Skip to main content

Get an Object Type by Id

Get a specific object type by type.

GET /v1/object-types/:type

Parameters

ParameterDescriptionTypeRequired
typeThe type id of the object type to retrieve.Path paramyes

Sample Request

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

Sample Response

{
"type": "report",
"relations": {
"editor": {
"type": "anyOf",
"rules": [
{
"type": "userset",
"relation": "owner"
}
]
},
"owner": {},
"parent": {},
"viewer": {
"type": "anyOf",
"rules": [
{
"type": "userset",
"relation": "editor"
},
{
"type": "objectUserset",
"relation": "parent",
"userset": {
"type": "userset",
"relation": "viewer"
}
}
]
}
}
}