background image

Backups

Download a project as a zip file and restore it later.

Download a backup

GET /v1/backups

Downloads a backup of the project as a zip file, streamed while it is read.

Parameters

project uuid query required

The GUID of the project.

Responses

  • 200 The backup (application/zip).
  • 403 The caller is not the project's owner.
  • 404 The project doesn't exist.

Request

curl -X GET 'https://api.stellards.io/v1/backups?project=PROJECT_ID' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -o backup.zip

Restore a backup

POST /v1/backups/restore

Restores a backup into the project it was made from, replacing the project's tables, records, relations, role permissions and designer layout with the backup's. Tables and fields keep their ids; members, API keys, OAuth applications, webhooks, custom queries and procedures are kept. Send the zip file as the request body (Content-Type: application/zip).

Parameters

project uuid query required

The GUID of the project the backup was made from; the caller must own it.

Responses

  • 200 The project and what it now holds.
  • 400 The file isn't a valid backup of this project, doesn't fit the plan's limits, or the restore failed (the project is then left as it was).
  • 403 The caller is not the project's owner.
  • 413 The file is larger than the server accepts.

Request

curl -X POST 'https://api.stellards.io/v1/backups/restore?project=PROJECT_ID' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/zip' \
  --data-binary '@backup.zip'

Response 200

{
  "messages": [],
  "isSuccess": true,
  "data": {
    "projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "projectName": "Webshop",
    "tables": 4,
    "records": 1250,
    "blobs": 12,
    "relations": 3,
    "roles": 2,
    "warnings": []
  }
}