Skip to main content
GET
/
tasks
curl -X GET http://localhost:3000/tasks \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
[
  {
    "id": 1,
    "title": "Complete API documentation",
    "description": "Write comprehensive API docs for all task endpoints",
    "completed": false,
    "userId": 5
  },
  {
    "id": 2,
    "title": "Review pull requests",
    "description": null,
    "completed": true,
    "userId": 5
  }
]
This endpoint requires implementation in the backend. Documentation reflects the expected API design based on the Task model schema.

Authentication

This endpoint requires a valid JWT token in the Authorization header.
Authorization: Bearer YOUR_JWT_TOKEN

Query Parameters

completed
boolean
Filter tasks by completion status. If not provided, returns all tasks.

Response

Returns an array of task objects.
id
integer
The unique identifier for the task
title
string
The title of the task
description
string
The description of the task (null if not provided)
completed
boolean
Whether the task is completed
userId
integer
The ID of the user who owns this task
curl -X GET http://localhost:3000/tasks \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
[
  {
    "id": 1,
    "title": "Complete API documentation",
    "description": "Write comprehensive API docs for all task endpoints",
    "completed": false,
    "userId": 5
  },
  {
    "id": 2,
    "title": "Review pull requests",
    "description": null,
    "completed": true,
    "userId": 5
  }
]

Build docs developers (and LLMs) love