Repository Statistics
Function
This API is used to query code commit record statistics of a repository by the repository short ID.
URI
POST /v1/repositories/{repository_id}/statistics
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
repository_id |
Yes |
Integer |
Explanation: Repository ID. Constraints: N/A Range: 1–2147483647 Default value: N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Explanation: User token. It can be obtained by calling the corresponding Obtaining a User Token. The value of X-Subject-Token in the response header is the user token. Constraints: N/A Range: 1–100,000 characters. Default value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
branch_name |
Yes |
String |
Explanation: Branch name. Constraints: N/A Range: 1–2,000 Default value: N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
Error object |
Explanation: Response error code. Range: N/A |
|
result |
RepoStatisticsLaunch object |
Explanation: Response result. Range: N/A |
|
status |
String |
Explanation: Response status. Range:
|
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Explanation: Error code. Range: Max. 100 characters in the error code format. |
|
message |
String |
Explanation: Error message. Range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
can_statistics |
Boolean |
Explanation: Whether the repository statistics can be collected. Range:
|
|
join_id |
String |
Explanation: Task ID for starting repository statistics collection. Range: N/A |
|
message |
String |
Explanation: Information returned after repository statistics collection is started. Range: N/A |
Example Requests
POST https://{endpoint}/v1/repositories/{repository_id}/statistics
{
"branch_name" : "master"
}
Example Responses
Status code: 200
OK
{
"result" : {
"can_statistics" : false,
"message" : "operation success",
"join_id" : "2a48a9fd140dd4efabcc6e07"
},
"status" : "success"
}
Status Code
|
Status Code |
Description |
|---|---|
|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot