全部產品
Search
文件中心

AI Coding Assistant Lingma:查詢組織部門列表

更新時間:Jul 01, 2025

通過 OpenAPI 查詢組織部門列表。

適用版本

企業專屬版

服務存取點

擷取服務存取點,替換 API 請求文法中的 {domain}

授權資訊

產品

資源

要求的權限

組織管理

組織部門

唯讀

請求文法

GET https://{domain}/oapi/v1/platform/organizations/{organizationId}/departments

請求說明

查詢組織部門列表

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/organizations/9a2b****5ef1/departments' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

查詢某部門下的所有子部門列表

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/organizations/9a2b****5ef1/departments?parentId=99d1****71d4&page=1&perPage=100' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

要求標頭(Headers)

x-yunxiao-token string (必選)

個人存取權杖。您可參考個人存取權杖擷取。

樣本:pt-0fh3****0fbG_35af****0484。

請求參數

organizationId string (必選)

組織 ID。您可前往組織管理背景基本資料頁面擷取組織ID(organizationId)

parentIdstring(可選)

父部門 ID。

page integer(可選)預設值為1

當前頁。

perPage integer(可選)預設為100

每頁資料條數,取值範圍:[1,100]

返回參數

返回樣本

[
    {
        "creatorId": "99d1****6124",
        "hasSub": true,
        "id": "99d1****6124",
        "name": "樣本",
        "organizationId": "99d1****6124",
        "parentId": "99d1****6124"
    }
]

creatorId string

建立人 ID。

hasSub boolean

是否有子部門。

idstring

部門 ID。

name string

部門名稱。

organizationIdstring

組織 ID。

parentIdstring

父部門 ID。

回應標頭

參數

描述

樣本值

x-next-page

下一頁。

1

x-page

當前頁。

2

x-per-page

每頁資料條數。

1

x-prev-page

上一頁。

2

x-total

總資料量。

1

x-total-pages

總分頁數。

10

錯誤碼

訪問錯誤碼中心查看 API 相關錯誤碼。