Skip to main content
PATCH
/
databases
/
{database}
Update database cluster
curl --request PATCH \
  --url https://app.laravel.cloud/api/databases/{database} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "config": {
    "cu_min": 0.25,
    "cu_max": 0.25,
    "suspend_seconds": 123,
    "retention_days": 123
  }
}
'
{
  "data": {
    "id": "<string>",
    "type": "databases",
    "attributes": {
      "name": "<string>",
      "type": "laravel_mysql_8",
      "status": "creating",
      "region": "us-east-2",
      "created_at": "2023-11-07T05:31:56Z",
      "config": {
        "cu_min": 0.25,
        "cu_max": 0.25,
        "suspend_seconds": 123,
        "retention_days": 123
      },
      "connection": {
        "hostname": "<string>",
        "port": 123,
        "protocol": "<string>",
        "driver": "<string>",
        "username": "<string>",
        "password": "<string>"
      }
    },
    "relationships": {
      "schemas": {
        "data": [
          {
            "type": "databaseSchemas",
            "id": "<string>"
          }
        ]
      }
    }
  },
  "included": [
    {
      "id": "<string>",
      "type": "databaseSchemas",
      "attributes": {
        "name": "<string>",
        "created_at": "2023-11-07T05:31:56Z"
      },
      "relationships": {
        "database": {
          "data": {
            "type": "databases",
            "id": "<string>"
          }
        }
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

The Bearer Token generated on the Cloud UI.

Path Parameters

database
string | null
required

The database identifier

Body

application/json
config
object
required

Configuration object. Fields vary based on database type.

Response

DatabaseResource

data
DatabaseResource · object
required
included
DatabaseSchemaResource · object[]