List policies (names)
GET/metalakes/:metalake/policies
List policies (names)
Request
Path Parameters
The name of the metalake
Query Parameters
Include detailed information about the policy
Responses
- 200
- 400
- 404
- 5xx
Returns the list of policy objects if {details} is true, otherwise returns the list of policy names
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- NameListResponse
- PolicyListResponse
Schema
- NameListResponse
- PolicyListResponse
Array [
- CustomPolicy
]
oneOf
Possible values: [0
]
Status code of the response
Possible values: [0
]
Status code of the response
policies
object[]
A list of policy objects
oneOf
A policy with custom content
The name of the policy
A comment about the policy
The type of the policy
Whether the policy is enabled
audit
object
required
Audit information for a Gravitino resource.
The user who created the resource
The time the resource was created
The user who last modified the resource
The time the resource was last modified
Whether the policy is inherited from the parent metadata object
content
object
required
Content for a custom policy type.
Possible values: [CATALOG
, SCHEMA
, TABLE
, FILESET
, TOPIC
, MODEL
], >= 1
The types of metadata objects this policy content can be applied to.
properties
object
A map of string-to-string properties for the policy content.
A map of custom rules where the key is the rule name and the value can be of any type.
{}
{
"code": 0,
"names": [
"my_policy1",
"my_policy2"
]
}
{
"code": 0,
"policies": [
{
"name": "my_policy1",
"comment": "This is a test policy",
"policyType": "custom",
"enabled": false,
"content": {
"customRules": {
"rule1": 123
},
"supportedObjectTypes": [
"CATALOG",
"SCHEMA",
"TABLE",
"FILESET",
"TOPIC",
"MODEL"
],
"properties": {
"key1": "value1"
}
},
"inherited": null,
"audit": {
"creator": "anonymous",
"createTime": "2025-08-04T10:29:23.463Z"
}
}
]
}
Indicates a bad request error. It could be caused by an unexpected request body format or other forms of request validation failure, such as invalid json. Usually serves application/json content, although in some cases simple text/plain content might be returned by the server's middleware.
- 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
{
"code": 1002,
"type": "string",
"message": "string",
"stack": [
"string"
]
}
{
"code": 1003,
"type": "BadRequestException",
"message": "Malformed request"
}
Not Found - The specified metalake does not exist
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- NoSuchMetalakeException
Schema
Possible values: >= 1000
and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
{
"code": 1002,
"type": "string",
"message": "string",
"stack": [
"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",
"..."
]
}
A server-side problem that might not be addressable from the client side. Used for server 5xx errors without more specific documentation in individual routes.
- 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
{
"code": 1002,
"type": "string",
"message": "string",
"stack": [
"string"
]
}
{
"code": 1002,
"type": "RuntimeException",
"message": "Internal Server Error",
"stack": [
"java.lang.RuntimeException: Internal Server Error"
]
}