ReferenceHTTP APISessions

Change who sees the session

POST
/v1/sessions/{id}/share

private is the creator alone; people and team add the people or the current members of the teams named; workspace is every member, or only those inside the agent while audience_limited holds (GET /v1/sessions/{id}/share). A person's session is changed only by its creator; a session an API key made, by owners, admins and the admins of its agent. Anyone else the session is visible to gets 403; anyone it is not visible to, 404. Open event streams that may no longer see the session end. Writes a share_session receipt unless the share was already as asked (receipt_id null).

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 session'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
scope*string
Value in"private""people""team""workspace"
user_ids?array<>
Itemsitems <= 100
team_ids?array<>
Itemsitems <= 100
expected_revision?integer
Range0 <= value <= 2147483647

Response Body

Success

application/json
  1. response
share*
receipt_id*|null
Example Request
curl -X POST 'https://example.com/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/share' \  -H 'Content-Type: application/json' \  -d '{  "scope": "private"}'
Example Response
{  "share": {    "session_id": "1ffd059c-17ea-40a8-8aef-70fd0307db82",    "scope": "private",    "user_ids": [      "2d98503d-4ab4-41bd-8fc6-78cc006fd2db"    ],    "team_ids": [      "a6a20ef3-202d-4e2c-be30-1ec5fea948be"    ],    "revision": 0,    "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",    "updated_at": "2019-08-24T14:15:22Z",    "audience_limited": true  },  "receipt_id": "64d0a161-468e-472a-b00e-a06ee9ab7de7"}