リファレンスHTTP APIAgents

How many agents the workspace has, by state, and how many the caller administers

GET
/v1/agents/counts

all is how many agents GET /v1/agents lists read to the last page; administered is how many of them the caller administers now, directly or through a team they are a live member of; active is how many are active with an active_release_id, and draft how many are not archived and have none yet. Answered for the same callers as the list, over the same agents: every member counts what the list shows them, so a private agent the caller may not use is in no count. API keys are refused. It changes nothing.

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.

Response Body

The counts.

application/json
  1. response
counts*
Example Request
curl -X GET 'https://example.com/v1/agents/counts'
Example Response
{  "counts": {    "all": 128,    "administered": 3,    "active": 97,    "draft": 24  }}