Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 111 additions & 0 deletions apify-api/openapi/components/objects/actor-runs/abort.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
sharedAbort: &sharedAbort
responses:
"200":
description: ""
headers: {}
content:
application/json:
schema:
$ref: ../../schemas/actor-runs/RunResponse.yaml
example:
$ref: ../../examples/AbortedRunExample.yaml
"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
deprecated: false

byRunId:
<<: *sharedAbort
tags:
- Actor runs
summary: Abort run
description: |
Aborts an Actor run and returns an object that contains all the details
about the run.

Only runs that are starting or running are aborted. For runs with status
`FINISHED`, `FAILED`, `ABORTING` and `TIMED-OUT` this call does nothing.
operationId: actorRun_abort_post
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/runId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/gracefully"
x-legacy-doc-urls:
- https://docs.apify.com/api/v2#/reference/actor-runs/abort-run/abort-run
- https://docs.apify.com/api/v2#/reference/actor-runs/abort-run
- https://docs.apify.com/api/v2#tag/Actor-runsAbort-run/operation/actorRun_abort_post
x-js-parent: RunClient
x-js-name: abort
x-js-doc-url: https://docs.apify.com/api/client/js/reference/class/RunClient#abort
x-py-parent: RunClientAsync
x-py-name: abort
x-py-doc-url: https://docs.apify.com/api/client/python/reference/class/RunClientAsync#abort

byActorRunId:
<<: *sharedAbort
tags:
- Actors/Actor runs
summary: Abort run
description: |
**[DEPRECATED]** API endpoints related to run of the Actor were moved under
new namespace [`actor-runs`](#/reference/actor-runs). Aborts an Actor run and
returns an object that contains all the details about the run.

Only runs that are starting or running are aborted. For runs with status
`FINISHED`, `FAILED`, `ABORTING` and `TIMED-OUT` this call does nothing.
operationId: act_run_abort_post
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/actorId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/runId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/gracefully"
deprecated: true
x-legacy-doc-urls:
- https://docs.apify.com/api/v2#/reference/actors/abort-run/abort-run
- https://docs.apify.com/api/v2#/reference/actors/abort-run
- https://docs.apify.com/api/v2#tag/ActorsAbort-run/operation/act_run_abort_post

lastRunByActor:
<<: *sharedAbort
tags:
- Last Actor run's abort
summary: Abort Actor's last run
description: |
Aborts the last run of the specified Actor and returns an object that
contains all the details about the run.

This endpoint is a shortcut for [Abort run](#/reference/actor-runs/abort-run/abort-run)
on the Actor's last run. Only runs that are starting or running are aborted.
For runs with status `FINISHED`, `FAILED`, `ABORTING` and `TIMED-OUT` this call
does nothing.
operationId: act_runs_last_abort_post
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/actorId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/statusLastRun"
- $ref: "../../parameters/runAndBuildParameters.yaml#/gracefully"

lastRunByActorTask:
<<: *sharedAbort
tags:
- Last Actor task run's abort
summary: Abort Actor task's last run
description: |
Aborts the last run of the specified Actor task and returns an object that
contains all the details about the run.

This endpoint is a shortcut for [Abort run](#/reference/actor-runs/abort-run/abort-run)
on the Actor task's last run. Only runs that are starting or running are aborted.
For runs with status `FINISHED`, `FAILED`, `ABORTING` and `TIMED-OUT` this call
does nothing.
operationId: actorTask_runs_last_abort_post
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/actorTaskId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/statusLastRun"
- $ref: "../../parameters/runAndBuildParameters.yaml#/gracefully"
69 changes: 69 additions & 0 deletions apify-api/openapi/components/objects/actor-runs/charge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
byRunId:
tags:
- Actor runs
summary: Charge events in run
description: |
Charge for events in the run of your [pay per event Actor](https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event).
The event you are charging for must be one of the configured events in your Actor. If the Actor is not set up as pay per event, or if the event is not configured,
the endpoint will return an error. The endpoint must be called from the Actor run itself, with the same API token that the run was started with.

:::info Learn more about pay-per-event pricing

For more details about pay-per-event (PPE) pricing, refer to our [PPE documentation](/platform/actors/publishing/monetize/pay-per-event).

:::

operationId: PostChargeRun
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/runId"
- name: idempotency-key
in: header
required: false
schema:
type: string
example: 2024-12-09T01:23:45.000Z-random-uuid
description: Always pass a unique idempotency key (any unique string) for each charge to avoid double charging in case of retries or network errors.
requestBody:
description: "Define which event, and how many times, you want to charge for."
content:
application/json:
schema:
$ref: ../../schemas/actor-runs/ChargeRunRequest.yaml
example:
eventName: ANALYZE_PAGE
count: 1
required: true
responses:
"201":
description: "The charge was successful. Note that you still have to make sure in your Actor that the total charge for the run respects the maximum value set by the user, as the API does not check this. Above the limit, the charges reported as successful in API will not be added to your payouts, but you will still bear the associated costs. Use the Apify charge manager or SDK to avoid having to deal with this manually."
content:
application/json:
schema:
type: object
additionalProperties: false
"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
"413":
$ref: ../../responses/PayloadTooLarge.yaml
"415":
$ref: ../../responses/UnsupportedMediaType.yaml
"429":
$ref: ../../responses/TooManyRequests.yaml
deprecated: false
x-js-parent: RunClient
x-js-name: charge
x-js-doc-url: https://docs.apify.com/api/client/js/reference/class/RunClient#charge
x-py-parent: RunClientAsync
x-py-name: charge
x-py-doc-url: https://docs.apify.com/api/client/python/reference/class/RunClientAsync#charge
x-legacy-doc-urls:
- https://docs.apify.com/api/v2#/reference/actor-runs/charge-events-in-run
- https://docs.apify.com/api/v2#tag/Actor-runsCharge-events-in-run/operation/PostChargeRun
148 changes: 148 additions & 0 deletions apify-api/openapi/components/objects/actor-runs/metamorph.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
sharedMetamorph: &sharedMetamorph
responses:
"200":
description: ""
headers: {}
content:
application/json:
schema:
$ref: ../../schemas/actor-runs/RunResponse.yaml
"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
deprecated: false

buildQueryParameter: &buildQueryParameter
name: build
in: query
description: |
Optional build of the target Actor.

It can be either a build tag or build number. By default, the run uses
the build specified in the default run configuration for the target
Actor (typically `latest`).
style: form
explode: true
schema:
type: string
example: beta

byRunId:
<<: *sharedMetamorph
tags:
- Actor runs
summary: Metamorph run
description: |
Transforms an Actor run into a run of another Actor with a new input.

This is useful if you want to use another Actor to finish the work
of your current Actor run, without the need to create a completely new run
and waiting for its finish.

For the users of your Actors, the metamorph operation is transparent, they
will just see your Actor got the work done.

Internally, the system stops the Docker container corresponding to the Actor
run and starts a new container using a different Docker image.

All the default storages are preserved and the new input is stored under the
`INPUT-METAMORPH-1` key in the same default key-value store.

For more information, see the [Actor docs](https://docs.apify.com/platform/actors/development/programming-interface/metamorph).
operationId: actorRun_metamorph_post
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/runId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/targetActorId"
- *buildQueryParameter
x-legacy-doc-urls:
- https://docs.apify.com/api/v2#/reference/actor-runs/metamorph-run/metamorph-run
- https://docs.apify.com/api/v2#/reference/actor-runs/metamorph-run
- https://docs.apify.com/api/v2#tag/Actor-runsMetamorph-run/operation/actorRun_metamorph_post
x-js-parent: RunClient
x-js-name: metamorph
x-js-doc-url: https://docs.apify.com/api/client/js/reference/class/RunClient#metamorph
x-py-parent: RunClientAsync
x-py-name: metamorph
x-py-doc-url: https://docs.apify.com/api/client/python/reference/class/RunClientAsync#metamorph

byActorRunId:
<<: *sharedMetamorph
tags:
- Actors/Actor runs
summary: Metamorph run
description: |
**[DEPRECATED]** API endpoints related to run of the Actor were moved under
new namespace [`actor-runs`](#/reference/actor-runs). Transforms an Actor run
into a run of another Actor with a new input.

This is useful if you want to use another Actor to finish the work
of your current Actor run, without the need to create a completely new run
and waiting for its finish.
For the users of your Actors, the metamorph operation is transparent, they
will just see your Actor got the work done.

There is a limit on how many times you can metamorph a single run. You can
check the limit in [the Actor runtime limits](https://docs.apify.com/platform/limits#actor-limits).

Internally, the system stops the Docker container corresponding to the Actor
run and starts a new container using a different Docker image.
All the default storages are preserved and the new input is stored under the
`INPUT-METAMORPH-1` key in the same default key-value store.

For more information, see the [Actor docs](https://docs.apify.com/platform/actors/development/programming-interface/metamorph).
operationId: act_run_metamorph_post
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/actorId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/runId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/targetActorId"
- *buildQueryParameter
deprecated: true
x-legacy-doc-urls:
- https://docs.apify.com/api/v2#/reference/actors/metamorph-run/metamorph-run
- https://docs.apify.com/api/v2#/reference/actors/metamorph-run
- https://docs.apify.com/api/v2#tag/ActorsMetamorph-run/operation/act_run_metamorph_post

lastRunByActor:
<<: *sharedMetamorph
tags:
- Last Actor run's metamorph
summary: Metamorph Actor's last run
description: |
Transforms the last run of the specified Actor into a run of another Actor with
a new input.

This endpoint is a shortcut for [Metamorph run](#/reference/actor-runs/metamorph-run/metamorph-run)
on the Actor's last run.
operationId: act_runs_last_metamorph_post
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/actorId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/statusLastRun"
- $ref: "../../parameters/runAndBuildParameters.yaml#/targetActorId"
- *buildQueryParameter

lastRunByActorTask:
<<: *sharedMetamorph
tags:
- Last Actor task run's metamorph
summary: Metamorph Actor task's last run
description: |
Transforms the last run of the specified Actor task into a run of another Actor with
a new input.

This endpoint is a shortcut for [Metamorph run](#/reference/actor-runs/metamorph-run/metamorph-run)
on the Actor task's last run.
operationId: actorTask_runs_last_metamorph_post
parameters:
- $ref: "../../parameters/runAndBuildParameters.yaml#/actorTaskId"
- $ref: "../../parameters/runAndBuildParameters.yaml#/statusLastRun"
- $ref: "../../parameters/runAndBuildParameters.yaml#/targetActorId"
- *buildQueryParameter
Loading
Loading