Help Center/ MetaStudio/ API Reference/ Tenant Management/ Querying Tenant Resource Details
Updated on 2025-12-08 GMT+08:00

Querying Tenant Resource Details

Function

Queries the details of resources allocated to a common tenant.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

URI

GET /v1/{project_id}/tenants/resource/assignrecourd

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Number of items displayed on each page.

Value range:

1~100

Default value:

10

offset

No

Integer

Offset where the query starts.

Value range:

0~2147483647

Default value:

0

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

User token. This parameter is mandatory when token authentication is used.

You can obtain the token by calling the IAM API used to obtain a user token.

Value of X-Subject-Token in the response header.

Response Parameters

Status code: 200

Table 4 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Request ID.

Table 5 Response body parameters

Parameter

Type

Description

customer_project_id

String

Tenant ID.

customer_name

String

Name of the associated tenant.

region_id

String

AZ of the tenant.

resource_count

Integer

Total number of records in the allocation table, which is used for pagination.

Value range:

0~2147483647

resources

Array of AllocateSpResourceInfo objects

Resources allocated to the tenant.

resources_overview

Array of AllocateSpResourceSummaryInfo objects

Summary of resources allocated to the tenant.

Table 6 AllocateSpResourceInfo

Parameter

Type

Description

assignment_record_id

String

Resource allocation record ID.

resource_spec_code

String

Resource specification code.

charging_mode

String

Resource billing type.

resource_num

Double

Resource quantity.

Value range:

0~2147483647

resource_used_num

Double

Number of used resources.

Value range:

0~2147483647

resource_allocate_time

Long

Resource allocation time (UTC time), which is a Unix time. The value is accurate to seconds.

Value range:

0~2147483647

resource_expire_time

Long

Resource expiration time (UTC time), which is a Unix time. The value is accurate to seconds.

Value range:

0~2147483647

Table 7 AllocateSpResourceSummaryInfo

Parameter

Type

Description

resource_spec_code

String

Resource specification code.

resource_num

Double

Resource quantity.

Value range:

0~2147483647

resource_used_num

Double

Number of used resources.

Value range:

0~2147483647

resource_remind_quota

Double

Remaining resources in TMS.

Value range:

0~2147483647

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

None

Example Responses

Status code: 400

Parameters error, including the error code and its description.

{
  "error_code" : "MSS.00000003",
  "error_msg" : "Invalid parameter"
}

Status Codes

Status Code

Description

200

Succeeded.

400

Parameters error, including the error code and its description.

Error Codes

See Error Codes.