すべてのプロダクト
Search
ドキュメントセンター

AI Coding Assistant Lingma:ListDepartments

最終更新日:Jul 03, 2025

この API を呼び出して、組織部門のリストをクエリします。

サポートされているエディション

Enterprise Dedicated Edition

サービスエンドポイント

サービスエンドポイントを取得し、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) を取得できます。

parentId string (オプション)

親部門 ID。

page integer (オプション) デフォルト値: 1

現在のページ。

perPage integer (オプション) デフォルト値: 100

1 ページあたりのエントリ数。 有効な値: [1, 100]

レスポンスパラメーター

サンプル レスポンス

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

creatorId string

作成者 ID。

hasSub boolean

部門にサブ部門があるかどうかを示します。

id string

部門 ID。

name string

部門名。

organizationId string

組織 ID。

parentId string

親部門 ID。

レスポンスヘッダー

パラメーター

説明

サンプル値

x-next-page

次のページ。

1

x-page

現在のページ。

2

x-per-page

1 ページあたりのエントリ数。

1

x-prev-page

前のページ。

2

x-total

エントリの総数。

1

x-total-pages

ページの総数。

10

エラーコード

詳細については、「エラーコード」をご参照ください。