Help Center/ Cloud Operations Center/ API Reference/ API/ Application Resource Management/ Associated Resources/ Querying the Capacity Data Ranking of Application, Component, and Group
Updated on 2025-10-24 GMT+08:00

Querying the Capacity Data Ranking of Application, Component, and Group

Function

This API is used to query the ranking of application, component, and group capacity data. Only one of the following is set: application, component, and group ID.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    coc:application:getSortedCapacity

    List

    application *

    -

    -

    -

URI

GET /v1/capacity/order

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

application_id

No

String

Definition:

Application ID.

Constraints:

N/A

Value range:

ID of the application whose capacity data ranking needs to be queried.

Default value:

N/A

component_id

No

String

Definition:

Component ID.

Constraints:

N/A

Value range:

ID of the component whose capacity data ranking needs to be queried.

Default value:

N/A

group_id

No

String

Definition:

Group ID.

Constraints:

N/A

Value range:

ID of the group whose capacity data ranking is to be queried.

Default value:

N/A

provider

Yes

String

Definition:

Cloud service name.

Constraints:

N/A

Value range:

The value is a string. The value can be ecs, cce, or rds.

Default value:

N/A

type

Yes

String

Definition:

Resource type.

Constraints:

N/A

Value range:

There are many resource types. Select a resource type based on the actual service. The common resource types are as follows:

  • cloudservers: Elastic Cloud Servers (ECSs)

  • servers: bare metal server (BMSs)

  • clusters: Cloud Container Engine (CCE) instances

  • instances: cloud database instances

Default value:

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

data

Array of data objects

Definition:

Capacity ranking data.

Value Range:

Ranking of application, component, or group capacity data.

Table 3 data

Parameter

Type

Description

type

String

Definition:

Capacity type.

Value Range:

The capacity type is displayed based on the cloud service capacity data.

  • cpu: number of CPU cores

  • mem: memory

  • size: cloud disk size

rank_list

rank_list object

Definition:

List of top 5 objects.

Value Range:

A list consisting of capacity information about top 5 applications, components, or groups by capacity type.

Table 4 rank_list

Parameter

Type

Description

id

String

Definition:

Application, component, or group ID.

Value Range:

IDs of top five applications, components, or groups by capacity.

name

String

Definition:

Name of an application, component, or group.

Value Range:

Names of top five applications, components, or groups by capacity.

value

String

Definition:

Capacity of an application, component, or group.

Value Range:

Capacity values of top five applications, components, or groups by capacity type.

Example Requests

This API is used to query the capacity data ranking of application, component, and group.

GET https://{Endpoint}/v1/capacity/order?component_id=673c04d5f77f2c62d81a3b59&type=cloudservers&provider=ecs

Example Responses

Status code: 200

The capacity ranking is queried.

{
  "data" : [ {
    "type" : "cpu",
    "rank_list" : [ {
      "id" : "67dccc6bcc8db1018650ce26",
      "name" : "Test_cmdb_Intelligent correlation",
      "value" : "1187.0"
    }, {
      "id" : "6784d2cf796f946ff344708a",
      "name" : "vvvvvvvvvv",
      "value" : "1075.0"
    }, {
      "id" : "6788bdadbc066c540614692a",
      "name" : "dddddddd",
      "value" : "525.0"
    }, {
      "id" : "67dccc20cc8db10186500689",
      "name" : "cadacca",
      "value" : "4.0"
    }, {
      "id" : "687204a28e3d61245b9d54fb",
      "name" : "group071201",
      "value" : "1.0"
    } ]
  }, {
    "type" : "mem",
    "rank_list" : [ {
      "id" : "67dccc6bcc8db1018650ce26",
      "name" : "Test_cmdb_Intelligent correlation",
      "value" : "2914304.0"
    }, {
      "id" : "6784d2cf796f946ff344708a",
      "name" : "vvvvvvvvvv",
      "value" : "2335744.0"
    }, {
      "id" : "6788bdadbc066c540614692a",
      "name" : "dddddddd",
      "value" : "1069056.0"
    }, {
      "id" : "67dccc20cc8db10186500689",
      "name" : "cadacca",
      "value" : "16384.0"
    }, {
      "id" : "687204a28e3d61245b9d54fb",
      "name" : "group071201",
      "value" : "1024.0"
    } ]
  } ]
}

Status Codes

Status Code

Description

200

The capacity ranking is queried.

Error Codes

See Error Codes.