Updated on 2026-01-08 GMT+08:00

Querying Available DB Instances

API Description

This API is used to query DB instances to which a specified parameter template can be applied.

URI

  • URI format

    GET https://{Endpoint}/v3/{project_id}/configurations/{config_id}/applicable-instances

Table 1 Path parameters

Parameter

Type

IN

Mandatory

Description

project_id

string

path

Yes

Project ID of a tenant in a region. Obtain the project ID by following the instructions in Obtaining a Project ID.

Table 2 Path parameters

Parameter

Mandatory

Type

Description

config_id

Yes

String

Parameter template ID.

Table 3 Query parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Index offset. If offset is set to N, the resource query starts from the N+1 piece of data. The default value is 0, indicating that the query starts from the first piece of data. The value must be a positive integer.

limit

No

Integer

Number of records to be queried. The default value is 100. The value must be a positive integer. The minimum value is 1 and the maximum value is 100.

Request Parameters

Table 4 Request header parameters

Parameter

Type

IN

Mandatory

Description

X-Auth-Token

string

header

Yes

User token

Response Parameters

Table 5 Response body parameters

Name

Type

Description

instances

Array of Table 5-5 objects

List of instances to which the parameter template can be applied.

Table 6 ApplicableInstancesInfo

Name

Type

Description

instance_id

String

DB instance ID.

instance_name

String

DB instance name.

entities

Array of Table 6-6 objects

List of node group information or node information.

  • For the shard or config group of a cluster instance, information about the node group of the corresponding instance is returned. For the mongos node of a cluster instance, information about the node of the corresponding instance is returned.
  • If the DB instance type is replica set, the parameter template is directly applied to the corresponding DB instance. For read replicas, the parameter template is applied to read replicas of the corresponding type.
Table 7 EntityInfo

Name

Type

Description

entity_id

String

Group ID or node ID.

entity_name

String

Group name or node name.

  • Example response
{  
  instances:[ 
    { 
      "instance_id": "1967d9d9d6ef4c5ea38bd5a754f5737ein02", 
      "instance_name": "dds-5425", 
      "entities": [ 
        { 
          "entity_id": "36457a9af7c7486a882727d205ef37afgr02", 
          "entity_name": "shard_1" 
        }, 
        { 
          "entity_id": "a36651f1807f40be891db839e8bbe9e7gr02", 
          "entity_name": "shard_2" 
        } 
      ] 
    }, 
    { 
      "instance_id": "4809355b9836467c8749610089b1ef3bin02", 
      "instance_name": "dds-9d67", 
      "entities": [ 
        { 
          "entity_id": "08e61e50220c49728eb49dbb092d6ec4gr02", 
          "entity_name": "shard_2" 
        }, 
        { 
          "entity_id": "24d58cd41c20486e9745e7f5b424e641gr02", 
          "entity_name": "shard_3" 
        }, 
        { 
          "entity_id": "602807fcb2b24e38952347e030ec4a61gr02", 
          "entity_name": "shard_1" 
        } 
      ] 
    } 
  ] 
}

Status Code

For details, see Status Code.

Error Code

For details, see Error Code.