레퍼런스HTTP APIAgents

Who may use an agent

GET
/v1/agents/{id}/usage

scope is workspace (every member of the workspace) or private (the members of teams). Owners, admins and the agent's own admins read it, as they edit it; never an API key. revision is the If-Match of the next edit; it moves with every change, and with the archive of a team the agent lists. Reading it changes no session: this is the setting, not a decision.

Auth: cookie session only; no scope.

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 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)$
Formatuuid

Response Body

The agent's usage setting.

application/json
  1. response
scope*string
Value in"workspace""private"
teams*array<>
revision*integer
Range0 < value <= 9007199254740991
Example Request
curl -X GET 'https://example.com/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/usage'
Example Response
{  "scope": "private",  "teams": [    {      "id": "019a0000-0000-7000-8000-00000000b0a1",      "name": "Platform"    }  ],  "revision": 2}