Update task
PUThttps://api.apify.com/v2/actor-tasks/:actorTaskId
ClientsUpdate 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.
- application/json
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
options object
input object
Responses
- 200
Response Headers
- application/json
- Schema
- Example (auto)
- Example
Schema
data objectrequired
{
"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": "string"
}
}
{
"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": null,
"stats": {
"totalRuns": 15
},
"options": {
"build": "latest",
"timeoutSecs": 300,
"memoryMbytes": 128
},
"input": {
"hello": "world"
}
}
}
Authorization: http
name: httpBearertype: httpscheme: bearerdescription: API authentication token.
- CLI
- JavaScript
- Python
- PHP
- Java
- C
- C#
- Go
- Rust
- Node.js
- Ruby
- PowerShell
- Dart
- Objective-C
- OCaml
- R
- Swift
- Kotlin
- CURL
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"
}'
ResponseClear