ReferenceHTTP APIAgents

Release a version against a runtime profile

POST
/v1/agents/{id}/releases

The release id is a hash of the card, the profile's digest and the resolved runtime settings; releasing the same content again returns the stored release with created: false. The optional note (trimmed, 1 to 200 characters) is stored with the release but is not part of its id, so a re-release keeps the note it was first made with. A card tool outside the profile, a different model or an unknown profile answers 422. repository_id names the catalog repository the release pins (GET /v1/profiles, repository_ids): required when the profile's repository_mode is required (422 repository_id: Profile <id> needs a repository: send repository_id), refused when it is none, and 422 when the catalog has no such repository or it does not allow the profile. Slack sessions and API sessions that send no repository_id start on it only while the agent has no GitHub settings; an agent with settings starts them without a repository. A profile the operator blocked, or one over a blocked base, answers 409 PROFILE_BLOCKED. A request carrying github for an agent that already has GitHub settings answers 409 ALREADY_EXISTS with reason_code: github_settings_exist: those are saved with PUT /v1/agents/{id}/github/settings. Releasing approves and activates nothing.

Auth: cookie session only; no scope. Idempotency-Key: ignored.

Authorization

cookieSession
cookie__Host-werft_session<token>

For the web console: the browser session cookie set by POST /v1/auth/login. It holds the scopes of the user's workspace role (owner: all; admin and member: all but sessions:recover). Requests other than GET must also send X-Requested-With: werft-web.

Path Parameters

id*string

The agent's id.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Header Parameters

X-Requested-With?"werft-web"

Required with a cookie session: the literal werft-web.

Value in"werft-web"

Request Body

application/json
  1. body
version_id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
runtime_profile_id*string
Length1 <= length <= 128
note?string
repository_id?string
Length1 <= length <= 128
github?

Response Body

Success

application/json
  1. response
release*
created*boolean
Example Request
curl -X POST 'https://example.com/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/releases' \  -H 'Content-Type: application/json' \  -d '{  "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",  "runtime_profile_id": "string"}'
Example Response
{  "release": {    "id": "string",    "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",    "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",    "card_sha256": "string",    "runtime_profile_id": "string",    "repository_id": "string",    "profile_digest": "string",    "runtime_config_snapshot": {      "property1": null,      "property2": null    },    "effective_tools": {      "tools": [        "string"      ],      "mcp": [        "string"      ]    },    "policy_pins": {      "tools": {        "default": {          "builtin": "allow",          "mcp": "allow"        },        "per_tool": {          "property1": "allow",          "property2": "allow"        }      },      "github": {        "repositories": [          "string"        ],        "push_approval": true,        "features": {          "workflows": true,          "actions": true,          "checks": true,          "issues": true,          "review": true        },        "actions_allow": [          {            "workflow": "string",            "ref": "string"          }        ]      }    },    "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",    "created_at": "2019-08-24T14:15:22Z",    "approved_by": "02030314-b162-4b4d-8af1-88eabdcc615d",    "approved_at": "2019-08-24T14:15:22Z",    "note": "string",    "label": "string",    "activated_at": "2019-08-24T14:15:22Z",    "deactivated_at": "2019-08-24T14:15:22Z"  },  "created": true}