リファレンスHTTP APIVariables

Delete a workspace variable

DELETE
/v1/workspace/variables/{name}

Takes what writing takes, and If-Match: <version>. affected_agents counts the agents that received the value and open_sessions the sessions not closed yet that copied it when they started: those keep the value until they close. Writes a delete_env_variable receipt.

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

name*string

The variable's name.

Length1 <= length

Header Parameters

If-Match*string

The 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.

Length1 <= length
X-Requested-With?"werft-web"

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

Value in"werft-web"

Response Body

How many agents received the value and sessions still hold it.

application/json
  1. response
affected_agents*integer
Range0 <= value <= 9007199254740991
open_sessions*integer
Range0 <= value <= 9007199254740991
Example Request
curl -X DELETE 'https://example.com/v1/workspace/variables/string' \  -H 'If-Match: string'
Example Response
{  "affected_agents": 3,  "open_sessions": 1}