Skip to main content

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.

Request

Path Parameters

    actorTaskId string required

    Task ID or a tilde-separated owner's username and task's name.


    Example: janedoe~my-task

Bodyrequired

  • name string
    Example: my-task
  • options object
      anyOf
    • build string | null nullable
      Example: latest
    • timeoutSecs integer | null nullable
      Example: 300
    • memoryMbytes integer | null nullable
      Example: 1024
    • maxItems integer | null nullable
      Example: 1000
    • maxTotalChargeUsd number | null nullable
      Example: 5
    • restartOnError boolean | null nullable
      Example: false
  • input object
      anyOf
    • 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
    • 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": 1024,
    "maxItems": 1000,
    "maxTotalChargeUsd": 5,
    "restartOnError": false
    },
    "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"
    }
    }