List Tasks

Get a list of tasks with filtering and pagination.

Request

Method: GET
URL: /api/tasks
Headers: Authorization: Bearer {token}

Example Request

curl -X GET "https://example.com/api/tasks" \
  -H "Authorization: Bearer {token}"

Success Response (200)

{
  "records": [
    {
      "id": 1,
      "title": "Monthly Report",
      "description": "Last month performance report",
      "project_id": 1,
      "assigned_to": [1, 2],
      "status": "in_progress",
      "priority": "high",
      "start_date": "1403-05-01",
      "deadline": "1403-05-15",
      "created_at": "1403-04-20"
    }
  ],
  "meta": {
    "total": 25,
    "current_page": 1,
    "per_page": 20
  }
}

Errors

Code Description
401 Invalid token

Task Details

Get complete information about a task.

Request

Method: GET
URL: /api/tasks/{id}
Headers: Authorization: Bearer {token}

Example Request

curl -X GET "https://example.com/api/tasks/1" \
  -H "Authorization: Bearer {token}"

Success Response (200)

{
  "record": {
    "id": 1,
    "title": "Monthly Report",
    "description": "Last month performance report",
    "project_id": 1,
    "assigned_to": [1, 2],
    "status": "in_progress",
    "priority": "high",
    "start_date": "1403-05-01",
    "deadline": "1403-05-15",
    "labels": [],
    "created_at": "1403-04-20"
  }
}

Errors

Code Description
401 Invalid token
404 Task not found

Create Task

Create a new task in the system.

Request

Method: POST
URL: /api/tasks
Headers: Authorization: Bearer {token}
Content-Type: application/json

Example Request

curl -X POST "https://example.com/api/tasks" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "New Task",
    "description": "Task description",
    "project_id": 1,
    "assigned_to": [1],
    "priority": "medium",
    "start_date": "1403-06-01",
    "deadline": "1403-06-15"
  }'

Success Response (201)

{
  "record": {
    "id": 2,
    "title": "New Task",
    "project_id": 1,
    "assigned_to": [1],
    "status": "not_started",
    "start_date": "1403-06-01",
    "deadline": "1403-06-15"
  }
}

Errors

Code Description
401 Invalid token
422 Validation error
Type to search...