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] (CloudDeploy_api_0014.xml). 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 |
Parameter description: Success rate. Value range: N/A |
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 |
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 Codes
Status Code |
Description |
---|---|
200 |
OK: The request is successful. |
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.