GET /api/tasks/export
Exports the authenticated user’s tasks as a downloadable file. Supports CSV and JSON formats. The same status, priority, tag, and overdue filters available on List Tasks are supported here.
Returns
404 Not Found if no tasks match the applied filters. Ensure your filters are not too restrictive before exporting.Authentication
Query Parameters
Export file format. Allowed values:
csv, json.Filter exported tasks by status. Allowed values:
pending, in_progress, completed, cancelled.Filter exported tasks by priority. Allowed values:
low, medium, high, urgent.Filter exported tasks to those associated with a specific tag ID.
When
true, exports only tasks whose due_date is in the past and whose status is not completed.Response
The response is a file download, not a JSON object.| Format | Content-Type | Content-Disposition |
|---|---|---|
csv | text/csv | attachment; filename=tasks.csv |
json | application/json | attachment; filename=tasks.json |
CSV Columns
The CSV file contains the following columns, derived from theprepare_tasks_for_export function:
| Column | Description |
|---|---|
id | Task ID |
title | Task title |
description | Task description |
status | Task status |
priority | Task priority |
due_date | ISO 8601 due date, or empty |
completed_at | ISO 8601 completion timestamp, or empty |
is_overdue | True or False |
is_completed | True or False |
created_at | ISO 8601 creation timestamp |
updated_at | ISO 8601 last-updated timestamp |
user_id | ID of the task owner |
user_username | Username of the task owner |
user_email | Email of the task owner |
tags | Comma-separated list of tag names, e.g. docs, api |