Skip to main content

Retrieve all tasks

This endpoint retrieves all tasks in your account. You can narrow down the data returned by filtering on the source of the task (see the section about creating tasks for more information).

HTTP Request

GET https://api.lunatask.app/v1/tasks

Query Parameters

ParameterDescription
sourceThe source specified when creating the task (optional)
source_idThe source_id specified when creating the task (optional)

If no source is specified, all tasks are returned.

Example in Ruby

require 'rest-client'

RestClient.get('https://api.lunatask.app/v1/tasks', { Authorization: "bearer #{access_token}" })

Response

The above command returns JSON structured like this:

{
"tasks": [
{
"id": "066b5835-184f-4fd9-be60-7d735aa94708",
"area_id": "11b37775-5a34-41bb-b109-f0e5a6084799",
"status": "next",
"previous_status": "later",
"estimate": 10,
"priority": 0,
"motivation": "unknown",
"eisenhower": 0,
"sources": [
{
"source": "github",
"source_id": "123"
}
],
"scheduled_on": null,
"completed_at": null,
"created_at": "2021-01-10T10:39:25Z",
"updated_at": "2021-01-10T10:39:25Z",
"deleted_at": null
},
{
"id": "0e0cff5c-c334-4a24-b15a-4fca6cfbf25f",
"area_id": "f557287e-ae43-4472-9478-497887362dcb",
"status": "later",
"previous_status": null,
"estimate": 120,
"priority": 0,
"motivation": "unknown",
"eisenhower": 0,
"sources": [],
"scheduled_on": null,
"completed_at": null,
"created_at": "2021-01-10T10:39:26Z",
"updated_at": "2021-01-10T10:39:26Z",
"deleted_at": null
}
]
}