Skip to content

Commit 93fb6d9

Browse files
authored
Merge pull request #30 from cachethq/codex/document-bulk-delete-api
Document bulk deletion API convention
2 parents 8774959 + b32770c commit 93fb6d9

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎api-reference/introduction.mdx‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,24 @@ description: 'Learn how to interact with the Cachet API.'
1111

1212
Cachet provides a RESTful JSON API that allows you to interact with the status page programmatically. The API is simple to use.
1313

14+
## Deleting resources
15+
16+
Every resource with a delete endpoint supports deleting one resource by ID:
17+
18+
```http
19+
DELETE /api/components/123
20+
```
21+
22+
Component groups, components, incidents, incident templates, metrics, and schedules also support atomic bulk deletion
23+
with a comma-separated `ids` query parameter:
24+
25+
```http
26+
DELETE /api/components?ids=123,456
27+
```
28+
29+
All requested IDs must be valid and exist before Cachet deletes anything. An unqualified collection `DELETE` is rejected,
30+
and `ids=all` is not supported. See the relevant endpoint reference for the required API-token ability.
31+
1432
### Example response
1533

1634
```json

0 commit comments

Comments
 (0)