Skip to main content

List Member Roles (V2)

Lists roles directly assigned to a member. Group-inherited roles are not included.

GET/v2/members/{userId}/roles
Connection Endpoint

The base URL for this API is in the following format:

https://api.cloud.zilliz.com

📘Notes

The endpoints on the control plane currently supports up to 20 requests per second per user per endpoint.

shell
export BASE_URL="https://api.cloud.zilliz.com"
Parameters
Authorizationstringheaderrequired

The authentication token should be an API key with appropriate privileges.

Example Value: Bearer {{TOKEN}}
userIdstringpathrequired

The member user ID.

Example Value: usr-xxxxxxxxxxxxxx
bash
export TOKEN="YOUR_API_KEY"
export userId="usr-xxxxxxxxxxxxxx"

curl --request GET \
--url "${BASE_URL}/v2/members/${userId}/roles" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json"
Responses

Returns a successful result or an error message.

A successful response.

codeintegerrequired

The response code.

Example Value: 0
dataobjectrequired
orgRolesarrayrequired

The organization-scoped roles directly assigned to the principal.

[]orgRolesobjectrequired

A role directly assigned to a member or group.

roleIdstringrequired

The role ID.

roleNamestringrequired

The role display name.

roleKindstringrequired

Whether the role is predefined or custom.

assignedBystringrequired

The display name of the user who assigned the role, or the raw non-user assigner value.

projectRolesarrayrequired

The project-scoped roles directly assigned to the principal, grouped by project.

[]projectRolesobjectrequired
projectIdstringrequired

The project ID.

rolesarrayrequired

The roles assigned within the project.

[]rolesobjectrequired

A role directly assigned to a member or group.

roleIdstringrequired

The role ID.

roleNamestringrequired

The role display name.

roleKindstringrequired

Whether the role is predefined or custom.

assignedBystringrequired

The display name of the user who assigned the role, or the raw non-user assigner value.

A failure response.

codeintegerrequired

The response code.

messagestringrequired

The error message.

Successjson
{
"code": 0,
"data": {
"orgRoles": [
{
"roleId": "r-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"roleName": "Public",
"roleKind": "pre-defined",
"assignedBy": "Bob Li"
}
],
"projectRoles": [
{
"projectId": "proj-xxxxxxxx",
"roles": [
{
"roleId": "r-yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
"roleName": "Data Reader",
"roleKind": "custom",
"assignedBy": "Bob Li"
}
]
}
]
}
}
Ctrl I