Obtaining the Application Deployment Success Rate in a Specified Project
Function
This API is used to obtain the application deployment success rate in a specified project.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/metrics/success-rate
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Parameter description: Project ID. For details, see Obtaining a Project ID. Constraints: N/A Value range: The value consists of 32 characters. Only letters and digits are allowed. Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
start_date |
Yes |
String |
Parameter description: Left boundary (included) of the application deployment start time range. The value format is yyyy-MM-dd. For example, 2022-01-01. Constraints: This parameter is used together with end_date. The value of end_date must be later than or equal to the value of start_date. The maximum time range is one year. Value range: N/A Default value: N/A |
|
end_date |
Yes |
String |
Parameter description: Right boundary (included) of the application deployment start time range. The value format is yyyy-MM-dd. For example, 2022-10-26. Constraints: This parameter is used together with start_date. The value of end_date must be later than or equal to the value of start_date. The maximum time range is one year. Value range: N/A Default value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
success_rate |
String |
Definition: Success rate (%). Value range: 0–100. |
|
project_id |
String |
Parameter description: Project ID. Value range: The value consists of 32 characters. Letters and digits are allowed. |
|
project_name |
String |
Parameter description: Project name. Value range: The value consists of 3 to 128 characters. |
|
start_date |
String |
Parameter description: Left boundary (included) of the application deployment start time range. The value format is yyyy-MM-dd. For example, 2022-10-26. Value range: N/A |
|
end_date |
String |
Parameter description: Right boundary (included) of the application deployment start time range. The value format is yyyy-MM-dd. For example, 2022-10-26. Value range: N/A |
|
task_count |
Integer |
Parameter description: Number of queried applications. Value range: N/A |
|
record_count |
Integer |
Parameter description: Number of queried application deployment records. Value range: N/A |
|
success_record_count |
Integer |
Parameter description: Number of successful application deployment records. Value range: N/A |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code |
|
error_msg |
String |
Error description |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code |
|
error_msg |
String |
Error description |
Example Requests
This API is used to obtain the deployment success rate of the target application in a specified period.
https://{endpoint}/v2/89931e210b214b5892ea833712f0f5e0/metrics/success-rate?start_date=2022-01-01&end_date=2022-10-26
Example Responses
Status code: 200
OK: The request is successful.
{
"success_rate" : "34.09",
"project_id" : "89931e210b214b5892ea833712f0f5e0",
"project_name" : "Happy",
"start_date" : "2022-01-01",
"end_date" : "2022-10-26",
"task_count" : 8,
"record_count" : 44,
"success_record_count" : 15
}
Status code: 400
Bad Request
{
"error_code" : "Deploy.00015002",
"error_msg" : "Invalid request parameter."
}
Status code: 403
Forbidden
{
"error_code" : "Deploy.00011154",
"error_msg" : "You do not have permissions to perform this operation."
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK: The request is successful. |
|
400 |
Bad Request |
|
403 |
Forbidden |
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