Change who sees the session
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.
cookieSession__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.
id*stringThe session's id.
^([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)$uuidX-Requested-With?"werft-web"Required with a cookie session: the literal werft-web.
"werft-web"application/json- body
scope*string"private""people""team""workspace"user_ids?array<>items <= 100team_ids?array<>items <= 100expected_revision?integer0 <= value <= 2147483647Success
application/json- response
share*receipt_id*|nullcurl -X POST 'https://example.com/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/share' \ -H 'Content-Type: application/json' \ -d '{ "scope": "private"}'{ "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"}