ReferenceHTTP APIMembers

Members of the workspace, oldest first

GET
/v1/members

Lists the workspace's members, disabled ones included, oldest membership first, limit per page (default 50, at most 100). Pass next_cursor back as cursor for the next page; it is null on the last one. q keeps the members whose display name or email contains it, ignoring case. user_ids (comma-separated, at most 100) keeps the members among those users, as one page of a screen that already holds the ids and needs their names or roles. Each row's actions says, for the caller as the list was read, whether each role change, disable and enable would be accepted, and if not, why: the reason is the lower-cased error code the write answers with, or unchanged when it would answer 200 and change nothing. The write checks again when it runs. A client that validates responses strictly needs this version's schema to read the field.

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.

Query Parameters

cursor?string

The next_cursor of the page before; omit it for the first page.

Length1 <= length
limit?integer

How many items a page holds at most.

Range1 <= value <= 100
Default50
q?string

Matches a member whose display name or email contains it, ignoring case. % and _ match themselves.

Length1 <= length <= 200
user_ids?string

Comma-separated user ids, at most 100: keeps the members among them, in the list's order. An id of no member is left out.

Length1 <= length <= 3700

Response Body

Success

application/json
  1. response
items*array<>
next_cursor*|null
assignable_roles*array<>

The roles the caller may invite someone as now (POST /v1/invites refuses any other with OWNER_PROTECTED). The same on every page and search.

Example Request
curl -X GET 'https://example.com/v1/members'
Example Response
{  "items": [    {      "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",      "actions": {        "change_role": {          "owner": {            "allowed": true          },          "admin": {            "allowed": true          },          "member": {            "allowed": true          }        },        "disable": {          "allowed": true        },        "enable": {          "allowed": true        }      },      "administered_agents": [        {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "name": "string",          "via": "user"        }      ],      "last_active_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "assignable_roles": [    "owner"  ]}