• Relational Database Service

rds
  1. Help Center
  2. Relational Database Service
  3. API Reference
  4. OpenStack trove API v1.0
  5. DB Instance Management
  6. Obtaining a DB Instance List

Obtaining a DB Instance List

Function

This API is used to obtain a DB instance list.

URI

  • URI format

    PATH: /{versionId}/{project_id}/instances

    Method: GET

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    versionId

    Yes

    Specifies the API version. It is case-sensitive and the value is v1.0.

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

  • Restrictions

    Currently, only the DB engines MySQL and PostgreSQL are supported by the API.

Request

N/A

Normal Response

  • Parameter description
    Table 2 Parameter description

    Name

    Type

    Description

    instances

    List data structure. For details, see Table 4.

    Indicates the DB instance information.

    Table 3 instances field data structure description

    Name

    Type

    Description

    instance

    Dictionary data structure. For details, see Table 4.

    Indicates the DB instance information.

    Table 4 instance field data structure description

    Name

    Type

    Description

    status

    String

    Indicates the DB instance status.

    Value:
    • If the value is BUILD, the instance is being created.
    • If the value is ACTIVE, the instance is normal.
    • If the value is FAILED, the instance is abnormal.
    • If the value is MODIFYING, the instance is being scaled up.
    • If the value is REBOOTING, the instance is being rebooted.
    • If the value is RESTORING, the instance is being restored.

    name

    String

    Indicates the DB instance name.

    links

    List data structure. For details, see Table 5.

    Indicates the link address.

    id

    String

    Indicates the DB instance ID.

    volume

    Dictionary data structure. For details, see Table 6.

    Indicates the volume information.

    flavor

    Dictionary data structure. For details, see Table 7.

    Indicates the DB instance specifications.

    datastore

    Dictionary data structure. For details, see Table 8.

    Indicates the database information.

    region

    String

    Indicates the region where the DB instance is deployed.

    ip

    String

    Indicates the DB instance IP address.

    replica_of

    Dictionary data structure. For details, see Table 9.

    Indicates the primary DB instance ID corresponding to the read replica.

    hostname

    String

    Indicates the domain name. Its value is null.

    Currently, this parameter is not supported.

    Table 5 links field data structure description

    Name

    Type

    Description

    rel

    String

    Its value is self or bookmark.

    href

    String

    Its value is "".

    Table 6 volume field data structure description

    Name

    Type

    Description

    type

    String

    Indicates the volume type.

    size

    Int

    Indicates the volume size.

    Table 7 flavor field data structure description

    Name

    Type

    Description

    id

    String

    Indicates the specification ID.

    links

    List data structure. For details, see Table 5.

    Indicates the link address.

    Table 8 datastore field data structure description

    Name

    Type

    Description

    type

    String

    Indicates the DB engine type.

    version

    String

    Indicates the database version.

    Table 9 replica_of field data structure description

    Name

    Type

    Description

    id

    String

    Indicates a primary DB instance ID.

    links

    List data structure. For details, see Table 5.

    Indicates the link address.

  • Response example
    {
      "instances": [
        {
          "instance": {
            "status": "ACTIVE",
            "name": "rds-new-channle-read",
            "links": [
              {
                "rel": "self",
                "href": ""
              },
              {
                "rel": "bookmark",
                "href": ""
              }
            ],
            "id": "37f52707-2fb3-482c-a444-77a70a4eafd6",
            "volume": {
              "type": "COMMON",
              "size": 100
            },
            "flavor": {
              "id": "7fbf27c5-07e5-43dc-cf13-ad7a0f1c5d9a",
              "links": [
                {
                  "rel": "self",
                  "href": ""
                },
                {
                  "rel": "bookmark",
                  "href": ""
                }
              ]
            },
            "datastore": {
              "type": "PostgreSQL",
              "version": "PostgreSQL-9.5.5"
            },
            
            "region": "eu-de",
            "ip": "192.168.1.29",
            "replica_of": [
              {
                "id": "c42cdd29-9912-4b57-91a8-c37a845566b1",
                "links": [
                  {
                    "rel": "self",
                    "href": ""
                  },
                  {
                    "rel": "bookmark",
                    "href": ""
                  }
                ]
              }
            ],
            "hostname": null
          }
        }
      ]
    }

Abnormal Response

For details, see Abnormal Request Results.