ReferenceHTTP APIWorkspace settings

Change how the workspace's achievement judge runs

PUT
/v1/workspaces/{id}/achievement-judge

Owners and admins (achievement_rule.manage), signed in; API keys are refused. Replaces the settings; a field left out takes its default. threshold is between 0 and 1, every_n_turns null or 5 to 100, transcript none or recent. Writes a set_achievement_judge receipt with the settings saved. Another workspace is 404.

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 workspace'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
connection_id?|
Defaultnull
threshold?number
Range0 <= value <= 1
Default0.9
on_evidence?boolean
Defaulttrue
every_n_turns?|
Defaultnull
on_idle?boolean
Defaultfalse
transcript?string
Default"recent"
Value in"none""recent"
daily_budget_usd?number
Range0 <= value
Default1
max_per_session?integer
Range0 < value <= 9007199254740991
Default20

Response Body

The settings saved, and the receipt.

application/json
  1. response
achievement_judge*
receipt_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
Example Request
curl -X PUT 'https://example.com/v1/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/achievement-judge' \  -H 'Content-Type: application/json' \  -d '{  "connection_id": null,  "threshold": 0.9,  "on_evidence": true,  "every_n_turns": 10,  "on_idle": false,  "transcript": "recent",  "daily_budget_usd": 1,  "max_per_session": 20}'
Example Response
{  "achievement_judge": {    "connection_id": null,    "threshold": 0.9,    "on_evidence": true,    "every_n_turns": 10,    "on_idle": false,    "transcript": "recent",    "daily_budget_usd": 1,    "max_per_session": 20  },  "receipt_id": "c4a1e9d2-7b3f-4e8a-a6c5-1d2e3f4a5b6c"}