DocumentationAPI reference

Rust · 0.1.0

Update Space Member

PATCH /api/v1/spaces/{space}/members/{member}

SpaceService · SpaceService_UpdateSpaceMember

Protocol-derived reference. Authorization and instance policy still apply. Schema descriptions are inherited from the MIT-licensed application contract; examples here are not executed against a live server.

Access

Requires the space ADMIN role as an active member. An instance administrator who is not a space administrator cannot use these governance operations.

Role changes and the last administrator

Use updateMask=role with a SpaceMember body containing role ADMIN or USER. The URL identifies the member by username. A supplied user must agree with that name; it cannot be used to replace a member with another account. Demoting the last active administrator is rejected with FAILED_PRECONDITION.

Request

UpdateSpaceMember changes a member's space role.

PATCH/api/v1/spaces/{space}/members/{member}

Parameters

Name / locationType / requirementDescription
space
path
string
Required
The space id.
member
path
string
Required
The member id.
updateMask
query
string (field-mask)
Required (contract description)
Required. Only role is supported.

Request body

Required

application/json · SpaceMember

Responses

200 · OK

application/json · SpaceMember

default · Default error response

application/json · Status

Complete operation definition

All declared constraints, media types and response details are retained below. Schema references link to their complete definitions.

Open JSON definition
{
  "tags": [
    "SpaceService"
  ],
  "description": "UpdateSpaceMember changes a member's space role.",
  "operationId": "SpaceService_UpdateSpaceMember",
  "parameters": [
    {
      "name": "space",
      "in": "path",
      "description": "The space id.",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "member",
      "in": "path",
      "description": "The member id.",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "updateMask",
      "in": "query",
      "description": "Required. Only role is supported.",
      "schema": {
        "type": "string",
        "format": "field-mask"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SpaceMember"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SpaceMember"
          }
        }
      }
    },
    "default": {
      "description": "Default error response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Status"
          }
        }
      }
    }
  }
}