Vishwanath Martur 8b382e8ae0
Update REST API docs to include default and max values for page_size
Related to #3135

Update REST APIs documentation to include default and max values for `page_size` flag

* **Client Code Changes**
  - Update `getStoreMessagesV3` function in `waku/waku_api/rest/store/client.nim` to set the default value of `page_size` to 20.

* **Handler Code Changes**
  - Update `installStoreApiHandlers` procedure in `waku/waku_api/rest/store/handlers.nim` to enforce the default value of `page_size` to 20.
  - Enforce the max value of `page_size` to 100 in `installStoreApiHandlers` procedure.

* **Documentation Changes**
  - Add a note in `docs/api/rest-api.md` mentioning the default value of `page_size` is 20 and the max value is 100.
  - Add a note in `docs/operators/how-to/configure-rest-api.md` mentioning the default value of `page_size` is 20 and the max value is 100.
2025-11-19 13:14:26 +01:00

2.0 KiB

HTTP REST API

The HTTP REST API consists of a set of methods operating on the Waku Node remotely over HTTP.

This API is divided in different namespaces which group a set of resources:

Namespace Description
/debug Information about a Waku v2 node.
/relay Control of the relaying of messages. See 11/WAKU2-RELAY RFC
/store Retrieve the message history. See 13/WAKU2-STORE RFC
/filter Control of the content filtering. See 12/WAKU2-FILTER RFC
/admin Privileged access to the internal operations of the node.
/private Provides functionality to encrypt/decrypt WakuMessage payloads using either symmetric or asymmetric cryptography. This allows backwards compatibility with Waku v1 nodes.

API Specification

The HTTP REST API has been designed following the OpenAPI 3.0.3 standard specification format. The OpenAPI specification files can be found in the Waku Node REST API Reference repository.

You can also use hosted OpenAPI UI to explore and execute the calls locally.

Check the OpenAPI Tools site for the right tool for you (e.g. REST API client generator)

A particular OpenAPI spec can be easily imported into Postman

  1. Open Postman.
  2. Click on File -> Import...
  3. Load the openapi.yaml of interest, stored in your computer.
  4. Then, requests can be made from within the 'Collections' section.

Usage example

get_waku_v2_debug_v1_info

curl http://localhost:8645/debug/v1/info -s | jq

Store API

The page_size flag in the Store API has a default value of 20 and a max value of 100.

Node configuration

Find details here