Datastores
Managed Postgres and Redis instances with their connection strings and resource limits.
/api/v1/datastoresAn API token: one created in the dashboard or by ferry login, or the server token stored in <data-dir>/api_token. GET requests may send it as ?access_token= instead.
In: header
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/datastores" \ -H "Authorization: Bearer $FERRY_TOKEN"[ { "cpu_limit": 0, "created_at": "2019-08-24T14:15:22Z", "database": "string", "error": "string", "host_port": 0, "id": "string", "kind": "postgres", "memory_limit_mb": 0, "name": "string", "password": "string", "status": "creating", "updated_at": "2019-08-24T14:15:22Z", "username": "string", "version": "string", "external_url": "string", "internal_host": "string", "internal_port": 0, "internal_url": "string" }]/api/v1/datastoresCreates the row (creating) and provisions the container. A failed provisioning still answers 201, with status failed and the reason in error. Datastores and services share one namespace of names. memory_limit_mb (MiB, 16 MiB to 1 TiB) and cpu_limit (CPUs, 0.01 to 512, rounded to 0.01) limit the container; omitted or 0 = the server default (see GET /api/v1/info).
An API token: one created in the dashboard or by ferry login, or the server token stored in <data-dir>/api_token. GET requests may send it as ?access_token= instead.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
POST /api/v1/datastores
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/datastores" \ -H "Authorization: Bearer $FERRY_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "kind": "postgres", "name": "string" }'{ "cpu_limit": 0, "created_at": "2019-08-24T14:15:22Z", "database": "string", "error": "string", "host_port": 0, "id": "string", "kind": "postgres", "memory_limit_mb": 0, "name": "string", "password": "string", "status": "creating", "updated_at": "2019-08-24T14:15:22Z", "username": "string", "version": "string", "external_url": "string", "internal_host": "string", "internal_port": 0, "internal_url": "string"}/api/v1/datastores/{id}An API token: one created in the dashboard or by ferry login, or the server token stored in <data-dir>/api_token. GET requests may send it as ?access_token= instead.
In: header
Path Parameters
Datastore id or name.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/datastores/string" \ -H "Authorization: Bearer $FERRY_TOKEN"{ "cpu_limit": 0, "created_at": "2019-08-24T14:15:22Z", "database": "string", "error": "string", "host_port": 0, "id": "string", "kind": "postgres", "memory_limit_mb": 0, "name": "string", "password": "string", "status": "creating", "updated_at": "2019-08-24T14:15:22Z", "username": "string", "version": "string", "external_url": "string", "internal_host": "string", "internal_port": 0, "internal_url": "string"}/api/v1/datastores/{id}Every field is optional: memory_limit_mb (MiB, 16 MiB to 1 TiB) and cpu_limit (CPUs, 0.01 to 512, rounded to 0.01); 0 = back to the server default (see GET /api/v1/info). The limits are applied to the datastore's container in place, without a restart, whatever the datastore's status (a memory limit below what the datastore currently uses can fail, or get it killed for running out of memory; a failed datastore gets them for its next start). A datastore whose container is not created yet gets them when it is. When applying them fails after they were saved, the error message says so.
An API token: one created in the dashboard or by ferry login, or the server token stored in <data-dir>/api_token. GET requests may send it as ?access_token= instead.
In: header
Path Parameters
Datastore id or name.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
PATCH /api/v1/datastores/{id} — change resource limits. 0 clears
(server default). Applied to the running container in place (no restart).
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/api/v1/datastores/string" \ -H "Authorization: Bearer $FERRY_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'{ "cpu_limit": 0, "created_at": "2019-08-24T14:15:22Z", "database": "string", "error": "string", "host_port": 0, "id": "string", "kind": "postgres", "memory_limit_mb": 0, "name": "string", "password": "string", "status": "creating", "updated_at": "2019-08-24T14:15:22Z", "username": "string", "version": "string", "external_url": "string", "internal_host": "string", "internal_port": 0, "internal_url": "string"}/api/v1/datastores/{id}Removes its container and its data volume. Refused while services reference it in their env (${{datastore.NAME...}}), unless force=true.
An API token: one created in the dashboard or by ferry login, or the server token stored in <data-dir>/api_token. GET requests may send it as ?access_token= instead.
In: header
Path Parameters
Datastore id or name.
Query Parameters
Delete even though services reference it (they will fail to deploy or restart).
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/api/v1/datastores/string" \ -H "Authorization: Bearer $FERRY_TOKEN"Jobs
Job runs: cron runs and one-off commands, with their logs.
Git connections
Git connections: the GitHub / GitLab accounts this server is authorized to read the repositories of, to pick a repository and a branch from a list and to clone private repositories. An account is authorized in the browser (a GitHub App on GitHub, an OAuth application on GitLab) or with an access token. Connections belong to the server, not to a service: a repository is cloned with the connection that serves its URL.