Skip to content

Commit 97daaaf

Browse files
committed
feat: added default build endpoint
1 parent 5859871 commit 97daaaf

File tree

4 files changed

+82
-0
lines changed

4 files changed

+82
-0
lines changed

apify-api/openapi/components/tags.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@
127127
x-trait: 'true'
128128
description: '**[DEPRECATED]** API endpoints related to build of the actor were
129129
moved under new namespace [`actor-builds`](#/reference/actor-builds).'
130+
- name: Actors/Default build object
131+
x-displayName: Default build object
132+
x-parent-tag-name: Actor builds
133+
x-trait: 'true'
130134
- name: Actors/Abort build
131135
x-displayName: Abort build
132136
x-parent-tag-name: Actors

apify-api/openapi/components/x-tag-groups.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- Actors/Webhook collection
1111
- Actors/Build collection
1212
- Actors/Build object
13+
- Actors/Default build object
1314
- Actors/Abort build
1415
- Actors/Run collection
1516
- Actors/Run actor synchronously

apify-api/openapi/openapi.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,8 @@ paths:
499499
$ref: 'paths/actors/acts@{actorId}@builds.yaml'
500500
'/v2/acts/{actorId}/builds/{buildId}':
501501
$ref: 'paths/actors/acts@{actorId}@builds@{buildId}.yaml'
502+
'/v2/acts/{actorId}/builds/default':
503+
$ref: 'paths/actors/acts@{actorId}@[email protected]'
502504
'/v2/acts/{actorId}/builds/{buildId}/abort':
503505
$ref: 'paths/actors/acts@{actorId}@builds@{buildId}@abort.yaml'
504506
'/v2/acts/{actorId}/runs':
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
get:
2+
tags:
3+
- Actors/Default build object
4+
summary: Get default build
5+
description: |
6+
By passing the optional `waitForFinish` parameter the API endpoint will
7+
synchronously wait for the build to finish.
8+
This is useful to avoid periodic polling when waiting for an Actor build to
9+
finish.
10+
11+
This endpoint does not require the authentication token. Instead, calls are authenticated using a hard-to-guess ID of the build. However,
12+
if you access the endpoint without the token, certain attributes, such as `usageUsd` and `usageTotalUsd`, will be hidden.
13+
operationId: act_build_default_get
14+
security:
15+
- apiKeyActorBuilds: []
16+
- httpBearerActorBuilds: []
17+
parameters:
18+
- name: actorId
19+
in: path
20+
description: Actor ID or a tilde-separated owner's username and Actor name.
21+
required: true
22+
style: simple
23+
schema:
24+
type: string
25+
example: janedoe~my-actor
26+
- name: waitForFinish
27+
in: query
28+
description: |
29+
The maximum number of seconds the server waits for the build to finish.
30+
By default it is `0`, the maximum value is `60`. <!-- MAX_ACTOR_JOB_ASYNC_WAIT_SECS -->
31+
If the build finishes in time then the returned build object will have a terminal status (e.g. `SUCCEEDED`),
32+
otherwise it will have a transitional status (e.g. `RUNNING`).
33+
style: form
34+
explode: true
35+
schema:
36+
type: number
37+
format: double
38+
example: 60
39+
responses:
40+
'200':
41+
description: ''
42+
headers: {}
43+
content:
44+
application/json:
45+
schema:
46+
$ref: "../../components/schemas/actor-builds/GetBuildResponse.yaml"
47+
example:
48+
data:
49+
id: HG7ML7M8z78YcAPEB
50+
actId: janedoe~my-actor
51+
userId: klmdEpoiojmdEMlk3
52+
startedAt: '2019-11-30T07:34:24.202Z'
53+
finishedAt: '2019-12-12T09:30:12.202Z'
54+
status: SUCCEEDED
55+
meta:
56+
origin: WEB
57+
clientIp: 172.234.12.34
58+
userAgent: Mozilla/5.0 (iPad)
59+
stats:
60+
durationMillis: 1000
61+
runTimeSecs: 45.718
62+
computeUnits: 0.012699444444444444
63+
options:
64+
useCache: false
65+
betaPackages: false
66+
memoryMbytes: 1024
67+
diskMbytes: 2048
68+
usage:
69+
ACTOR_COMPUTE_UNITS: 0.08
70+
usageTotalUsd: 0.02
71+
usageUsd:
72+
ACTOR_COMPUTE_UNITS: 0.02
73+
inputSchema: '{\n \"title\": \"Schema for ... }'
74+
readme: '# Magic Actor\nThis Actor is magic.'
75+
buildNumber: 0.1.1

0 commit comments

Comments
 (0)