List Member Roles (V2)
Lists roles directly assigned to a member. Group-inherited roles are not included.
The base URL for this API is in the following format:
https://api.cloud.zilliz.com
The endpoints on the control plane currently supports up to 20 requests per second per user per endpoint.
export BASE_URL="https://api.cloud.zilliz.com"
The authentication token should be an API key with appropriate privileges.
The member user ID.
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"
Returns a successful result or an error message.
A successful response.
The response code.
The organization-scoped roles directly assigned to the principal.
A role directly assigned to a member or group.
The role ID.
The role display name.
Whether the role is predefined or custom.
The display name of the user who assigned the role, or the raw non-user assigner value.
The project-scoped roles directly assigned to the principal, grouped by project.
The project ID.
The roles assigned within the project.
A role directly assigned to a member or group.
The role ID.
The role display name.
Whether the role is predefined or custom.
The display name of the user who assigned the role, or the raw non-user assigner value.
A failure response.
The response code.
The error message.
{
"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"
}
]
}
]
}
}