Skip to main content

Describe Role

This operation describes the details of a specified role.

POST
/v2/vectordb/roles/describe
Cluster Endpoint

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

https://${CLUSTER_ENDPOINT}

📘Notes
export CLUSTER_ENDPOINT=""
Parameters
Authorizationstringheaderrequired

The authentication token should be an API key with appropriate privileges or a pair of colon-joined username and password, like username:password.

Example Value: Bearer {{TOKEN}}
Request Bodyapplication/json
roleNamestringrequired

The name of the role.

export TOKEN="db_admin:xxxxxxxxxxxxx"

curl --request POST \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"roleName": "db_admin"
}'
Responses200 - application/json

A success response.

codeinteger

Response code.

Example Value: 0
dataarray

Response payload which is a list of privilege items.

[]dataobject

A privilege item.

object_typestring

The type of the object to which the privilege belongs.

privilegestring

The privilege that is granted to the role.

object_namestring

The name of the object to which the role is granted the specified privilege.

grantorstring

The name of the user who granted a specific role to a user.

A failure response.

codeinteger

Response code.

messagestring

Error message.

{
"code": 0,
"data": [
{
"dbName": "*",
"grantor": "db_admin",
"objectName": "*",
"objectType": "Collection",
"privilege": "IndexDetail"
},
{
"dbName": "*",
"grantor": "db_admin",
"objectName": "*",
"objectType": "Global",
"privilege": "DescribeCollection"
},
{
"dbName": "*",
"grantor": "db_admin",
"objectName": "*",
"objectType": "Global",
"privilege": "ShowCollections"
}
]
}