From e485edbe9f19cb8532abd619b5c682753b653b19 Mon Sep 17 00:00:00 2001 From: lyrandy <42095565+lyrandy@users.noreply.github.com> Date: Fri, 27 Sep 2024 09:00:06 -0400 Subject: [PATCH] Update API documentation to mention pagination --- docs/content/operations/api.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/content/operations/api.md b/docs/content/operations/api.md index f6786f6d5..a495ab4e5 100644 --- a/docs/content/operations/api.md +++ b/docs/content/operations/api.md @@ -136,6 +136,15 @@ api: All the following endpoints must be accessed with a `GET` HTTP request. +!!! info "Pagination" + + By default, up to 100 results are returned per page, and the next page can be checked using the `X-Next-Page` HTTP Header. + To control pagination, use the `page` and `per_page` query parameters. + + ```bash + curl https://traefik.example.com:8080/api/http/routers?page=2&per_page=20 + ``` + | Path | Description | |--------------------------------|---------------------------------------------------------------------------------------------| | `/api/http/routers` | Lists all the HTTP routers information. |