UpCloud

Managed Databases

A Managed Database is a database-as-a-service which lets you use a database without setting up a server or database software. The configuration defines high-availability, resources, software version, and security parameters.

Managed Databases support MySQL, PostgreSQL, Valkey, and OpenSearch. They are available in every UpCloud zone. API requests and responses use JSON format.


Database states

The service state indicates the current status.

  • Name
    pending
    Description

    Newly created service or started reconfiguration.

  • Name
    setup-network
    Description

    Configuring network.

  • Name
    setup-peer
    Description

    Configuring SDN network peerings if provided.

  • Name
    setup-service
    Description

    Service is being created or reconfigured.

  • Name
    rebuilding
    Description

    Service creation in progress.

  • Name
    rebalancing
    Description

    Service is being upgraded or migrated.

  • Name
    running
    Description

    Service up and running.

  • Name
    stopped
    Description

    Service is stopped.

  • Name
    error
    Description

    Service encountered an error requiring user action.


Available databases

  • Name
    MySQL
    Description

    Enterprise-grade open-source relational database. Uses MySQL Community Edition.

  • Name
    PostgreSQL
    Description

    Object-relational database emphasizing extensibility and SQL compliance.

  • Name
    Valkey
    Description

    Open-source key-value database, cache, and message broker supporting various data structures.

  • Name
    OpenSearch
    Description

    Searchable data collection for discovery and access across different sources.


GET/1.3/database/service-types

List database types

Returns a list of available database types including plans, zones, versions, and configuration properties.

Request

GET
/1.3/database/service-types
curl -X GET https://api.upcloud.com/1.3/database/service-types \
  -u your_username:your_password

GET/1.3/database/service-types/{type}

Get database type details

Returns detailed information about a specific database type.

Request

GET
/1.3/database/service-types/{type}
curl -X GET https://api.upcloud.com/1.3/database/service-types/pg \
  -u your_username:your_password

GET/1.3/database/ca-certificate

Get CA certificate

Returns the certificate authority (CA) certificate for Managed Database connections.

Request

GET
/1.3/database/ca-certificate
curl -X GET https://api.upcloud.com/1.3/database/ca-certificate \
  -u your_username:your_password

GET/1.3/database

List databases

Returns a list of all Managed Databases in the account.

Query parameters

  • Name
    label
    Type
    string
    Description

    Filter by label (e.g., ?label=env=prod).

Request

GET
/1.3/database
curl -X GET https://api.upcloud.com/1.3/database \
  -u your_username:your_password

GET/1.3/database/{uuid}

Get database details

Returns detailed information about a specific Managed Database.

Request

GET
/1.3/database/{uuid}
curl -X GET https://api.upcloud.com/1.3/database/09a4b9d5-c1f8-4c9f-9e7a-1234567890ab \
  -u your_username:your_password

GET/1.3/database/{uuid}/versions

Get database versions

Returns available versions for a specific Managed Database service.

Request

GET
/1.3/database/{uuid}/versions
curl -X GET https://api.upcloud.com/1.3/database/09a4b9d5-c1f8-4c9f-9e7a-1234567890ab/versions \
  -u your_username:your_password

POST/1.3/database

Create database

Creates a new Managed Database service.

Attributes

  • Name
    name
    Type
    string
    Description

    Database name (lowercase alphanumeric, max 64 chars). Required.

  • Name
    plan
    Type
    string
    Description

    Service plan identifier. Required.

  • Name
    title
    Type
    string
    Description

    Human-readable title (max 255 chars).

  • Name
    type
    Type
    string
    Description

    Database type: "mysql", "pg", "valkey", or "opensearch". Required.

  • Name
    zone
    Type
    string
    Description

    Zone identifier. Required.

  • Name
    maintenance
    Type
    object
    Description

    Maintenance window configuration.

  • Name
    properties
    Type
    object
    Description

    Database-specific configuration properties.

  • Name
    labels
    Type
    array
    Description

    Labels for classification.

Request

POST
/1.3/database
curl -X POST https://api.upcloud.com/1.3/database \
  -u your_username:your_password \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-mysql-db",
    "plan": "1x1xCPU-2GB-25GB",
    "title": "My MySQL Database",
    "type": "mysql",
    "zone": "fi-hel1",
    "maintenance": {
      "dow": "monday",
      "time": "03:00:00"
    },
    "properties": {
      "public_access": true,
      "version": "8"
    },
    "labels": [
      {"key": "env", "value": "prod"}
    ]
  }'

PATCH/1.3/database/{uuid}

Modify database

Modifies an existing Managed Database service.

Attributes

  • Name
    plan
    Type
    string
    Description

    Service plan identifier.

  • Name
    title
    Type
    string
    Description

    Human-readable title.

  • Name
    maintenance
    Type
    object
    Description

    Maintenance window configuration.

  • Name
    properties
    Type
    object
    Description

    Database-specific configuration properties.

  • Name
    powered
    Type
    boolean
    Description

    Power state: true to start, false to stop.

  • Name
    labels
    Type
    array
    Description

    Labels for classification.

Request

PATCH
/1.3/database/{uuid}
curl -X PATCH https://api.upcloud.com/1.3/database/09a4b9d5-c1f8-4c9f-9e7a-1234567890ab \
  -u your_username:your_password \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated MySQL Database",
    "plan": "2x2xCPU-4GB-50GB",
    "maintenance": {
      "dow": "sunday",
      "time": "04:00:00"
    }
  }'

DELETE/1.3/database/{uuid}

Delete database

Deletes a Managed Database service and all its data.

Request

DELETE
/1.3/database/{uuid}
curl -X DELETE https://api.upcloud.com/1.3/database/09a4b9d5-c1f8-4c9f-9e7a-1234567890ab \
  -u your_username:your_password