-
Notifications
You must be signed in to change notification settings - Fork 17
Document bulk deletion API convention #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,24 @@ description: 'Learn how to interact with the Cachet API.' | |
|
|
||
| Cachet provides a RESTful JSON API that allows you to interact with the status page programmatically. The API is simple to use. | ||
|
|
||
| ## Deleting resources | ||
|
|
||
| Every resource with a delete endpoint supports deleting one resource by ID: | ||
|
|
||
| ```http | ||
| DELETE /api/components/123 | ||
| ``` | ||
|
|
||
| Component groups, components, incidents, incident templates, metrics, and schedules also support atomic bulk deletion | ||
| with a comma-separated `ids` query parameter: | ||
|
|
||
| ```http | ||
| DELETE /api/components?ids=123,456 | ||
| ``` | ||
|
|
||
| All requested IDs must be valid and exist before Cachet deletes anything. An unqualified collection `DELETE` is rejected, | ||
| and `ids=all` is not supported. See the relevant endpoint reference for the required API-token ability. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The promised ability information is not present in the checked API reference: Useful? React with 👍 / 👎. |
||
|
|
||
| ### Example response | ||
|
|
||
| ```json | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Placing this
##heading here makes the existing### Example responsea subsection of “Deleting resources,” although that payload is a paginated incident-list response rather than a deletion response. Readers navigating this page will therefore see an unrelated response presented as the result of the documentedDELETE; move this section below the example or adjust the heading hierarchy so the example remains under “JSON API.”Useful? React with 👍 / 👎.