FerryDocs
ReferenceAPI reference

Blueprints

Infrastructure as code: apply a ferry.yaml / render.yaml (idempotent, with a dry run).

Apply a blueprint

POST/api/v1/blueprints/apply

Creates 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.

Authorization

AuthorizationBearer <token>

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

dry_run?boolean

Only report what would be done (for raw YAML bodies; JSON bodies can also set dry_run).

Request Body

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"  ]}