Retrieve department usage data
Retrieves department-level usage data for Qoder CN via OpenAPI.
The new Qoder CN documentation site is now available. Content on this site may not reflect the latest product features and changes. Visit docs.qoder.cn for the latest product documentation.
|
Supported editions |
Enterprise Dedicated Edition, Enterprise Standard Edition |
Service endpoints
Get the service endpoint and replace {domain} in the API request syntax with your endpoint.
Authorization
|
Product |
Resource |
Required permission |
|
Qoder CN |
Department usage statistics |
read-only |
Request syntax
GET https://{domain}/oapi/v1/lingma/organizations/{organizationId}/departmentUsage
Request details |
Enterprise standard editionQuery department usage data
Enterprise dedicated editionQuery department usage data
|
Request header |
|
|
x-yunxiao-token Your personal access token. For details on how to get this token, see Personal access tokens. Example: pt-0fh3****0fbG_35af****0484. |
|
Request parameters |
|
|
organizationId The ID of your organization. Go to the Basic Information page in the Organization Management console to obtain the organization ID. |
|
|
departmentId The department ID. To get this ID, see List departments in an organization. |
|
|
startTime The start date of the query range, in YYYY-MM-DD format. |
|
|
endTime The end date of the query range, in YYYY-MM-DD format. |
|
|
page The page number to return. |
|
|
perPage The maximum number of entries to return on each page. Valid values: |
Response parameters |
Response example
|
|
activeDeveloper The number of active developers. |
|
|
activeDeveloperChat The number of active developers who used the chat feature. |
|
|
activeDeveloperCompletion The number of active developers who used code completion. |
|
|
breakdown The detailed usage data. |
|
|
date The date of the statistics, represented as a Unix timestamp in milliseconds. |
|
|
departmentId The department ID. |
|
|
totalChatTurns The total number of chat turns for the department on the specified day. |
|
|
totalChatTurnsAccepted The total number of accepted chat turns for the department on the specified day. |
|
|
totalCountAcceptedCompletion The total number of accepted code completion suggestions for the department on the specified day. |
|
|
totalCountSuggestedCompletion The total number of code completion suggestions for the department on the specified day. |
|
|
totalLinesAccepted The total number of accepted lines of code for the department on the specified day. This includes code from all features, such as chat and code completion. |
|
|
totalLinesAcceptedChat The total number of accepted lines of code generated by chat features for the department on the specified day. |
|
|
totalLinesAcceptedCompletion The total number of accepted lines of code from code completion for the department on the specified day. |
|
|
totalLinesChanged The total number of changed lines of code for the department on the specified day. This includes changes from all features, such as chat and code completion. |
|
|
totalLinesSuggestedCompletion The total number of suggested lines of code from code completion for the department on the specified day. |
Response headers
|
Parameter |
Description |
Example value |
|
|
The next page |
2 |
|
|
The current page |
1 |
|
|
The number of entries per page |
100 |
|
|
The previous page |
0 |
|
|
The request ID |
37294673-00CA-5B8B-914F-A8B35511E90A |
|
|
The total number of entries |
10 |
|
|
The total number of pages |
1 |
Error codes
For more information, see Error code center.
References
If you have questions about this API, see OpenAPI-related issues.