Databases

PostgreSQL, MySQL, MariaDB, MongoDB, Redis and libSQL databases: create, deploy, start, stop and delete.

Each database engine has the same set of routes under its own prefix. PostgreSQL, MySQL and Redis can also run in a Cloud account (RDS, Cloud SQL, ElastiCache, Memorystore) or stand for an existing database made outside Cloudgate.

Every request goes to https://cloudgate.octabyte.app/backend on the Hosted instance, or to your console address followed by /backend when you self-host. Send a Personal key in x-api-key and the Organization in x-organization-id; Authentication shows how to make the key, and Errors explains every refusal. The examples setCLOUDGATE_KEY and CLOUDGATE_ORG_ID in the shell first. To do the same in the console, read Databases in the user guide.

PostgreSQL

Create a PostgreSQL database

POST/postgres

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Request body

FieldTypeNotes
namerequiredstring1 to 100 characters.
appNamestring1 to 63 characters. Matches ^[a-zA-Z0-9_][a-zA-Z0-9._-]*$.
databaseNamerequiredstring1 to 63 characters. Matches ^[A-Za-z_][A-Za-z0-9_]*$.
databaseUserrequiredstring1 to 63 characters. Matches ^[A-Za-z_][A-Za-z0-9_]*$.
databasePasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
dockerImagestringMatches ^(?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*(?::[\w][\w.-]{0,127})?(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,})?$.
descriptionstring
environmentIdrequiredstringNot empty.
serverIdstring or null

Responses

201 Created
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/postgres \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "orders-db",
    "databaseName": "example",
    "databaseUser": "example",
    "environmentId": "UVFRqyCfWEtSm6NdDvrZc"
  }'

Use an existing PostgreSQL database

POST/postgres/existing

"Use an existing database": the Environment's entry stands for an RDS instance the operator already has.

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Request body

FieldTypeNotes
environmentIdrequiredstringNot empty.
configNamerequiredstringMatches ^[a-z][a-z0-9-]{0,62}$.
identifierrequiredstring
databaseUserrequiredstring1 to 63 characters.
databasePasswordrequiredstring1 to 128 characters.
databaseNamerequiredstring1 to 63 characters.
madeReachablebooleanDefault false.

Responses

201 Created
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/postgres/existing \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "environmentId": "UVFRqyCfWEtSm6NdDvrZc",
    "configName": "example",
    "identifier": "example",
    "databaseUser": "example",
    "databasePassword": "<secret>",
    "databaseName": "example"
  }'

Read reach for an existing PostgreSQL database

GET/postgres/existing/reach

What the "Use an existing database" form shows: where this Environment's Services reach a database from, to let in.

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Parameters

NameInTypeNotes
environmentIdrequiredquerystringNot empty.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl "https://cloudgate.octabyte.app/backend/postgres/existing/reach?environmentId=UVFRqyCfWEtSm6NdDvrZc" \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Update an existing PostgreSQL database

PATCH/postgres/{id}/existing

An Existing database's login, identifier or tick.

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Request body

FieldTypeNotes
identifierstring
databaseUserstring1 to 63 characters.
databasePasswordstring1 to 128 characters.
databaseNamestring1 to 63 characters.
madeReachableboolean

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/existing \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "identifier": "example",
    "databaseUser": "example",
    "databasePassword": "<secret>"
  }'

Switch to an existing PostgreSQL database

POST/postgres/{id}/switch/to-existing

A switch between a Cloudgate-made and an existing database, asked for on the Service's page: to-existing takes what "Use an existing database" takes, to-made nothing. Nothing changes until the next plan's Apply, which removes one Service and adds the other — its destroy confirmed by name, as any.

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Request body

FieldTypeNotes
identifierrequiredstring
databaseUserrequiredstring1 to 63 characters.
databasePasswordrequiredstring1 to 128 characters.
databaseNamerequiredstring1 to 63 characters.
madeReachablebooleanDefault false.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/switch/to-existing \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "identifier": "example",
    "databaseUser": "example",
    "databasePassword": "<secret>",
    "databaseName": "example"
  }'

Switch to a Cloudgate-made PostgreSQL database

POST/postgres/{id}/switch/to-made

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/switch/to-made \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Cancel the switch of a PostgreSQL database

DELETE/postgres/{id}/switch

Cancels a switch no Apply has made yet.

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X DELETE https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/switch \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Deploy a PostgreSQL database

POST/postgres/{id}/deploy

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/deploy \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Get a PostgreSQL database

GET/postgres/{id}

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Update a PostgreSQL database

PATCH/postgres/{id}

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Request body

FieldTypeNotes
namestring1 to 100 characters.
descriptionstring or null
databaseNamestringNot empty.
databaseUserstringNot empty.
databasePasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
dockerImagestringMatches ^(?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*(?::[\w][\w.-]{0,127})?(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,})?$.
commandstring or null
argsarray of string or null
memoryReservationstring or null
memoryLimitstring or null
cpuReservationstring or null
cpuLimitstring or null
replicasintegerAt least 0.
healthCheckSwarmobject or null
healthCheckSwarm.Testarray of string
healthCheckSwarm.Intervalnumber
healthCheckSwarm.Timeoutnumber
healthCheckSwarm.StartPeriodnumber
healthCheckSwarm.Retriesnumber
restartPolicySwarmobject or null
restartPolicySwarm.Conditionstring
restartPolicySwarm.Delaynumber
restartPolicySwarm.MaxAttemptsnumber
restartPolicySwarm.Windownumber
placementSwarmobject or null
placementSwarm.Constraintsarray of string
placementSwarm.Preferencesarray of object
placementSwarm.Preferences[].Spreadrequiredobject
placementSwarm.MaxReplicasnumber
placementSwarm.Platformsarray of object
placementSwarm.Platforms[].Architecturerequiredstring
placementSwarm.Platforms[].OSrequiredstring
updateConfigSwarmobject or null
updateConfigSwarm.Parallelismrequirednumber
updateConfigSwarm.Delaynumber
updateConfigSwarm.FailureActionstring
updateConfigSwarm.Monitornumber
updateConfigSwarm.MaxFailureRationumber
updateConfigSwarm.Orderrequiredstring
rollbackConfigSwarmobject or null
rollbackConfigSwarm.Parallelismrequirednumber
rollbackConfigSwarm.Delaynumber
rollbackConfigSwarm.FailureActionstring
rollbackConfigSwarm.Monitornumber
rollbackConfigSwarm.MaxFailureRationumber
rollbackConfigSwarm.Orderrequiredstring
modeSwarmobject or null
modeSwarm.Replicatedobject
modeSwarm.Replicated.Replicasnumber
modeSwarm.Globalobject
modeSwarm.ReplicatedJobobject
modeSwarm.ReplicatedJob.MaxConcurrentnumber
modeSwarm.ReplicatedJob.TotalCompletionsnumber
modeSwarm.GlobalJobobject
labelsSwarmmap of string or null
networkSwarmarray of object or null
networkSwarm[].Targetstring
networkSwarm[].Aliasesarray of string
networkSwarm[].DriverOptsmap of string
stopGracePeriodSwarmnumber or null
endpointSpecSwarmobject or null
endpointSpecSwarm.Modestring
endpointSpecSwarm.Portsarray of object
endpointSpecSwarm.Ports[].Protocolstring
endpointSpecSwarm.Ports[].TargetPortnumber
endpointSpecSwarm.Ports[].PublishedPortnumber
endpointSpecSwarm.Ports[].PublishModestring
ulimitsSwarmarray of object or null
ulimitsSwarm[].Namerequiredstring
ulimitsSwarm[].Softrequirednumber
ulimitsSwarm[].Hardrequirednumber

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "orders-db",
    "description": "Storefront for Northwind Labs",
    "databaseName": "example"
  }'

Delete a PostgreSQL database

DELETE/postgres/{id}

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.
forcerequiredquerystring
deleteDatarequiredquerystring

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X DELETE "https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC?force=example&deleteData=example" \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Save RDS settings of a PostgreSQL database

PATCH/postgres/{id}/rds-settings

Cloudgate's own settings of a postgres on RDS: its class when the entry has no size, storage and its ceiling, Multi-AZ and backup retention, applied by the next plan's Apply.

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Request body

FieldTypeNotes
instanceClassstringNot empty.
storageGbinteger20 to 65536.
maxStorageGbinteger20 to 65536.
multiAzboolean
backupRetentionDaysinteger1 to 35.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/rds-settings \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "instanceClass": "example",
    "storageGb": 20,
    "maxStorageGb": 20
  }'

Save Cloud SQL settings of a PostgreSQL database

PATCH/postgres/{id}/cloud-sql-settings

Cloudgate's own setting of a postgres on Cloud SQL: its backup retention, 1 to 365 days, edited on its Backups tab and applied by the next plan's Apply. Refused for a postgres anywhere else.

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Request body

FieldTypeNotes
backupRetentionDaysrequiredinteger1 to 365.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/cloud-sql-settings \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "backupRetentionDays": 1
  }'

List cloud backups of a PostgreSQL database

GET/postgres/{id}/cloud-backups

A postgres in a Cloud account's Backups tab: its retention, the window a restore reaches and its snapshots or backups, read live from RDS or Cloud SQL.

Who can call it: Owner, Admin or Member. Needs backup: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/cloud-backups \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Save the environment variables of a PostgreSQL database

PATCH/postgres/{id}/environment

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Request body

FieldTypeNotes
envrequiredstring or null

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/environment \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "env": "NODE_ENV=production"
  }'

Change status of a PostgreSQL database

POST/postgres/{id}/status

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Request body

FieldTypeNotes
applicationStatusrequiredstringOne of idle, running, done, error, stopped.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/status \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "applicationStatus": "idle"
  }'

Check the data volume of a PostgreSQL database

GET/postgres/{id}/volume

Whether <appName>-data is on the Server now, for the Delete dialog. present is null when it cannot be known — a multi-node swarm, or a Server that did not answer.

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/volume \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Preview the final snapshot of a PostgreSQL database

GET/postgres/{id}/final-snapshot

The final snapshot a Delete pressed now keeps, and about what it costs a month, for the Delete dialog of a database in a Cloud account.

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/final-snapshot \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Retry deleting a PostgreSQL database

POST/postgres/{id}/delete/retry

Retry a cloud database's incomplete Delete: another destroy-only Cloud run from the kept state.

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/delete/retry \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Forget the incomplete delete of a PostgreSQL database

POST/postgres/{id}/delete/forget

Forget a cloud database's incomplete Delete: the row dropped, what is left in AWS written into the audit entry.

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/delete/forget \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Set the external port of a PostgreSQL database

POST/postgres/{id}/external-port

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Request body

FieldTypeNotes
externalPortrequiredinteger or null1 to 65535.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/external-port \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "externalPort": 3000
  }'

Rebuild a PostgreSQL database

POST/postgres/{id}/rebuild

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/rebuild \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Start a PostgreSQL database

POST/postgres/{id}/start

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/start \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Stop a PostgreSQL database

POST/postgres/{id}/stop

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe PostgreSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/postgres/RAU6yAYUXFRdXdPLyLoPC/stop \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

MySQL

Create a MySQL database

POST/mysql

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Request body

FieldTypeNotes
namerequiredstring1 to 100 characters.
appNamestring1 to 63 characters. Matches ^[a-zA-Z0-9_][a-zA-Z0-9._-]*$.
databaseNamerequiredstring1 to 64 characters. Matches ^[A-Za-z_][A-Za-z0-9_]*$.
databaseUserrequiredstring1 to 32 characters. Matches ^[A-Za-z_][A-Za-z0-9_]*$.
databasePasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
databaseRootPasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
dockerImagestringMatches ^(?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*(?::[\w][\w.-]{0,127})?(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,})?$.
descriptionstring
environmentIdrequiredstringNot empty.
serverIdstring or null

Responses

201 Created
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mysql \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "catalog-db",
    "databaseName": "example",
    "databaseUser": "example",
    "environmentId": "UVFRqyCfWEtSm6NdDvrZc"
  }'

Use an existing MySQL database

POST/mysql/existing

"Use an existing database": the Environment's entry stands for an RDS instance the operator already has.

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Request body

FieldTypeNotes
environmentIdrequiredstringNot empty.
configNamerequiredstringMatches ^[a-z][a-z0-9-]{0,62}$.
identifierrequiredstring
databaseUserrequiredstring1 to 63 characters.
databasePasswordrequiredstring1 to 128 characters.
databaseNamerequiredstring1 to 63 characters.
madeReachablebooleanDefault false.

Responses

201 Created
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mysql/existing \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "environmentId": "UVFRqyCfWEtSm6NdDvrZc",
    "configName": "example",
    "identifier": "example",
    "databaseUser": "example",
    "databasePassword": "<secret>",
    "databaseName": "example"
  }'

Read reach for an existing MySQL database

GET/mysql/existing/reach

What the "Use an existing database" form shows: where this Environment's Services reach a database from, to let in.

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Parameters

NameInTypeNotes
environmentIdrequiredquerystringNot empty.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl "https://cloudgate.octabyte.app/backend/mysql/existing/reach?environmentId=UVFRqyCfWEtSm6NdDvrZc" \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Update an existing MySQL database

PATCH/mysql/{id}/existing

An Existing database's login, identifier or tick.

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Request body

FieldTypeNotes
identifierstring
databaseUserstring1 to 63 characters.
databasePasswordstring1 to 128 characters.
databaseNamestring1 to 63 characters.
madeReachableboolean

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/existing \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "identifier": "example",
    "databaseUser": "example",
    "databasePassword": "<secret>"
  }'

Switch to an existing MySQL database

POST/mysql/{id}/switch/to-existing

A switch between a Cloudgate-made and an existing database, asked for on the Service's page: to-existing takes what "Use an existing database" takes, to-made nothing. Nothing changes until the next plan's Apply, which removes one Service and adds the other — its destroy confirmed by name, as any.

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Request body

FieldTypeNotes
identifierrequiredstring
databaseUserrequiredstring1 to 63 characters.
databasePasswordrequiredstring1 to 128 characters.
databaseNamerequiredstring1 to 63 characters.
madeReachablebooleanDefault false.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/switch/to-existing \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "identifier": "example",
    "databaseUser": "example",
    "databasePassword": "<secret>",
    "databaseName": "example"
  }'

Switch to a Cloudgate-made MySQL database

POST/mysql/{id}/switch/to-made

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/switch/to-made \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Cancel the switch of a MySQL database

DELETE/mysql/{id}/switch

Cancels a switch no Apply has made yet.

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X DELETE https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/switch \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Deploy a MySQL database

POST/mysql/{id}/deploy

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/deploy \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Get a MySQL database

GET/mysql/{id}

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Update a MySQL database

PATCH/mysql/{id}

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Request body

FieldTypeNotes
namestring1 to 100 characters.
descriptionstring or null
databaseNamestringNot empty.
databaseUserstringNot empty.
databasePasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
databaseRootPasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
dockerImagestringMatches ^(?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*(?::[\w][\w.-]{0,127})?(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,})?$.
commandstring or null
argsarray of string or null
memoryReservationstring or null
memoryLimitstring or null
cpuReservationstring or null
cpuLimitstring or null
replicasintegerAt least 0.
healthCheckSwarmobject or null
healthCheckSwarm.Testarray of string
healthCheckSwarm.Intervalnumber
healthCheckSwarm.Timeoutnumber
healthCheckSwarm.StartPeriodnumber
healthCheckSwarm.Retriesnumber
restartPolicySwarmobject or null
restartPolicySwarm.Conditionstring
restartPolicySwarm.Delaynumber
restartPolicySwarm.MaxAttemptsnumber
restartPolicySwarm.Windownumber
placementSwarmobject or null
placementSwarm.Constraintsarray of string
placementSwarm.Preferencesarray of object
placementSwarm.Preferences[].Spreadrequiredobject
placementSwarm.MaxReplicasnumber
placementSwarm.Platformsarray of object
placementSwarm.Platforms[].Architecturerequiredstring
placementSwarm.Platforms[].OSrequiredstring
updateConfigSwarmobject or null
updateConfigSwarm.Parallelismrequirednumber
updateConfigSwarm.Delaynumber
updateConfigSwarm.FailureActionstring
updateConfigSwarm.Monitornumber
updateConfigSwarm.MaxFailureRationumber
updateConfigSwarm.Orderrequiredstring
rollbackConfigSwarmobject or null
rollbackConfigSwarm.Parallelismrequirednumber
rollbackConfigSwarm.Delaynumber
rollbackConfigSwarm.FailureActionstring
rollbackConfigSwarm.Monitornumber
rollbackConfigSwarm.MaxFailureRationumber
rollbackConfigSwarm.Orderrequiredstring
modeSwarmobject or null
modeSwarm.Replicatedobject
modeSwarm.Replicated.Replicasnumber
modeSwarm.Globalobject
modeSwarm.ReplicatedJobobject
modeSwarm.ReplicatedJob.MaxConcurrentnumber
modeSwarm.ReplicatedJob.TotalCompletionsnumber
modeSwarm.GlobalJobobject
labelsSwarmmap of string or null
networkSwarmarray of object or null
networkSwarm[].Targetstring
networkSwarm[].Aliasesarray of string
networkSwarm[].DriverOptsmap of string
stopGracePeriodSwarmnumber or null
endpointSpecSwarmobject or null
endpointSpecSwarm.Modestring
endpointSpecSwarm.Portsarray of object
endpointSpecSwarm.Ports[].Protocolstring
endpointSpecSwarm.Ports[].TargetPortnumber
endpointSpecSwarm.Ports[].PublishedPortnumber
endpointSpecSwarm.Ports[].PublishModestring
ulimitsSwarmarray of object or null
ulimitsSwarm[].Namerequiredstring
ulimitsSwarm[].Softrequirednumber
ulimitsSwarm[].Hardrequirednumber

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "catalog-db",
    "description": "Storefront for Northwind Labs",
    "databaseName": "example"
  }'

Delete a MySQL database

DELETE/mysql/{id}

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.
forcerequiredquerystring
deleteDatarequiredquerystring

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X DELETE "https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC?force=example&deleteData=example" \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Save RDS settings of a MySQL database

PATCH/mysql/{id}/rds-settings

Cloudgate's own settings of a mysql on RDS, as a postgres's: its class when the entry has no size, storage and its ceiling, Multi-AZ and backup retention, applied by the next plan's Apply.

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Request body

FieldTypeNotes
instanceClassstringNot empty.
storageGbinteger20 to 65536.
maxStorageGbinteger20 to 65536.
multiAzboolean
backupRetentionDaysinteger1 to 35.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/rds-settings \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "instanceClass": "example",
    "storageGb": 20,
    "maxStorageGb": 20
  }'

Save Cloud SQL settings of a MySQL database

PATCH/mysql/{id}/cloud-sql-settings

Cloudgate's own setting of a mysql on Cloud SQL, as a postgres's: its backup retention, 1 to 365 days, edited on its Backups tab and applied by the next plan's Apply. Refused for a mysql anywhere else.

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Request body

FieldTypeNotes
backupRetentionDaysrequiredinteger1 to 365.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/cloud-sql-settings \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "backupRetentionDays": 1
  }'

List cloud backups of a MySQL database

GET/mysql/{id}/cloud-backups

A mysql in a Cloud account's Backups tab, as a postgres's: its retention, the window point-in-time restore reaches and its snapshots or backups, read live from RDS or Cloud SQL.

Who can call it: Owner, Admin or Member. Needs backup: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/cloud-backups \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Save the environment variables of a MySQL database

PATCH/mysql/{id}/environment

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Request body

FieldTypeNotes
envrequiredstring or null

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/environment \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "env": "NODE_ENV=production"
  }'

Change status of a MySQL database

POST/mysql/{id}/status

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Request body

FieldTypeNotes
applicationStatusrequiredstringOne of idle, running, done, error, stopped.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/status \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "applicationStatus": "idle"
  }'

Check the data volume of a MySQL database

GET/mysql/{id}/volume

Whether <appName>-data is on the Server now, for the Delete dialog. present is null when it cannot be known — a multi-node swarm, or a Server that did not answer.

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/volume \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Preview the final snapshot of a MySQL database

GET/mysql/{id}/final-snapshot

The final snapshot a Delete pressed now keeps, and about what it costs a month, for the Delete dialog of a database in a Cloud account.

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/final-snapshot \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Retry deleting a MySQL database

POST/mysql/{id}/delete/retry

Retry a cloud database's incomplete Delete: another destroy-only Cloud run from the kept state.

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/delete/retry \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Forget the incomplete delete of a MySQL database

POST/mysql/{id}/delete/forget

Forget a cloud database's incomplete Delete: the row dropped, what is left in AWS written into the audit entry.

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/delete/forget \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Set the external port of a MySQL database

POST/mysql/{id}/external-port

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Request body

FieldTypeNotes
externalPortrequiredinteger or null1 to 65535.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/external-port \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "externalPort": 3000
  }'

Rebuild a MySQL database

POST/mysql/{id}/rebuild

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/rebuild \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Start a MySQL database

POST/mysql/{id}/start

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/start \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Stop a MySQL database

POST/mysql/{id}/stop

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MySQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mysql/RAU6yAYUXFRdXdPLyLoPC/stop \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

MariaDB

Create a MariaDB database

POST/mariadb

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Request body

FieldTypeNotes
namerequiredstring1 to 100 characters.
appNamestring1 to 63 characters. Matches ^[a-zA-Z0-9_][a-zA-Z0-9._-]*$.
databaseNamerequiredstring1 to 64 characters. Matches ^[A-Za-z_][A-Za-z0-9_]*$.
databaseUserrequiredstring1 to 80 characters. Matches ^[A-Za-z_][A-Za-z0-9_]*$.
databasePasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
databaseRootPasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
dockerImagestringMatches ^(?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*(?::[\w][\w.-]{0,127})?(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,})?$.
descriptionstring
environmentIdrequiredstringNot empty.
serverIdstring or null

Responses

201 Created
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mariadb \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "catalog-db",
    "databaseName": "example",
    "databaseUser": "example",
    "environmentId": "UVFRqyCfWEtSm6NdDvrZc"
  }'

Deploy a MariaDB database

POST/mariadb/{id}/deploy

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MariaDB database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mariadb/RAU6yAYUXFRdXdPLyLoPC/deploy \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Get a MariaDB database

GET/mariadb/{id}

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe MariaDB database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/mariadb/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Update a MariaDB database

PATCH/mariadb/{id}

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe MariaDB database's id.

Request body

FieldTypeNotes
namestring1 to 100 characters.
descriptionstring or null
databaseNamestringNot empty.
databaseUserstringNot empty.
databasePasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
databaseRootPasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
dockerImagestringMatches ^(?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*(?::[\w][\w.-]{0,127})?(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,})?$.
commandstring or null
argsarray of string or null
memoryReservationstring or null
memoryLimitstring or null
cpuReservationstring or null
cpuLimitstring or null
replicasintegerAt least 0.
healthCheckSwarmobject or null
healthCheckSwarm.Testarray of string
healthCheckSwarm.Intervalnumber
healthCheckSwarm.Timeoutnumber
healthCheckSwarm.StartPeriodnumber
healthCheckSwarm.Retriesnumber
restartPolicySwarmobject or null
restartPolicySwarm.Conditionstring
restartPolicySwarm.Delaynumber
restartPolicySwarm.MaxAttemptsnumber
restartPolicySwarm.Windownumber
placementSwarmobject or null
placementSwarm.Constraintsarray of string
placementSwarm.Preferencesarray of object
placementSwarm.Preferences[].Spreadrequiredobject
placementSwarm.MaxReplicasnumber
placementSwarm.Platformsarray of object
placementSwarm.Platforms[].Architecturerequiredstring
placementSwarm.Platforms[].OSrequiredstring
updateConfigSwarmobject or null
updateConfigSwarm.Parallelismrequirednumber
updateConfigSwarm.Delaynumber
updateConfigSwarm.FailureActionstring
updateConfigSwarm.Monitornumber
updateConfigSwarm.MaxFailureRationumber
updateConfigSwarm.Orderrequiredstring
rollbackConfigSwarmobject or null
rollbackConfigSwarm.Parallelismrequirednumber
rollbackConfigSwarm.Delaynumber
rollbackConfigSwarm.FailureActionstring
rollbackConfigSwarm.Monitornumber
rollbackConfigSwarm.MaxFailureRationumber
rollbackConfigSwarm.Orderrequiredstring
modeSwarmobject or null
modeSwarm.Replicatedobject
modeSwarm.Replicated.Replicasnumber
modeSwarm.Globalobject
modeSwarm.ReplicatedJobobject
modeSwarm.ReplicatedJob.MaxConcurrentnumber
modeSwarm.ReplicatedJob.TotalCompletionsnumber
modeSwarm.GlobalJobobject
labelsSwarmmap of string or null
networkSwarmarray of object or null
networkSwarm[].Targetstring
networkSwarm[].Aliasesarray of string
networkSwarm[].DriverOptsmap of string
stopGracePeriodSwarmnumber or null
endpointSpecSwarmobject or null
endpointSpecSwarm.Modestring
endpointSpecSwarm.Portsarray of object
endpointSpecSwarm.Ports[].Protocolstring
endpointSpecSwarm.Ports[].TargetPortnumber
endpointSpecSwarm.Ports[].PublishedPortnumber
endpointSpecSwarm.Ports[].PublishModestring
ulimitsSwarmarray of object or null
ulimitsSwarm[].Namerequiredstring
ulimitsSwarm[].Softrequirednumber
ulimitsSwarm[].Hardrequirednumber

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/mariadb/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "catalog-db",
    "description": "Storefront for Northwind Labs",
    "databaseName": "example"
  }'

Delete a MariaDB database

DELETE/mariadb/{id}

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MariaDB database's id.
forcerequiredquerystring
deleteDatarequiredquerystring

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X DELETE "https://cloudgate.octabyte.app/backend/mariadb/RAU6yAYUXFRdXdPLyLoPC?force=example&deleteData=example" \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Save the environment variables of a MariaDB database

PATCH/mariadb/{id}/environment

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe MariaDB database's id.

Request body

FieldTypeNotes
envrequiredstring or null

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/mariadb/RAU6yAYUXFRdXdPLyLoPC/environment \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "env": "NODE_ENV=production"
  }'

Change status of a MariaDB database

POST/mariadb/{id}/status

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MariaDB database's id.

Request body

FieldTypeNotes
applicationStatusrequiredstringOne of idle, running, done, error, stopped.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mariadb/RAU6yAYUXFRdXdPLyLoPC/status \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "applicationStatus": "idle"
  }'

Check the data volume of a MariaDB database

GET/mariadb/{id}/volume

Whether <appName>-data is on the Server now, for the Delete dialog. present is null when it cannot be known — a multi-node swarm, or a Server that did not answer.

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MariaDB database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/mariadb/RAU6yAYUXFRdXdPLyLoPC/volume \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Set the external port of a MariaDB database

POST/mariadb/{id}/external-port

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MariaDB database's id.

Request body

FieldTypeNotes
externalPortrequiredinteger or null1 to 65535.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mariadb/RAU6yAYUXFRdXdPLyLoPC/external-port \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "externalPort": 3000
  }'

Rebuild a MariaDB database

POST/mariadb/{id}/rebuild

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MariaDB database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mariadb/RAU6yAYUXFRdXdPLyLoPC/rebuild \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Start a MariaDB database

POST/mariadb/{id}/start

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MariaDB database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mariadb/RAU6yAYUXFRdXdPLyLoPC/start \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Stop a MariaDB database

POST/mariadb/{id}/stop

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MariaDB database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mariadb/RAU6yAYUXFRdXdPLyLoPC/stop \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

MongoDB

Create a MongoDB database

POST/mongo

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Request body

FieldTypeNotes
namerequiredstring1 to 100 characters.
appNamestring1 to 63 characters. Matches ^[a-zA-Z0-9_][a-zA-Z0-9._-]*$.
databaseUserrequiredstringNot empty.
databasePasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
dockerImagestringMatches ^(?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*(?::[\w][\w.-]{0,127})?(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,})?$.
descriptionstring
replicaSetsboolean
environmentIdrequiredstringNot empty.
serverIdstring or null

Responses

201 Created
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mongo \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "events-db",
    "databaseUser": "example",
    "environmentId": "UVFRqyCfWEtSm6NdDvrZc"
  }'

Deploy a MongoDB database

POST/mongo/{id}/deploy

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MongoDB database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mongo/RAU6yAYUXFRdXdPLyLoPC/deploy \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Get a MongoDB database

GET/mongo/{id}

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe MongoDB database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/mongo/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Update a MongoDB database

PATCH/mongo/{id}

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe MongoDB database's id.

Request body

FieldTypeNotes
namestring1 to 100 characters.
descriptionstring or null
databaseUserstringNot empty.
databasePasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
dockerImagestringMatches ^(?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*(?::[\w][\w.-]{0,127})?(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,})?$.
commandstring or null
argsarray of string or null
replicaSetsboolean
memoryReservationstring or null
memoryLimitstring or null
cpuReservationstring or null
cpuLimitstring or null
replicasintegerAt least 0.
healthCheckSwarmobject or null
healthCheckSwarm.Testarray of string
healthCheckSwarm.Intervalnumber
healthCheckSwarm.Timeoutnumber
healthCheckSwarm.StartPeriodnumber
healthCheckSwarm.Retriesnumber
restartPolicySwarmobject or null
restartPolicySwarm.Conditionstring
restartPolicySwarm.Delaynumber
restartPolicySwarm.MaxAttemptsnumber
restartPolicySwarm.Windownumber
placementSwarmobject or null
placementSwarm.Constraintsarray of string
placementSwarm.Preferencesarray of object
placementSwarm.Preferences[].Spreadrequiredobject
placementSwarm.MaxReplicasnumber
placementSwarm.Platformsarray of object
placementSwarm.Platforms[].Architecturerequiredstring
placementSwarm.Platforms[].OSrequiredstring
updateConfigSwarmobject or null
updateConfigSwarm.Parallelismrequirednumber
updateConfigSwarm.Delaynumber
updateConfigSwarm.FailureActionstring
updateConfigSwarm.Monitornumber
updateConfigSwarm.MaxFailureRationumber
updateConfigSwarm.Orderrequiredstring
rollbackConfigSwarmobject or null
rollbackConfigSwarm.Parallelismrequirednumber
rollbackConfigSwarm.Delaynumber
rollbackConfigSwarm.FailureActionstring
rollbackConfigSwarm.Monitornumber
rollbackConfigSwarm.MaxFailureRationumber
rollbackConfigSwarm.Orderrequiredstring
modeSwarmobject or null
modeSwarm.Replicatedobject
modeSwarm.Replicated.Replicasnumber
modeSwarm.Globalobject
modeSwarm.ReplicatedJobobject
modeSwarm.ReplicatedJob.MaxConcurrentnumber
modeSwarm.ReplicatedJob.TotalCompletionsnumber
modeSwarm.GlobalJobobject
labelsSwarmmap of string or null
networkSwarmarray of object or null
networkSwarm[].Targetstring
networkSwarm[].Aliasesarray of string
networkSwarm[].DriverOptsmap of string
stopGracePeriodSwarmnumber or null
endpointSpecSwarmobject or null
endpointSpecSwarm.Modestring
endpointSpecSwarm.Portsarray of object
endpointSpecSwarm.Ports[].Protocolstring
endpointSpecSwarm.Ports[].TargetPortnumber
endpointSpecSwarm.Ports[].PublishedPortnumber
endpointSpecSwarm.Ports[].PublishModestring
ulimitsSwarmarray of object or null
ulimitsSwarm[].Namerequiredstring
ulimitsSwarm[].Softrequirednumber
ulimitsSwarm[].Hardrequirednumber

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/mongo/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "events-db",
    "description": "Storefront for Northwind Labs",
    "databaseUser": "example"
  }'

Delete a MongoDB database

DELETE/mongo/{id}

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MongoDB database's id.
forcerequiredquerystring
deleteDatarequiredquerystring

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X DELETE "https://cloudgate.octabyte.app/backend/mongo/RAU6yAYUXFRdXdPLyLoPC?force=example&deleteData=example" \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Save the environment variables of a MongoDB database

PATCH/mongo/{id}/environment

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe MongoDB database's id.

Request body

FieldTypeNotes
envrequiredstring or null

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/mongo/RAU6yAYUXFRdXdPLyLoPC/environment \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "env": "NODE_ENV=production"
  }'

Change status of a MongoDB database

POST/mongo/{id}/status

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MongoDB database's id.

Request body

FieldTypeNotes
applicationStatusrequiredstringOne of idle, running, done, error, stopped.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mongo/RAU6yAYUXFRdXdPLyLoPC/status \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "applicationStatus": "idle"
  }'

Check the data volume of a MongoDB database

GET/mongo/{id}/volume

Whether <appName>-data is on the Server now, for the Delete dialog. present is null when it cannot be known — a multi-node swarm, or a Server that did not answer.

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MongoDB database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/mongo/RAU6yAYUXFRdXdPLyLoPC/volume \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Set the external port of a MongoDB database

POST/mongo/{id}/external-port

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MongoDB database's id.

Request body

FieldTypeNotes
externalPortrequiredinteger or null1 to 65535.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mongo/RAU6yAYUXFRdXdPLyLoPC/external-port \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "externalPort": 3000
  }'

Rebuild a MongoDB database

POST/mongo/{id}/rebuild

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MongoDB database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mongo/RAU6yAYUXFRdXdPLyLoPC/rebuild \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Start a MongoDB database

POST/mongo/{id}/start

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MongoDB database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mongo/RAU6yAYUXFRdXdPLyLoPC/start \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Stop a MongoDB database

POST/mongo/{id}/stop

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe MongoDB database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/mongo/RAU6yAYUXFRdXdPLyLoPC/stop \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Redis

List cloud backups of a Redis database

GET/redis/{id}/cloud-backups

A redis on ElastiCache's Backups tab: its snapshot retention and snapshots, read live from ElastiCache.

Who can call it: Owner, Admin or Member. Needs backup: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/cloud-backups \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Create a Redis database

POST/redis

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Request body

FieldTypeNotes
namerequiredstring1 to 100 characters.
appNamestring1 to 63 characters. Matches ^[a-zA-Z0-9_][a-zA-Z0-9._-]*$.
databasePasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
dockerImagestringMatches ^(?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*(?::[\w][\w.-]{0,127})?(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,})?$.
descriptionstring
environmentIdrequiredstringNot empty.
serverIdstring or null

Responses

201 Created
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/redis \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "sessions",
    "environmentId": "UVFRqyCfWEtSm6NdDvrZc"
  }'

Use an existing Redis database

POST/redis/existing

"Use an existing database" for a redis: the Environment's entry stands for an ElastiCache replication group the operator already has.

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Request body

FieldTypeNotes
environmentIdrequiredstringNot empty.
configNamerequiredstringMatches ^[a-z][a-z0-9-]{0,62}$.
identifierrequiredstring
authTokenstring or ""Default "".
tlsbooleanDefault true.
madeReachablebooleanDefault false.

Responses

201 Created
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/redis/existing \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "environmentId": "UVFRqyCfWEtSm6NdDvrZc",
    "configName": "example",
    "identifier": "example"
  }'

Read reach for an existing Redis database

GET/redis/existing/reach

What the "Use an existing database" form shows: where this Environment's Services reach a cache from, to let in.

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Parameters

NameInTypeNotes
environmentIdrequiredquerystringNot empty.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl "https://cloudgate.octabyte.app/backend/redis/existing/reach?environmentId=UVFRqyCfWEtSm6NdDvrZc" \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Update an existing Redis database

PATCH/redis/{id}/existing

An Existing cache's replication group id, AUTH token, TLS flag or tick.

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Request body

FieldTypeNotes
identifierstring
authTokenstring or ""
tlsboolean
madeReachableboolean

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/existing \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "identifier": "example",
    "authToken": "<secret>",
    "tls": true
  }'

Switch to an existing Redis database

POST/redis/{id}/switch/to-existing

A switch between a Cloudgate-made and an existing cache, asked for on the Service's page: to-existing takes what "Use an existing cache" takes, to-made nothing. Nothing changes until the next plan's Apply, which removes one Service and adds the other — its destroy confirmed by name, as any.

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Request body

FieldTypeNotes
identifierrequiredstring
authTokenstring or ""Default "".
tlsbooleanDefault true.
madeReachablebooleanDefault false.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/switch/to-existing \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "identifier": "example"
  }'

Switch to a Cloudgate-made Redis database

POST/redis/{id}/switch/to-made

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/switch/to-made \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Cancel the switch of a Redis database

DELETE/redis/{id}/switch

Cancels a switch no Apply has made yet.

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X DELETE https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/switch \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Deploy a Redis database

POST/redis/{id}/deploy

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/deploy \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Get a Redis database

GET/redis/{id}

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Update a Redis database

PATCH/redis/{id}

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Request body

FieldTypeNotes
namestring1 to 100 characters.
descriptionstring or null
databasePasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
dockerImagestringMatches ^(?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*(?::[\w][\w.-]{0,127})?(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,})?$.
commandstring or null
argsarray of string or null
memoryReservationstring or null
memoryLimitstring or null
cpuReservationstring or null
cpuLimitstring or null
replicasintegerAt least 0.
healthCheckSwarmobject or null
healthCheckSwarm.Testarray of string
healthCheckSwarm.Intervalnumber
healthCheckSwarm.Timeoutnumber
healthCheckSwarm.StartPeriodnumber
healthCheckSwarm.Retriesnumber
restartPolicySwarmobject or null
restartPolicySwarm.Conditionstring
restartPolicySwarm.Delaynumber
restartPolicySwarm.MaxAttemptsnumber
restartPolicySwarm.Windownumber
placementSwarmobject or null
placementSwarm.Constraintsarray of string
placementSwarm.Preferencesarray of object
placementSwarm.Preferences[].Spreadrequiredobject
placementSwarm.MaxReplicasnumber
placementSwarm.Platformsarray of object
placementSwarm.Platforms[].Architecturerequiredstring
placementSwarm.Platforms[].OSrequiredstring
updateConfigSwarmobject or null
updateConfigSwarm.Parallelismrequirednumber
updateConfigSwarm.Delaynumber
updateConfigSwarm.FailureActionstring
updateConfigSwarm.Monitornumber
updateConfigSwarm.MaxFailureRationumber
updateConfigSwarm.Orderrequiredstring
rollbackConfigSwarmobject or null
rollbackConfigSwarm.Parallelismrequirednumber
rollbackConfigSwarm.Delaynumber
rollbackConfigSwarm.FailureActionstring
rollbackConfigSwarm.Monitornumber
rollbackConfigSwarm.MaxFailureRationumber
rollbackConfigSwarm.Orderrequiredstring
modeSwarmobject or null
modeSwarm.Replicatedobject
modeSwarm.Replicated.Replicasnumber
modeSwarm.Globalobject
modeSwarm.ReplicatedJobobject
modeSwarm.ReplicatedJob.MaxConcurrentnumber
modeSwarm.ReplicatedJob.TotalCompletionsnumber
modeSwarm.GlobalJobobject
labelsSwarmmap of string or null
networkSwarmarray of object or null
networkSwarm[].Targetstring
networkSwarm[].Aliasesarray of string
networkSwarm[].DriverOptsmap of string
stopGracePeriodSwarmnumber or null
endpointSpecSwarmobject or null
endpointSpecSwarm.Modestring
endpointSpecSwarm.Portsarray of object
endpointSpecSwarm.Ports[].Protocolstring
endpointSpecSwarm.Ports[].TargetPortnumber
endpointSpecSwarm.Ports[].PublishedPortnumber
endpointSpecSwarm.Ports[].PublishModestring
ulimitsSwarmarray of object or null
ulimitsSwarm[].Namerequiredstring
ulimitsSwarm[].Softrequirednumber
ulimitsSwarm[].Hardrequirednumber

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "sessions",
    "description": "Storefront for Northwind Labs",
    "databasePassword": "<secret>"
  }'

Delete a Redis database

DELETE/redis/{id}

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.
forcerequiredquerystring
deleteDatarequiredquerystring

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X DELETE "https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC?force=example&deleteData=example" \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Save ElastiCache settings of a Redis database

PATCH/redis/{id}/elasticache-settings

Cloudgate's own settings of a redis on ElastiCache: its node type when the entry has no size, the replica and snapshot retention, applied by the next plan's Apply.

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Request body

FieldTypeNotes
nodeTypestringNot empty.
replicaboolean
snapshotRetentionDaysinteger0 to 35.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/elasticache-settings \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "nodeType": "example",
    "replica": true,
    "snapshotRetentionDays": 0
  }'

Save Memorystore settings of a Redis database

PATCH/redis/{id}/memorystore-settings

Cloudgate's own setting of a redis on Memorystore: high availability, a replica in another zone, applied by the next plan's Apply. Refused for a redis anywhere else.

Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Request body

FieldTypeNotes
highAvailabilityboolean
backupRetentionDaysinteger0 to 365.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/memorystore-settings \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "highAvailability": true,
    "backupRetentionDays": 0
  }'

Save the environment variables of a Redis database

PATCH/redis/{id}/environment

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Request body

FieldTypeNotes
envrequiredstring or null

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/environment \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "env": "NODE_ENV=production"
  }'

Change status of a Redis database

POST/redis/{id}/status

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Request body

FieldTypeNotes
applicationStatusrequiredstringOne of idle, running, done, error, stopped.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/status \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "applicationStatus": "idle"
  }'

Check the data volume of a Redis database

GET/redis/{id}/volume

Whether <appName>-data is on the Server now, for the Delete dialog. present is null when it cannot be known — a multi-node swarm, or a Server that did not answer.

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/volume \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Preview the final snapshot of a Redis database

GET/redis/{id}/final-snapshot

The final snapshot a Delete pressed now keeps, and about what it costs a month, for the Delete dialog of a database in a Cloud account.

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/final-snapshot \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Retry deleting a Redis database

POST/redis/{id}/delete/retry

Retry a cloud database's incomplete Delete: another destroy-only Cloud run from the kept state.

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/delete/retry \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Forget the incomplete delete of a Redis database

POST/redis/{id}/delete/forget

Forget a cloud database's incomplete Delete: the row dropped, what is left in AWS written into the audit entry.

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/delete/forget \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Set the external port of a Redis database

POST/redis/{id}/external-port

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Request body

FieldTypeNotes
externalPortrequiredinteger or null1 to 65535.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/external-port \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "externalPort": 3000
  }'

Rebuild a Redis database

POST/redis/{id}/rebuild

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/rebuild \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Start a Redis database

POST/redis/{id}/start

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/start \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Stop a Redis database

POST/redis/{id}/stop

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Redis database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/redis/RAU6yAYUXFRdXdPLyLoPC/stop \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

libSQL

Create a libSQL database

POST/libsql

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Request body

FieldTypeNotes
namerequiredstring1 to 100 characters.
appNamestring1 to 63 characters. Matches ^[a-zA-Z0-9_][a-zA-Z0-9._-]*$.
databaseUserrequiredstringNot empty.
databasePasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
sqldNodestringOne of primary, replica.
sqldPrimaryUrlstring or null
enableNamespacesboolean
dockerImagestringMatches ^(?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*(?::[\w][\w.-]{0,127})?(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,})?$.
descriptionstring
environmentIdrequiredstringNot empty.
serverIdstring or null

Responses

201 Created
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/libsql \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "edge-db",
    "databaseUser": "example",
    "environmentId": "UVFRqyCfWEtSm6NdDvrZc"
  }'

Deploy a libSQL database

POST/libsql/{id}/deploy

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe libSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/libsql/RAU6yAYUXFRdXdPLyLoPC/deploy \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Get a libSQL database

GET/libsql/{id}

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe libSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/libsql/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Update a libSQL database

PATCH/libsql/{id}

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe libSQL database's id.

Request body

FieldTypeNotes
namestring1 to 100 characters.
descriptionstring or null
databaseUserstringNot empty.
databasePasswordstringMatches ^[a-zA-Z0-9@#%^&*()_+\-=[\]{}|;:,.<>?~]*$`.
sqldNodestringOne of primary, replica.
sqldPrimaryUrlstring or null
enableNamespacesboolean
dockerImagestringMatches ^(?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*(?::[\w][\w.-]{0,127})?(?:@[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,})?$.
commandstring or null
memoryReservationstring or null
memoryLimitstring or null
cpuReservationstring or null
cpuLimitstring or null
replicasintegerAt least 0.
healthCheckSwarmobject or null
healthCheckSwarm.Testarray of string
healthCheckSwarm.Intervalnumber
healthCheckSwarm.Timeoutnumber
healthCheckSwarm.StartPeriodnumber
healthCheckSwarm.Retriesnumber
restartPolicySwarmobject or null
restartPolicySwarm.Conditionstring
restartPolicySwarm.Delaynumber
restartPolicySwarm.MaxAttemptsnumber
restartPolicySwarm.Windownumber
placementSwarmobject or null
placementSwarm.Constraintsarray of string
placementSwarm.Preferencesarray of object
placementSwarm.Preferences[].Spreadrequiredobject
placementSwarm.MaxReplicasnumber
placementSwarm.Platformsarray of object
placementSwarm.Platforms[].Architecturerequiredstring
placementSwarm.Platforms[].OSrequiredstring
updateConfigSwarmobject or null
updateConfigSwarm.Parallelismrequirednumber
updateConfigSwarm.Delaynumber
updateConfigSwarm.FailureActionstring
updateConfigSwarm.Monitornumber
updateConfigSwarm.MaxFailureRationumber
updateConfigSwarm.Orderrequiredstring
rollbackConfigSwarmobject or null
rollbackConfigSwarm.Parallelismrequirednumber
rollbackConfigSwarm.Delaynumber
rollbackConfigSwarm.FailureActionstring
rollbackConfigSwarm.Monitornumber
rollbackConfigSwarm.MaxFailureRationumber
rollbackConfigSwarm.Orderrequiredstring
modeSwarmobject or null
modeSwarm.Replicatedobject
modeSwarm.Replicated.Replicasnumber
modeSwarm.Globalobject
modeSwarm.ReplicatedJobobject
modeSwarm.ReplicatedJob.MaxConcurrentnumber
modeSwarm.ReplicatedJob.TotalCompletionsnumber
modeSwarm.GlobalJobobject
labelsSwarmmap of string or null
networkSwarmarray of object or null
networkSwarm[].Targetstring
networkSwarm[].Aliasesarray of string
networkSwarm[].DriverOptsmap of string
stopGracePeriodSwarmnumber or null
endpointSpecSwarmobject or null
endpointSpecSwarm.Modestring
endpointSpecSwarm.Portsarray of object
endpointSpecSwarm.Ports[].Protocolstring
endpointSpecSwarm.Ports[].TargetPortnumber
endpointSpecSwarm.Ports[].PublishedPortnumber
endpointSpecSwarm.Ports[].PublishModestring

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/libsql/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "edge-db",
    "description": "Storefront for Northwind Labs",
    "databaseUser": "example"
  }'

Delete a libSQL database

DELETE/libsql/{id}

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe libSQL database's id.
forcerequiredquerystring
deleteDatarequiredquerystring

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X DELETE "https://cloudgate.octabyte.app/backend/libsql/RAU6yAYUXFRdXdPLyLoPC?force=example&deleteData=example" \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Save the environment variables of a libSQL database

PATCH/libsql/{id}/environment

Who can call it: Any signed-in member. The route names no permission of its own; Cloudgate checks your role and your access to what it touches as it runs.

Parameters

NameInTypeNotes
idrequiredpathstringThe libSQL database's id.

Request body

FieldTypeNotes
envrequiredstring or null

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 You may not reach what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/libsql/RAU6yAYUXFRdXdPLyLoPC/environment \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "env": "NODE_ENV=production"
  }'

Change status of a libSQL database

POST/libsql/{id}/status

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe libSQL database's id.

Request body

FieldTypeNotes
applicationStatusrequiredstringOne of idle, running, done, error, stopped.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/libsql/RAU6yAYUXFRdXdPLyLoPC/status \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "applicationStatus": "idle"
  }'

Check the data volume of a libSQL database

GET/libsql/{id}/volume

Whether <appName>-data is on the Server now, for the Delete dialog. present is null when it cannot be known — a multi-node swarm, or a Server that did not answer.

Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe libSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/libsql/RAU6yAYUXFRdXdPLyLoPC/volume \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Set the external ports of a libSQL database

POST/libsql/{id}/external-ports

Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe libSQL database's id.

Request body

FieldTypeNotes
externalPortrequiredinteger or null1 to 65535.
externalGRPCPortrequiredinteger or null1 to 65535.
externalAdminPortrequiredinteger or null1 to 65535.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/libsql/RAU6yAYUXFRdXdPLyLoPC/external-ports \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "externalPort": 3000,
    "externalGRPCPort": 3000,
    "externalAdminPort": 3000
  }'

Rebuild a libSQL database

POST/libsql/{id}/rebuild

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe libSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/libsql/RAU6yAYUXFRdXdPLyLoPC/rebuild \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Start a libSQL database

POST/libsql/{id}/start

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe libSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/libsql/RAU6yAYUXFRdXdPLyLoPC/start \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Stop a libSQL database

POST/libsql/{id}/stop

Who can call it: Owner, Admin or Member. Needs deployment: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe libSQL database's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/libsql/RAU6yAYUXFRdXdPLyLoPC/stop \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Something missing or wrong on this page? Email support@octabyte.io, or start a free trial and try it in the console.