diff --git a/CHANGELOG.md b/CHANGELOG.md index 763da10..846651c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog Hiber Rest API +### 0.164 (2023-09-19) + +- Added `pagination` to all list-type results, with + - `size`: the number of items per page + - `page`: the current page + - `total`: the total number of results + - `totalPages`: the total number of pages + - `approximation`: whether the total number of results/pages is an approximation + ### 0.157 (2023-07-10) - Add `/modems` to list modems. diff --git a/docs/message-events.md b/docs/message-events.md index 7d88ad9..138ef7f 100644 --- a/docs/message-events.md +++ b/docs/message-events.md @@ -30,12 +30,15 @@ Textual shortcuts for timestamps are also supported, like: ### Output format -The output is an object with two fields. +The output is an object with three fields. The `messageEvents` field is a json array containing messages, which are a json version of the `ModemEvent.MessageEvent.ModemMessageReceivedEvent` object [in the grpc API](https://github.com/HiberGlobal/api/blob/master/docs/event.md#eventmodemeventmessageeventmodemmessagereceivedevent). +The `pagination` field is a simple object with some pagination-related information, like the total amount of results +and the current page number (starting from 0). + The other field is a `_links` field, as described in [readme](../README.md#hal). ### Example diff --git a/docs/messages.md b/docs/messages.md index 4b8c5b4..18658a3 100644 --- a/docs/messages.md +++ b/docs/messages.md @@ -36,6 +36,9 @@ The `messages` field is a json array containing messages, which are a json versi [in the grpc API](https://github.com/HiberGlobal/api/blob/master/docs/modem.md#modemmessage), though some fields may be omitted for simplicity. +The `pagination` field is a simple object with some pagination-related information, like the total amount of results +and the current page number (starting from 0). + The other field is a `_links` field, as described in [readme](../README.md#hal). ### Example diff --git a/docs/modems.md b/docs/modems.md index 2e641b8..d9f6a03 100644 --- a/docs/modems.md +++ b/docs/modems.md @@ -15,6 +15,9 @@ The `modems` field is a json version of the `Modem` object [in the grpc API](https://github.com/HiberGlobal/api/blob/master/docs/modem.md#modem), though some fields may be omitted for simplicity. +The `pagination` field is a simple object with some pagination-related information, like the total amount of results +and the current page number (starting from 0). + The other field is a `_links` field, as described in [readme](../README.md#hal). ### Example