TaskClient
Hierarchy
- ResourceClient
- TaskClient
Index
Properties
inheritedapifyClient
inheritedbaseUrl
inheritedhttpClient
optionalinheritedid
optionalinheritedparams
inheritedpublicBaseUrl
inheritedresourcePath
optionalinheritedsafeId
inheritedurl
Methods
call
Starts a task and waits for it to finish before returning the Run object. It waits indefinitely, unless the
waitSecsoption is provided.Parameters
optionalinput: Dictionary
Input overrides for the task. If not provided, the task's saved input is used.
options: TaskCallOptions = {}
Run and wait options.
Returns Promise<ActorRun>
The Actor run object.
delete
Deletes the Task.
Returns Promise<void>
get
Retrieves the Actor task.
Returns Promise<undefined | Task>
The task object, or
undefinedif it does not exist.
getInput
Retrieves the Actor task's input object.
Returns Promise<undefined | Dictionary | Dictionary[]>
The Task's input, or
undefinedif it does not exist.
lastRun
Returns a client for the last run of this task.
Parameters
options: TaskLastRunOptions = {}
Filter options for the last run.
Returns RunClient
A client for the last run.
runs
Returns a client for the Runs of this Task.
Returns RunCollectionClient
A client for the task's runs.
start
Starts an Actor task and immediately returns the Run object.
Parameters
optionalinput: Dictionary
Input overrides for the task. If not provided, the task's saved input is used.
options: TaskStartOptions = {}
Run options.
Returns Promise<ActorRun>
The Actor Run object.
update
updateInput
Updates the Actor task's input object.
Parameters
newFields: Dictionary | Dictionary[]
New input data for the task.
Returns Promise<Dictionary | Dictionary[]>
The updated task input.
webhooks
Returns a client for the Webhooks of this Task.
Returns WebhookCollectionClient
A client for the task's webhooks.
Client for managing a specific Actor task.
Tasks are pre-configured Actor runs with saved input and options. This client provides methods to start, call, update, and delete tasks, as well as manage their runs and webhooks.
https://docs.apify.com/platform/actors/running/tasks