Harthelm Docs
REST APIMembers

Grant a workspace role

Workspace admins (`workspace.members`). The user must be a member of the workspace's team (409 `not-team-member`), and the role must be above the one they inherit (409 `below-inherited-role`). Replaces an explicit role they have.

Generated from openapi/harthelm.yaml at v1.5.0
PUT
/workspaces/{ws}/members/{user}

Authorization

cookie__Host-harthelm_session<token>

Browser session of the UI (12 h idle, 7 days absolute). State-changing requests also need the header Harthelm-CSRF: 1 and a matching Origin.

Path Parameters

ws*integer

Numeric resource id.

Formatint64
Range1 <= value
user*integer

A user's id.

Formatint64
Range1 <= value

Request Body

application/json
  1. body
role*WorkspaceRole
Value in"admin""editor""viewer"

Response Body

The member.

application/json
  1. response
user*

A user as member lists show them.

role*WorkspaceRole

The effective role, the higher of explicit_role and inherited_role.

Value in"admin""editor""viewer"
explicit_role?WorkspaceRole

The effective role, the higher of explicit_role and inherited_role.

Value in"admin""editor""viewer"
inherited_role?WorkspaceRole

The effective role, the higher of explicit_role and inherited_role.

Value in"admin""editor""viewer"
inherited_from?string
Value in"org_owner""team_admin""team_member"
creator*boolean
owner*boolean

The user whose Git token the git proxy uses for this workspace.

curl -X PUT 'https://console.example.com/api/v1/workspaces/1/members/1' \  -H 'Content-Type: application/json' \  -d '{  "role": "admin"}'
{  "user": {    "id": 1,    "name": "string",    "email": "string",    "picture_url": "string"  },  "role": "admin",  "explicit_role": "admin",  "inherited_role": "admin",  "inherited_from": "org_owner",  "creator": true,  "owner": true}