Skip to main content

Grant Role To Member (V2)

Grants one role directly to a member.

PUT/v2/members/{userId}/roles/{roleId}
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
roleIdstringpathrequired

The role ID.

Example Value: r-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
projectIdstringquery

Required when granting a predefined project role.

Example Value: proj-xxxxxxxx
bash
export TOKEN="YOUR_API_KEY"
export userId="usr-xxxxxxxxxxxxxx"
export roleId="r-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

curl --request PUT \
--url "${BASE_URL}/v2/members/${userId}/roles/${roleId}" \
--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
databooleanrequired

Whether the operation succeeded.

A failure response.

codeintegerrequired

The response code.

messagestringrequired

The error message.

Successjson
{
"code": 0,
"data": true
}
Ctrl I