Buckets and backups
Buckets for files, database and volume backups, and the S3-compatible destinations backups go to.
A bucket is a Service that stores files. Backups copy a database or a volume to a destination, an S3-compatible bucket you name, on a schedule or when you ask, and restore from it.
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 Backups in the user guide.
Buckets
Use an existing bucket
POST/buckets/existing
"Use an existing bucket": the Environment's bucket entry stands for an S3 bucket the operator already has, looked up at every plan and never changed.
Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.
Request body
| Field | Type | Notes |
|---|---|---|
environmentIdrequired | string | Not empty. |
configNamerequired | string | Matches ^[a-z][a-z0-9-]{0,62}$. |
bucketNamerequired | string | Matches ^(?=.{3,222}$)[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$. |
Responses
201Created- The result, as JSON.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/buckets/existing \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID" \
-H "content-type: application/json" \
-d '{
"environmentId": "UVFRqyCfWEtSm6NdDvrZc",
"configName": "example",
"bucketName": "example"
}'Read reach for an existing bucket
GET/buckets/existing/reach
What the "Use an existing bucket" form shows: on Google Cloud the roles/storage.legacyBucketReader grant a bucket in another project needs so every plan can look it up; on AWS.
Who can call it: Owner or Admin. Needs service: create, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
environmentIdrequired | query | string |
Responses
200OK- The result, as JSON.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches. The error body.
curl "https://cloudgate.octabyte.app/backend/buckets/existing/reach?environmentId=UVFRqyCfWEtSm6NdDvrZc" \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Get a bucket
GET/buckets/{id}
The bucket's page; an existing bucket on Google Cloud's access is checked again.
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
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The bucket's id. |
Responses
200OK- The result, as JSON.
- Refusals
401No key, or the key is not valid;403You may not reach what it touches;404Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/buckets/RAU6yAYUXFRdXdPLyLoPC \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Delete a bucket
DELETE/buckets/{id}
Keeps a bucket that holds files and names it as left behind (bucketLeftBehind), and removes an empty one whole.
Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The bucket's id. |
deleteFilesrequired | query | string |
Responses
200OK- The result, as JSON.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl -X DELETE "https://cloudgate.octabyte.app/backend/buckets/RAU6yAYUXFRdXdPLyLoPC?deleteFiles=example" \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Set upload origins
PUT/buckets/{id}/origins
The bucket's whole browser-upload origin list, an ordinary Service update.
Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The bucket's id. |
Request body
| Field | Type | Notes |
|---|---|---|
originsrequired | array of string |
Responses
200OK- The result, as JSON.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl -X PUT https://cloudgate.octabyte.app/backend/buckets/RAU6yAYUXFRdXdPLyLoPC/origins \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID" \
-H "content-type: application/json" \
-d '{
"origins": [
"example"
]
}'Rotate a bucket's key
POST/buckets/{id}/rotate-key
Rotate key: a new key, a redeploy of every Service linking the bucket's key, and only then the old key's removal. An ordinary Service update. Answers once the redeploys are queued, with the bucket whose keyRotation then follows them to their end.
Who can call it: Owner, Admin or Member. Needs service: update, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The bucket's id. |
Responses
200OK- The result, as JSON.
- Refusals
401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/buckets/RAU6yAYUXFRdXdPLyLoPC/rotate-key \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Retry deleting a bucket
POST/buckets/{id}/delete/retry
Retry a bucket on AWS's incomplete Delete: another destroy-only Cloud run from the kept state, emptying it again first if its Delete asked.
Who can call it: Owner or Admin. Needs service: delete, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The bucket's id. |
Responses
200OK- The result, as JSON.
- Refusals
401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/buckets/RAU6yAYUXFRdXdPLyLoPC/delete/retry \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Forget the incomplete delete of a bucket
POST/buckets/{id}/delete/forget
Forget a bucket on AWS'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
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The bucket's id. |
Responses
200OK- The result, as JSON.
- Refusals
401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/buckets/RAU6yAYUXFRdXdPLyLoPC/delete/forget \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Backups
List backups for a Service
GET/backups
Who can call it: Owner, Admin or Member. Needs backup: read, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
serviceIdrequired | query | string | Not empty. |
serviceTyperequired | query | string | One of postgres, mysql, mariadb, mongo, libsql, compose. |
Responses
200OK- The result, as JSON.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches. The error body.
curl "https://cloudgate.octabyte.app/backend/backups?serviceId=ikGaJLrdLoCZDcimNaVV3&serviceType=application" \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Create a backup
POST/backups
Who can call it: Owner, Admin or Member. Needs backup: create, which a custom role can also grant.
Request body
| Field | Type | Notes |
|---|---|---|
schedulerequired | string | Not empty. |
enabled | boolean | |
prefixrequired | string | Not empty. |
databaserequired | string | Not empty. Matches ^[a-zA-Z0-9_][a-zA-Z0-9_$.-]*$. |
keepLatestCount | integer or null | At least 0. |
destinationIdrequired | string | Not empty. |
databaseTyperequired | string | One of postgres, mysql, mariadb, mongo, libsql. |
backupType | string | One of database, compose. Default "database". |
serviceIdrequired | string | Not empty. |
serviceName | string | Not empty. Matches ^[a-zA-Z0-9._-]+$. |
metadata | object | |
metadata.postgres | object | |
metadata.postgres.databaseUserrequired | string | Not empty. |
metadata.mariadb | object | |
metadata.mariadb.databaseUserrequired | string | Not empty. |
metadata.mariadb.databasePasswordrequired | string | |
metadata.mongo | object | |
metadata.mongo.databaseUserrequired | string | Not empty. |
metadata.mongo.databasePasswordrequired | string | |
metadata.mysql | object | |
metadata.mysql.databaseRootPasswordrequired | string |
Responses
201Created- The result, as JSON.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/backups \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID" \
-H "content-type: application/json" \
-d '{
"schedule": "0 3 * * *",
"prefix": "ci",
"database": "example",
"destinationId": "ULX2acJSVhXEsZABPDxLh",
"databaseType": "postgres",
"serviceId": "ikGaJLrdLoCZDcimNaVV3"
}'Restore a backup
POST/backups/restore
Who can call it: Owner, Admin or Member. Needs backup: restore, which a custom role can also grant.
Request body
| Field | Type | Notes |
|---|---|---|
databaseIdrequired | string | Not empty. |
databaseTyperequired | string | One of postgres, mysql, mariadb, mongo, libsql. |
backupType | string | One of database, compose. Default "database". |
databaseNamerequired | string | Not empty. Matches ^[a-zA-Z0-9_][a-zA-Z0-9_$.-]*$. |
backupFilerequired | string | Not empty. |
destinationIdrequired | string | Not empty. |
metadata | object | |
metadata.postgres | object | |
metadata.postgres.databaseUserrequired | string | Not empty. |
metadata.mariadb | object | |
metadata.mariadb.databaseUserrequired | string | Not empty. |
metadata.mariadb.databasePasswordrequired | string | |
metadata.mongo | object | |
metadata.mongo.databaseUserrequired | string | Not empty. |
metadata.mongo.databasePasswordrequired | string | |
metadata.mysql | object | |
metadata.mysql.databaseRootPasswordrequired | string | |
metadata.serviceName | string | Not empty. Matches ^[a-zA-Z0-9._-]+$. |
Responses
204No content- Done. The answer has no body.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/backups/restore \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID" \
-H "content-type: application/json" \
-d '{
"databaseId": "2wSsHYv3jCBNZyD8omEe2",
"databaseType": "postgres",
"databaseName": "example",
"backupFile": "example",
"destinationId": "ULX2acJSVhXEsZABPDxLh"
}'List backup files
GET/backups/files
Who can call it: Owner, Admin or Member. Needs backup: read, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
destinationIdrequired | query | string | Not empty. |
search | query | string | Default "". |
serverId | query | string or null |
Responses
200OK- The result, as JSON.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches. The error body.
curl "https://cloudgate.octabyte.app/backend/backups/files?destinationId=ULX2acJSVhXEsZABPDxLh" \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Get a backup
GET/backups/{id}
Who can call it: Owner, Admin or Member. Needs backup: read, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The backup's id. |
Responses
200OK- The result, as JSON.
- Refusals
401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/backups/RAU6yAYUXFRdXdPLyLoPC \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Update a backup
PATCH/backups/{id}
Who can call it: Owner, Admin or Member. Needs backup: update, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The backup's id. |
Request body
| Field | Type | Notes |
|---|---|---|
schedule | string | Not empty. |
enabled | boolean | |
prefix | string | Not empty. |
database | string | Not empty. Matches ^[a-zA-Z0-9_][a-zA-Z0-9_$.-]*$. |
keepLatestCount | integer or null | At least 0. |
destinationId | string | Not empty. |
databaseType | string | One of postgres, mysql, mariadb, mongo, libsql. |
serviceName | string or null | Not empty. Matches ^[a-zA-Z0-9._-]+$. |
metadata | object or null | |
metadata.postgres | object | |
metadata.postgres.databaseUserrequired | string | Not empty. |
metadata.mariadb | object | |
metadata.mariadb.databaseUserrequired | string | Not empty. |
metadata.mariadb.databasePasswordrequired | string | |
metadata.mongo | object | |
metadata.mongo.databaseUserrequired | string | Not empty. |
metadata.mongo.databasePasswordrequired | string | |
metadata.mysql | object | |
metadata.mysql.databaseRootPasswordrequired | string |
Responses
200OK- The result, as JSON.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/backups/RAU6yAYUXFRdXdPLyLoPC \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID" \
-H "content-type: application/json" \
-d '{
"schedule": "0 3 * * *",
"enabled": true,
"prefix": "ci"
}'Delete a backup
DELETE/backups/{id}
Who can call it: Owner, Admin or Member. Needs backup: delete, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The backup's id. |
Responses
200OK- The result, as JSON.
- Refusals
401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl -X DELETE https://cloudgate.octabyte.app/backend/backups/RAU6yAYUXFRdXdPLyLoPC \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Run a backup now
POST/backups/{id}/run
Who can call it: Owner, Admin or Member. Needs backup: create, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The backup's id. |
Responses
204No content- Done. The answer has no body.
- Refusals
401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/backups/RAU6yAYUXFRdXdPLyLoPC/run \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Volume backups
List volume backups for a Service
GET/volume-backups
Who can call it: Owner, Admin or Member. Needs volumeBackup: read, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
serviceIdrequired | query | string | Not empty. |
serviceTyperequired | query | string | One of application, postgres, mysql, mariadb, mongo, redis, compose, libsql, bucket. |
Responses
200OK- The result, as JSON.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches. The error body.
curl "https://cloudgate.octabyte.app/backend/volume-backups?serviceId=ikGaJLrdLoCZDcimNaVV3&serviceType=application" \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Create a volume backup
POST/volume-backups
Who can call it: Owner, Admin or Member. Needs volumeBackup: create, which a custom role can also grant.
Request body
| Field | Type | Notes |
|---|---|---|
namerequired | string | Not empty. |
volumeNamerequired | string | Not empty. Matches ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$. |
prefixrequired | string | Not empty. Matches ^[a-zA-Z0-9][a-zA-Z0-9_./-]*$. |
schedulerequired | string | Not empty. |
serviceType | string | One of application, postgres, mysql, mariadb, mongo, redis, compose, libsql, bucket. Default "application". |
serviceIdrequired | string | Not empty. |
serviceName | string | Not empty. Matches ^[a-zA-Z0-9._-]+$. |
turnOff | boolean | Default false. |
keepLatestCount | integer or null | At least 0. |
enabled | boolean | |
destinationIdrequired | string | Not empty. |
Responses
201Created- The result, as JSON.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/volume-backups \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID" \
-H "content-type: application/json" \
-d '{
"name": "storefront",
"volumeName": "example",
"prefix": "ci",
"schedule": "0 3 * * *",
"serviceId": "ikGaJLrdLoCZDcimNaVV3",
"destinationId": "ULX2acJSVhXEsZABPDxLh"
}'Restore a volume backup
POST/volume-backups/restore
204, and both of this controller's 204s are void by design. restore answers nothing because its whole diagnosis is the rclone script's stdout, which reaches the caller as a 400/409 message — success has nothing left to say.
Who can call it: Owner, Admin or Member. Needs volumeBackup: restore, which a custom role can also grant.
Request body
| Field | Type | Notes |
|---|---|---|
serviceIdrequired | string | Not empty. |
serviceTyperequired | string | One of application, compose, bucket. |
volumeNamerequired | string | Not empty. Matches ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$. |
backupFileNamerequired | string | Not empty. Matches ^[a-zA-Z0-9][a-zA-Z0-9_./-]*$. |
destinationIdrequired | string | Not empty. |
Responses
204No content- Done. The answer has no body.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/volume-backups/restore \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID" \
-H "content-type: application/json" \
-d '{
"serviceId": "ikGaJLrdLoCZDcimNaVV3",
"serviceType": "application",
"volumeName": "example",
"backupFileName": "example",
"destinationId": "ULX2acJSVhXEsZABPDxLh"
}'Get a volume backup
GET/volume-backups/{id}
Who can call it: Owner, Admin or Member. Needs volumeBackup: read, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The volume backup's id. |
Responses
200OK- The result, as JSON.
- Refusals
401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/volume-backups/RAU6yAYUXFRdXdPLyLoPC \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Update a volume backup
PATCH/volume-backups/{id}
Who can call it: Owner, Admin or Member. Needs volumeBackup: update, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The volume backup's id. |
Request body
| Field | Type | Notes |
|---|---|---|
name | string | Not empty. |
volumeName | string | Not empty. Matches ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$. |
prefix | string | Not empty. Matches ^[a-zA-Z0-9][a-zA-Z0-9_./-]*$. |
schedule | string | Not empty. |
serviceName | string or null | Not empty. Matches ^[a-zA-Z0-9._-]+$. |
turnOff | boolean | |
keepLatestCount | integer or null | At least 0. |
enabled | boolean | |
destinationId | string | Not empty. |
Responses
200OK- The result, as JSON.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/volume-backups/RAU6yAYUXFRdXdPLyLoPC \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID" \
-H "content-type: application/json" \
-d '{
"name": "storefront",
"volumeName": "example",
"prefix": "ci"
}'Delete a volume backup
DELETE/volume-backups/{id}
Who can call it: Owner, Admin or Member. Needs volumeBackup: delete, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The volume backup's id. |
Responses
200OK- The result, as JSON.
- Refusals
401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl -X DELETE https://cloudgate.octabyte.app/backend/volume-backups/RAU6yAYUXFRdXdPLyLoPC \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Run a volume backup now
POST/volume-backups/{id}/run
Who can call it: Owner, Admin or Member. Needs volumeBackup: create, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The volume backup's id. |
Responses
204No content- Done. The answer has no body.
- Refusals
401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/volume-backups/RAU6yAYUXFRdXdPLyLoPC/run \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Backup destinations
List backup destinations
GET/destinations
Who can call it: Owner or Admin. Needs destination: read, which a custom role can also grant.
Responses
200OK- The result, as JSON.
- Refusals
401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches. The error body.
curl https://cloudgate.octabyte.app/backend/destinations \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Create a backup destination
POST/destinations
Who can call it: Owner or Admin. Needs destination: create, which a custom role can also grant.
Request body
| Field | Type | Notes |
|---|---|---|
namerequired | string | Not empty. |
provider | string or null | |
accessKeyrequired | string | Not empty. |
secretAccessKeyrequired | string | Not empty. |
bucketrequired | string | Not empty. |
regionrequired | string | |
endpointrequired | string |
Responses
201Created- The result, as JSON.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/destinations \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID" \
-H "content-type: application/json" \
-d '{
"name": "offsite-backups",
"accessKey": "<secret>",
"secretAccessKey": "<secret>",
"bucket": "example",
"region": "eu-central-1",
"endpoint": "https://northwind.dev"
}'Test a connection to a backup destination
POST/destinations/test-connection
Who can call it: Owner or Admin. Needs destination: create, which a custom role can also grant.
Request body
| Field | Type | Notes |
|---|---|---|
namerequired | string | Not empty. |
provider | string or null | |
accessKeyrequired | string | Not empty. |
secretAccessKeyrequired | string | Not empty. |
bucketrequired | string | Not empty. |
regionrequired | string | |
endpointrequired | string | |
serverId | string or null |
Responses
204No content- Done. The answer has no body.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/destinations/test-connection \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID" \
-H "content-type: application/json" \
-d '{
"name": "offsite-backups",
"accessKey": "<secret>",
"secretAccessKey": "<secret>",
"bucket": "example",
"region": "eu-central-1",
"endpoint": "https://northwind.dev"
}'Test a saved backup destination
POST/destinations/{id}/test-connection
The same probe against a destination that is already saved. The credentials come off the row server-side, because the read path strips the secret and so the console has nothing to send.
Who can call it: Owner or Admin. Needs destination: create, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The backup destination's id. |
Request body
| Field | Type | Notes |
|---|---|---|
serverId | string or null |
Responses
204No content- Done. The answer has no body.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/destinations/RAU6yAYUXFRdXdPLyLoPC/test-connection \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID" \
-H "content-type: application/json" \
-d '{
"serverId": "Ni7mAbWKjbWy4KErPjtrY"
}'Get a backup destination
GET/destinations/{id}
Who can call it: Owner or Admin. Needs destination: read, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The backup destination's id. |
Responses
200OK- The result, as JSON.
- Refusals
401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/destinations/RAU6yAYUXFRdXdPLyLoPC \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"Update a backup destination
PATCH/destinations/{id}
Who can call it: Owner or Admin. Needs destination: create, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The backup destination's id. |
Request body
| Field | Type | Notes |
|---|---|---|
name | string | Not empty. |
provider | string or null | |
accessKey | string | Not empty. |
secretAccessKey | string | Not empty. |
bucket | string | Not empty. |
region | string | |
endpoint | string |
Responses
200OK- The result, as JSON.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/destinations/RAU6yAYUXFRdXdPLyLoPC \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID" \
-H "content-type: application/json" \
-d '{
"name": "offsite-backups",
"provider": "example",
"accessKey": "<secret>"
}'Delete a backup destination
DELETE/destinations/{id}
Who can call it: Owner or Admin. Needs destination: delete, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The backup destination's id. |
Responses
200OK- The result, as JSON.
- Refusals
401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl -X DELETE https://cloudgate.octabyte.app/backend/destinations/RAU6yAYUXFRdXdPLyLoPC \
-H "x-api-key: $CLOUDGATE_KEY" \
-H "x-organization-id: $CLOUDGATE_ORG_ID"List objects
GET/destinations/{id}/objects
What is actually in the bucket, so a restore can pick it.
Who can call it: Owner or Admin. Needs destination: read, which a custom role can also grant.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
idrequired | path | string | The backup destination's id. |
prefix | query | string | |
serverId | query | string or null |
Responses
200OK- The result, as JSON.
- Refusals
400Validation failed;detailsnames each field;401No key, or the key is not valid;403Your role does not allow it, or you were not granted what it touches;404Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/destinations/RAU6yAYUXFRdXdPLyLoPC/objects \
-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.