Updating tasks
This endpoint updates a specific task.
HTTP Request
PUT https://api.lunatask.app/v1/tasks/<id>
URL Parameters
Parameter | Description |
---|---|
id | The ID of the task to update |
Body Parameters
The attributes you want to update. Besides name
and note
, other options like status
, motivation
, or scheduled_on
are available (see Task entity for allowed attribute values).
Example in Ruby
require 'rest-client'
access_token = 'xxx'
payload = { name: 'My new name', motivation: 'must' }
RestClient.put('https://api.lunatask.app/v1/tasks/066b5835-184f-4fd9-be60-7d735aa94708', payload.to_json, { Authorization: "bearer #{access_token}", "Content-Type": 'application/json' })
Response
The above command returns JSON structured like this:
{
"task": {
"id": "066b5835-184f-4fd9-be60-7d735aa94708",
"area_id": "11b37775-5a34-41bb-b109-f0e5a6084799",
"goal_id": null,
"status": "later",
"previous_status": null,
"estimate": null,
"priority": null,
"progress": null,
"motivation": "must",
"eisenhower": 0,
"sources": [],
"scheduled_on": null,
"completed_at": null,
"created_at": "2021-01-10T10:39:25Z",
"updated_at": "2021-01-10T10:39:25Z",
"deleted_at": null
}
}