milvus-logo
LFAI
< Docs
  • RESTful

Describe Role

POST
http://${MILVUS_URI}/v2/vectordb/roles/describe

This operation describes the details of a specified role.

Example

export MILVUS_URI="localhost:19530"

curl --location --request POST "http://${MILVUS_URI}/v2/vectordb/roles/describe" \
--header "Content-Type: application/json" \
--data-raw '{
    "roleName": "readOnly"
}'

Possible response is similar to the following .

{
    "code": 200,
    "data": [
        {
             "objectType": "Collection",
             "objectName": "*",
             "privilege": "Search",
             "roleName": "readOnly"
        }
    ]
}

Request

Parameters

  • Header parameters

    ParameterDescription
    Request-Timeoutinteger
    The timeout duration for this operation.
    Setting this to None indicates that this operation timeouts when any response arrives or any error occurs.
    Authorizationstring
    The authentication token.
  • No query parameters required

  • No path parameters required

Request Body

{
    "roleName": "string"
}
ParameterDescription
roleName *string
The name of the role.

Response

An object that contains the detailed desription of a role.

Response Bodies

  • Response body if we process your request successfully
{
    "code": "integer",
    "data": [
        {
            "object_type": "string",
            "privilege": "string",
            "object_name": "string",
            "db_name": "string",
            "grantor": "string"
        }
    ]
}
  • Response body if we failed to process your request
{
    "code": integer,
    "message": string
}

Properties

The properties in the returned response are listed in the following table.

PropertyDescription
codeinteger
Indicates whether the request succeeds.
  • 200: The request succeeds.
  • Others: Some error occurs.
dataarray
A list of privilege items.
data[]object
data[].object_typestring
The type of the object to which the privilege belongs.
data[].privilegestring
The privilege that is granted to the role.
data[].object_namestring
The name of the object to which the role is granted the specified privilege.
data[].db_namestring
The name of the database in which this operation has been executed.
data[].grantorstring
The name of the user who granted a specific role to a user.
messagestring
Indicates the possible reason for the reported error.
Feedback

Was this page helpful?