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
.
- cURL
- CLI
- Go
GET /v2/object-types
curl "https://api.warrant.dev/v2/object-types" \
-H "Authorization: ApiKey YOUR_KEY"
GET /v2/object-types
warrant objecttype list
GET /v2/object-types
types, err := objecttype.ListObjectTypes(&warrant.ListObjectTypeParams{})
if err != nil {
// handle error
}
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": {}
}
}
]
}