Blueprints
Infrastructure as code: apply a ferry.yaml / render.yaml (idempotent, with a dry run).
/api/v1/blueprints/applyCreates or updates the services, datastores and env groups a ferry.yaml / render.yaml describes (nothing is deleted) and queues the deploys that follow. Send the JSON ApplyBlueprint request, or the YAML itself with a YAML content type (application/yaml, text/yaml) and ?dry_run=. A dry run only reports the planned actions.
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
Query Parameters
Only report what would be done (for raw YAML bodies; JSON bodies can also set dry_run).
The blueprint: a JSON ApplyBlueprint request, or raw YAML.
TypeScript Definitions
Use the request body type in TypeScript.
POST /api/v1/blueprints/apply (JSON body) — or send the raw YAML with
Content-Type: application/yaml and ?dry_run=true.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/blueprints/apply" \ -H "Authorization: Bearer $FERRY_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "yaml": "string" }'{ "actions": [ { "action": "string", "changes": [ "string" ], "name": "string", "resource": "string" } ], "deploys": [ { "commit_message": "string", "commit_sha": "string", "created_at": "2019-08-24T14:15:22Z", "error": "string", "finished_at": "2019-08-24T14:15:22Z", "id": "string", "image": "string", "port": 0, "service_id": "string", "source": { "branch": "string", "commit": "string", "kind": "git", "repo_url": "string" }, "started_at": "2019-08-24T14:15:22Z", "status": "queued", "trigger": "create" } ], "dry_run": true, "warnings": [ "string" ]}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.
Change feed
The change feed (Server-Sent Events) the web client uses to stay current without polling.