-
Notifications
You must be signed in to change notification settings - Fork 189
Expand file tree
/
Copy pathacts@{actorId}@run-sync.yaml
More file actions
153 lines (147 loc) · 5.99 KB
/
acts@{actorId}@run-sync.yaml
File metadata and controls
153 lines (147 loc) · 5.99 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
152
153
post:
tags:
- Actors/Actor runs
summary: Run Actor synchronously with input and return output
description: |
Runs a specific Actor and returns its output.
The POST payload including its `Content-Type` header is passed as `INPUT` to
the Actor (usually <code>application/json</code>).
The HTTP response contains Actors `OUTPUT` record from its default
key-value store.
The Actor is started with the default options; you can override them using
various URL query parameters.
If the Actor run exceeds 300<!-- MAX_ACTOR_JOB_SYNC_WAIT_SECS --> seconds,
the HTTP response will have status 408 (Request Timeout).
Beware that it might be impossible to maintain an idle HTTP connection for a
long period of time, 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 Actor asynchronously, use the [Run
Actor](#/reference/actors/run-collection/run-actor) API endpoint instead.
operationId: act_runSync_post
parameters:
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/actorId"
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/outputRecordKey"
- $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#/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":
description: ""
headers: {}
content:
application/json:
schema:
$ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunFailedError"
"404":
description: Not found - the requested resource was not found.
content:
application/json:
schema:
$ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError"
"408":
description: ""
headers: {}
content:
application/json:
schema:
$ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunTimeoutExceededError"
"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/actors/run-actor-synchronously/with-input
- https://docs.apify.com/api/v2#/reference/actors/with-input
- https://docs.apify.com/api/v2#tag/ActorsRun-actor-synchronously/operation/act_runSync_post
get:
tags:
- Actors/Actor runs
summary: Without input
description: |
Runs a specific Actor and returns its output.
The run must finish in 300<!-- MAX_ACTOR_JOB_SYNC_WAIT_SECS --> seconds
otherwise the API endpoint returns a timeout error.
The Actor is not passed any input.
Beware that it might be impossible to maintain an idle HTTP connection for a
long period of time,
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 Actor asynchronously, use the [Run
Actor](#/reference/actors/run-collection/run-actor) API endpoint instead.
operationId: act_runSync_get
parameters:
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/actorId"
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/outputRecordKey"
- $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#/webhooks"
responses:
"201":
description: ""
headers: {}
content:
application/json:
schema:
type: object
example:
foo: bar
"400":
description: ""
headers: {}
content:
application/json:
schema:
$ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunFailedError"
"404":
description: Not found - the requested resource was not found.
content:
application/json:
schema:
$ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError"
"408":
description: ""
headers: {}
content:
application/json:
schema:
$ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunTimeoutExceededError"
"429":
$ref: ../../components/responses/TooManyRequests.yaml
deprecated: false
x-legacy-doc-urls:
- https://docs.apify.com/api/v2#/reference/actors/run-actor-synchronously/without-input
- https://docs.apify.com/api/v2#/reference/actors/without-input
- https://docs.apify.com/api/v2#tag/ActorsRun-actor-synchronously/operation/act_runSync_get