Create or replace an agent's own variable
Owners, admins and that agent's admins, signed in as a person; never an API key. Preconditions, limits and receipt as for the workspace's variables; an agent holds 50. The agent's value wins over a workspace value of the same name.
Auth: cookie session only; no scope. Idempotency-Key: ignored.
cookieSession__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.
^([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)$uuidname*stringThe variable's name.
1 <= lengthIf-Match?stringThe version last read, as a number (an entity tag's quotes are allowed). A different one answers 412 VERSION_MISMATCH; none answers 428 PRECONDITION_REQUIRED. Send it to change a variable that exists, If-None-Match: * to create one; never both.
1 <= lengthIf-None-Match?"*"The literal *, to create a variable that must not exist yet. One that exists answers 412 VERSION_MISMATCH.
"*"X-Requested-With?"werft-web"Required with a cookie session: the literal werft-web.
"werft-web"application/json- body
kind*string"plain""secret"value*stringengine_delivery?booleanacknowledge_engine_exposure?booleanallow_automation?booleanThe variable's new version and its grant_version.
application/json- response
name*string^[A-Z][A-Z0-9_]{0,63}$version*integer0 < value <= 9007199254740991grant_version*integer0 < value <= 9007199254740991curl -X PUT 'https://example.com/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/variables/string' \ -H 'Content-Type: application/json' \ -d '{ "kind": "plain", "value": "ap-northeast-1"}'{ "name": "REGION", "version": 44, "grant_version": 42}