Skip to main content

List Object Types

List object types.

Endpoint
GET /v2/object-types

Request

Headers


Warrant-Token string, optional

A valid Warrant-Token from a previous write operation or latest. Used to specify desired consistency for this read operation.


Query Params


This endpoint supports all of the query parameters specified in the Pagination & Sorting section. Supported values for the sortBy parameter are type and createdAt.


GET /v2/object-types
curl "https://api.warrant.dev/v2/object-types" \
-H "Authorization: ApiKey YOUR_KEY"

Response

Body


results array

A list of object types.


prevCursor string

This attribute will be omitted from the response if there are no previous results to fetch.


nextCursor string

This attribute will be omitted from the response if there are no more results to fetch.


200 OK
{
"results": [
{
"type": "role",
"relations": {
"parent": {},
"owner": {},
"editor": {
"inheritIf": "owner"
},
"member": {
"inheritIf": "member",
"ofType": "role",
"withRelation": "parent"
},
"viewer": {
"inheritIf": "editor"
}
}
},
{
"type": "tenant",
"relations": {
"member": {}
}
}
]
}