Querying the Package Status Under a Tenant Account
Function
This API is used to query the package subscription status of the tenant to which the project belongs based on the project ID. The main package details, purchased extension packages, and supported rule set languages are returned.
Calling Method
For details, see Calling APIs.
Authorization Information
No identity policy-based permission required for calling this API.
URI
GET /v4/tenant/tenant-package-status
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
No |
String |
Definition : 32-character project UUID. Obtain it by calling the API used to query the project list. Constraints: N/A Value range: 32 characters. Default value: N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition : User token. Obtain one by calling the IAM API Obtaining a User Token. The value of X-Subject-Token in the response header is a token. Constraints: N/A Value range: 1–100,000 characters. Default value: N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
result |
TenantPackageStatus object |
Definition: Response of querying the package status (old and new versions included) under a tenant account. Range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
duration |
Integer |
Definition: Check duration of the current package. Range: For the free package, the execution duration of the current month is queried. For other packages, -1 is returned. |
|
charge_type |
String |
Definition: Charging type. Range: N/A |
|
supportedLanguage |
Array of strings |
Definition: Supported languages. Range: Programming language. |
|
securityPackageOpenStatus |
Boolean |
Definition: Whether the security enhanced package is enabled. Value range: |
|
tenantId |
String |
Definition: Tenant ID. Value range: 32 characters. |
|
main_resource_list |
Array of Main_resource objects |
Definition: Primary resources. Range: N/A |
|
type |
String |
Definition: Package type. Range: charge_type: queries the tenant type (used in the new version of yearly/monthly packages). popup: queries whether to display a dialog box (deprecated for new yearly/monthly packages). |
|
concurrencyPackageOpenStatus |
Boolean |
Definition: Whether the concurrent package function is enabled. Range: true: enabled. false: disabled. |
|
other_resource_list |
Array of Other_resource objects |
Definition: Other resource list. Range: N/A |
|
tips |
Tips object |
Definition: Time left before the current tenant's main resource package expires. Range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
chargeType |
Integer |
Definition: Charging mode. Value range: |
|
resourceSpecCode |
String |
Definition: Resource code. Range: N/A |
|
resourceType |
String |
Definition: Resource type. Range: N/A |
|
serviceType |
String |
Definition: Service type. Range: N/A |
|
status |
String |
Definition: Resource status. Range: normal: normal. freeze: frozen. close: invalid. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition: Resource ID. Value range: N/A |
|
tenantId |
String |
Definition: Tenant ID. Value range: 32 characters. |
|
region |
String |
Definition: Logical zone. Range: N/A |
|
createTime |
String |
Definition: Creation time. Range: N/A |
|
updateTime |
String |
Definition: Update time. Range: N/A |
|
specCode |
String |
Definition: Resource code. Range: N/A |
|
resourceType |
String |
Definition: Resource type. Range: N/A |
|
serviceType |
String |
Definition: Service type. Range: N/A |
|
resourceId |
String |
Definition: Resource ID. Value range: N/A |
|
resourceStatus |
String |
Definition: Resource status. Value range: |
|
amount |
String |
Definition: Quantity. Range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
next_action_url |
String |
Definition: Link of the next operation. Range: N/A |
|
next_action |
Integer |
Definition: Processing policy of the next operation. Value range: 0: The resource enters the grace period upon expiration. This value applies to the 'effective' state. 1: Yearly/monthly to pay-per-use 2: Automatically deleted upon expiration. This value applies to the 'effective' state. 4: Frozen. This value applies to the 'grace period' state. 5: Deleted. This value applies to 'in retention' state. |
|
next_action_remain_day |
Integer |
Definition: Remaining days from the current status to the next operation. Range: N/A |
|
status |
Integer |
Definition: Current status of resources. Value range: 1: invalid (being enabled) 2: in effect. 3: deleted. 4: in retention period. 5: in grace period. 99: frozen (for security reasons). |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition: Error code. Value range: N/A |
|
error_msg |
String |
Definition: Error message. Value range: N/A |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition: Error code. Value range: N/A |
|
error_msg |
String |
Definition: Error message. Value range: N/A |
Example Requests
This API is used to query the package status under a tenant account.
GET https://{endpoint}/v4/tenant/tenant-package-status&project_id=&
Example Responses
Status code: 200
Request succeeded!
{
"result" : {
"duration" : -1,
"charge_type" : "effective_business_service",
"supportedLanguages" : [ "ARKTS", "C#", "CANGJIE", "C++", "CSS", "GO", "HTML", "JAVA", "JAVASCRIPT", "KOTLIN", "LUA", "PHP", "PYTHON", "RUST", "SCALA", "SHELL", "SQL", "TERRAFORM", "TYPESCRIPT" ],
"securityPackageOpenStatus" : true,
"tenantId" : "389efb76b1354e4482eabeedxxxxxxxx",
"main_resource_list" : [ {
"chargeType" : 1,
"resourceSpecCode" : "codearts.china.enterprise",
"resourceType" : "hws.resource.type.codearts.combo",
"serviceType" : "hws.service.type.devcloud",
"status" : "normal"
} ],
"type" : "charge_type",
"other_resource_list" : [ {
"id" : null,
"tenantId" : "389efb76b1354e4482eabeedxxxxxxxx",
"region" : "cn-north-7",
"createTime" : "2025-04-11T06:24:47Z",
"updateTime" : "2025-07-08T14:36:32Z",
"serviceType" : "hws.service.type.devcloud",
"resourceType" : "hws.resource.type.codecheck.security",
"specCode" : "devcloud.codecheck.sec.professional",
"resourceId" : "19aa597004e84a16bc108f33xxxxxxxx",
"resourceStatus" : "normal",
"amount" : "1"
}, {
"id" : null,
"tenantId" : "389efb76b1354e4482eabeedxxxxxxxx",
"region" : "cn-north-7",
"createTime" : "2024-07-26T08:31:53Z",
"updateTime" : "2025-07-08T14:36:32Z",
"serviceType" : "hws.service.type.devcloud",
"resourceType" : "hws.resource.type.codearts.combo",
"specCode" : "codearts.china.enterprise",
"resourceId" : "5988b33d03f44c8f91141512xxxxxxxx",
"resourceStatus" : "normal",
"amount" : "20"
}, {
"id" : null,
"tenantId" : "389efb76b1354e4482eabeedxxxxxxxx",
"region" : "cn-north-7",
"createTime" : "2025-06-30T08:20:05Z",
"updateTime" : "2025-07-08T14:36:32Z",
"serviceType" : "hws.service.type.devcloud",
"resourceType" : "hws.resource.type.codearts.extension.concurrency",
"specCode" : "codearts.extension.concurrency.check",
"resourceId" : "e5470ceb4d0440f198b56974xxxxxxxx",
"resourceStatus" : "normal",
"amount" : "2"
} ],
"concurrencyPackageOpenStatus" : true,
"tips" : {
"next_action_url" : "https://account.ulanqab.huawei.com/usercenter/?region=cn-north-7&locale=zh-cn#/renewal?subscriptionId=&orderId=&isFrom=expense",
"next_action" : 0,
"next_action_remain_day" : 32,
"status" : 2
}
}
}
Status code: 400
Bad Request
{
"error_code" : "CC.xxxxxxxx.400",
"error_msg" : "Verify request parameter failed. Check whether the request parameters are correct."
}
Status code: 401
Unauthorized
{
"error_code" : "CC.00000003",
"error_msg" : "Authentication information expired."
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Request succeeded! |
|
400 |
Bad Request |
|
401 |
Unauthorized |
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