IBM Cloud API Docs

Introduction

The IBM Cloud Databases API is a supplemental layer that adds the capability to manage IBM Cloud Databases through a REST API. The API is designed to provide users and developers the ability to examine their database deployments, upgrade deployments, manage users, manage connections, monitor tasks, and work with backups.

Authentication

Access to the API uses token authentication, by using the header Authorization: Bearer <token>. The token must be IAM-issued. You can send in an IAM API key directly as the token or use the API key to generate an IAM Bearer Token.

To call each method, you'll need to be assigned a role that includes the required IAM actions. Each method lists the associated action. For more information about IAM actions and how they map to roles, see Managing access for IBM Cloud.

Event tracking

You can monitor API activity within your account by using the IBM Cloud Activity Tracker service. Whenever an API method is called, an event is generated that you can then track and audit from within Activity Tracker. The specific event type is listed for each individual method.

For more information about how to track Certificate Manager activity, see Auditing events for IBM Cloud.

Deployment IDs and CRNs

Deployment IDs are CRNs on the IBM Cloud Databases v4 API platform. When you use the CRN, remember to URL encode the CRN value as it might include the forward-slash (/) %2F character. For example,

crn:v1:bluemix:public:databases-for-redis:us-south:a/274074dce64e9c423ffc238516c755e1:29caf0e7-120f-4da8-9551-3abf57ebcfc7::

becomes

crn:v1:bluemix:public:databases-for-redis:us-south:a%2F274074dce64e9c423ffc238516c755e1:29caf0e7-120f-4da8-9551-3abf57ebcfc7::

when URL encoded.

Error Handling

The IBM Cloud Databases API uses standard HTTP response codes to indicate whether a method completed successfully. A 200 response always indicates success. A 4xx type response is some sort of failure, and a 500 type response usually indicates an internal system error. Any of these responses might be accompanied by a JSON formatted body that contains more detailed error information.

Pagination

No endpoint currently returns paginated data.

Rate Limiting

No endpoint currently implements rate limiting.

This API does not support listing your deployments. You can retrieve a list of all service instances (including your database deployments) from the Resource Controller and the Resource Controller API.

Specifically, the [`GET /resource_instances endpoint](https://cloud.ibm.com/apidocs/resource-controller#get-a-list-of-all-resource-instances) either with no query parameters or with a `resource_plan_id` can be used to list your deployments.

This API does not support provisioning and decommissioning of database deployments. Those functions are the responsibility of the Resource Controller and the Resource Controller API.

Specifically the POST /resource_instances endpoint with appropriate resource_plan_id (such as databases-for-postgresql-standard or databases-for-redis-standard) can be used to create a new database instance. Consult the Cloud Databases provisioning documentation page for details of plan ids and other settings.

Methods

Get all deployable databases

Returns a list of all the types and associated major versions of database deployments that can be provisioned.

GET /deployables

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • GET /v4/ibm/deployables

Request

No Request Parameters

This method does not accept any request parameters.

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployables   -H 'Authorization: Bearer <>' \

Response

Status Code

  • Deployable database objects

  • Invalid token

Example responses
  • {
      "deployables": [
        {
          "type": "elasticsearch",
          "versions": [
            {
              "version": "6.7",
              "status": "stable",
              "is_preferred": true,
              "transitions": []
            },
            {
              "version": "5.6",
              "status": "stable",
              "is_preferred": false,
              "transitions": [
                {
                  "application": "elasticsearch",
                  "method": "restore",
                  "from_version": "5.6",
                  "to_version": "6.7"
                }
              ]
            }
          ]
        }
      ]
    }

Get all deployable regions

Returns a list of all the regions that deployments can be provisioned into from the current region. Used to determine region availability for read-only replicas

GET /regions

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • GET /v4/ibm/regions

Request

No Request Parameters

This method does not accept any request parameters.

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/regions   -H 'Authorization: Bearer <>' \

Response

Status Code

  • A regions object

  • Invalid token

Example responses
  • {
      "regions": [
        "eu-gb",
        "us-south"
      ]
    }

Get deployment information

Gets the full data that is associated with a deployment. This data includes the ID, name, database type, and version.

GET /deployments/{id}

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • GET /v4/ibm/deployments/:deployment_id

Request

Path Parameters

  • Deployment ID

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}   -H 'Authorization: Bearer <>' \

Response

Status Code

  • A deployment response

  • Invalid token

Example responses
  • {
      "deployment": {
        "id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/2740839ce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a::",
        "name": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/2740839ce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a::",
        "type": "elasticsearch",
        "platform_options": {
          "key_protect_key_id": ""
        },
        "version": "6.5",
        "admin_username": "admin",
        "enable_private_endpoints": false,
        "enable_public_endpoints": true
      }
    }

Creates a database-level user

Creates a user in the database that can access the database through a connection.

POST /deployments/{id}/users

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • POST /v4/ibm/deployments/:deployment_id/users

Auditing

Calling this method generates the following auditing event.

  • <service_id>.user.create

Request

Path Parameters

  • Deployment ID

Parameters for creating the user

  • curl -X POST   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/users   -H 'Authorization: Bearer <>'  -H 'Content-Type: application/json'  -d '{"user": {"username": "james", "password": "kickoutthe"}}' \

Response

Status Code

  • A task which is being run to create the user

  • Invalid token

  • An error message response

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f3-b5c96544393b",
        "description": "Creating user for database",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:21:30Z"
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

Set database-level user's password

Sets the password of a database-level user.

PATCH /deployments/{id}/users/{username}

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • PATCH /v4/ibm/deployments/:deployment_id/users/:user_id

Auditing

Calling this method generates the following auditing event.

  • <service_id>.user-password.update

Request

Path Parameters

  • Deployment ID

  • User ID

New Password Details

  • curl -X PATCH   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/users/{username}   -H 'Authorization: Bearer <>'  -H 'Content-Type: application/json'  -d '{"user": {"password": "xyzzy"}}' \

Response

Status Code

  • A task which is being run to set the user password

  • Invalid token

  • An error message response

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f3-b5c96544393b",
        "description": "Setting user password for database",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:22:30Z"
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

Deletes a database-level user

Removes a database-level user from the deployment.

DELETE /deployments/{id}/users/{username}

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • DELETE /v4/ibm/deployments/:deployment_id/users/:user_id

Auditing

Calling this method generates the following auditing event.

  • <service_id>.user.delete

Request

Path Parameters

  • Deployment ID

  • Username

  • curl -X DELETE   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/users/{username}   -H 'Authorization: Bearer <>' \

Response

Status Code

  • A task which is being run to delete the user

  • Invalid token

  • An error message response

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f3-b5c96555393b",
        "description": "Deleting user from database",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-99bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 10,
        "created_at": "2018-03-28T10:23:30Z"
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

Discover user name and password information for a deployment for a user with an endpoint type.

Only for Redis v5 and prior: Discover connection information for a deployment for a user with an endpoint type.

GET /deployments/{id}/users/{user_id}/

Request

Path Parameters

  • Deployment ID

  • User ID

  • Endpoint Type. The endpoint must be enabled on the deployment before its connection information can be fetched.

    Allowable values: [public,private]

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/users/{user_id}   -H 'Authorization: Bearer <>' \

Response

Status Code

  • User

  • Not Found

Example responses
  • {
      "connection": {
        "rediss": {
          "user": {
            "username": "admin",
            "password": "supersecure3"
          }
        }
      }
    }

Change your database configuration

Change your database configuration. Available for PostgreSQL, EnterpriseDB, and Redis ONLY.

PATCH /deployments/{id}/configuration

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • PATCH /v4/ibm/deployments/:deployment_id/configuration

Request

Path Parameters

  • Deployment ID

Database configuration

  • curl -X PATCH   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/configuration   -H 'Authorization: Bearer <>'  -H 'Content-Type: application/json'  -d '{"configuration": {"max_connections": 200}}' \

Response

Status Code

  • A task

  • Invalid token

  • not found

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f3-b5c96544393a",
        "description": "Applying new configuration",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }

Get the schema of the database configuration

Get the schema of the database configuration. Available for PostgreSQL and Redis ONLY.

GET /deployments/{id}/configuration/schema

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • GET /v4/ibm/deployments/:deployment_id/configuration/schema

Request

Path Parameters

  • Deployment ID

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/configuration/schema   -H 'Authorization: Bearer <>' \

Response

Status Code

  • A database configuration schema

  • Invalid token

  • not found

Example responses
  • {
      "schema": {
        "max_connections": {
          "default": 115,
          "default_description": "This property has no documentation for its default value.",
          "description": "Maximum Connections allowed.",
          "kind": "integer",
          "requires_restart": true,
          "min": 115,
          "max": 30000,
          "step": null
        },
        "max_prepared_transactions": {
          "default": 0,
          "default_description": "This property has no documentation for its default value.",
          "description": "Max number of transactions that can be in the \"prepared\" state simultaneously.",
          "kind": "integer",
          "max": null,
          "min": 0,
          "requires_restart": true,
          "step": null
        }
      }
    }

Get read-only replica information

Get the read-only replicas associated with a deployment. Available for PostgreSQL and EnterpriseDB ONLY.

GET /deployments/{id}/remotes

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • GET /v4/ibm/deployments/:deployment_id/remotes

Request

Path Parameters

  • Deployment ID

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/remotes   -H 'Authorization: Bearer <>' \

Response

Status Code

  • A remotes object

  • Invalid token

  • not found

Example responses
  • {
      "remotes": {
        "leader": "",
        "replicas": [
          "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/389574dce64e9c423ffc238516c755e1:0e399ae3-4a1a-476d-b85b-755c7af54788::"
        ]
      }
    }

Modify read-only replication on a deployment

Promote a read-only remote replica to leader by calling with leader set to an empty string. Available for PostgreSQL and EnterpriseDB ONLY.

PATCH /deployments/{id}/remotes

Request

Path Parameters

  • Deployment ID

Parameters for promoting a read-only replica

  • curl -X PATCH   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/remotes   -H 'Authorization: Bearer <>'   -H 'Content-Type: application/json'  -d '{"remotes": {"leader": ""}}' \

Response

Status Code

  • A task

  • Invalid token

  • not found

  • promotion is the only feature supported and must be requested as an empty string

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:5abb6a7d11a1a5001479a0b0",
        "description": "Promoting read-only replica to standalone instance.",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }

Resync read-only replica

Reinitialize a read-only replica. Available for PostgreSQL and EnterpriseDB ONLY.

POST /deployments/{id}/remotes/resync

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • POST /v4/ibm/deployments/:deployment_id/remotes/resync

Request

Path Parameters

  • Deployment ID

  • curl -X POST   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/remotes/resync   -H 'Authorization: Bearer <>' \

Response

Status Code

  • A task

  • Invalid token

  • not found

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:5abb6a7d11a1a5001479a0b0",
        "description": "Reinitializing read-only replica.",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }

Promote read-only replica to a full deployment

Promote a read-only replica or upgrade and promote a read-only replica. Available for PostgreSQL and EnterpriseDB ONLY.

POST /deployments/{id}/remotes/promotion

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • POST /v4/ibm/deployments/:deployment_id/remotes/promotion

Request

Path Parameters

  • Deployment ID

Parameters for promoting a read-only replica

  • curl -X POST   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/remotes   -H 'Authorization: Bearer <>'   -H 'Content-Type: application/json'  -d '{"promotion": {"skip_initial_backup": false}}' \

Response

Status Code

  • A task

  • Invalid token

  • not found

  • An error message response from sending invalid body parameters.

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:5abb6a7d11a1a5001479a0b0",
        "description": "Promoting read-only replica to standalone instance.",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc257516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

Get currently running tasks on a deployment

Obtain a list of tasks currently running or recently run on a deployment. Tasks are ephemeral. Records of successful tasks are shown for 24-48 hours, and unsuccessful tasks are shown for 7-8 days.

GET /deployments/{id}/tasks

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • GET /v4/ibm/deployments/:deployment_id/tasks

Request

Path Parameters

  • Deployment ID

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/tasks   -H 'Authorization: Bearer <>' \

Response

Status Code

  • An array of tasks

  • Invalid token

No Sample Response

This method does not specify any sample responses.

Get information about a task

Get information about a task and its status. Tasks themselves are persistent so old tasks can be consulted as well as running tasks.

GET /tasks/{id}

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • GET /v4/ibm/tasks/:task_id

Request

Path Parameters

  • Task ID

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/tasks/{id}   -H 'Authorization: Bearer <>' \

Response

Status Code

  • A task

  • A completed task redirects to the associated resource.

  • Invalid token

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f4-b5c96544393b",
        "description": "Backing up database on-demand",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f4-b5c96544393b",
        "description": "Backing up database on-demand",
        "status": "completed",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 100,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }

Get information about a backup

Get information about a backup, such as creation date.

GET /backups/{backup_id}

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • GET /v4/ibm/backups/:backup_id

Request

Path Parameters

  • Backup ID

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/backups/{backup_id}   -H 'Authorization: Bearer <>' \

Response

Status Code

  • A backup response

  • Invalid token

Example responses
  • {
      "backup": {
        "id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/274074dce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a:backup:87635880-b11c-4359-9d06-41fd9f90feaf",
        "deployment_id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/274074dce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a::",
        "type": "scheduled",
        "status": "completed",
        "is_downloadable": false,
        "is_restorable": true,
        "created_at": "2019-06-10T14:31:40.000Z"
      }
    }

Get currently available backups from a deployment

Get details of all currently available backups from a deployment.

GET /deployments/{id}/backups

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • GET /v4/ibm/deployments/:deployment_id/backups

Request

Path Parameters

  • Deployment ID

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/backups   -H 'Authorization: Bearer <>' \

Response

Status Code

  • An array of backups

  • Invalid token

Example responses
  • {
      "backups": [
        {
          "id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/2740839ce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a:backup:e47213d6-4a13-47f4-a511-9ef459670192",
          "deployment_id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/2740839ce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a::",
          "type": "scheduled",
          "status": "completed",
          "is_downloadable": false,
          "is_restorable": true,
          "created_at": "2019-05-29T14:30:46.000Z"
        },
        {
          "id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/2740839ce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a:backup:ec07e9be-9ad8-48ad-a22e-bc93abe66339",
          "deployment_id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/2740839ce64e9c423ffc238516c755e1:afa742a3-6f83-4f6e-a06e-b5c501e9e87a::",
          "type": "scheduled",
          "status": "completed",
          "is_downloadable": false,
          "is_restorable": true,
          "created_at": "2019-05-18T14:30:39.000Z"
        }
      ]
    }

Initiate an on-demand backup

Signal the platform to create an on-demand backup for the specified deployment. The returned task can be polled to track progress of the backup as it takes place.

POST /deployments/{id}/backups

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • POST /v4/ibm/deployments/:deployment_id/backups

Auditing

Calling this method generates the following auditing event.

  • <service_id>.backup-ondemand.create

Request

Path Parameters

  • Deployment ID

  • curl -X POST   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/backups   -H 'Authorization: Bearer <>' \

Response

Status Code

  • A task

  • Invalid token

  • An error message response

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f4-b5c96544393b",
        "description": "Backing up database on-demand",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:30:30Z"
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

Get earliest point-in-time-recovery timestamp

Returns the earliest available time for point-in-time-recovery in ISO8601 UTC format. PostgreSQL and EnterpriseDB only.

GET /deployments/{id}/point_in_time_recovery_data

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • GET /v4/ibm/deployments/:deployment_id/point_in_time_recovery_data

Request

Path Parameters

  • Deployment ID

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/point_in_time_recovery_data   -H 'Authorization: Bearer <>' \

Response

Status Code

  • The earliest point-in-time-recovery time

  • Invalid token

  • not found

Example responses
  • {
      "point_in_time_recovery_data": {
        "earliest_point_in_time_recovery_time": "2019-09-09T23:16:00Z"
      }
    }

Discover connection information for a deployment for a user with an endpoint type.

Discover connection information for a deployment for a user with an endpoint type.

GET /deployments/{id}/users/{user_id}/connections/{endpoint_type}

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • GET /v4/ibm/deployments/:deployment_id/users/:user_id/connections/:endpoint_type

Request

Path Parameters

  • Deployment ID

  • User ID

  • Endpoint Type. The endpoint must be enabled on the deployment before its connection information can be fetched.

    Allowable values: [public,private]

Query Parameters

  • Optional certificate root path to prepend certificate names. Certificates would be stored in this directory for use by other commands.

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/users/{user_id}/connections/{endpoint_type}   -H 'Authorization: Bearer <>' \

Response

Status Code

  • A Connection

  • Invalid token

Example responses
  • {
      "connection": {
        "postgres": {
          "composed": [
            "postgres://admin:$PASSWORD@1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32121/ibmclouddb?sslmode=verify-full"
          ],
          "type": "uri",
          "scheme": "postgres",
          "hosts": [
            {
              "hostname": "1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 32121
            }
          ],
          "path": "/ibmclouddb",
          "query_options": {
            "sslmode": "verify-full"
          },
          "authentication": {
            "method": "direct",
            "username": "admin",
            "password": "$PASSWORD"
          },
          "database": "ibmclouddb",
          "certificate": {
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        },
        "cli": {
          "composed": [
            "PGPASSWORD=$PASSWORD PGSSLROOTCERT=0b22f14b-7ba2-11e8-b8e9-568642342d40 psql 'host=1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud port=32121 dbname=ibmclouddb user=admin sslmode=verify-full"
          ],
          "type": "cli",
          "environment": {
            "PGPASSWORD": "$PASSWORD"
          },
          "bin": "psql",
          "arguments": [
            [
              "host=1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud port=32121 dbname=ibmclouddb user=admin sslmode=verify-full"
            ]
          ],
          "certificate": {
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        }
      }
    }
  • {
      "connection": {
        "rediss": {
          "composed": [
            "rediss://admin:$PASSWORD@6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud:32658/0"
          ],
          "type": "uri",
          "scheme": "rediss",
          "hosts": [
            {
              "hostname": "6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud",
              "port": 32658
            }
          ],
          "path": "/0",
          "query_options": null,
          "authentication": {
            "method": "direct",
            "username": "admin",
            "password": "$PASSWORD"
          },
          "database": 0,
          "certificate": {
            "name": "014c4682-b21d-11e8-b42a-6eef56314b76",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        },
        "cli": {
          "composed": [
            "REDIS_CERTFILE=014c4682-b21d-11e8-b42a-6eef56314b76 redli -u rediss://admin:$PASSWORD@6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud:32658/0"
          ],
          "type": "cli",
          "environment": {
            "REDIS_CERTFILE\"": "014c4682-b21d-11e8-b42a-6eef56314b76"
          },
          "bin": "redli",
          "arguments": [
            "-u",
            "rediss://admin:$PASSWORD@6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud:32658/0"
          ],
          "certificate": {
            "name": "014c4682-b21d-11e8-b42a-6eef56314b76",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        }
      }
    }
  • {
      "connection": {
        "cli": {
          "arguments": [
            "-u",
            "ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4:$PASSWORD",
            "https://d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31821"
          ],
          "bin": "curl",
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "CURL_CA_BUNDLE=0b22f14b-7ba2-11e8-b8e9-568642342d40 curl -u ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4:$PASSWORD https://d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31821"
          ],
          "environment": {
            "CURL_CA_BUNDLE": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "type": "cli"
        },
        "https": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4"
          },
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "https://ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4:8dc6926bb16c0d52c56cede36cd101481def910fdfdfec3da766da4f9545ff78@d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31821"
          ],
          "hosts": [
            {
              "hostname": "d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 31821
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "https",
          "type": "uri"
        }
      }
    }
  • {
      "connection": {
        "amqps": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368"
          },
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "amqps://ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368:$PASSWORD@1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31683"
          ],
          "hosts": [
            {
              "hostname": "1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 31683
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "amqps",
          "type": "uri"
        },
        "cli": {
          "arguments": [
            "--username=ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368",
            "--password=$PASSWORD",
            "--ssl",
            "--ssl-ca-cert-file=0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "--host=1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
            "--port=31797"
          ],
          "bin": "rabbitmqadmin",
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "rabbitmqadmin --username=ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368 --password=$PASSWORD --ssl --ssl-ca-cert-file=0b22f14b-7ba2-11e8-b8e9-568642342d40 --host=1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud --port=31797"
          ],
          "environment": {},
          "type": "cli"
        },
        "https": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368"
          },
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "https://ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368:$PASSWORD@1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31797"
          ],
          "hosts": [
            {
              "hostname": "1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 31797
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "https",
          "type": "uri"
        }
      }
    }
  • {
      "connection": {
        "cli": {
          "arguments": [
            "--cacert=0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "--endpoints=https://ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32218",
            "--user=ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c:$PASSWORD"
          ],
          "bin": "etcdctl",
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "ETCDCTL_API=3 etcdctl --cacert=0b22f14b-7ba2-11e8-b8e9-568642342d40 --endpoints=https://ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32218 --user=ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c:$PASSWORD"
          ],
          "environment": {
            "ETCDCTL_API": "3"
          },
          "type": "cli"
        },
        "grpc": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c"
          },
          "certificate": null,
          "composed": [
            "http://ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c:$PASSWORD@ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32218"
          ],
          "hosts": [
            {
              "hostname": "ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 32218
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "http",
          "type": "uri"
        }
      }
    }
  • {
      "connection": {
        "mongodb": {
          "composed": [
            "mongodb://ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18:$PASSWORD@bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484/ibmclouddb?authSource=admin",
            "mongodb://ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18:$PASSWORD@bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484/ibmclouddb?authSource=admin"
          ],
          "type": "uri",
          "scheme": "mongodb",
          "hosts": [
            {
              "hostname": "bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud",
              "port": 31484,
              "protocol": "mongodb"
            },
            {
              "hostname": "bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud",
              "port": 31484,
              "protocol": "mongodb"
            }
          ],
          "path": "/ibmclouddb",
          "query_options": {
            "authSource": "admin"
          },
          "authentication": {
            "method": "direct",
            "username": "ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18",
            "password": "$PASSWORD"
          },
          "certificate": {
            "name": "13f690a1-d94d-11e8-955c-127ef829f16b",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        },
        "cli": {
          "composed": [
            "mongo -u ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18 -p $PASSWORD --ssl --sslCAFile 13f690a1-d94d-11e8-955c-127ef829f16b --authenticationDatabase admin --host replset/bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484,bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484"
          ],
          "type": "cli",
          "environment": {},
          "bin": "mongo",
          "arguments": [
            [
              "-u",
              "ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18",
              "-p",
              "$PASSWORD",
              "--ssl",
              "--sslCAFile",
              "13f690a1-d94d-11e8-955c-127ef829f16b",
              "--authenticationDatabase",
              "admin",
              "--host",
              "replset/bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484,bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484"
            ]
          ],
          "certificate": {
            "name": "13f690a1-d94d-11e8-955c-127ef829f16b",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        }
      }
    }

Discover connection information for a deployment for a user with substitutions and an endpoint type.

Discover connection information for a deployment for a user. Behaves the same as the GET method but substitutes the provided password parameter into the returned connection information.

POST /deployments/{id}/users/{user_id}/connections/{endpoint_type}

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • POST /v4/ibm/deployments/:deployment_id/users/:user_id/connections/:endpoint_type

Request

Path Parameters

  • Deployment ID

  • User ID

Optional parameters to be substituted into the response

  • curl -X POST   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/users/{user_id}/connections/{endpoint_type}   -H 'Authorization: Bearer <>'  -H 'Content-Type: application/json'  -d '{"password": "providedpassword"}' \

Response

Status Code

  • A Connection

  • Invalid token

  • An error message response

Example responses
  • {
      "connection": {
        "postgres": {
          "composed": [
            "postgres://admin:givenpassword@1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32121/ibmclouddb?sslmode=verify-full"
          ],
          "type": "uri",
          "scheme": "postgres",
          "hosts": [
            {
              "hostname": "1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 32121
            }
          ],
          "path": "/ibmclouddb",
          "query_options": null,
          "authentication": {
            "method": "direct",
            "username": "admin",
            "password": "givenpassword"
          },
          "database": "ibmclouddb",
          "certificate": {
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        },
        "cli": {
          "composed": [
            "PGPASSWORD=givenpassword PGSSLROOTCERT=0b22f14b-7ba2-11e8-b8e9-568642342d40 psql 'host=1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud port=32121 dbname=ibmclouddb user=admin sslmode=verify-full'"
          ],
          "type": "cli",
          "environment": {
            "PGPASSWORD": "givenpassword"
          },
          "bin": "psql",
          "arguments": [
            [
              "host=1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud port=32121 dbname=ibmclouddb user=admin sslmode=verify-full"
            ]
          ],
          "certificate": {
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        }
      }
    }
  • {
      "connection": {
        "rediss": {
          "composed": [
            "rediss://admin:$PASSWORD@6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud:32658/0"
          ],
          "type": "uri",
          "scheme": "rediss",
          "hosts": [
            {
              "hostname": "6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud",
              "port": 32658
            }
          ],
          "path": "/0",
          "query_options": null,
          "authentication": {
            "method": "direct",
            "username": "admin",
            "password": "$PASSWORD"
          },
          "database": 0,
          "certificate": {
            "name": "014c4682-b21d-11e8-b42a-6eef56314b76",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        },
        "cli": {
          "composed": [
            "REDIS_CERTFILE=014c4682-b21d-11e8-b42a-6eef56314b76 redli -u rediss://admin:$PASSWORD@6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud:32658/0"
          ],
          "type": "cli",
          "environment": {
            "REDIS_CERTFILE\"": "014c4682-b21d-11e8-b42a-6eef56314b76"
          },
          "bin": "redli",
          "arguments": [
            "-u",
            "rediss://admin:$PASSWORD@6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud:32658/0"
          ],
          "certificate": {
            "name": "014c4682-b21d-11e8-b42a-6eef56314b76",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        }
      }
    }
  • {
      "connection": {
        "cli": {
          "arguments": [
            "-u",
            "ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4:$PASSWORD",
            "https://d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31821"
          ],
          "bin": "curl",
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "CURL_CA_BUNDLE=0b22f14b-7ba2-11e8-b8e9-568642342d40 curl -u ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4:$PASSWORD https://d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31821"
          ],
          "environment": {
            "CURL_CA_BUNDLE": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "type": "cli"
        },
        "https": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4"
          },
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "https://ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4:$PASSWORD@d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31821"
          ],
          "hosts": [
            {
              "hostname": "d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 31821
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "https",
          "type": "uri"
        }
      }
    }
  • {
      "connection": {
        "amqps": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368"
          },
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "amqps://ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368:$PASSWORD@1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31683"
          ],
          "hosts": [
            {
              "hostname": "1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 31683
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "amqps",
          "type": "uri"
        },
        "cli": {
          "arguments": [
            "--username=ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368",
            "--password=$PASSWORD",
            "--ssl",
            "--ssl-ca-cert-file=0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "--host=1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
            "--port=31797"
          ],
          "bin": "rabbitmqadmin",
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "rabbitmqadmin --username=ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368 --password=$PASSWORD --ssl --ssl-ca-cert-file=0b22f14b-7ba2-11e8-b8e9-568642342d40 --host=1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud --port=31797"
          ],
          "environment": {},
          "type": "cli"
        },
        "https": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368"
          },
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "https://ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368:$PASSWORD@1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31797"
          ],
          "hosts": [
            {
              "hostname": "1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 31797
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "https",
          "type": "uri"
        }
      }
    }
  • {
      "connection": {
        "cli": {
          "arguments": [
            "--cacert=0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "--endpoints=https://ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32218",
            "--user=ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c:$PASSWORD"
          ],
          "bin": "etcdctl",
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "ETCDCTL_API=3 etcdctl --cacert=0b22f14b-7ba2-11e8-b8e9-568642342d40 --endpoints=https://ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32218 --user=ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c:$PASSWORD"
          ],
          "environment": {
            "ETCDCTL_API": "3"
          },
          "type": "cli"
        },
        "grpc": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c"
          },
          "certificate": null,
          "composed": [
            "http://ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c:$PASSWORD@ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32218"
          ],
          "hosts": [
            {
              "hostname": "ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 32218
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "http",
          "type": "uri"
        }
      }
    }
  • {
      "connection": {
        "mongodb": {
          "composed": [
            "mongodb://ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18:$PASSWORD@bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484/ibmclouddb?authSource=admin",
            "mongodb://ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18:$PASSWORD@bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484/ibmclouddb?authSource=admin"
          ],
          "type": "uri",
          "scheme": "mongodb",
          "hosts": [
            {
              "hostname": "bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud",
              "port": 31484,
              "protocol": "mongodb"
            },
            {
              "hostname": "bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud",
              "port": 31484,
              "protocol": "mongodb"
            }
          ],
          "path": "/ibmclouddb",
          "query_options": {
            "authSource": "admin"
          },
          "authentication": {
            "method": "direct",
            "username": "ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18",
            "password": "$PASSWORD"
          },
          "certificate": {
            "name": "13f690a1-d94d-11e8-955c-127ef829f16b",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        },
        "cli": {
          "composed": [
            "mongo -u ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18 -p $PASSWORD --ssl --sslCAFile 13f690a1-d94d-11e8-955c-127ef829f16b --authenticationDatabase admin --host replset/bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484,bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484"
          ],
          "type": "cli",
          "environment": {},
          "bin": "mongo",
          "arguments": [
            [
              "-u",
              "ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18",
              "-p",
              "$PASSWORD",
              "--ssl",
              "--sslCAFile",
              "13f690a1-d94d-11e8-955c-127ef829f16b",
              "--authenticationDatabase",
              "admin",
              "--host",
              "replset/bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484,bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484"
            ]
          ],
          "certificate": {
            "name": "13f690a1-d94d-11e8-955c-127ef829f16b",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        }
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

Discover connection information for a deployment for a user.

Discover connection information for a deployment for a user.

GET /deployments/{id}/users/{user_id}/connections

Request

Path Parameters

  • Deployment ID

  • User ID

Query Parameters

  • Optional certificate root path to prepend certificate names. Certificates would be stored in this directory for use by other commands.

Response

Status Code

  • A Connection

  • Invalid token

Example responses
  • {
      "connection": {
        "postgres": {
          "composed": [
            "postgres://admin:$PASSWORD@1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32121/ibmclouddb?sslmode=verify-full"
          ],
          "type": "uri",
          "scheme": "postgres",
          "hosts": [
            {
              "hostname": "1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 32121
            }
          ],
          "path": "/ibmclouddb",
          "query_options": null,
          "authentication": {
            "method": "direct",
            "username": "admin",
            "password": "$PASSWORD"
          },
          "database": "ibmclouddb",
          "certificate": {
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        },
        "cli": {
          "composed": [
            "PGPASSWORD=$PASSWORD PGSSLROOTCERT=0b22f14b-7ba2-11e8-b8e9-568642342d40 psql 'host=1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud port=32121 dbname=ibmclouddb user=admin sslmode=verify-full"
          ],
          "type": "cli",
          "environment": {
            "PGPASSWORD": "$PASSWORD"
          },
          "bin": "psql",
          "arguments": [
            [
              "host=1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud port=32121 dbname=ibmclouddb user=admin sslmode=verify-full"
            ]
          ],
          "certificate": {
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        }
      }
    }
  • {
      "connection": {
        "rediss": {
          "composed": [
            "rediss://admin:$PASSWORD@6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud:32658/0"
          ],
          "type": "uri",
          "scheme": "rediss",
          "hosts": [
            {
              "hostname": "6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud",
              "port": 32658
            }
          ],
          "path": "/0",
          "query_options": null,
          "authentication": {
            "method": "direct",
            "username": "admin",
            "password": "$PASSWORD"
          },
          "database": 0,
          "certificate": {
            "name": "014c4682-b21d-11e8-b42a-6eef56314b76",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        },
        "cli": {
          "composed": [
            "REDIS_CERTFILE=014c4682-b21d-11e8-b42a-6eef56314b76 redli -u rediss://admin:$PASSWORD@6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud:32658/0"
          ],
          "type": "cli",
          "environment": {
            "REDIS_CERTFILE\"": "014c4682-b21d-11e8-b42a-6eef56314b76"
          },
          "bin": "redli",
          "arguments": [
            "-u",
            "rediss://admin:$PASSWORD@6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud:32658/0"
          ],
          "certificate": {
            "name": "014c4682-b21d-11e8-b42a-6eef56314b76",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        }
      }
    }
  • {
      "connection": {
        "cli": {
          "arguments": [
            "-u",
            "ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4:$PASSWORD",
            "https://d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31821"
          ],
          "bin": "curl",
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "CURL_CA_BUNDLE=0b22f14b-7ba2-11e8-b8e9-568642342d40 curl -u ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4:$PASSWORD https://d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31821"
          ],
          "environment": {
            "CURL_CA_BUNDLE": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "type": "cli"
        },
        "https": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4"
          },
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "https://ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4:8dc6926bb16c0d52c56cede36cd101481def910fdfdfec3da766da4f9545ff78@d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31821"
          ],
          "hosts": [
            {
              "hostname": "d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 31821
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "https",
          "type": "uri"
        }
      }
    }
  • {
      "connection": {
        "amqps": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368"
          },
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "amqps://ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368:$PASSWORD@1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31683"
          ],
          "hosts": [
            {
              "hostname": "1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 31683
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "amqps",
          "type": "uri"
        },
        "stomp_ssl": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368"
          },
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "hosts": [
            {
              "hostname": "1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 31123,
              "protocol": "stomp-ssl"
            }
          ],
          "ssl": true,
          "type": "stomp"
        },
        "cli": {
          "arguments": [
            "--username=ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368",
            "--password=$PASSWORD",
            "--ssl",
            "--ssl-ca-cert-file=0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "--host=1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
            "--port=31797"
          ],
          "bin": "rabbitmqadmin",
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "rabbitmqadmin --username=ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368 --password=$PASSWORD --ssl --ssl-ca-cert-file=0b22f14b-7ba2-11e8-b8e9-568642342d40 --host=1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud --port=31797"
          ],
          "environment": {},
          "type": "cli"
        },
        "https": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368"
          },
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "https://ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368:$PASSWORD@1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31797"
          ],
          "hosts": [
            {
              "hostname": "1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 31797
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "https",
          "type": "uri"
        }
      }
    }
  • {
      "connection": {
        "cli": {
          "arguments": [
            "--cacert=0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "--endpoints=https://ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32218",
            "--user=ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c:$PASSWORD"
          ],
          "bin": "etcdctl",
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "ETCDCTL_API=3 etcdctl --cacert=0b22f14b-7ba2-11e8-b8e9-568642342d40 --endpoints=https://ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32218 --user=ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c:$PASSWORD"
          ],
          "environment": {
            "ETCDCTL_API": "3"
          },
          "type": "cli"
        },
        "grpc": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c"
          },
          "certificate": null,
          "composed": [
            "http://ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c:$PASSWORD@ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32218"
          ],
          "hosts": [
            {
              "hostname": "ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 32218
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "http",
          "type": "uri"
        }
      }
    }
  • {
      "connection": {
        "mongodb": {
          "composed": [
            "mongodb://ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18:$PASSWORD@bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484/ibmclouddb?authSource=admin",
            "mongodb://ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18:$PASSWORD@bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484/ibmclouddb?authSource=admin"
          ],
          "type": "uri",
          "scheme": "mongodb",
          "hosts": [
            {
              "hostname": "bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud",
              "port": 31484,
              "protocol": "mongodb"
            },
            {
              "hostname": "bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud",
              "port": 31484,
              "protocol": "mongodb"
            }
          ],
          "path": "/ibmclouddb",
          "query_options": {
            "authSource": "admin"
          },
          "authentication": {
            "method": "direct",
            "username": "ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18",
            "password": "$PASSWORD"
          },
          "certificate": {
            "name": "13f690a1-d94d-11e8-955c-127ef829f16b",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        },
        "cli": {
          "composed": [
            "mongo -u ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18 -p $PASSWORD --ssl --sslCAFile 13f690a1-d94d-11e8-955c-127ef829f16b --authenticationDatabase admin --host replset/bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484,bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484"
          ],
          "type": "cli",
          "environment": {},
          "bin": "mongo",
          "arguments": [
            [
              "-u",
              "ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18",
              "-p",
              "$PASSWORD",
              "--ssl",
              "--sslCAFile",
              "13f690a1-d94d-11e8-955c-127ef829f16b",
              "--authenticationDatabase",
              "admin",
              "--host",
              "replset/bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484,bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484"
            ]
          ],
          "certificate": {
            "name": "13f690a1-d94d-11e8-955c-127ef829f16b",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        }
      }
    }

Discover connection information for a deployment for a user with substitutions.

Discover connection information for a deployment for a user. Behaves the same as the GET method but substitutes the given password parameter into the returned connection information.

POST /deployments/{id}/users/{user_id}/connections

Request

Path Parameters

  • Deployment ID

  • User ID

Optional parameters to be substituted into the response

Response

Status Code

  • A Connection

  • Invalid token

  • An error message response

Example responses
  • {
      "connection": {
        "postgres": {
          "composed": [
            "postgres://admin:givenpassword@1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32121/ibmclouddb?sslmode=verify-full"
          ],
          "type": "uri",
          "scheme": "postgres",
          "hosts": [
            {
              "hostname": "1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 32121
            }
          ],
          "path": "/ibmclouddb",
          "query_options": null,
          "authentication": {
            "method": "direct",
            "username": "admin",
            "password": "givenpassword"
          },
          "database": "ibmclouddb",
          "certificate": {
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        },
        "cli": {
          "composed": [
            "PGPASSWORD=givenpassword PGSSLROOTCERT=0b22f14b-7ba2-11e8-b8e9-568642342d40 psql 'host=1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud port=32121 dbname=ibmclouddb user=admin sslmode=verify-full'"
          ],
          "type": "cli",
          "environment": {
            "PGPASSWORD": "givenpassword"
          },
          "bin": "psql",
          "arguments": [
            [
              "host=1b8f53db-fc2d-4e24-8470-f82b15c71717.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud port=32121 dbname=ibmclouddb user=admin sslmode=verify-full"
            ]
          ],
          "certificate": {
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        }
      }
    }
  • {
      "connection": {
        "rediss": {
          "composed": [
            "rediss://admin:$PASSWORD@6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud:32658/0"
          ],
          "type": "uri",
          "scheme": "rediss",
          "hosts": [
            {
              "hostname": "6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud",
              "port": 32658
            }
          ],
          "path": "/0",
          "query_options": null,
          "authentication": {
            "method": "direct",
            "username": "admin",
            "password": "$PASSWORD"
          },
          "database": 0,
          "certificate": {
            "name": "014c4682-b21d-11e8-b42a-6eef56314b76",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        },
        "cli": {
          "composed": [
            "REDIS_CERTFILE=014c4682-b21d-11e8-b42a-6eef56314b76 redli -u rediss://admin:$PASSWORD@6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud:32658/0"
          ],
          "type": "cli",
          "environment": {
            "REDIS_CERTFILE\"": "014c4682-b21d-11e8-b42a-6eef56314b76"
          },
          "bin": "redli",
          "arguments": [
            "-u",
            "rediss://admin:$PASSWORD@6a5e3192-83a6-401f-b9ac-9663b68378fe.1cb1834b36b24f729271d2cfcd2f2177.databases.appdomain.cloud:32658/0"
          ],
          "certificate": {
            "name": "014c4682-b21d-11e8-b42a-6eef56314b76",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        }
      }
    }
  • {
      "connection": {
        "cli": {
          "arguments": [
            "-u",
            "ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4:$PASSWORD",
            "https://d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31821"
          ],
          "bin": "curl",
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "CURL_CA_BUNDLE=0b22f14b-7ba2-11e8-b8e9-568642342d40 curl -u ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4:$PASSWORD https://d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31821"
          ],
          "environment": {
            "CURL_CA_BUNDLE": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "type": "cli"
        },
        "https": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4"
          },
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "https://ibm_cloud_9ba7cc3f_5364_4c05_ba35_3e44f33781c4:$PASSWORD@d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31821"
          ],
          "hosts": [
            {
              "hostname": "d5eeee66-5bc4-499a-b73b-1307848f1eac.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 31821
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "https",
          "type": "uri"
        }
      }
    }
  • {
      "connection": {
        "amqps": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368"
          },
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "amqps://ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368:$PASSWORD@1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31683"
          ],
          "hosts": [
            {
              "hostname": "1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 31683
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "amqps",
          "type": "uri"
        },
        "stomp_ssl": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368"
          },
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "hosts": [
            {
              "hostname": "1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 31123,
              "protocol": "stomp-ssl"
            }
          ],
          "ssl": true,
          "type": "stomp"
        },
        "cli": {
          "arguments": [
            "--username=ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368",
            "--password=$PASSWORD",
            "--ssl",
            "--ssl-ca-cert-file=0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "--host=1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
            "--port=31797"
          ],
          "bin": "rabbitmqadmin",
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "rabbitmqadmin --username=ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368 --password=$PASSWORD --ssl --ssl-ca-cert-file=0b22f14b-7ba2-11e8-b8e9-568642342d40 --host=1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud --port=31797"
          ],
          "environment": {},
          "type": "cli"
        },
        "https": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368"
          },
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "https://ibm_cloud_6829a37b_2ade_4bc5_953e_949a5a46e368:$PASSWORD@1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:31797"
          ],
          "hosts": [
            {
              "hostname": "1a619c43-6415-4abb-8df0-0c7b1b3a3001.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 31797
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "https",
          "type": "uri"
        }
      }
    }
  • {
      "connection": {
        "cli": {
          "arguments": [
            "--cacert=0b22f14b-7ba2-11e8-b8e9-568642342d40",
            "--endpoints=https://ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32218",
            "--user=ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c:$PASSWORD"
          ],
          "bin": "etcdctl",
          "certificate": {
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE...",
            "name": "0b22f14b-7ba2-11e8-b8e9-568642342d40"
          },
          "composed": [
            "ETCDCTL_API=3 etcdctl --cacert=0b22f14b-7ba2-11e8-b8e9-568642342d40 --endpoints=https://ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32218 --user=ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c:$PASSWORD"
          ],
          "environment": {
            "ETCDCTL_API": "3"
          },
          "type": "cli"
        },
        "grpc": {
          "authentication": {
            "method": "direct",
            "password": "$PASSWORD",
            "username": "ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c"
          },
          "certificate": null,
          "composed": [
            "http://ibm_cloud_59699685_b95e_4afe_9d39_7464c228563c:$PASSWORD@ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud:32218"
          ],
          "hosts": [
            {
              "hostname": "ca537b4d-dcf2-467f-bd98-97535f11445b.8f7bfd8f3faa4218aec56e069eb46187.databases.appdomain.cloud",
              "port": 32218
            }
          ],
          "path": "",
          "query_options": {},
          "scheme": "http",
          "type": "uri"
        }
      }
    }
  • {
      "connection": {
        "mongodb": {
          "composed": [
            "mongodb://ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18:$PASSWORD@bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484/ibmclouddb?authSource=admin",
            "mongodb://ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18:$PASSWORD@bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484/ibmclouddb?authSource=admin"
          ],
          "type": "uri",
          "scheme": "mongodb",
          "hosts": [
            {
              "hostname": "bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud",
              "port": 31484,
              "protocol": "mongodb"
            },
            {
              "hostname": "bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud",
              "port": 31484,
              "protocol": "mongodb"
            }
          ],
          "path": "/ibmclouddb",
          "query_options": {
            "authSource": "admin"
          },
          "authentication": {
            "method": "direct",
            "username": "ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18",
            "password": "$PASSWORD"
          },
          "certificate": {
            "name": "13f690a1-d94d-11e8-955c-127ef829f16b",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        },
        "cli": {
          "composed": [
            "mongo -u ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18 -p $PASSWORD --ssl --sslCAFile 13f690a1-d94d-11e8-955c-127ef829f16b --authenticationDatabase admin --host replset/bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484,bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484"
          ],
          "type": "cli",
          "environment": {},
          "bin": "mongo",
          "arguments": [
            [
              "-u",
              "ibm_cloud_986062af_d976_42d0_aedc_87effaa5ce18",
              "-p",
              "$PASSWORD",
              "--ssl",
              "--sslCAFile",
              "13f690a1-d94d-11e8-955c-127ef829f16b",
              "--authenticationDatabase",
              "admin",
              "--host",
              "replset/bd574ce4-7b36-4274-9976-96db99a3ac10-0.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484,bd574ce4-7b36-4274-9976-96db99a3ac10-1.b8a5e798d2d04f2e860e54e5d042c915.databases.appdomain.cloud:31484"
            ]
          ],
          "certificate": {
            "name": "13f690a1-d94d-11e8-955c-127ef829f16b",
            "certificate_base64": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURE..."
          }
        }
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

Get currently available scaling groups from a deployment

Scaling groups represent the various resources that are allocated to a deployment. This command allows for the retrieval of all of the groups for a particular deployment.

GET /deployments/{id}/groups

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • GET /v4/ibm/deployables/:deployable_id/groups

Request

Path Parameters

  • Deployment ID

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/groups   -H 'Authorization: Bearer <>' \

Response

Status Code

  • An array of scaling groups

  • Invalid token

Example responses
  • {
      "groups": [
        {
          "id": "member",
          "count": 3,
          "members": {
            "units": "count",
            "allocation_count": 3,
            "minimum_count": 3,
            "maximum_count": 20,
            "step_size_count": 1,
            "is_adjustable": false,
            "is_optional": false,
            "can_scale_down": false
          },
          "memory": {
            "units": "mb",
            "allocation_mb": 3072,
            "minimum_mb": 3072,
            "maximum_mb": 344064,
            "step_size_mb": 384,
            "is_adjustable": true,
            "can_scale_down": true
          },
          "disk": {
            "units": "mb",
            "allocation_mb": 15360,
            "minimum_mb": 15360,
            "maximum_mb": 11010048,
            "step_size_mb": 3072,
            "is_adjustable": true,
            "can_scale_down": false
          },
          "cpu": {
            "units": "count",
            "allocation_count": 0,
            "minimum_count": 3,
            "maximum_count": 90,
            "step_size_count": 3,
            "is_adjustable": false,
            "is_optional": true
          }
        }
      ]
    }

Get default scaling groups for a new deployment

Scaling groups represent the various resources allocated to a deployment. When a new deployment is created, there are a set of defaults for each database type. This endpoint returns them for a particular database.

GET /deployables/{type}/groups

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • GET /v4/ibm/deployables/:type/groups

Request

Path Parameters

  • Database type name

    Allowable values: [postgresql,etcd]

    Example: postgresql

Query Parameters

  • When a host_flavor of 'multitenant' is included with the request, IBM Cloud Database's new shared compute groups will be returned

    Allowable values: [multitenant]

    Example: multitenant

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployables/{type}/groups   -H 'Authorization: Bearer <>' \

Response

Status Code

  • An array of scaling groups

  • Invalid token

Example responses
  • {
      "groups": [
        {
          "id": "member",
          "count": 3,
          "members": {
            "units": "count",
            "allocation_count": 3,
            "minimum_count": 3,
            "maximum_count": 20,
            "step_size_count": 1,
            "is_adjustable": false,
            "is_optional": false,
            "can_scale_down": false
          },
          "memory": {
            "units": "mb",
            "allocation_mb": 3072,
            "minimum_mb": 3072,
            "maximum_mb": 344064,
            "step_size_mb": 384,
            "is_adjustable": true,
            "can_scale_down": true
          },
          "disk": {
            "units": "mb",
            "allocation_mb": 15360,
            "minimum_mb": 15360,
            "maximum_mb": 11010048,
            "step_size_mb": 3072,
            "is_adjustable": true,
            "can_scale_down": false
          },
          "cpu": {
            "units": "count",
            "allocation_count": 0,
            "minimum_count": 3,
            "maximum_count": 90,
            "step_size_count": 3,
            "is_adjustable": false,
            "is_optional": true
          }
        }
      ]
    }

Set scaling values on a specified group.

Set scaling value on a specified group. Can only be performed on is_adjustable=true groups. Values set are for the group as a whole and resources are distributed amongst the group. Values must be greater than or equal to the minimum size and must be a multiple of the step size.

PATCH /deployments/{id}/groups/{group_id}

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • PATCH /v4/ibm/deployments/:deployment_id/groups/:group_id

Request

Path Parameters

  • Deployment ID

  • Group Id

Scaling group settings

  • curl -X PATCH   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/groups/{group_id}   -H 'Authorization: Bearer <>'  -H 'Content-Type: application/json'  -d '{"memory": {"allocation_mb": 4096}}' \

Response

Status Code

  • A task which is being run to scale the deployment

  • Invalid token

  • An error message response

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f4-b5c96544393b",
        "description": "Scaling database deployment",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:20:30Z"
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

Get the autoscaling configuration from a deployment

The Autoscaling configuration represents the various conditions that control autoscaling for a deployment. This command allows for the retrieval of all autoscaling conditions for a particular deployment.

GET /deployments/{id}/groups/{group_id}/autoscaling

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • GET /v4/ibm/deployments/:deployment_id/groups/:group_id/autoscaling

Request

Path Parameters

  • Deployment ID

  • Group ID

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/groups/{group_id}/autoscaling   -H 'Authorization: Bearer <>' \

Response

Status Code

  • An object containing autoscaling conditions

  • Invalid token

  • Not Found

Example responses
  • {
      "autoscaling": {
        "disk": {
          "scalers": {
            "capacity": {
              "enabled": false,
              "free_space_remaining_percent": 10
            },
            "io_utilization": {
              "enabled": true,
              "over_period": "30m",
              "above_percent": 45
            }
          },
          "rate": {
            "increase_percent": 20,
            "scale_period_seconds": 900,
            "limit_mb_per_member": 3670016,
            "units": "mb"
          }
        },
        "memory": {
          "scalers": {
            "io_utilization": {
              "enabled": false,
              "over_period": "5m",
              "above_percent": 90
            }
          },
          "rate": {
            "increase_percent": 10,
            "period_seconds": 900,
            "limit_mb_per_member": 125952,
            "units": "mb"
          }
        },
        "cpu": {
          "scalers": {},
          "rate": {
            "increase_percent": 10,
            "period_seconds": 300,
            "units": "count",
            "limit_count_per_member": 5
          }
        }
      }
    }

Set the autoscaling configuration from a deployment

Enable, disable, or set the conditions for autoscaling on your deployment. Memory, disk, and CPU (if available) can be set separately and are not all required.

PATCH /deployments/{id}/groups/{group_id}/autoscaling

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • PATCH /v4/ibm/deployments/:deployment_id/groups/:group_id/autoscaling

Auditing

Calling this method generates the following auditing event.

  • <service_id>.autoscaling.update

Request

Path Parameters

  • Deployment ID

  • Group ID

Autoscaling configuration

  • curl -X PATCH   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/groups/{group_id}/autoscaling   -H 'Authorization: Bearer <>'  -H 'Content-Type: application/json'  -d '{"autoscaling": { "memory": {"scalers": {"io_utilization": {"enabled": true, "over_period": "5m","above_percent": 90}},"rate": {"increase_percent": 10.0, "period_seconds": 300,"limit_mb_per_member": 125952,"units": "mb"}}}}' \

Response

Status Code

  • A task which is being run to configure autoscaling

  • Invalid token

  • Not Found

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423a4ef238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4d36-92f3-b5c96544393b",
        "description": "Synthesized autoscaling",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "created_at": "2019-10-17T14:15:52.393Z"
      }
    }

Kill connections to a PostgreSQL or EnterpriseDB deployment

Closes all the connections on a deployment. Available for PostgreSQL and EnterpriseDB ONLY.

DELETE /deployments/{id}/management/database_connections

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • DELETE /v4/ibm/deployments/:deployment_id/management/database_connections

Request

Path Parameters

  • Deployment ID

  • curl -X DELETE   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/management/database_connections   -H 'Authorization: Bearer <>' \

Response

Status Code

  • A task

  • Invalid token

  • not found

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0c59-4db6-92f3-b5c96544393b",
        "description": "Killing all database connections.",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }

Sync files uploaded to Elasticsearch deployment

Starts a task that writes files to disk. Available for Elasticsearch ONLY.

POST /deployments/{id}/elasticsearch/file_syncs

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • POST /v4/ibm/deployments/:deployment_id/elasticsearch/file_syncs

Request

Path Parameters

  • Deployment ID

  • curl -X POST   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/elasticsearch/file_syncs   -H 'Authorization: Bearer <>' \

Response

Status Code

  • A task

  • Invalid token

  • not found

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/274074dce64e9c423ffc238516c755e1:b125f76a-99bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f3-b5c96544393b",
        "description": "Syncing files from standard index.",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-elasticsearch:us-south:a/274074dce64e9c423ffc238516c755e1:b125f76a-99bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 5,
        "created_at": "2018-03-28T10:31:30Z"
      }
    }

Create a new logical replication slot

Creates a new logical replication slot on the specified database. For use with PostgreSQL, EnterpriseDB, and wal2json only.

POST /deployments/{id}/postgresql/logical_replication_slots

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • POST /v4/ibm/deployments/:deployment_id/postgresql/logical_replication_slots

Request

Path Parameters

  • Deployment ID

Defines the logical replication slot. All fields are required.

  • curl -X POST   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/postgresql/logical_replication_slots   -H 'Authorization: Bearer <>'  -H 'Content-Type: application/json'  -d '{"logical_replication_slot":{"name": "customer_replication","database_name": "customers","plugin_type": "wal2json"}}' \

Response

Status Code

  • A task

  • Invalid token

  • not found

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:eu-de:a/057f598ff0b94d9663c28b68843eaab3:b544602f-ad0a-405b-ba39-2e69d04ff3a2:task:d29ea458-5c11-486f-9182-1984ec5d5314",
        "description": "Creating logical replication slot",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:eu-de:a/057f598ff0b94d9663c28b68843eaab3:b544602f-ad0a-405b-ba39-2e69d04ff3a2::",
        "progress_percent": 0,
        "created_at": "2019-05-31T10:20:30Z"
      }
    }

Delete a logical replication slot

Deletes a logical replication slot from a database. For use with PostgreSQL, EnterpriseDB, and wal2json only.

DELETE /deployments/{id}/postgresql/logical_replication_slots/{name}

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • DELETE /v4/ibm/deployments/:deployment_id/postgresql/logical_replication_slots/:name

Request

Path Parameters

  • Deployment ID

  • Name of the logical replication slot

  • curl -X DELETE   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/postgresql/logical_replication_slots/customer_replication   -H 'Authorization: Bearer <>' \

Response

Status Code

  • A task

  • Invalid token

  • not found

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:eu-de:a/057f598ff0b94d9663c28b68843eaab3:b544602f-ad0a-405b-ba39-2e69d04ff3a2:task:d29ea458-5c11-486f-9182-1894ec5d5314",
        "description": "Deleting logical replication slot",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:eu-de:a/057f598ff0b94d9663c28b68843eaab3:b544602f-ad0a-405b-ba39-2e69d04ff3a2::",
        "progress_percent": 0,
        "created_at": "2019-05-31T10:20:30Z"
      }
    }

Retrieve the allowlisted addresses and ranges for a deployment.

Retrieve the allowlisted addresses and ranges for a deployment.

GET /deployments/{id}/whitelists/ip_addresses

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • GET /v4/ibm/deployments/:deployment_id/whitelists/ip_addresses

Request

Path Parameters

  • Deployment ID

  • curl -X GET   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/whitelists/ip_addresses   -H 'Authorization: Bearer <>' \

Response

Status Code

  • An allowlist

  • Invalid token

  • An error message response

Example responses
  • {
      "ip_addresses": [
        {
          "address": "195.212.0.0/16",
          "description": "Dev IP space 1"
        },
        {
          "address": "195.0.0.0/8",
          "description": "BB Lab"
        },
        {
          "address": "46.5.0.0/16",
          "description": "Dev IP space 2"
        },
        {
          "address": "10.187.176.142/32",
          "description": "Demo SL VSI"
        }
      ]
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

Replace the allowlist for a deployment.

Replace the allowlist for a deployment. This action overwrites all existing entries, so when you modify the allowlist via a GET/update/PUT, provide the GET response's ETag header value in this endpoint's If-Match header to ensure that changes that are made by other clients are not accidentally overwritten.

PUT /deployments/{id}/whitelists/ip_addresses

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • PUT /v4/ibm/deployments/:deployment_id/whitelists/ip_addresses

Auditing

Calling this method generates the following auditing event.

  • <service_id>.whitelisted-ips-list.update

Request

Custom Headers

  • Verify that the current allowlist matches a provided ETag value. Use in conjunction with the GET operation's ETag header to ensure synchronicity between clients.

Path Parameters

  • Deployment ID

New allowlist

  • curl -X PUT   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/whitelists/ip_addresses   -H 'Authorization: Bearer <>'  -H 'Content-Type: application/json'  -d '{"ip_addresses": [{"address": "195.212.0.0/16", "description": "Dev IP space 1"},{"address": "195.0.0.0/8", "description": "BB Lab"}, {"address": "46.5.0.0/16","description": "Dev IP space 2"}, {"address": "10.187.176.142/32", "description": "Demo SL VSI"}]}' \

Response

Status Code

  • A task which is being run to add the allowlist entry

  • Invalid token

  • An error message response

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f3-b5c96544573b",
        "description": "Updating allowlist for database",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 10,
        "created_at": "2018-03-28T10:21:30Z"
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

Add an address or range to the allowlist for a deployment.

Add an address or range to the allowlist for a deployment.

POST /deployments/{id}/whitelists/ip_addresses

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • POST /v4/ibm/deployments/:deployment_id/whitelists/ip_addresses

Request

Path Parameters

  • Deployment ID

New allowlist Entry

  • curl -X POST   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/whitelists/ip_addresses   -H 'Authorization: Bearer <>'  -H 'Content-Type: application/json'  -d '{"ip_address": {"address": "http://172.16.254.1/16", "description": "Dev IP space 3"}}' \

Response

Status Code

  • A task which is being run to add the allowlist entry

  • Invalid token

  • An error message response

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4db6-92f3-d9c96544393b",
        "description": "Adding allowlist entry for database",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 10,
        "created_at": "2018-03-28T10:21:30Z"
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }

Delete an address or range from the allowlist of a deployment.

Delete an address or range from the allowlist of a deployment.

DELETE /deployments/{id}/whitelists/ip_addresses/{ipaddress}

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • DELETE /v4/ibm/deployments/:deployment_id/whitelists/ip_addresses/:ip_address_id

Request

Path Parameters

  • Deployment ID

  • An IPv4 address or a CIDR range (netmasked IPv4 address)

  • curl -X DELETE   https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/whitelists/ip_addresses/{ipaddress}   -H 'Authorization: Bearer <>' \

Response

Status Code

  • A task which is being run to delete the allowlist entry

  • Invalid token

  • An error message response

Example responses
  • {
      "task": {
        "id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd:task:3dc480bd-0cd9-4d36-92f3-b5c96544393b",
        "description": "Deleting allowlist entry for database",
        "status": "running",
        "deployment_id": "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/274074dce64e9c423ffc238516c755e1:a127f76a-98bf-4f8b-b263-01d9e16b15bd::",
        "progress_percent": 15,
        "created_at": "2018-03-28T10:25:30Z"
      }
    }
  • {
      "errors": {
        "error.source": [
          "readable error message",
          "more error messages"
        ],
        "other.source": [
          "other errors"
        ]
      }
    }