18 KiB

original_name

ddm_api_01_0018.html

Querying DDM Instances

Function

This API is used to query DDM instances.

Constraints

None

URI

GET /v1/{project_id}/instances

Table 1 Path parameters
Parameter Mandatory Type Description
project_id Yes String Project ID of a tenant in a region
Table 2 Query parameters
Parameter Mandatory Type Description
offset No Integer

Which page the server starts returning items. The start value cannot be less than 0. The default value is 0.

Minimum value: 0

limit No Integer

Number of records displayed on each page. The value is greater than 0 and not greater than 128. The default value is 10.

Minimum value: 1

Maximum value: 128

Request Parameters

Table 3 Request header parameters
Parameter Mandatory Type Description
X-Auth-Token Yes String

User token

It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 4 Response body parameters
Parameter Type Description
instances Array of ShowInstanceBeanResponse <ddm_api_01_0018__response_showinstancebeanresponse> objects DDM instance information
instance_num Integer Number of DDM instances of a tenant
page_no Integer Current page
page_size Integer Data records on the current page
total_record Integer Total records
total_page Integer Total pages
Table 5 ShowInstanceBeanResponse
Parameter Type Description
id String DDM instance ID
status String DDM instance status
name String Name of the created DDM instance
created String

Time when the DDM instance is created. The time must be in the format of yyyy-mm-dd Thh:mm:ssZ.

T indicates the separator between the calendar and the hourly notation of time. Z indicates Coordinated Universal Time (UTC).

updated String Time when the DDM instance is last updated, which is in the same format as created.
available_zone String AZ name
vpc_id String VPC ID
subnet_id String Subnet ID
security_group_id String Security group ID
node_count Integer Number of nodes
access_ip String Address for accessing the DDM instance
access_port String Port for accessing the DDM instance
core_count String Number of CPUs
ram_capacity String Memory size in GB
error_msg String Response message. This parameter is not returned if no abnormality occurs.
node_status String Node status
enterprise_project_id String Enterprise project ID
project_id String Project ID of a tenant in a region
engine_version String Engine version (core version)
order_id String Order ID, which is returned if the DDM instance is billed on a yearly/monthly basis

Status code: 400

Table 6 Response body parameters
Parameter Type Description
errCode String Service error code
externalMessage String Error message

Status code: 500

Table 7 Response body parameters
Parameter Type Description
errCode String Service error code
externalMessage String Error message

Example Request

GET https://{endpoint}/v1/{project_id}/instances?offset={offset}&limit={limit}

Example Response

Status code: 200

OK

{
  "instance_num" : 26,
  "instances" : [ {
    "id" : "73f27bb0b26d4a79a9b0c58a4c700c4fin09,",
    "status" : "RUNNING,",
    "name" : "ddm-36c7,",
    "created" : "2021-12-14T07:46:22+0000,",
    "updated" : "2021-12-14T10:11:22+0000,",
    "available_zone" : "az1xahz,",
    "vpc_id" : "1d9441c5-1a4b-431d-9edb-bf3564a83e74,",
    "subnet_id" : "20c2d83c-755b-42a2-846a-4688eb35d1a7,",
    "security_group_id" : "fbdff89d-32fe-45a4-832b-115ac4bfaac9,",
    "node_count" : "1,",
    "access_ip" : "192.168.23.143",
    "access_port" : "5066,",
    "core_count" : "2,",
    "ram_capacity" : "4,",
    "node_status" : "RUNNING,",
    "enterprise_project_id" : "0,",
    "project_id" : "055d9f4ee780d4d42f96c01c1bc3c50c,",
    "engine_version" : "3.0.8"
  } ],
  "page_size" : 1,
  "total_record" : 26,
  "total_page" : 26,
  "page_no" : 3
}

Status code: 400

bad request

{
  "externalMessage" : "Parameter error.",
  "errCode" : "DBS.280001"
}

Status code: 500

server error

{
  "externalMessage" : "Server failure.",
  "errCode" : "DBS.200412"
}

Status Codes

Status Code Description
200 OK
400 bad request
500 server error

Error Codes

For details, see Error Codes <ddm_api_01_0061>.