Skip to content

Commit 0930fc8

Browse files
authored
fix: document pagination headers on all paginated endpoints (#2965)
The API sets `X-Apify-Pagination-*` on every offset-paginated list endpoint, but the spec declared them only on the dataset item endpoints. This PR adds the shared header component to the remaining 17 list endpoints, adds the `X-Apify-Pagination-Desc` header that the component was missing, and documents the `offset`/`limit`/`desc` query parameters on the webhook dispatches list. Cross-checked against the `setPaginationHeaders` call sites in `apify-core`.
1 parent a0dbbcd commit 0930fc8

18 files changed

Lines changed: 45 additions & 18 deletions

‎apify-api/openapi/components/headers/ApifyPaginationHeaders.yaml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,16 @@ X-Apify-Pagination-Count:
2020
type: string
2121
example: "100"
2222
X-Apify-Pagination-Total:
23-
description: The total number of items in the dataset.
23+
description: The total number of items available.
2424
content:
2525
text/plain:
2626
schema:
2727
type: string
2828
example: "10204"
29+
X-Apify-Pagination-Desc:
30+
description: Whether the items are sorted in descending order.
31+
content:
32+
text/plain:
33+
schema:
34+
type: string
35+
example: "false"

‎apify-api/openapi/paths/actor-builds/actor-builds.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ get:
2525
responses:
2626
"200":
2727
description: ""
28-
headers: {}
28+
headers:
29+
$ref: ../../components/headers/ApifyPaginationHeaders.yaml
2930
content:
3031
application/json:
3132
schema:

‎apify-api/openapi/paths/actor-runs/actor-runs.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ get:
2626
# todo 404?
2727
"200":
2828
description: ""
29-
headers: {}
29+
headers:
30+
$ref: ../../components/headers/ApifyPaginationHeaders.yaml
3031
content:
3132
application/json:
3233
schema:

‎apify-api/openapi/paths/actor-tasks/actor-tasks.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ get:
2323
responses:
2424
"200":
2525
description: ""
26-
headers: {}
26+
headers:
27+
$ref: ../../components/headers/ApifyPaginationHeaders.yaml
2728
content:
2829
application/json:
2930
schema:

‎apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@runs.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ get:
2424
responses:
2525
"200":
2626
description: ""
27-
headers: {}
27+
headers:
28+
$ref: ../../components/headers/ApifyPaginationHeaders.yaml
2829
content:
2930
application/json:
3031
schema:

‎apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}@webhooks.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ get:
2020
responses:
2121
"200":
2222
description: ""
23-
headers: {}
23+
headers:
24+
$ref: ../../components/headers/ApifyPaginationHeaders.yaml
2425
content:
2526
application/json:
2627
schema:

‎apify-api/openapi/paths/actors/acts.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ get:
4444
responses:
4545
"200":
4646
description: ""
47-
headers: {}
47+
headers:
48+
$ref: ../../components/headers/ApifyPaginationHeaders.yaml
4849
content:
4950
application/json:
5051
schema:

‎apify-api/openapi/paths/actors/acts@{actorId}@builds.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ get:
2222
responses:
2323
"200":
2424
description: ""
25-
headers: {}
25+
headers:
26+
$ref: ../../components/headers/ApifyPaginationHeaders.yaml
2627
content:
2728
application/json:
2829
schema:

‎apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ get:
2626
responses:
2727
"200":
2828
description: ""
29-
headers: {}
29+
headers:
30+
$ref: ../../components/headers/ApifyPaginationHeaders.yaml
3031
content:
3132
application/json:
3233
schema:

‎apify-api/openapi/paths/actors/acts@{actorId}@webhooks.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ get:
2020
responses:
2121
"200":
2222
description: ""
23-
headers: {}
23+
headers:
24+
$ref: ../../components/headers/ApifyPaginationHeaders.yaml
2425
content:
2526
application/json:
2627
schema:

0 commit comments

Comments
 (0)