-
Notifications
You must be signed in to change notification settings - Fork 209
Expand file tree
/
Copy pathrequest-queue-head-lock.yaml
More file actions
115 lines (105 loc) · 4.79 KB
/
Copy pathrequest-queue-head-lock.yaml
File metadata and controls
115 lines (105 loc) · 4.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
commonErrors: &commonErrors
"400":
$ref: ../../responses/BadRequest.yaml
"401":
$ref: ../../responses/Unauthorized.yaml
"403":
$ref: ../../responses/Forbidden.yaml
"404":
$ref: ../../responses/NotFound.yaml
"405":
$ref: ../../responses/MethodNotAllowed.yaml
"429":
$ref: ../../responses/TooManyRequests.yaml
sharedPost: &sharedPost
responses:
"201":
description: ""
headers: {}
content:
application/json:
schema:
$ref: ../../schemas/request-queues/HeadAndLockResponse.yaml
<<: *commonErrors
deprecated: false
postById:
<<: *sharedPost
tags:
- Storage/Request queues/Requests locks
summary: Get head and lock
description: |
Returns the given number of first requests from the queue and locks them for
the given time.
If this endpoint locks the request, no other client or run will be able to get and
lock these requests.
The response contains the `hadMultipleClients` boolean field which indicates
that the queue was accessed by more than one client (with unique or empty
`clientKey`).
operationId: requestQueue_head_lock_post
parameters:
- $ref: "../../parameters/requestQueueParameters.yaml#/queueId"
- $ref: "../../parameters/requestQueueParameters.yaml#/lockSecs"
- $ref: "../../parameters/requestQueueParameters.yaml#/headLockLimit"
- $ref: "../../parameters/requestQueueParameters.yaml#/clientKey"
x-legacy-doc-urls:
- https://docs.apify.com/api/v2#/reference/request-queues/queue-head-with-locks/get-head-and-lock
- https://docs.apify.com/api/v2#/reference/request-queues/get-head-and-lock
- https://docs.apify.com/api/v2#tag/Request-queuesQueue-head-with-locks/operation/requestQueue_head_lock_post
x-js-parent: RequestQueueClient
x-js-name: listAndLockHead
x-js-doc-url: https://docs.apify.com/api/client/js/reference/class/RequestQueueClient#listAndLockHead
x-py-parent: RequestQueueClientAsync
x-py-name: list_and_lock_head
x-py-doc-url: https://docs.apify.com/api/client/python/reference/class/RequestQueueClientAsync#list_and_lock_head
postDefault:
<<: *sharedPost
tags:
- Default request queue
summary: Get and lock default request queue head
description: |
Returns the given number of first requests from the default request queue of the Actor run
and locks them for the given time.
This endpoint is a shortcut for getting the run's `defaultRequestQueueId` and then using the
[Get head and lock](/api/v2/request-queue-head-lock-post) endpoint.
operationId: actorRun_requestQueue_head_lock_post
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/runId"
- $ref: "../../parameters/requestQueueParameters.yaml#/lockSecs"
- $ref: "../../parameters/requestQueueParameters.yaml#/headLockLimit"
- $ref: "../../parameters/requestQueueParameters.yaml#/clientKey"
postLastRun:
<<: *sharedPost
tags:
- Last Actor run's default request queue
summary: Get and lock last run's default request queue head
description: |
Returns the given number of first requests from the default request queue of the last Actor run
and locks them for the given time.
This endpoint is a shortcut for getting the last run's `defaultRequestQueueId` and then using the
[Get head and lock](/api/v2/request-queue-head-lock-post) endpoint.
operationId: act_runs_last_requestQueue_head_lock_post
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/actorId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/statusLastRun"
- $ref: "../../parameters/runAndBuildParameters.yaml#/originLastRun"
- $ref: "../../parameters/requestQueueParameters.yaml#/lockSecs"
- $ref: "../../parameters/requestQueueParameters.yaml#/headLockLimit"
- $ref: "../../parameters/requestQueueParameters.yaml#/clientKey"
postTaskLastRun:
<<: *sharedPost
tags:
- Last Actor task run's default request queue
summary: Get and lock last task run's default request queue head
description: |
Returns the given number of first requests from the default request queue of the last Actor task run
and locks them for the given time.
This endpoint is a shortcut for getting the last task run's `defaultRequestQueueId` and then using the
[Get head and lock](/api/v2/request-queue-head-lock-post) endpoint.
operationId: actorTask_runs_last_requestQueue_head_lock_post
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/actorTaskId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/statusLastRun"
- $ref: "../../parameters/runAndBuildParameters.yaml#/originLastRun"
- $ref: "../../parameters/requestQueueParameters.yaml#/lockSecs"
- $ref: "../../parameters/requestQueueParameters.yaml#/headLockLimit"
- $ref: "../../parameters/requestQueueParameters.yaml#/clientKey"