全部產品
Search
文件中心

AI Coding Assistant Lingma:ListUsers - 查詢使用者列表

更新時間:Jul 01, 2025

通過 OpenAPI 查詢使用者列表。

適用版本

企業專屬版

服務存取點

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

授權資訊

產品

資源

要求的權限

組織管理

使用者

唯讀

請求文法

GET https://{domain}/oapi/v1/platform/users?filter={filter}&status={status}&deptId={deptId}&page={page}&perPage={perPage}

請求說明

查詢正常使用者資訊

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/users' \
  -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/users?status=deleted' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

要求標頭(Headers)

x-yunxiao-token string (必選)

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

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

請求參數

filter string (可選)

查詢資訊,支援使用者名稱、登入名稱、郵箱、手機號等資訊的模糊搜尋。

status string (可選)

使用者狀態。

  • enabled:正常使用者。

  • deleted:已刪除使用者。

deptId string (可選)

所屬部門。

page integer (可選)預設值為1

當前頁。

perPage integer (可選)預設值為100

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

返回參數

返回正常使用者資訊

[
    {
        "id": "c75d6f21-2af7-4d8e-b0fb-bac25128****",
        "username": "tmp_test2",
        "name": "臨時測試帳號2",
        "sysDeptIds": [
            "9e415b19-10bc-4bb6-a34f-2045a59a****"
        ],
        "lastOrganization": "3deba052-8501-4f30-a52d-3e9b1ca8****",
        "createdAt": "2025-06-10T06:45:29Z"
    },
    {
        "id": "85c7aa62-8da7-4f2d-8c99-4b90a253****",
        "username": "tmp_test1",
        "name": "臨時測試帳號1",
        "sysDeptIds": [
            "9e415b19-10bc-4bb6-a34f-2045a59a****"
        ],
        "createdAt": "2025-06-10T06:44:57Z"
    }
]

返回已刪除使用者資訊

[
    {
        "id": "3d4caf00-0004-4a07-9cb7-18c9559d****",
        "username": "doc-test4",
        "name": "文檔測試使用者4",
        "nickName": "暱稱4",
        "email": "doc-test4@example.com",
        "staffId": "1004",
        "sysDeptIds": [
            "ebeb5a64-c98c-478a-9d9d-513841da****"
        ],
        "createdAt": "2025-06-13T05:41:53Z",
        "deletedAt": "2025-06-13T06:36:43Z"
    }
]

id string

使用者識別碼。

username string

登入帳號名。

name string

顯示名稱。

nickName string

暱稱。

email string

郵箱。

lastOrganization string

上次登入組織。

staffId string

工號。

sysDeptIds array[string]

所屬部門。

createdAt string

建立時間。

deletedAt string

刪除時間。

只有已刪除使用者才會顯示此參數。

回應標頭

參數

描述

樣本值

x-next-page

下一頁

2

x-page

當前頁

1

x-per-page

每頁大小

100

x-prev-page

前一頁

0

x-request-id

請求 ID

37294673-00CA-5B8B-914F-A8B35511E90A

x-total

總數

10

x-total-pages

總分頁數

1

錯誤碼

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