-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added default build endpoint (#1423)
Recently we released endpoint to get default actor build: `/v2/acts/:actorId/builds/default` **This PR updates the documentation to include this endpoint.** <img width="338" alt="Screenshot 2025-01-22 at 11 22 34" src="https://github.com/user-attachments/assets/2f55917a-6196-4d47-ba65-805699c0a385" /> We already had this endpoint: `/v2/acts/:actorId/builds/:buildId` I was considering just adding information, that instead of `buildId` `default` can be passed. But since this endpoint is deprecated it does not make sense to me. @TC-MO Let me know what do you think?
- Loading branch information
1 parent
8c7e259
commit fb56b9b
Showing
4 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -499,6 +499,8 @@ paths: | |
$ref: 'paths/actors/acts@{actorId}@builds.yaml' | ||
'/v2/acts/{actorId}/builds/{buildId}': | ||
$ref: 'paths/actors/acts@{actorId}@builds@{buildId}.yaml' | ||
'/v2/acts/{actorId}/builds/default': | ||
$ref: 'paths/actors/acts@{actorId}@[email protected]' | ||
'/v2/acts/{actorId}/builds/{buildId}/abort': | ||
$ref: 'paths/actors/acts@{actorId}@builds@{buildId}@abort.yaml' | ||
'/v2/acts/{actorId}/builds/{buildId}/openapi-specification': | ||
|
76 changes: 76 additions & 0 deletions
76
apify-api/openapi/paths/actors/acts@{actorId}@[email protected]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
get: | ||
tags: | ||
- Actors/Default build object | ||
summary: Get default build | ||
description: | | ||
Get the default build for an Actor. | ||
Use the optional `waitForFinish` parameter to synchronously wait for the build to finish. | ||
This avoids the need for periodic polling when waiting for the build to complete. | ||
This endpoint does not require an authentication token. Instead, calls are authenticated using the build's unique ID. | ||
However, if you access the endpoint without a token, certain attributes (e.g., `usageUsd` and `usageTotalUsd`) will be hidden. | ||
operationId: act_build_default_get | ||
security: | ||
- apiKeyActorBuilds: [] | ||
- httpBearerActorBuilds: [] | ||
parameters: | ||
- name: actorId | ||
in: path | ||
description: Actor ID or a tilde-separated owner's username and Actor name. | ||
required: true | ||
style: simple | ||
schema: | ||
type: string | ||
example: janedoe~my-actor | ||
- name: waitForFinish | ||
in: query | ||
description: | | ||
The maximum number of seconds the server waits for the build to finish. | ||
If the build finishes within this time, the returned build object will have a terminal status (e.g. `SUCCEEDED`), | ||
otherwise it will have a transitional status (e.g. `RUNNING`). | ||
By default it is `0`, the maximum value is `60`. <!-- MAX_ACTOR_JOB_ASYNC_WAIT_SECS --> | ||
style: form | ||
explode: true | ||
schema: | ||
type: number | ||
format: double | ||
example: 60 | ||
responses: | ||
'200': | ||
description: '' | ||
headers: {} | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../components/schemas/actor-builds/GetBuildResponse.yaml' | ||
example: | ||
data: | ||
id: HG7ML7M8z78YcAPEB | ||
actId: janedoe~my-actor | ||
userId: klmdEpoiojmdEMlk3 | ||
startedAt: '2019-11-30T07:34:24.202Z' | ||
finishedAt: '2019-12-12T09:30:12.202Z' | ||
status: SUCCEEDED | ||
meta: | ||
origin: WEB | ||
clientIp: 172.234.12.34 | ||
userAgent: Mozilla/5.0 (iPad) | ||
stats: | ||
durationMillis: 1000 | ||
runTimeSecs: 45.718 | ||
computeUnits: 0.012699444444444444 | ||
options: | ||
useCache: false | ||
betaPackages: false | ||
memoryMbytes: 1024 | ||
diskMbytes: 2048 | ||
usage: | ||
ACTOR_COMPUTE_UNITS: 0.08 | ||
usageTotalUsd: 0.02 | ||
usageUsd: | ||
ACTOR_COMPUTE_UNITS: 0.02 | ||
inputSchema: '{\n \"title\": \"Schema for ... }' | ||
readme: '# Magic Actor\nThis Actor is magic.' | ||
buildNumber: 0.1.1 |