Tracking Expiration Dates of a Package
Function
This API is used to obtain expiration details of a package.
Calling Method
For details, see Calling APIs.
URI
POST /v2/resource/countdown
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token. (The value of the X-Subject-Token response header is the user token.) It is obtained by calling the IAM API. For details, see Obtaining an IAM User Token. Constraints Global tenant tokens are not supported. Use a region-level token whose scope is project. Range N/A. Default Value N/A. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
service_type |
Yes |
String |
Definition Service type. Constraints N/A. Range N/A. Default Value N/A. |
|
resource_id |
Yes |
String |
Definition Resource ID. Constraints N/A. Range N/A. Default Value N/A. |
|
reminder_day |
Yes |
String |
Definition Reminder date. Constraints N/A. Range N/A. Default Value N/A. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
status |
String |
Definition API response status. Range ● success: The API call is successful. ● fail: The API call failed. |
|
error |
Object |
Error. |
|
result |
Array of CountdownList objects |
Unit test reports. |
|
Parameter |
Type |
Description |
|---|---|---|
|
service_type |
String |
Service type. |
|
resource_id |
String |
Resource ID. |
|
resource_name |
String |
Resource name. |
|
resource_type |
String |
Resource type. |
|
resource_spec_code |
String |
Resource specification. |
|
tips |
tips object |
Tips for consultation. |
|
Parameter |
Type |
Description |
|---|---|---|
|
status |
Integer |
Status. |
|
next_action |
Integer |
Next active day. |
|
next_action_remain_day |
Integer |
The time left in the upcoming active day. |
|
next_action_url |
String |
Name. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Requests
POST https://{endpoint}/v2/resource/countdown
{
"service_type" : "x86-64",
"resource_id" : "a287e712be6c404ca26e5f69040fa12b",
"reminder_day" : "jobName"
}
Example Responses
Status code: 200
OK
{
"status" : "success",
"error" : null,
"result" : [ {
"service_type" : null,
"resource_id" : "cf5d89cf3c6c4c53a1e92897ccc88012",
"resource_name" : "CodeArts Build Parallel (X86, 2U8G)",
"resource_type" : "hws.resource.type.dev.codeci",
"resource_spec_code" : "devcloud.cloudbuild.cbhost.x86.2u8g",
"tips" : {
"summary" : {
"status" : 2,
"next_action" : 0,
"next_action_remain_day" : 18,
"next_action_url" : "https://account.huawei.com/usercenter/"
}
}
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not Found |
|
500 |
Internal Server Error |
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