Environment variables
A service's own environment variables. ?restart=true restarts the live service when its effective environment changed.
/api/v1/services/{id}/envThe service's own variables (not those of its env groups).
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
Service id, or name: a name is looked up in the environment of environment (omitted: production).
Query Parameters
The environment (id or name) of the service or datastore the path names. Omitted = production. With an
id in the path, the environment must be that one's. 404 when there is no such environment.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/services/string/env" \ -H "Authorization: Bearer $FERRY_TOKEN"[ { "key": "string", "value": "string" }]/api/v1/services/{id}/envUpserts set and deletes unset; the other variables stay.
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
Service id, or name: a name is looked up in the environment of environment (omitted: production).
Query Parameters
The environment (id or name) of the service or datastore the path names. Omitted = production. With an
id in the path, the environment must be that one's. 404 when there is no such environment.
Then restart the affected live services whose effective environment changed (the variables are saved either way; a failed restart is reported as the error).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
PATCH /api/v1/services/{id}/env (and env groups): upsert set, delete unset.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/api/v1/services/string/env" \ -H "Authorization: Bearer $FERRY_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'[ { "key": "string", "value": "string" }]/api/v1/services/{id}/envThe service's own variables become exactly vars. They are validated alone and merged with the linked env groups (size limits, ${{...}} references).
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
Service id, or name: a name is looked up in the environment of environment (omitted: production).
Query Parameters
The environment (id or name) of the service or datastore the path names. Omitted = production. With an
id in the path, the environment must be that one's. 404 when there is no such environment.
Then restart the affected live services whose effective environment changed (the variables are saved either way; a failed restart is reported as the error).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
PUT /api/v1/services/{id}/env (replace all) and env group equivalent.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/api/v1/services/string/env" \ -H "Authorization: Bearer $FERRY_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "vars": [ { "key": "string", "value": "string" } ] }'[ { "key": "string", "value": "string" }]Deploys
Deploy history, manual deploys, source uploads (ferry up), cancellation and build logs.
environments
Environments (production, staging…): groups of services and datastores, each on a private network of its own. A service or datastore picks its environment when it is created and reaches only the datastores and services of that environment by name; outside production a web service answers at <service>.<environment>.<domain>. Only public URLs cross from one environment to another.