全部產品
Search
文件中心

Qoder CN 系列:列出 Skills

更新時間:Jul 15, 2026

擷取當前賬戶下所有 Skill 的列表,支援分頁。

GET /api/v1/cloud/skills

擷取當前賬戶下所有 Skill 的列表,支援分頁。

要求標頭

頭部

必選

說明

Authorization

Bearer <PAT>

查詢參數

參數

類型

必選

說明

limit

integer

每頁返回數量上限。預設 20,範圍 1-100。超過 100 返回 400 invalid_request_error

page

string

Claude 風格的向後翻頁遊標,等價於 after_id;與 before_idafter_id 互斥

after_id

string

遊標分頁:返回此 ID 之後的記錄。與 pagebefore_id 互斥

before_id

string

遊標分頁:返回此 ID 之前的記錄。與 pageafter_id 互斥

name

string

按 Skill 名稱首碼搜尋,不區分大小寫

source

string

按來源過濾,可選值:customqoder

完整分頁規範詳見 分頁。

樣本請求

# 擷取所有 Skill
curl -X GET "https://api.qoder.com.cn/api/v1/cloud/skills" \
  -H "Authorization: Bearer $QODER_PAT"

# 分頁擷取
curl -X GET "https://api.qoder.com.cn/api/v1/cloud/skills?limit=10" \
  -H "Authorization: Bearer $QODER_PAT"

# 使用遊標翻頁
curl -X GET "https://api.qoder.com.cn/api/v1/cloud/skills?limit=10&page=skill_019e3bba474b73cfaf19eae9b5f5e66d" \
  -H "Authorization: Bearer $QODER_PAT"

樣本響應

HTTP 200 OK

{
  "data": [
    {
      "id": "skill_019e3bba474b73cfaf19eae9b5f5e66d",
      "type": "skill",
      "display_title": "test-skill-api-doc",
      "description": "A test skill for API documentation",
      "source": "custom",
      "latest_version": "1",
      "metadata": {
        "team": "docs"
      },
      "created_at": "2026-05-18T15:35:24.248164Z",
      "updated_at": "2026-05-18T15:35:24.248164Z"
    }
  ],
  "next_page": null,
  "first_id": "skill_019e3bba474b73cfaf19eae9b5f5e66d",
  "last_id": "skill_019e3bba474b73cfaf19eae9b5f5e66d",
  "has_more": false
}

空列表響應:

{
  "data": [],
  "next_page": null,
  "first_id": null,
  "last_id": null,
  "has_more": false
}

響應欄位

欄位

類型

說明

data

array

Skill 對象數組;列表響應不包含 content

next_page

string | null

下一頁向後遊標;has_moretrue 時傳給 page

first_id

string | null

當前頁第一條記錄 ID

last_id

string | null

當前頁最後一條記錄 ID

has_more

boolean

是否還有更多記錄(true 時使用 next_page 作為下一頁的 page 值)

錯誤碼

HTTP

type

觸發條件

400

invalid_request_error

limitsource 非法,或同時傳入多個 pagebefore_idafter_id

401

authentication_error

缺少或無效的認證令牌

完整錯誤信封說明詳見 錯誤參考