getCloudDBInstanceList

Prev Next

Overview

Gets a list of Cloud DB instances.

Request

Request header

Header Description
x-ncp-apigw-timestamp It is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC. If the time difference with the API Gateway server is more than 5 minutes, the request is considered invalid.
x-ncp-apigw-timestamp:{Timestamp}
x-ncp-apigw-api-key API key issued by API Gateway (not used in the API v2)
x-ncp-apigw-api-key:{API Gateway API Key}
x-ncp-iam-access-key Access Key ID issued from the NAVER CLOUD PLATFORM portal.
x-ncp-iam-access-key:{Sub Account Access Key}
x-ncp-apigw-signature-v2 Signature encrypted with your Access Key ID and Secret Key.
x-ncp-apigw-signature-v2:{API Gateway Signature}
Content-Type Set the request body content type to application/json.
Content-Type: application/json

Request body

Field names in the request body are case sensitive.

Parameter Required Type Limitations Description
cloudDBInstanceNoList N List<String> Instance number
pageNo N integer Page number
pageSize N integer Page size
dbKindCode Y String MYSQL, MSSQL, REDIS DB type code
searchFilterName N String Search filter name
searchFilterValue N String Search filter value
regionNo N String Region number
zoneNo N String Zone number
responseFormatType N String Response format
  • cloudDBInstanceNoList

    • Instance number to query
  • pageNo

    • Page number based on the page size if the number of items is large.
  • pageSize

    • Number of items to be shown per page
  • dbKindCode

    • Cloud DB type. Select among MSSQL, MySQL, and Redis.
  • searchFilterName

    • Filter type to search
  • searchFilterValue

    • Filter values to search for
  • regionNo

    • Get available values by using the Server API, getRegionList.
  • zoneNo

    • Get available values by using the Server API, getZoneList.
  • responseFormatType

    • Response format. Select between xml and json.

Response

Field Type Description Note
returnCode Integer Response code
returnMessage String Response message
totalRows Integer Number of response result rows
cloudDBInstanceList[] String Created Cloud DB instance information

Examples

Request example

curl -X GET "https://ncloud.apigw.ntruss.com/clouddb/v2/getCloudDBInstanceList?pageNo=0&pageSize=0&dbKindCode=MYSQL&responseFormatType=json" 
-H "accept: application/json" 
-H "Content-Type: application/x-www-form-urlencoded" 
-H "x-ncp-apigw-api-key: 25bpuog9sz" 
-H "x-ncp-iam-access-key: Y0Z9EG0lKoeWAQCSHRtM" 
-H "x-ncp-apigw-timestamp: 1545982163179" 
-H "x-ncp-apigw-signature-v2: V/thRK1plszQrws/GphD5YAr94g0Z76t+w4Wn9zXZYw=" 

https://ncloud.apigw.ntruss.com/clouddb/v2/getCloudDBInstanceList?pageNo=0&pageSize=0&dbKindCode=MYSQL&responseFormatType=json

Request sample

  • Get a list of MySQL instances
{
  "pageNo": 0,
  "pageSize": 0,
  "dbKindCode": "MYSQL",
  "responseFormatType": "json"
}

Response example

connection: keep-alive 
content-type: application/json;charset=UTF-8 
date: Mon, 24 Dec 2018 08:59:40 GMT 
server: nginx 
transfer-encoding: chunked 
x-ncp-trace-id: 6acpi6di6apj536ob5cksjcor2 
{
  "getCloudDBInstanceListResponse": {
    "returnCode": "0",
    "returnMessage": "success",
    "totalRows": 1,
    "cloudDBInstanceList": [
      {
        "cloudDBInstanceNo": "882617",
        "cloudDBServiceName": "test",
        "dbKindCode": "MYSQL",
        "engineVersion": "MYSQL5.7.19",
        "cpuCount": 2,
        "dataStorageType": {
          "code": "SSD",
          "codeName": "SSD"
        },
        "licenseCode": "GPL",
        "cloudDBPort": 3306,
        "isHa": true,
        "backupTime": "10:30",
        "backupFileRetentionPeriod": 1,
        "cloudDBInstanceStatusName": "running",
        "collation": "",
        "createDate": "2018-12-28T14:37:00+0900",
        "cloudDBImageProductCode": "SPSWMYSQLLINUX01",
        "cloudDBProductCode": "SPSVRDBAAS000001",
        "isCloudDBConfigNeedReboot": false,
        "isCloudDBNeedReboot": false,
        "zone": {
          "zoneNo": "2",
          "zoneName": "KR-1",
          "zoneCode": "KR-1",
          "zoneDescription": "Gasan zone",
          "regionNo": "1"
        },
        "region": {
          "regionNo": "1",
          "regionCode": "KR",
          "regionName": "Korea"
        },
        "cloudDBConfigList": [],
        "cloudDBConfigGroupList": [],
        "accessControlGroupList": [
          {
            "accessControlGroupConfigurationNo": "23949",
            "accessControlGroupName": "cloud-db-ix15",
            "accessControlGroupDescription": "Group for cloud DB service 'test' (automatically created)",
            "isDefault": false,
            "createDate": "2018-12-28T14:37:29+0900"
          }
        ],
        "cloudDBServerInstanceList": [
          {
            "cloudDBServerInstanceNo": "882618",
            "cloudDBServerInstanceStatusName": "running",
            "cloudDBServerName": "test-001",
            "cloudDBServerRole": {
              "code": "M",
              "codeName": "Master"
            },
            "privateDnsName": "db-qttq.beta-cdb.ntruss.com",
            "publicDnsName": "",
            "dataStorageSize": 10737418240,
            "usedDataStorageSize": 0,
            "createDate": "2018-12-28T14:37:00+0900",
            "uptime": "2018-12-28T14:39:00+0900"
          },
          {
            "cloudDBServerName": "test-002",
            "cloudDBServerRole": {
              "code": "H",
              "codeName": "Hidden Master"
            }
          }
        ]
      }
    ]
  }
}

Error codes

If a Cloud DB API request is invalid or an error occurs while processing the request, the API returns an HTTP status code representing success or failure with a detailed message in JSON.

There are two types of error codes: “common error code” of the Cloud DB API and “API Gateway error code.”

Error code Response message Description
200 Ok
500 Server Error