List roles for a metadata object
GET/metalakes/:metalake/objects/:metadataObjectType/:metadataObjectFullName/roles
Returns the names of the roles that grant privileges on the given metadata object. When authorization is enabled, the list includes only the roles the caller is allowed to view.
Sign in with a bearer token or a local user's password; see Authentication.
Request
Path Parameters
The name of the metalake
Possible values: [METALAKE, CATALOG, SCHEMA, FILESET, TABLE, VIEW, TOPIC, MODEL, TAG, POLICY, JOB_TEMPLATE, FUNCTION]
The type of the metadata object. The list is the set of types that at least one privilege can be bound to; granting or revoking a privilege on any other type fails with IllegalPrivilegeException. The server matches the value case-insensitively.
The full name of the metadata object
Responses
- 200
- 400
- 404
The names of the roles that grant privileges on the metadata object.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- NameListResponse
Schema
Possible values: [0]
Status code of the response
{
"code": 0,
"names": [
"string"
]
}
{
"code": 0,
"names": [
"role1",
"role2"
]
}
The request is malformed or fails validation, for example because of invalid JSON, a missing required field or an invalid parameter value. The body is normally an error model, although the server's middleware can return plain text instead.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- Example
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1003,
"type": "BadRequestException",
"message": "Malformed request"
}
The metalake or the metadata object does not exist.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- NoSuchMetalakeException
- NoSuchMetadataObjectException
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1003,
"type": "NoSuchMetalakeException",
"message": "Failed to operate metalake(s) [test] operation [LOAD], reason [NoSuchMetalakeException]",
"stack": [
"org.apache.gravitino.exceptions.NoSuchMetalakeException: Metalake test does not exist",
"..."
]
}
{
"code": 1003,
"type": "NoSuchMetadataObjectException",
"message": "Metadata object does not exist",
"stack": [
"org.apache.gravitino.exceptions.NoSuchMetadataObjectException: Metadata object does not exist",
"..."
]
}