Update task
PUT/v2/actor-tasks/:actorTaskId
Update settings of a task using values specified by an object passed as JSON in the POST payload.
If the object does not define a specific property, its value is not updated.
The response is the full task object as returned by the Get task endpoint.
The request needs to specify the Content-Type: application/json HTTP
header!
When providing your API authentication token, we recommend using the
request's Authorization header, rather than the URL. (More
info).
Request
Path Parameters
Task ID or a tilde-separated owner's username and task's name.
Example:janedoe~my-taskBodyrequired
- name stringExample:
my-task options object
- anyOf
- TaskOptions
- null
- build string | null nullableExample:
latest - timeoutSecs integer | null nullableExample:
300 - memoryMbytes integer | null nullableExample:
128 - restartOnError boolean | null nullableExample:
false - maxItems integer | null nullable
input object
- anyOf
- TaskInput
- null
- object
The input configuration for the Actor task. This is a user-defined JSON object that will be passed to the Actor when the task is run.
Example:{"startUrls":[{"url":"https://example.com"}],"maxRequestsPerCrawl":100}
- title string | null nullable
actorStandby object
- anyOf
- ActorStandby
- null
- isEnabled boolean | null nullable
- desiredRequestsPerActorRun integer | null nullable
- maxRequestsPerActorRun integer | null nullable
- idleTimeoutSecs integer | null nullable
- build string | null nullable
- memoryMbytes integer | null nullable
- disableStandbyFieldsOverride boolean | null nullable
- shouldPassActorInput boolean | null nullable
Status 200
Response Headers
{
"data": {
"id": "zdc3Pyhyz3m8vjDeM",
"userId": "wRsJZtadYvn4mBZmm",
"actId": "asADASadYvn4mBZmm",
"name": "my-task",
"username": "janedoe",
"createdAt": "2018-10-26T07:23:14.855Z",
"modifiedAt": "2018-10-26T13:30:49.578Z",
"removedAt": "2024-07-29T15:51:28.071Z",
"stats": {
"totalRuns": 15
},
"options": {
"build": "latest",
"timeoutSecs": 300,
"memoryMbytes": 128,
"restartOnError": false,
"maxItems": 0
},
"input": {
"startUrls": [
{
"url": "https://example.com"
}
],
"maxRequestsPerCrawl": 100
},
"title": "string",
"actorStandby": {
"isEnabled": true,
"desiredRequestsPerActorRun": 0,
"maxRequestsPerActorRun": 0,
"idleTimeoutSecs": 0,
"build": "string",
"memoryMbytes": 0,
"disableStandbyFieldsOverride": true,
"shouldPassActorInput": true
},
"standbyUrl": "string"
}
}
Schema
data object required
- id string requiredExample:
zdc3Pyhyz3m8vjDeM - userId string requiredExample:
wRsJZtadYvn4mBZmm - actId string requiredExample:
asADASadYvn4mBZmm - name string requiredExample:
my-task - username string | null nullableExample:
janedoe - createdAt string<date-time> requiredExample:
2018-10-26T07:23:14.855Z - modifiedAt string<date-time> requiredExample:
2018-10-26T13:30:49.578Z - removedAt string,null<date-time> nullable
stats object
- anyOf
- TaskStats
- null
- totalRuns integerExample:
15
options object
- anyOf
- TaskOptions
- null
- build string | null nullableExample:
latest - timeoutSecs integer | null nullableExample:
300 - memoryMbytes integer | null nullableExample:
128 - restartOnError boolean | null nullableExample:
false - maxItems integer | null nullable
input object
- anyOf
- TaskInput
- null
- object
The input configuration for the Actor task. This is a user-defined JSON object that will be passed to the Actor when the task is run.
Example:{"startUrls":[{"url":"https://example.com"}],"maxRequestsPerCrawl":100}
- title string | null nullable
actorStandby object
- anyOf
- ActorStandby
- null
- isEnabled boolean | null nullable
- desiredRequestsPerActorRun integer | null nullable
- maxRequestsPerActorRun integer | null nullable
- idleTimeoutSecs integer | null nullable
- build string | null nullable
- memoryMbytes integer | null nullable
- disableStandbyFieldsOverride boolean | null nullable
- shouldPassActorInput boolean | null nullable
- standbyUrl string,null<uri> nullable
- id string requiredExample:
Status 400
Bad request - invalid input parameters or request body.
{
"error": {
"type": "invalid-input",
"message": "Invalid input: The request body contains invalid data."
}
}
Schema
error object required
- type string requiredExample:
run-failed - message string requiredExample:
Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)
- type string requiredExample:
Status 401
Unauthorized - authentication required or invalid token.
{
"error": {
"type": "token-not-valid",
"message": "Authentication token is not valid."
}
}
Schema
error object required
- type string requiredExample:
run-failed - message string requiredExample:
Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)
- type string requiredExample:
Status 403
Forbidden - insufficient permissions to perform this action.
{
"error": {
"type": "permission-denied",
"message": "You do not have permission to perform this action."
}
}
Schema
error object required
- type string requiredExample:
run-failed - message string requiredExample:
Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)
- type string requiredExample:
Status 404
Not found - the requested resource does not exist.
{
"error": {
"type": "record-not-found",
"message": "The requested resource was not found."
}
}
Schema
error object required
- type string requiredExample:
run-failed - message string requiredExample:
Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)
- type string requiredExample:
Status 405
Method not allowed.
{
"error": {
"type": "method-not-allowed",
"message": "This API end-point can only be accessed using the following HTTP methods: OPTIONS,GET"
}
}
Schema
error object required
- type string requiredExample:
run-failed - message string requiredExample:
Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)
- type string requiredExample:
Status 413
Payload too large - the request body exceeds the size limit.
{
"error": {
"type": "request-too-large",
"message": "The POST payload is too large (limit: 9437184 bytes, actual length: 10485760 bytes)."
}
}
Schema
error object required
- type string requiredExample:
run-failed - message string requiredExample:
Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)
- type string requiredExample:
Status 415
Unsupported media type - the Content-Encoding of the request is not supported.
{
"error": {
"type": "unsupported-content-encoding",
"message": "Content-Encoding \"bla\" is not supported."
}
}
Schema
error object required
- type string requiredExample:
run-failed - message string requiredExample:
Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)
- type string requiredExample:
Status 429
Too many requests - rate limit exceeded.
{
"error": {
"type": "rate-limit-exceeded",
"message": "You have exceeded the rate limit. Please try again later."
}
}
Schema
error object required
- type string requiredExample:
run-failed - message string requiredExample:
Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)
- type string requiredExample: