CapyDB/ docs
ReferenceAPI

Exports

Downloadable logical exports of a project database.

List exports

GET
/v1/projects/{projectID}/exports

Authorization

headerAuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

Path Parameters

projectID*string

Project id.

Response Body

Exports.

application/json
  1. response
exports*array<>
curl -X GET 'https://capydb.dev/api/capydb/v1/projects/string/exports'
{  "exports": [    {      "created_at": "2019-08-24T14:15:22Z",      "database_name": "string",      "expires_at": "2019-08-24T14:15:22Z",      "id": "string",      "project_id": "string",      "size_bytes": 0,      "state": "completed"    }  ]}

Create an export

POST
/v1/projects/{projectID}/exports

Authorization

headerAuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

Path Parameters

projectID*string

Project id.

Response Body

Export job enqueued.

application/json
  1. response
export_id*string

Id the completed export will be listable and downloadable under.

job*
curl -X POST 'https://capydb.dev/api/capydb/v1/projects/string/exports'
{  "export_id": "string",  "job": {    "attempts": 0,    "claimed_at": "2019-08-24T14:15:22Z",    "claimed_by": "string",    "host_id": "string",    "instance_id": "string",    "completed_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "error": "string",    "id": "string",    "last_exit_code": 0,    "last_stderr": "string",    "last_stdout": "string",    "locked_resource": "string",    "max_attempts": 0,    "organization_id": "string",    "preview_database_id": "string",    "project_id": "string",    "result": null,    "retry_classification": "string",    "started_at": "2019-08-24T14:15:22Z",    "state": "pending",    "type": "project.apply_plan",    "updated_at": "2019-08-24T14:15:22Z"  }}
GET
/v1/projects/{projectID}/exports/{exportID}/download

Authorization

headerAuthorizationBearer <token>

Org or project-scoped API key, format capy_live_...; Clerk session tokens also accepted.

Path Parameters

projectID*string

Project id.

exportID*string

Response Body

Download URL.

application/json
  1. response
download*

A short-lived presigned download URL for a completed export. Request a fresh one per download.

curl -X GET 'https://capydb.dev/api/capydb/v1/projects/string/exports/string/download'
{  "download": {    "download_url": "string",    "expires_at": "2019-08-24T14:15:22Z"  }}