List Grants
GET
/api/v1/permissions
const url = 'https://example.com/api/v1/permissions';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/permissionsList all grants with optional filtering.
Args: object_type: Filter by object type (TABLE, VIEW, SCHEMA, etc.) grantee_name: Filter by grantee name privilege: Filter by privilege type
Returns: GrantListResponse with list of grants
Raises: HTTPException: If listing grants fails
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Header Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
GrantListResponse
Response containing list of grants.
object
grants
required
Grants
List of grants
Array<object>
GrantInfoInformation about a grant.
object
privilege
required
Privilege
The privilege granted
string
object_type
required
Object Type
Type of object (TABLE, VIEW, SCHEMA, etc.)
string
object_name
required
Object Name
Name of the object
string
grantee_name
required
Grantee Name
Name of the user/role granted the privilege
string
grantee_type
required
Grantee Type
Type of grantee (USER or ROLE)
string
grantor_name
required
Grantor Name
Name of the user/role who granted the privilege
string
total_count
required
Total Count
Total number of grants
integer
Examplegenerated
{ "grants": [ { "privilege": "example", "object_type": "example", "object_name": "example", "grantee_name": "example", "grantee_type": "example", "grantor_name": "example", "created_on": "2026-04-15T12:00:00Z", "granted_on": "2026-04-15T12:00:00Z" } ], "total_count": 1}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}