atlassian-cloud-rest-api

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Atlassian Cloud REST API Skill

Atlassian Cloud REST API Skill

Use this skill when you need Atlassian Cloud REST contract details from the local OpenAPI specs bundled into the generated skill.
当你需要从生成后的 skill 中内置的本地 OpenAPI 规范获取 Atlassian Cloud REST 契约详细信息时,请使用此 skill。

Available specs

可用规范

  • references/specs/assets-cloud-openapi.json
    - Assets Cloud REST API (/rest/assets/1.0/...)
  • references/specs/confluence-cloud-v1-openapi.json
    - Confluence Cloud REST API v1 (/wiki/rest/api/...)
  • references/specs/confluence-cloud-v2-openapi.json
    - Confluence Cloud REST API v2 (/wiki/api/v2/...)
  • references/specs/jira-cloud-platform-v3-openapi.json
    - Jira Cloud platform REST API v3 (/rest/api/3/...)
  • references/specs/jira-service-management-cloud-openapi.json
    - Jira Service Management Cloud REST API (/rest/servicedeskapi/...)
  • references/specs/jira-software-cloud-openapi.json
    - Jira Software Cloud REST API (/rest/agile/1.0/...)
See
references/SPECS.md
for the quick map.
  • references/specs/assets-cloud-openapi.json
    - Assets Cloud REST API(/rest/assets/1.0/...)
  • references/specs/confluence-cloud-v1-openapi.json
    - Confluence Cloud REST API v1(/wiki/rest/api/...)
  • references/specs/confluence-cloud-v2-openapi.json
    - Confluence Cloud REST API v2(/wiki/api/v2/...)
  • references/specs/jira-cloud-platform-v3-openapi.json
    - Jira Cloud platform REST API v3(/rest/api/3/...)
  • references/specs/jira-service-management-cloud-openapi.json
    - Jira Service Management Cloud REST API(/rest/servicedeskapi/...)
  • references/specs/jira-software-cloud-openapi.json
    - Jira Software Cloud REST API(/rest/agile/1.0/...)
有关快速映射,请参阅
references/SPECS.md
。

Workflow

工作流

  1. Load this skill before answering Atlassian Cloud REST API questions.
  2. Resolve the operations you need in one call with
    assets/operation.jq
    (below). Use
    references/SPECS.md
    ,
    rg
    , and
    jq
    only for what it does not answer.
  3. Use a subagent only for bounded discovery across a large search space. Ask it for concise findings, spec file paths, HTTP methods, operation paths, schema/component names, and jq selectors or line ranges, not full spec fragments.
  4. The parent agent performs any final focused reads and
    $ref
    resolution needed for accuracy.
  5. Read only the smallest matching fragments needed for the answer.
  6. Cite the skill file path, HTTP method, operation path, and resolved schema/component names in the final answer.
  1. 在回答 Atlassian Cloud REST API 问题之前加载此 skill。
  2. 使用下方的
    assets/operation.jq
    ,通过一次调用解析所需操作。仅将其无法回答的内容交给
    references/SPECS.md
    、
    rg
    和
    jq
    处理。
  3. 仅在大型搜索空间中进行范围明确的发现任务时使用 subagent。要求其提供简洁的查找结果、规范文件路径、HTTP 方法、操作路径、Schema/组件名称以及 jq 选择器或行号范围,不要返回完整的规范片段。
  4. 父 Agent 执行最终的有针对性读取,并完成保证准确性所需的
    $ref
    解析。
  5. 仅读取回答问题所需的最小匹配片段。
  6. 在最终回答中引用 skill 文件路径、HTTP 方法、操作路径以及解析后的 Schema/组件名称。

CLI guidance

CLI 使用指南

  • Resolve operations,
    ;
    -separated, with parameters, request body and success responses fully dereferenced and read-only request properties dropped:
    jq -c --arg ops 'POST /rest/api/3/version;GET /rest/api/3/project/{projectIdOrKey}/versions' -f assets/operation.jq references/specs/jira-cloud-platform-v3-openapi.json
  • Find operations by path or summary:
    jq -r --arg search 'version' -f assets/operation.jq references/specs/jira-cloud-platform-v3-openapi.json
  • List specs:
    ls references/specs
  • Find candidate paths or component names:
    rg -n '"/rest/api/3/issue"|IssueBean|CreateIssue' references/specs/*.json
  • Inspect an operation:
    jq '.paths["/rest/api/3/issue"].post' references/specs/jira-cloud-platform-v3-openapi.json
  • Inspect a component:
    jq '.components.schemas.IssueBean' references/specs/jira-cloud-platform-v3-openapi.json
  • Inspect a Confluence operation:
    jq '.paths["/pages"].post' references/specs/confluence-cloud-v2-openapi.json
  • 解析多个以
    ;
    分隔的操作,并完全解引用参数、请求体和成功响应,同时删除只读请求属性:
    jq -c --arg ops 'POST /rest/api/3/version;GET /rest/api/3/project/{projectIdOrKey}/versions' -f assets/operation.jq references/specs/jira-cloud-platform-v3-openapi.json
  • 按路径或摘要查找操作:
    jq -r --arg search 'version' -f assets/operation.jq references/specs/jira-cloud-platform-v3-openapi.json
  • 列出规范:
    ls references/specs
  • 查找候选路径或组件名称:
    rg -n '"/rest/api/3/issue"|IssueBean|CreateIssue' references/specs/*.json
  • 检查操作:
    jq '.paths["/rest/api/3/issue"].post' references/specs/jira-cloud-platform-v3-openapi.json
  • 检查组件:
    jq '.components.schemas.IssueBean' references/specs/jira-cloud-platform-v3-openapi.json
  • 检查 Confluence 操作:
    jq '.paths["/pages"].post' references/specs/confluence-cloud-v2-openapi.json

Ref resolution

Ref 解析

When generating code or summarizing request/response contracts, do not stop at a raw
$ref
.
assets/operation.jq
does all of this; resolve by hand only what it cuts short (it marks truncated depth with
…
).
  1. Resolve both path-level and operation-level
    parameters
    .
  2. Resolve
    requestBody
    references into
    components.requestBodies
    , then resolve nested schema refs into
    components.schemas
    .
  3. Resolve response entries in
    responses
    , including referenced response objects, headers, and nested schema refs.
  4. Continue resolving until the effective request/response shape is expanded enough to identify required fields, enums, formats, and nested objects needed for the task.
  5. Account for
    allOf
    ,
    oneOf
    ,
    anyOf
    , and array
    items
    while resolving.
If a referenced schema is large, resolve only the fields needed for the current code generation task.
在生成代码或总结请求/响应契约时,不要停留在原始
$ref
上。
assets/operation.jq
会完成所有这些工作;仅手动解析其无法完整处理的部分(它会用
…
标记被截断的深度)。
  1. 同时解析路径级和操作级的
    parameters
    。
  2. 将
    requestBody
    引用解析到
    components.requestBodies
    ,然后将嵌套的 Schema 引用解析到
    components.schemas
    。
  3. 解析
    responses
    中的响应条目,包括被引用的响应对象、Headers 和嵌套 Schema 引用。
  4. 持续解析,直到有效请求/响应结构被充分展开,能够识别当前任务所需的必填字段、枚举、格式和嵌套对象。
  5. 解析时需考虑
    allOf
    、
    oneOf
    、
    anyOf
    和数组
    items
    。
如果引用的 Schema 很大,仅解析当前代码生成任务所需的字段。

Resource map

资源映射

  • references/SPECS.md
    - human-readable spec index.
  • references/specs/*.json
    - raw OpenAPI specs bundled with the skill.
  • assets/specs.json
    - machine-readable spec manifest.
  • assets/operation.jq
    - operation resolver and search.
  • references/SPECS.md
    - 便于人工阅读的规范索引。
  • references/specs/*.json
    - skill 中内置的原始 OpenAPI 规范。
  • assets/specs.json
    - 机器可读的规范清单。
  • assets/operation.jq
    - 操作解析与搜索工具。

Notes

注意事项

  • Prefer these bundled local OpenAPI specs over memory or web lookups for Atlassian Cloud REST contracts.
  • Do not ask subagents to return full spec sections or large excerpts; the parent agent should perform any final focused reads directly.
  • Use
    scriptrunner-documentation
    separately for ScriptRunner behavior; use this skill for Atlassian REST details.
  • 对于 Atlassian Cloud REST 契约,优先使用这些内置的本地 OpenAPI 规范,而不是依赖记忆或网络查询。
  • 不要要求 subagent 返回完整的规范章节或大段摘录;父 Agent 应直接执行最终的有针对性读取。
  • ScriptRunner 的行为请单独使用
    scriptrunner-documentation
    ;Atlassian REST 详细信息请使用此 skill。