Help Center/ CodeArts Build/ API Reference/ APIs/ Tenant Management/ Tracking Expiration Dates of a Package
Updated on 2025-08-21 GMT+08:00

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

Table 1 Request header 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.

Table 2 Request body parameters

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

Table 3 Response body parameters

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.

Table 4 CountdownList

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.

Table 5 tips

Parameter

Type

Description

summary

Tips object

Tip information.

Table 6 Tips

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

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 401

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 403

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 404

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 11 Response body parameters

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.