ReferenceHTTP APIMembers

Disable a member of the workspace

POST
/v1/members/{user_id}/disable

In the same transaction: the membership is disabled, every web session of the person is revoked (open event streams end), their personal keys in the workspace are revoked, and the sessions they asked for wait for an owner's takeover. Agent keys are untouched. Only an owner disables an owner: an admin targeting one answers 403 OWNER_PROTECTED and nothing changes. Disabling yourself answers 403 SELF_PROTECTED, the last live owner 409 LAST_OWNER. When several apply, the first answers: no member.manage (403 FORBIDDEN), no such member (404), yourself (403 SELF_PROTECTED), an owner targeted by an admin (403 OWNER_PROTECTED), already disabled (200, nothing written), the last live owner (409). Writes a disable_member receipt unless the membership was already disabled (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

user_id*string

The member's user 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
reason?string

At most 1024 bytes of UTF-8

Length1 <= length

Response Body

Success

application/json
  1. response
member*
receipt_id*|null
Example Request
curl -X POST 'https://example.com/v1/members/497f6eca-6276-4993-bfeb-53cbbbba6f08/disable' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "member": {    "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",    "email": "user@example.com",    "display_name": "string",    "role": "owner",    "disabled_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z"  },  "receipt_id": "64d0a161-468e-472a-b00e-a06ee9ab7de7"}