全部產品
Search
文件中心

AI Coding Assistant Lingma:擷取成員使用資料列表

更新時間:Sep 17, 2025

通過 OpenAPI 擷取使用過靈碼的開發人員資料。

適用版本

企業專屬版

服務存取點

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

授權資訊

產品

資源

要求的權限

通義靈碼

開發人員使用統計

唯讀

請求文法

GET https://{domain}/oapi/v1/lingma/organizations/{organizationId}/developerUsage

請求說明

查詢所有使用者使用資料

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/lingma/organizations/67d8e0b9120358055abf****/developerUsage?startTime=2024-02-01&endTime=2025-05-31' \
  -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/lingma/organizations/67d8e0b9120358055abf****/developerUsage?userId=3693e234****&startTime=2024-02-01&endTime=2025-05-31' \
  -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。您可前往組織管理背景基本資料頁面擷取

startTime string (必選)

開始時間,格式為 YYYY-MM-DD。

endTime string (必選)

結束時間,格式為 YYYY-MM-DD。

userId string (可選)

使用者識別碼。

使用者識別碼 與部門 ID 選擇一個即可。如果兩個參數同時傳值,會以使用者識別碼 過濾 ;如果同時不傳值,會查詢企業下所有使用者資料。

departmentId string (可選)

部門 ID。

使用者識別碼 與部門 ID 選擇一個即可。如果兩個參數同時傳值,會以使用者識別碼 過濾 ;如果同時不傳值,會查詢企業下所有使用者資料。

page integer (可選)預設值為1

當前頁。

perPage integer (可選)預設值為100

每頁資料條數。

返回參數

返回所有使用者使用資料

[
    {
        "breakdown": {
            "chatting": [
                {
                    "chatTurns": 1,
                    "chatTurnsAccepted": 1,
                    "chatType": "GENERATE_TESTCASE",
                    "ide": "jetbrains"
                }
            ],
            "coding": [
                {
                    "acceptAssistantNewlineCount": 0,
                    "language": "java",
                    "linesAccepted": 79,
                    "linesChanged": 79
                }
            ],
            "completion": [
                {
                    "countAccepted": 1,
                    "countSuggested": 1,
                    "ide": "jetbrains",
                    "language": "java",
                    "linesAccepted": 1,
                    "linesSuggested": 1
                }
            ]
        },
        "date": 1749484800000,
        "statusActive": true,
        "statusActiveChat": true,
        "statusActiveCompletion": true,
        "statusActiveLastedTime": 1749570900000,
        "totalChatTurns": 1,
        "totalChatTurnsAccepted": 1,
        "totalCountAcceptedCompletion": 1,
        "totalCountSuggestedCompletion": 1,
        "totalLinesAccepted": 79,
        "totalLinesAcceptedChat": 0,
        "totalLinesAcceptedCompletion": 1,
        "totalLinesChanged": 79,
        "totalLinesSuggestedCompletion": 1,
        "userId": "10107ac8-59af-4391-8df5-ea4472bb****"
    }
]

返回指定使用者使用資料

[
    {
        "breakdown": {
            "chatting": [
                {
                    "chatTurns": 1,
                    "chatTurnsAccepted": 1,
                    "chatType": "GENERATE_TESTCASE",
                    "ide": "jetbrains"
                }
            ],
            "coding": [
                {
                    "acceptAssistantNewlineCount": 0,
                    "language": "java",
                    "linesAccepted": 79,
                    "linesChanged": 79
                }
            ],
            "completion": [
                {
                    "countAccepted": 1,
                    "countSuggested": 1,
                    "ide": "jetbrains",
                    "language": "java",
                    "linesAccepted": 1,
                    "linesSuggested": 1
                }
            ]
        },
        "date": 1749484800000,
        "statusActive": true,
        "statusActiveChat": true,
        "statusActiveCompletion": true,
        "statusActiveLastedTime": 1749570900000,
        "totalChatTurns": 1,
        "totalChatTurnsAccepted": 1,
        "totalCountAcceptedCompletion": 1,
        "totalCountSuggestedCompletion": 1,
        "totalLinesAccepted": 79,
        "totalLinesAcceptedChat": 0,
        "totalLinesAcceptedCompletion": 1,
        "totalLinesChanged": 79,
        "totalLinesSuggestedCompletion": 1,
        "userId": "10107ac8-59af-4391-8df5-ea4472bb****"
    }
]

breakdown Object

詳細資料。

屬性

chatting array

問答詳細資料。

屬性

chatTurns integer

問答次數。

chatTurnsAccepted integer

問答採納次數。

chatTypestring

問答類型:

  • CODE_GENERATE_COMMENT:代碼注釋

  • GENERATE_TESTCASE:單元測試

  • EXPLAIN_CODE:代碼解釋

  • OPTIMIZE_CODE:代碼最佳化

  • FREE_INPUT:自由問答,非大寫字母串(自訂指令)

ide string

IDE 編輯器類型 JetBrains/VsCode 等。

coding array

代碼變更詳細資料,包括行間補全、問答產生匯總採納詳細資料。

屬性

language string

語言。

linesAccepted integer

代碼採納行數。

linesChanged integer

代碼變更行數。

acceptAssistantNewlineCountinteger

該使用者當天按問答和語言採納的明細程式碼數。

completion array

行間補全產生採納詳細資料。

屬性

countAccepted integer

採納次數。

countSuggested integer

推薦次數。

ide string

ide 編輯器類型 jetbrains/vscode 等。

language string

語言。

linesAccepted integer

代碼採納行數。

linesChangedinteger

代碼變更行數。

linesSuggestedinteger

代碼推薦展示行數。

date integer

日期。

statusActive boolean

該使用者是否活躍。

  • true:使用者活躍。

  • false:使用者不活躍。

statusActiveChat boolean

該使用者是否活躍在問答。

  • true:使用者活躍在問答。

  • false:使用者不活躍問答。

statusActiveCompletion boolean

該使用者是否活躍在代碼產生。

  • true:使用者活躍在代碼產生。

  • false:使用者不活躍在代碼產生。

statusActiveLastedTime string

該使用者當天最後的活躍時刻。

totalChatTurns integer

該使用者當天問答次數。

totalLinesAcceptedChat integer

該使用者當天按問答方式採納的代碼總行數。

totalLinesAccepted integer

該使用者當天採納程式碼數,包括ask,edit(原 AI 程式員),agent問答產生和行間補全的總採納行數。

totalLinesChanged integer

該使用者當天變更行數,包括ask,edit(原 AI 程式員),agent問答產生和行間補全的總變更行數。

totalLinesSuggestedCompletion integer

該使用者當天行間補全產生變更代碼總行數。

totalLinesAcceptedCompletion integer

該使用者當天行間補全產生代碼採納總行數。

totalCountSuggestedCompletion integer

該使用者當天行間補全產生代碼推薦總次數。

totalCountAcceptedCompletion  integer

該使用者當天行間補全產生代碼採納總次數。

totalChatTurnsAccepted integer

該使用者當天問答採納總次數。

userId 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 相關錯誤碼。