Description
Replaces the details of a task given its properties. It is recommended to provide all properties in the body, as this endpoint performs a full replacement, not a partial update.
However, you cannot update a task's location
. Also, if no status
is provided, a value of Created
is used.
PUT
/tasks/{taskId}
Required OAuth Scopes:
task:write
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
taskId | path | string | true | The unique identifier of the task |
body | body | Task | true | All properties for the task, not just those to update |
Body parameter example
{
"assignee": {
"id": "V1ZVd2VyFzU3NiQ1NDA4NjIzNzk2MjD"
},
"description": "Review document for spelling and grammar",
"dueDate": "2019-10-30T00:00:00Z",
"location": {
"file": "124efa2a142f472ba1ceab34ed18915f",
"fileSegment": "465ttdh2a142y75ehsft5ab34edf5675"
},
"status": "Completed",
"title": "Review Document"
}
Code Samples
curl -X PUT https://api.app.wdesk.com/platform/v1/tasks/{taskId} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
http PUT https://api.app.wdesk.com/platform/v1/tasks/{taskId} \
Content-Type:application/json \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=PUT "https://api.app.wdesk.com/platform/v1/tasks/{taskId}" \
--output-document - \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('https://api.app.wdesk.com/platform/v1/tasks/{taskId}', headers = headers)
print(r.json())
Returns
200 - OK
Returns a Task
object containing details about the updated Task
.
Example Responses
{
"id": "129g274495354cf18edb6b3ea3d023b2",
"title": "Review Document",
"description": "Review document for spelling and grammar",
"status": "Completed",
"dueDate": "2019-10-30T00:00:00Z",
"sourceUrl": "https://app.wdesk.com/tasks/d/UVdOauIzVaVkQjdxTmzNNUOEUTQOakEnTnpJTE9ENXkuEkdGeaF4OENNJEV3NUTBmA?token=NTc0NDU2MTg1MjM0ODUyTM",
"completed": {
"dateTime": "2019-10-29T15:03:27Z"
},
"modified": {
"dateTime": "2019-10-29T15:03:27Z"
},
"assignee": {
"id": "V1ZVd2VyFzU3NiQ1NDA4NjIzNzk2MjD",
"displayName": "Jane Doe",
"email": "[email protected]"
},
"created": {
"user": {
"id": "V3ZVc2VyFzV3NiQ5NDA2NjIzNxk2njH",
"displayName": "John Doe",
"email": "[email protected]"
},
"dateTime": "2019-10-28T15:03:27Z"
},
"location": {
"file": "124efa2a142f472ba1ceab34ed18915f",
"fileSegment": "465ttdh2a142y75ehsft5ab34edf5675"
}
}