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
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition CodeArts project ID. For details about how to obtain the CodeArts project ID, see Obtaining 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
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. |
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 |
Definition Error message. Range N/A. |
result |
Array of ShowPackageSpecStatusList objects |
Definition A list of unit test reports. Range N/A. |
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. |
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
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 |
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