Monica
Log in
API v1
v1
View as Markdown

Stop keeping a file with a group

DELETE /api/v1/vaults/{vault}/groups/{group}/files/{file}

Stop keeping a file with a group. The change is written to the account log.

Files kept with a group need both groups and file upload to be available to your account. Until they are, every endpoint here answers 404.

The file is let go rather than deleted outright. It stays wherever else it is used, and is swept up after a grace period once nothing uses it.

Path parameters

Sent as JSON. Anything not listed here is ignored.

vault string Required

The vault the group lives in, named either by the readable name it reports as slug or by its id.

group uuid Required

The id of the group. One addressed through the wrong vault, deleted, or belonging to another account, answers 404.

file uuid Required

The id of the file as kept with the group, which is the id of the group file object and not the id of the stored file. One kept with another group answers 404.

Returns

Nothing at all. A file of another account, or one kept with another group, answers 404.

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://people.hansyeoh.com/api/v1/vaults/dunder-mifflin/groups/5d2a7c91-3e48-4b06-9f1d-a83c60e2b4f7/files/c4a8e1d7-6b32-4f95-8d10-2e7a93b5f6c8 \
-X DELETE \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://people.hansyeoh.com/api/v1/vaults/dunder-mifflin/groups/5d2a7c91-3e48-4b06-9f1d-a83c60e2b4f7/files/c4a8e1d7-6b32-4f95-8d10-2e7a93b5f6c8', {
method: 'DELETE',
headers: { Authorization: `Bearer ${token}` },
})
$response = Http::withToken($token)->delete('https://people.hansyeoh.com/api/v1/vaults/dunder-mifflin/groups/5d2a7c91-3e48-4b06-9f1d-a83c60e2b4f7/files/c4a8e1d7-6b32-4f95-8d10-2e7a93b5f6c8');
Response 204

No content.

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