API v1
v1
View as Markdown

Delete an entity type

DELETE /api/v1/entity-types/{entityType}

Delete a kind of object, which is only allowed while no record of it exists.

A type that still holds records refuses to go, and answers 422 saying how many it holds. Taking a hundred animals down with the word "Animal" is not something one call should be able to do. The two ways forward are to delete those records first, deliberately, or to stop the type being offered and keep everything filed under it.

The deletion is soft, so nothing is destroyed, but no endpoint here brings a type back today. The slug is not released with it either: a link that went out pointing at this type must not later land on a different one, so declaring a new type with the same slug is refused.

Path parameters

Sent as JSON. Anything not listed here is ignored.

entityType uuid Required

The id of the type. A path that is not a uuid answers 404 without a query being run, so neither a sequential number nor the slug reaches anything here.

Returns

Nothing at all. A type that still holds records answers 422 and stays. A type belonging to somebody else answers 404, and so does one you have already deleted, so calling this twice does not report a second deletion.

Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in X-RateLimit-Remaining.

DELETE
curl https://my.monicahq.com/api/v1/entity-types/4c2b9f10-5e37-4a6d-8b91-0f7c3d2a8e64 \
-X DELETE \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://my.monicahq.com/api/v1/entity-types/4c2b9f10-5e37-4a6d-8b91-0f7c3d2a8e64', {
method: 'DELETE',
headers: { Authorization: `Bearer ${token}` },
})
$response = Http::withToken($token)->delete('https://my.monicahq.com/api/v1/entity-types/4c2b9f10-5e37-4a6d-8b91-0f7c3d2a8e64');
Response 204

No content.

Keys act as you, with exactly the access you have. Make one per integration so you can revoke it alone.