Resource members

List Resource Members Endpoint

get

Endpoint to list resource members.

Args: resource: The resource for which to get the members. user: The authenticated user. rbac: RBAC component. db: DB session.

Returns: List of resource members.

Raises: ValueError: If the resource is missing an ID or workspace scope.

Authorizations
OAuth2clientCredentialsRequired
Token URL: Refresh URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Query parameters
resourcestringRequired
Responses
200

Successful Response

application/json
get
/rbac/resource_members
GET /rbac/resource_members?resource=text HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "user": {
      "password": "text",
      "password_expired": true,
      "name": "text",
      "avatar_url": "text",
      "company": "text",
      "job_title": "text",
      "metadata": {},
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "username": "text",
      "email": "text",
      "oauth_provider": "text",
      "oauth_id": "text",
      "is_active": true,
      "is_superuser": false,
      "is_service_account": false,
      "organization_id": "123e4567-e89b-12d3-a456-426614174000",
      "is_onboarded": false
    },
    "team": {
      "name": "text",
      "description": "text",
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "created": "2025-11-14T18:35:18.600Z",
      "updated": "2025-11-14T18:35:18.600Z",
      "member_count": 1
    },
    "role": {
      "name": "text",
      "description": "text",
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "organization_id": "123e4567-e89b-12d3-a456-426614174000",
      "level": "organization",
      "system_managed": true,
      "type": "normal"
    },
    "allowed_actions": [
      "text"
    ]
  }
]

Update Resource Membership Endpoint

post

Endpoint to add resource members.

Args: user_id: ID of the user to add as resource member. team_id: ID of the team to add as resource member. sharing_user_id: ID of the user that is sharing the resource. resource: The resource for which to get the members. actions: Actions that the user should be able to perform on the resource. auth_context: The authentication context. rbac: RBAC component. workspace_manager: Workspace manager. user_manager: User manager. db: DB session.

Raises: IllegalOperationError: If the user is not an internal user. ValueError: If the resource is missing an ID or workspace scope.

Authorizations
OAuth2clientCredentialsRequired
Token URL: Refresh URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Body
user_idany ofOptional
string · uuidOptional
or
nullOptional
team_idany ofOptional
string · uuidOptional
or
nullOptional
sharing_user_idany ofOptional
string · uuidOptional
or
nullOptional
resourcestringOptional
actionsstring[]Optional
Responses
200

Successful Response

application/json
Responseany
post
/rbac/resource_members
POST /rbac/resource_members HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 193

{
  "user_id": "123e4567-e89b-12d3-a456-426614174000",
  "team_id": "123e4567-e89b-12d3-a456-426614174000",
  "sharing_user_id": "123e4567-e89b-12d3-a456-426614174000",
  "resource": "text",
  "actions": [
    "text"
  ]
}

No content

Last updated

Was this helpful?