Skip to main content

Update task

PUT 

https://api.apify.com/v2/actor-tasks/:actorTaskId

ClientsApify API Python Client ReferenceApify API JavaScript Client ReferenceUpdate 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

    actorTaskId stringrequired

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

Bodyrequired

    idstringrequired
    Example: ZxLNxrRaZrSjuhT9y
    userIdstringrequired
    Example: BPWZBd7Z9c746JAnF
    actIdstringrequired
    Example: asADASadYvn4mBZmm
    namestringrequired
    Example: my-task
    usernamestringnullable
    Example: janedoe
    createdAtstringrequired
    Example: 2018-10-26T07:23:14.855Z
    modifiedAtstringrequired
    Example: 2018-10-26T13:30:49.578Z
    removedAtstringnullable
    stats object
    oneOf
    options object
    oneOf
    input object
    oneOf

Responses

Response Headers
    Schema
      data objectrequired
      idstringrequired
      Example: zdc3Pyhyz3m8vjDeM
      userIdstringrequired
      Example: wRsJZtadYvn4mBZmm
      actIdstringrequired
      Example: asADASadYvn4mBZmm
      namestringrequired
      Example: my-task
      usernamestringnullable
      Example: janedoe
      createdAtstringrequired
      Example: 2018-10-26T07:23:14.855Z
      modifiedAtstringrequired
      Example: 2018-10-26T13:30:49.578Z
      removedAtstringnullable
      stats object
      oneOf
      options object
      oneOf
      input object
      oneOf

    Authorization: http

    name: httpBearertype: httpscheme: bearerdescription: API authentication token.
    curl -L -X PUT 'https://api.apify.com/v2/actor-tasks/:actorTaskId' \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer <token>' \
    -d '{
    "id": "ZxLNxrRaZrSjuhT9y",
    "userId": "BPWZBd7Z9c746JAnF",
    "actId": "asADASadYvn4mBZmm",
    "name": "my-task",
    "username": "janedoe",
    "createdAt": "2018-10-26T07:23:14.855Z",
    "modifiedAt": "2018-10-26T13:30:49.578Z",
    "removedAt": "string"
    }'
    Request Collapse all
    Base URL
    https://api.apify.com
    Auth
    Parameters
    — pathrequired
    Body required
    {
      "id": "ZxLNxrRaZrSjuhT9y",
      "userId": "BPWZBd7Z9c746JAnF",
      "actId": "asADASadYvn4mBZmm",
      "name": "my-task",
      "username": "janedoe",
      "createdAt": "2018-10-26T07:23:14.855Z",
      "modifiedAt": "2018-10-26T13:30:49.578Z",
      "removedAt": "string"
    }
    
    ResponseClear

    Click the Send API Request button above and see the response here!