-
Notifications
You must be signed in to change notification settings - Fork 182
Expand file tree
/
Copy pathactor-tasks@{actorTaskId}@run-sync.yaml
More file actions
151 lines (139 loc) · 5.95 KB
/
actor-tasks@{actorTaskId}@run-sync.yaml
File metadata and controls
151 lines (139 loc) · 5.95 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
get:
tags:
- Actor tasks
summary: Run task synchronously
description: |
Run a specific task and return its output.
The run must finish in 300<!-- MAX_ACTOR_JOB_SYNC_WAIT_SECS --> seconds
otherwise the HTTP request fails with a timeout error (this won't abort
the run itself).
Beware that it might be impossible to maintain an idle HTTP connection for
an extended period, due to client timeout or network conditions. Make sure your HTTP client is
configured to have a long enough connection timeout.
If the connection breaks, you will not receive any information about the run
and its status.
To run the Task asynchronously, use the
[Run task asynchronously](#/reference/actor-tasks/run-collection/run-task)
endpoint instead.
operationId: actorTask_runSync_get
parameters:
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/actorTaskId"
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/timeout"
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/memory"
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/maxItems"
# XXX: do we support maxTotalChargeUsd for task runs?
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/build"
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/outputRecordKey"
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/webhooks"
responses:
"201":
description: ""
headers: {}
content:
application/json:
schema:
type: object
example:
bar: foo
"400":
$ref: ../../components/responses/BadRequest.yaml
"401":
$ref: ../../components/responses/Unauthorized.yaml
"403":
$ref: ../../components/responses/Forbidden.yaml
"404":
$ref: ../../components/responses/NotFound.yaml
"405":
$ref: ../../components/responses/MethodNotAllowed.yaml
"408":
description: "Request Timeout: the HTTP request exceeded the 300 second limit"
headers: {}
content:
application/json:
schema:
$ref: ../../components/schemas/common/ErrorResponse.yaml
"429":
$ref: ../../components/responses/TooManyRequests.yaml
deprecated: false
x-legacy-doc-urls:
- https://docs.apify.com/api/v2#/reference/actor-tasks/run-task-synchronously/run-task-synchronously-get
- https://docs.apify.com/api/v2#/reference/actor-tasks/run-task-synchronously-get
- https://docs.apify.com/api/v2#tag/Actor-tasksRun-task-synchronously/operation/actorTask_runSync_get
post:
tags:
- Actor tasks
summary: Run task synchronously
description: |
Runs an Actor task and synchronously returns its output.
The run must finish in 300<!-- MAX_ACTOR_JOB_SYNC_WAIT_SECS --> seconds
otherwise the HTTP request fails with a timeout error (this won't abort
the run itself).
Optionally, you can override the Actor input configuration by passing a JSON
object as the POST payload and setting the `Content-Type: application/json` HTTP header.
Note that if the object in the POST payload does not define a particular
input property, the Actor run uses the default value defined by the task (or Actor's input
schema if not defined by the task).
Beware that it might be impossible to maintain an idle HTTP connection for
an extended period, due to client timeout or network conditions. Make sure your HTTP client is
configured to have a long enough connection timeout.
If the connection breaks, you will not receive any information about the run
and its status.
Input fields from Actor task configuration can be overloaded with values
passed as the POST payload.
Just make sure to specify `Content-Type` header to be `application/json` and
input to be an object.
To run the task asynchronously, use the [Run
task](#/reference/actor-tasks/run-collection/run-task) API endpoint instead.
operationId: actorTask_runSync_post
parameters:
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/actorTaskId"
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/timeout"
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/memory"
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/maxItems"
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/maxTotalChargeUsd"
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/restartOnError"
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/build"
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/outputRecordKey"
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/webhooks"
requestBody:
description: ""
content:
application/json:
schema:
type: object
example:
foo: bar
"*/*":
schema: {}
required: true
responses:
"201":
description: ""
headers: {}
content:
application/json:
schema:
type: object
example:
bar: foo
"400":
$ref: ../../components/responses/BadRequest.yaml
"401":
$ref: ../../components/responses/Unauthorized.yaml
"403":
$ref: ../../components/responses/Forbidden.yaml
"404":
$ref: ../../components/responses/NotFound.yaml
"405":
$ref: ../../components/responses/MethodNotAllowed.yaml
"413":
$ref: ../../components/responses/PayloadTooLarge.yaml
"415":
$ref: ../../components/responses/UnsupportedMediaType.yaml
"429":
$ref: ../../components/responses/TooManyRequests.yaml
deprecated: false
x-legacy-doc-urls:
- https://docs.apify.com/api/v2#/reference/actor-tasks/run-task-synchronously/run-task-synchronously-post
- https://docs.apify.com/api/v2#/reference/actor-tasks/run-task-synchronously-post
- https://docs.apify.com/api/v2#tag/Actor-tasksRun-task-synchronously/operation/actorTask_runSync_post