diff --git a/src/content/docs/api/usage.mdx b/src/content/docs/api/usage.mdx index 7a8a832992..376ed8a3ac 100644 --- a/src/content/docs/api/usage.mdx +++ b/src/content/docs/api/usage.mdx @@ -146,20 +146,23 @@ for navigating between pages. **Link header example:** ```http -Link: ; rel="next", - ; rel="last", - ; rel="first" +Link: //logs?cursor=abc&per_page=20>; rel="next", + //logs?cursor=def&per_page=20>; rel="prev" ``` The `Link` header may include the following relations: - `next`: The next page of results - `prev`: The previous page of results -- `first`: The first page of results -- `last`: The last page of results + +Each relation appears only when that page exists: `next` is absent on the last +page, `prev` on the first. The two are independent, and a middle page carries +both. When neither applies — a result set that fits on a single page — the +`Link` header is omitted entirely. To iterate through all pages, follow the `rel="next"` link -until it is no longer present in the response. +until it is no longer present in the response. To get back to the first page, +call the endpoint again without a `cursor`. ## Error Handling