Skip to main content

Delete a Warrant

Delete a warrant, if it exists. The warrant to be deleted is specified by the combination of 'objectType', 'objectId', 'relation' and 'subject' provided in the delete request.

DELETE /v1/warrants

Parameters

ParameterDescriptionTypeRequired
objectTypeThe type of object. Must be one of your system's existing object types.JSON bodyyes
objectIdThe id of the specific object.JSON bodyyes
relationThe relation for this object to subject association. The relation must be valid as per the object type definition.JSON bodyyes
subjectThe specific subject (object, user etc.) to be associated with the object. A subject can either be a specific object (by id) or a group of objects defined by a set containing an objectType, objectId and relation.JSON bodyyes

Request

curl "https://api.warrant.dev/v1/warrants" \
-X DELETE \
-H "Authorization: ApiKey YOUR_KEY" \
--data-raw \
'{
"objectType": "report",
"objectId": "23ft346",
"relation": "editor",
"subject": {
"objectType": "user",
"objectId": "15ads7823a9df7as433gk23dd"
}
}'

Response

200 OK