All Products
Search
Document Center

AI Coding Assistant Lingma:Get member usage data list

Last Updated:Sep 17, 2025

Retrieve developer data for users of Lingma via OpenAPI.

Supported editions

Enterprise Dedicated Edition

Service endpoints

Get the service endpoint and replace {domain} in the API request syntax with your endpoint.

Authorization information

Product

Resource

Required permission

Tongyi Lingma

Developer usage statistics

Read-only

Request syntax

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

Request description

Query usage data for all users

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'

Query usage data for a specific user

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'

Request headers

x-yunxiao-token string (Required)

The access token. See Access token for details.

Example: pt-0fh3****0fbG_35af****0484.

Request parameters

organizationId string (Required)

The organization ID. You can obtain the ID from the basic information page in the Organization Management console.

startTime string (Required)

The start time. The format is YYYY-MM-DD.

endTime string (Required)

The end time. The format is YYYY-MM-DD.

userId string (Optional)

The user ID.

You can specify either the user ID or the department ID. If you specify both parameters, the system uses the user ID for filtering. If you do not specify either parameter, the system queries data for all users in the organization.

departmentId string (Optional)

The department ID.

You can specify either the user ID or the department ID. If you specify both parameters, the system uses the user ID for filtering. If you do not specify either parameter, the system queries data for all users in the organization.

page integer (Optional) Default value: 1

The current page number.

perPage integer (Optional) Default value: 100

The number of data entries per page.

Response parameters

Response for all user usage data

[
    {
        "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****"
    }
]

Response for specific user usage data

[
    {
        "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

The detailed data.

Properties

chatting array

Detailed data for Q&A pairs.

Properties

chatTurns integer

The number of Q&A pairs.

chatTurnsAccepted integer

The number of accepted Q&A pairs.

chatTypestring

The type of Q&A pair:

  • CODE_GENERATE_COMMENT: Generates code comments.

  • GENERATE_TESTCASE: Generates unit tests.

  • EXPLAIN_CODE: Explains code.

  • OPTIMIZE_CODE: Refactors and improves code.

  • FREE_INPUT: Free-form Q&A. This is a non-uppercase string for a custom instruction.

ide string

The IDE type, such as JetBrains or VS Code.

coding array

Detailed data for code changes, including accepted code from inline completions and Q&A generations.

Properties

language string

Language

linesAccepted integer

The number of accepted lines of code.

linesChanged integer

The number of changed lines of code.

acceptAssistantNewlineCountinteger

The number of lines of code accepted from the assistant on a specific day, categorized by Q&A pair and language.

completion array

Detailed data for accepted inline completions.

Properties

countAccepted integer

The number of acceptances.

countSuggested integer

The number of suggestions.

ide string

The IDE type, such as JetBrains or VS Code.

language string

Language.

linesAccepted integer

The number of accepted lines of code.

linesChangedinteger

The number of changed lines of code.

linesSuggestedinteger

The number of suggested lines of code.

date integer

The date.

statusActive boolean

Indicates whether the user is active.

  • true: The user is active.

  • false: The user is inactive.

statusActiveChat boolean

Indicates whether the user is active in Q&A.

  • true: The user is active in Q&A.

  • false: The user is inactive in Q&A.

statusActiveCompletion boolean

Indicates whether the user is active in code generation.

  • true: The user is active in code generation.

  • false: The user is inactive in code generation.

statusActiveLastedTime string

The last time the user was active.

totalChatTurns integer

The total number of Q&A pairs for the user.

totalLinesAcceptedChat integer

The total number of lines of code that the user accepted from Q&A.

totalLinesAccepted integer

The total number of lines of code that the user accepted. This includes lines from ask, edit (formerly AI Programmer), agent Q&A generation, and inline completions.

totalLinesChanged integer

The total number of lines of code that the user changed. This includes lines from ask, edit (formerly AI Programmer), agent Q&A generation, and inline completions.

totalLinesSuggestedCompletion integer

The total number of lines of code suggested by inline completions for the user.

totalLinesAcceptedCompletion integer

The total number of lines of code from inline completions that the user accepted.

totalCountSuggestedCompletion integer

The total number of suggestions from inline completions for the user.

totalCountAcceptedCompletion integer

The total number of suggestions from inline completions that the user accepted.

totalChatTurnsAccepted integer

The total number of Q&A pairs that the user accepted.

userId string

The user ID.

Response headers

Parameter

Description

Example value

x-next-page

The next page

2

x-page

The current page

1

x-per-page

The number of entries per page

100

x-prev-page

The previous page

0

x-request-id

The request ID

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

x-total

The total number of entries

10

x-total-pages

The total number of pages

1

Error codes

For more information, see Error codes.