ReferenceHTTP APIWorkspace settings

Set what members outside an agent may do with it and its sessions (owner or admin)

PATCH
/v1/workspaces/{id}/agent-access

Inside an agent are owners, admins, the agent's admins (its admin rows, its admin teams' members and its managing team's leads) and its managing team's other members; every other member is outside it. agent_outsider_access (default use): use lets those outside read the agent's information and start its sessions, view only read its information (a start is 403 FORBIDDEN, details.reason_code role), none hides the agent from them (absent from GET /v1/agents, 404 on reads of it, and a start is 403). It applies to every agent. agent_outsider_session_visibility (default managing_team): managing_team keeps the workspace-scoped sessions of an agent from those outside it, in every list, count, read, stream and usage list; workspace lets every member see them. A session the member holds, and a people or team share naming them, still reach them; an agent still held by the 'Unassigned agents' team that migration 0243 made for agents that had no managing team is not limited, until it is moved to a real team. Both apply from the next request to sessions already made, and an open event stream ends at its next page. A key left out keeps its value; name at least one. Writes a set_agent_access_settings receipt with what changed unless nothing did (receipt_id null). The current values are workspace.settings in GET /v1/auth/me.

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

id*string

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

Header Parameters

X-Requested-With?"werft-web"

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

Value in"werft-web"

Request Body

application/json
  1. body
agent_outsider_access?string
Value in"use""view""none"
agent_outsider_session_visibility?string
Value in"managing_team""workspace"

Response Body

Both settings as they now stand.

application/json
  1. response
agent_outsider_access*string
Value in"use""view""none"
agent_outsider_session_visibility*string
Value in"managing_team""workspace"
receipt_id*|null
Example Request
curl -X PATCH 'https://example.com/v1/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/agent-access' \  -H 'Content-Type: application/json' \  -d '{  "agent_outsider_access": "view"}'
Example Response
{  "agent_outsider_access": "view",  "agent_outsider_session_visibility": "managing_team",  "receipt_id": "b3c4d5e6-f7a8-4b9c-8d0e-1f2a3b4c5d6e"}