diff --git a/src/pages/docs/api/rest-api.mdx b/src/pages/docs/api/rest-api.mdx index fa7f51c146..5612b9ff19 100644 --- a/src/pages/docs/api/rest-api.mdx +++ b/src/pages/docs/api/rest-api.mdx @@ -991,7 +991,7 @@ Example request: ```shell -curl https://rest.ably.io/channels/rest-example/messages/01726585978590-001@abcdefghij:001/annotations?limit=100 \ +curl https://rest.ably.io/channels/mutable:channel/messages/01726585978590-001@abcdefghij:001/annotations?limit=100 \ -u "{{API_KEY}}" ``` @@ -1032,6 +1032,40 @@ A successful request returns a [paginated response](#pagination) with an array c ``` +### Retrieve annotation summary for a client + +#### GET rest.ably.io/channels/\{channelId\}/messages/\{messageSerial\}/client-summary + +Retrieve the annotation summary for a specific `clientId` for a specific message identified by its serial. + +Example request: + + +```shell +curl https://rest.ably.io/channels/mutable:channel/messages/01726585978590-001@abcdefghij:001/client-summary?forClientId=client1 \ + -u "{{API_KEY}}" +``` + + +##### Parameters + +| Parameter | Description | Type | +|-----------|-------------|------| +| forClientId | The `clientId` to retrieve the annotation summary for. Defaults to the `clientId` of the authenticated client. | string | + +##### Options + +| Option | Value | +|--------|-------| +| Accept | `application/json` (the default), `application/x-msgpack` | +| Auth required | yes ([basic](#basic-authentication) or [token](#token-authentication)) | + +##### Returns + +A successful request returns an object containing the annotation summary for the specified message, filtered to only include the summary entries relevant to the requested `clientId`. + +The summary is an object whose keys are [annotation types](/docs/messages/annotations#annotation-types), and the values are aggregated summaries for that annotation type. + ### Retrieve instantaneous presence status for a channel #### GET main.realtime.ably.net/channels/\{channelId\}/presence