Help Center/ CodeArts Build/ API Reference/ APIs/ Tenant Management/ Obtaining the Package Resource ID for Expiration Reminder and Alert
Updated on 2025-12-09 GMT+08:00

Obtaining the Package Resource ID for Expiration Reminder and Alert

Function

This API is used to obtain the package resource ID for expiration reminder and alert.

Calling Method

For details, see Calling APIs.

URI

GET /v2/resource/package-spec/status

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

CodeArts project ID. For details, seeObtaining a CodeArts Project ID.

Constraints

N/A.

Range

Use a 32-character string that includes digits and lowercase letters.

Default Value

N/A.

status

Yes

String

Definition

Status.

Constraints

N/A.

Range

N/A.

Default Value

N/A.

Request Parameters

Table 2 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 can be obtained by calling the IAM service API. For details, seeObtaining 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.

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

Definition

Error message.

Range

N/A.

result

Array of ShowPackageSpecStatusList objects

Definition

A list of unit test reports.

Range

N/A.

Table 4 ShowPackageSpecStatusList

Parameter

Type

Description

resource_id

String

Definition

Resource ID.

Range

N/A.

region_id

String

Definition

Region information.

Range

N/A.

tenant_id

String

Definition

Tenant ID.

Range

N/A.

tenant_name

String

Definition

Tenant name.

Range

N/A.

console_update_time

String

Definition

Update time of the console.

Range

N/A.

service_type

String

Definition

Service type.

Range

N/A.

resource_type

String

Definition

Resource type.

Range

N/A.

spec_code

String

Definition

Resource specification.

Range

N/A.

resource_status

String

Definition

Resource status.

Range

N/A.

create_time

String

Definition

Creation time.

Range

N/A.

update_time

String

Definition

Update time.

Range

N/A.

Example Requests

GET https://{endpoint}/v2/resource/package-spec/status

Example Responses

Status code: 200

OK

{
  "status" : "success",
  "error" : null,
  "result" : [ {
    "resource_id" : "cf5d89cf3c6c4c53a1e92897ccc88012",
    "region_id" : {
      "region" : null
    },
    "tenant_id" : "60021bab32fd450aa2cb89226f425e06",
    "tenant_name" : "testUser",
    "console_update_time" : "2024-08-27T07:08:16.000Z",
    "service_type" : "hws.service.type.devcloud",
    "resource_type" : "hws.resource.type.dev.codeci",
    "spec_code" : "devcloud.cloudbuild.cbhost.x86.2u8g",
    "resource_status" : "normal",
    "create_time" : "2024-08-27T07:08:17.000Z",
    "update_time" : "2024-08-27T07:08:17.000Z"
  } ]
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.