diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-10-25 01:19:49 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-10-25 01:23:22 -0400 |
| commit | 3a2f37e41681c2b233728c3cbddaea3f9fc74c08 (patch) | |
| tree | 9034ab3a2fd014dcf1f9806c2215eec0947ddcc3 /docs | |
| parent | 5423ec3937a4e28f3958a71b3db7498a4c427dc1 (diff) | |
To make it easier to correlate deletes to the event stream, have deletes return the ID of the affected entity.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api/channels-messages.md | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/docs/api/channels-messages.md b/docs/api/channels-messages.md index 9ef4e66..9854d22 100644 --- a/docs/api/channels-messages.md +++ b/docs/api/channels-messages.md @@ -162,9 +162,21 @@ This endpoint requires the following path parameter: ### Success -This endpoint will respond with a status of `202 Accepted` when successful. The response will not include a body. +This endpoint will respond with a status of `202 Accepted` when successful. The body of the response will be a JSON object describing the deleted channel: -When completed, the service will emit a [channel deleted](events.md#channel-deleted) event with the channel's ID. In addition, the service will emit a [message deleted](events.md#message-deleted) event for each message deleted. +```json +{ + "id": "Cfqdn1234" +} +``` + +The response will have the following fields: + +| Field | Type | Description | +|:----------|:----------|:--| +| `id` | string | The channel's ID. | + +When completed, the service will emit a [message deleted](events.md#message-deleted) event for each message in the channel, followed by a [channel deleted](events.md#channel-deleted) event with the channel's ID. ### Invalid channel ID @@ -184,9 +196,21 @@ This endpoint requires the following path parameter: ### Success -This endpoint will respond with a status of `202 Accepted` when successful. The response will not include a body. +This endpoint will respond with a status of `202 Accepted` when successful. The body of the response will be a JSON object describing the deleted message: + +```json +{ + "id": "Mgh98yp75" +} +``` + +The response will have the following fields: + +| Field | Type | Description | +|:----------|:----------|:--| +| `id` | string | The message's ID. | -When completed, the service will emit a [message deleted](events.md#message-deleted) event with the channel's ID. +When completed, the service will emit a [message deleted](events.md#message-deleted) event with the message's ID. ### Invalid message ID |
