Skip to main content

Get Warrants

Get a collection of warrants. Can be filtered down by specific objectType, objectId and/or relation.

GET /v1/warrants?objectType=TYPE&objectId=ID&relation=RELATION

Parameters

ParameterDescriptionTypeRequired
objectTypeFilter for warrants by a specific 'objectType'.Query paramno
objectIdFilter for warrants by a specific object with given id.Query paramno
relationFilter for warrants containing the given 'relation'.Query paramno

Request

curl "https://api.warrant.dev/v1/warrants?objectType=role" \
-H "Authorization: ApiKey YOUR_KEY"

Response

[
{
"objectType": "role",
"objectId": "34",
"relation": "member",
"subject": {
"objectType": "user",
"objectId": "test-user1"
}
},
{
"objectType": "role",
"objectId": "36",
"relation": "member",
"subject": {
"objectType": "user",
"objectId": "test-user2"
}
}
]