ReferenceHTTP APIAgents
Turn the agent's GitHub use on or off
PUT
Applies at once, without a release: off refuses every GitHub token for the agent's sessions from the next request on, running ones included (403 GITHUB_REFUSED github_disabled). Writes a set_agent_github receipt when the value changes; receipt_id is null when it already held. Agent managers with a web session only; API keys are refused.
Auth: cookie session only; no scope. Idempotency-Key: ignored.
cookieSessioncookie
__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.
id*stringThe 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)$Format
uuidX-Requested-With?"werft-web"Required with a cookie session: the literal werft-web.
Value in
"werft-web"application/json- body
enabled*booleanSaved.
application/json- response
enabled*booleanreceipt_id*|nullcurl -X PUT 'https://example.com/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/github/enabled' \ -H 'Content-Type: application/json' \ -d '{ "enabled": false}'Example Response
{ "enabled": false, "receipt_id": "c4a1e9d2-7b3f-4e8a-a6c5-1d2e3f4a5b6c"}