Help Center/ MetaStudio/ API Reference/ Tenant Management/ Viewing Tenant Resources
Updated on 2025-12-08 GMT+08:00

Viewing Tenant Resources

Function

Views tenant resources.

For details about the billing modes of various resources, see Billing Overview.

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/resources

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

resource

No

String

Resource type. You can enter multiple resource types and separate them with commas (,). For details, see Resource Type.

business

No

String

Service type. You can enter multiple service types and separate them with commas (,).

  • VOICE_CLONE: voice modeling

  • SYNTHETICS_SOUND: voice synthesis

  • ASSET_MANAGER: asset management

  • MODELING_2D: image modeling

  • LIVE_2D: virtual avatar livestreaming

  • VIDEO_2D: virtual avatar video production

  • CHAT_2D: virtual avatar intelligent interaction

  • BUSINESS_CARD_2D: virtual avatar business card

  • PICTURE_2D: photo-based virtual avatar video

  • MODELING_3D: 3D photo-based modeling

  • VDS_3D: 3D visual control

  • TTSA_3D: 3D speech control

  • FLEXUS_2D: Flexus resources

resource_source

Yes

String

Resource source. You can enter multiple resource sources.

For example, PURCHASED,ADMIN_ALLOCATED indicates that commercial resources and resources allocated by the administrator are returned.

  • PURCHASED: resources purchased by users

  • SP_ALLOCATED: resources allocated by the SP

  • ADMIN_ALLOCATED: resources allocated by the system administrator

resource_id

No

String

Resource ID.

order_id

No

String

Order ID.

charging_mode

No

String

Billing mode.

  • PERIODIC: yearly/monthly

  • ONE_TIME: one-off

  • ON_DEMAND: pay-per-use

resource_expire_start_time

No

String

Start time of the resource expiration period. The format complies with RFC 3339, for example, 2021-01-10T08:43:17Z.

resource_expire_end_time

No

String

End time of the resource expiration period. The format complies with RFC 3339, for example, 2021-01-10T08:43:17Z.

sub_resource

No

String

Sub-resource type. Currently, this field is available only for Flexus packages.

  • voice_clone_flexus: Voice cloning (Flexus edition)

  • modeling_count_2d_model_flexus: Virtual avatar image modeling (Flexus edition)

  • video_time_flexus_2d_model: Virtual avatar video production (Flexus edition)

status

No

Integer

Resource status.

Value range:

0~1

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.

Authorization

No

String

Authentication information. This parameter is mandatory for AK/SK authentication.

X-Sdk-Date

No

String

Time when the request is sent. This parameter is mandatory for AK/SK authentication.

The format is YYYYMMDD'T'HHMMSS'Z'.

X-Project-Id

No

String

Project ID. This parameter is mandatory for AK/SK authentication.

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

resources

Array of ResourceItemInfo objects

Resource usage list

count

Number

Total number of resources.

Value range:

0~2147483647

Table 6 ResourceItemInfo

Parameter

Type

Description

resource_id

String

Resource ID.

order_id

String

Order ID of cloudServiceId.

Mandatory in scenarios such as purchasing according to a cloud service list (purchaseMode set to 3 or 4). An order is generated for each CloudService. If this parameter is left empty in this scenario, an error is reported.

In other scenarios, this parameter is left empty.

bound_asset

BoundAssetInfo object

Bound asset.

resource_expire_time

String

Resource expiration time. The format complies with RFC 3339, for example, 2021-01-10T08:43:17Z.

resource_type

String

Resource type. For details, see Resource Type.

business_type

String

Service type.

  • VOICE_CLONE: voice modeling

  • SYNTHETICS_SOUND: voice synthesis

  • ASSET_MANAGER: asset management

  • MODELING_2D: image modeling

  • LIVE_2D: virtual avatar livestreaming

  • VIDEO_2D: virtual avatar video production

  • CHAT_2D: virtual avatar intelligent interaction

  • BUSINESS_CARD_2D: virtual avatar business card

  • PICTURE_2D: photo-based virtual avatar video

  • MODELING_3D: 3D photo-based modeling

  • VDS_3D: 3D visual control

  • TTSA_3D: 3D speech control

  • FLEXUS_2D: Flexus resources

sub_resource_type

String

Sub-resource type. Currently, this field is available only for Flexus packages.

  • voice_clone_flexus: Voice cloning (Flexus edition)

  • modeling_count_2d_model_flexus: Virtual avatar image modeling (Flexus edition)

  • video_time_flexus_2d_model: Virtual avatar video production (Flexus edition)

is_sub_resource

Boolean

Whether the resource is a sub-resource. If yes, the quantity and unit of the sub-resource are described.

Default value:

false

charging_mode

String

Billing mode.

  • PERIODIC: yearly/monthly

  • ONE_TIME: one-off billing

  • ON_DEMAND: pay-per-use billing

resource_source

String

Resource source.

  • PURCHASED: purchased

  • SP_ALLOCATED: allocated by the SP

  • ADMIN_ALLOCATED: allocated by the administrator

amount

Float

Total quantity

Value range:

0~1000000

usage

Float

Usage

Value range:

0~1000000

status

Integer

Resource status. 0: normal; 1: frozen

Value range:

0~1

unit

String

Unit.

  • NUM: avatar/voice quantity

  • MIN: minute (video production)

  • HOUR: hour (livestream duration)

  • CHANNEL: task (livestreaming/interaction)

  • GB: GB (asset management)

  • MILLION_WORDS: one million characters

  • TEN_THOUSAND_WORDS: ten thousand characters

  • TIME: times

Table 7 BoundAssetInfo

Parameter

Type

Description

asset_id

String

Asset ID.

asset_name

String

Asset name. Asset name queried from the asset library.

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

GET https://{endpoint}/v1/f488337c31c8e4622f1590735b134c65/tenants/resources

Example Responses

Status code: 200

Views tenant information.

{
  "resources" : [ {
    "resource_id" : "f488337c31c8e4622f1590735b134c65",
    "resource_type" : "Interaction.basic.channel",
    "business_type" : "LIVE_2D",
    "order_id" : "ed4553db2cf949fca7eeb327a276bdbd",
    "resource_expire_time" : "2021-01-10T08:43:17Z",
    "charging_mode" : "ONE_TIME",
    "amount" : 1,
    "unit" : "CHANNEL"
  } ],
  "count" : 1
}

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

Views tenant information.

400

Parameters error, including the error code and its description.

Error Codes

See Error Codes.