Update API documentation to mention pagination

This commit is contained in:
lyrandy 2024-09-27 09:00:06 -04:00 committed by GitHub
parent 61bb3ab991
commit e485edbe9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -136,6 +136,15 @@ api:
All the following endpoints must be accessed with a `GET` HTTP request. 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 | | Path | Description |
|--------------------------------|---------------------------------------------------------------------------------------------| |--------------------------------|---------------------------------------------------------------------------------------------|
| `/api/http/routers` | Lists all the HTTP routers information. | | `/api/http/routers` | Lists all the HTTP routers information. |