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.
openapi/harthelm.yaml at v1.5.0__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.
ws*integerNumeric resource id.
int641 <= valueuser*integerA user's id.
int641 <= valueapplication/json- body
role*WorkspaceRole"admin""editor""viewer"The member.
application/json- response
user*A user as member lists show them.
role*WorkspaceRoleThe effective role, the higher of explicit_role and inherited_role.
"admin""editor""viewer"explicit_role?WorkspaceRoleThe effective role, the higher of explicit_role and inherited_role.
"admin""editor""viewer"inherited_role?WorkspaceRoleThe effective role, the higher of explicit_role and inherited_role.
"admin""editor""viewer"inherited_from?string"org_owner""team_admin""team_member"creator*booleanowner*booleanThe 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}Transfer a workspace's ownership
Workspace admins (`workspace.members`). The owner's Git provider token is what the git proxy injects. A workspace whose owner left the team has `owner_id` absent and `needs_owner` set; the git proxy refuses it until it has a new owner. Making **someone else** the owner needs their consent: the answer is 202 with a pending `OwnerTransfer` that they accept or decline (`POST /owner-transfers/{transfer}/accept|decline`); until then the old owner stays the owner and the git proxy keeps using the old owner's token. A new offer replaces a pending one to another user (that one is cancelled); offering it again to the same user returns the pending one. The user must be a member of the workspace's team (409 `not-team-member`) and hold at least Editor (409 `owner-ineligible`); accepting checks that again together with their connection to the provider of the origin repository. Taking ownership oneself (`user_id` is the caller) and naming the current owner change it at once and answer 200 with the workspace; taking it cancels a pending transfer. With `promote_to` (decision 63) a Viewer or a team member without a workspace role is promoted to Editor or Admin and offered the ownership in one step.
Change a member's organization role
Organization owners (`org.members`). 409 `last-owner` when it would leave the organization without an owner.