레퍼런스HTTP APIWorkspace settings
Change how the workspace's achievement judge runs
PUT
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.
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 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)$Format
uuidX-Requested-With?"werft-web"Required with a cookie session: the literal werft-web.
Value in
"werft-web"application/json- body
connection_id?|Default
nullthreshold?numberRange
0 <= value <= 1Default
0.9on_evidence?booleanDefault
trueevery_n_turns?|Default
nullon_idle?booleanDefault
falsetranscript?stringDefault
"recent"Value in
"none""recent"daily_budget_usd?numberRange
0 <= valueDefault
1max_per_session?integerRange
0 < value <= 9007199254740991Default
20The settings saved, and the receipt.
application/json- response
achievement_judge*receipt_id*stringMatch
^([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
uuidcurl -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"}