Skip to content

dbaas post create

Marco-Garro edited this page Jan 21, 2025 · 1 revision

POST /api/v1.0/dbaas/create

Creates a new database on the cloud provider.

Request

Headers

Header Value
content-type application/json
Async boolean

NOTE: The async header is optional. If set to true, the request will be processed asynchronously and the response will contain a poolingURL with the URL to check the status of the request. If set to false, the request will be processed synchronously and the response will contain the result of the request.

Body

{
  "req": {
      "name": "test-db",
      "engine": "redis",
      "backup_time": "hh:mm:ss",
      "disk_size": 10,
      "ip_restrictions": ["192.0.2.0/24"],
      "password": "Good-Password!?",
      "nodes_number": 3
  },
  "client_uid": "ffffffff-ffff-ffff-ffff-ffffffffffff"
}

Body Attributes

client_uid

Type: string
Description:
The unique identifier of the client.

req

Type: object
Description:
The request object.
Attributes:

  • name:
    • Type: string
    • Description: The name of the database.
  • engine:
    • Type: string
    • Description: The database engine, can be selected between mongodb, mysql, postgresql, redis, cassandra, m3db.
  • backup_time:
    • Type: string
    • Description: The time when will be performed the backup, (hh:mm:ss).
  • disk_size:
    • Type: integer
    • Description: The size of the disk in GB.
  • ip_restrictions:
    • Type: array
    • Description: The list of ip networks to which restrict the database.
  • password:
    • Type: string
    • Description: The password of the database.
  • nodes_number:
    • Type: integer
    • Description: The number of nodes of the database.

Response

Headers

Header Value
content-type application/json

Body

Synchronous Response

{
  "id": "string",
  "description": "name.client_uid",
  "username": "admin@admin",
  "password": "string",
  "backups": {
    "pitr": "string",
    "retention_days": "int",
    "regions": [
        "string"
    ],
    "time": "hh:mm:ss"
  },
  "disk_size": "int",
  "engine": "string",
  "ip_restrictions": [],
  "nodes": [
    {
        "id": "string",
        "created_at": "datetime",
        "flavor": "string",
        "region": "string",
        "port": "int",
        "status": "string"
    },
    ...
  ],
  "endpoints": [
    {
      "component": "string",
      "domain": "string",
      "path": "string",
      "port": "string",
      "scheme": "string",
      "ssl": "string",
      "ssl_mode": "string",
      "uri": "string"
    },
    ...
  ],
  "created_at": "datetime",
  "version": "string"
}

Body Attributes

id

Type: string
Description:
An uuid4 that identifies the database.

description

Type: string
Description:
The description of the database, "name.client_uid".

username

Type: string
Description:
The username to access the database.

password

Type: string
Description:
The password to access the database.

backups

Type: object
Description:
The backup configuration.
Attributes:

  • pitr: ????????????
    • Type: string
    • Description: .
  • retention_days: ????????????
    • Type: integer
    • Description: .
  • regions: ????????????
    • Type: array
    • Description: .
  • time:
    • Type: string
    • Description: The time when will be performed the backup, (hh:mm:ss).

#### `disk_size` **Type**: `integer`
**Description**:
The size of the disk in GB.
#### `engine` **Type**: `string`
**Description**:
The database engine, can be selected between mongodb, mysql, postgresql, redis, cassandra, m3db. #### `ip_restrictions` **Type**: `array`
**Description**:
The list of ip networks to which restrict the database.
#### `nodes` **Type**: `array`
**Description**:
The list of nodes of the database.
**Attributes**: - `id`: - **Type**: `string` - **Description**: The unique identifier of the node. - `created_at`: - **Type**: `datetime` - **Description**: The creation date of the node, `%m/%d/%Y, %H:%M:%S`. - `flavor`: ????????? - **Type**: `string` - **Description**: . - `region`: - **Type**: `string` - **Description**: The region where the node is located. - `port`: ????????? - **Type**: `integer` - **Description**: . - `status`: - **Type**: `string` - **Description**: The status of the node. #### `endpoints` ????????????? **Type**: `array`
**Description**:
The list of endpoints of the database.
**Attributes**: - `component`: - **Type**: `string` - **Description**: . - `domain`: - **Type**: `string` - **Description**: . - `path`: - **Type**: `string` - **Description**: . - `port`: - **Type**: `string` - **Description**: . - `scheme`: - **Type**: `string` - **Description**: . - `ssl`: - **Type**: `string` - **Description**: . - `ssl_mode`: - **Type**: `string` - **Description**: . - `uri`: - **Type**: `string` - **Description**: The uri of the endpoint. #### `created_at` **Type**: `datetime`
**Description**:
The creation date of the database, `%m/%d/%Y, %H:%M:%S`.
#### `version` **Type**: `string`
**Description**:
The version of the database.

Async Response

{
  "service_id": "ffffffff-ffff-ffff-ffff-ffffffffffff",
  "poolingURL": "https://<meson_ip>:7770/api/v1.0/running/<db_id>"
}

Body Attributes

service_id

Type: string
Description:
The unique identifier of the database on the cloud provider.

poolingURL

Type: string
Description:
The URL to check the status of the request.

Clone this wiki locally