Dokumentasi API TaskLeef

REST API untuk mengelola todo, proyek, dan papan Kanban

Terakhir diperbarui:

Autentikasi

API mendukung dua metode autentikasi:

1. Autentikasi Kunci API (Disarankan)

Generate an API key from your Settings page and include it in the X-API-Key header:

curl -H "X-API-Key: your-api-key" \
  https://taskleef.com/api/todos

2. Token Bearer JWT

Untuk aplikasi berbasis browser, autentikasi melalui endpoint login:

curl -X POST https://taskleef.com/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": "your-username", "password": "your-password"}'

Lalu sertakan token dalam permintaan berikutnya:

curl -H "Authorization: Bearer your-jwt-token" \
  https://taskleef.com/api/todos

Todo

GET/api/todos

Dapatkan semua todo untuk pengguna yang terautentikasi.

curl -H "X-API-Key: your-api-key" \
  https://taskleef.com/api/todos
GET/api/todos/{id}

Dapatkan todo tertentu berdasarkan ID.

GET/api/inbox

Dapatkan todo yang tidak ditugaskan ke proyek mana pun.

POST/api/todos

Buat todo baru.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"title": "Buy groceries", "description": "Milk, eggs, bread"}' \
  https://taskleef.com/api/todos

Isi Permintaan

BidangTipeWajibDeskripsi
titlestringYesTodo title
descriptionstringNoDetailed description
dueDateISO 8601NoDue date/time
prioritystringNoLow, Medium, High, or Urgent
projectIdUUIDNoAssign to a project
PUT/api/todos/{id}

Perbarui todo yang sudah ada.

PATCH/api/todos/{id}/complete

Beralih status penyelesaian todo.

curl -X PATCH -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"isCompleted": true}' \
  https://taskleef.com/api/todos/{id}/complete
DELETE/api/todos/{id}

Hapus todo.

POST/api/todos/{parentId}/subtasks

Buat subtugas di bawah todo induk.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"title": "Subtask title"}' \
  https://taskleef.com/api/todos/{parentId}/subtasks

Proyek

GET/api/projects

Daftar semua proyek untuk pengguna yang terautentikasi.

POST/api/projects

Buat proyek baru.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"title": "Work Tasks", "description": "Tasks for work"}' \
  https://taskleef.com/api/projects
GET/api/projects/{id}

Dapatkan proyek tertentu beserta todo-nya.

PUT/api/projects/{id}

Perbarui proyek.

DELETE/api/projects/{id}

Hapus proyek (todo dipindahkan ke inbox).

Papan Kanban

GET/api/boards

Daftar semua papan yang dapat diakses pengguna.

POST/api/boards

Buat papan baru.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"title": "Sprint Board", "projectId": "project-uuid"}' \
  https://taskleef.com/api/boards
GET/api/boards/{id}

Dapatkan papan tertentu.

GET/api/boards/{boardId}/columns

Dapatkan semua kolom untuk sebuah papan.

GET/api/boards/{boardId}/todos

Dapatkan semua todo yang memiliki kartu di papan ini.

Kolom

POST/api/boards/{boardId}/columns

Buat kolom baru di papan.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"title": "In Progress", "wipLimit": 3}' \
  https://taskleef.com/api/boards/{boardId}/columns
PUT/api/columns/{id}

Perbarui kolom (judul, batas WIP, kriteria selesai).

GET/api/columns/{columnId}/cards

Dapatkan semua kartu dalam sebuah kolom.

DELETE/api/columns/{id}

Hapus kolom.

Kartu

Kartu mewakili todo di papan Kanban. Sebuah todo dapat memiliki kartu di beberapa papan.

POST/api/columns/{columnId}/cards

Buat kartu untuk sebuah todo di dalam kolom.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"todoId": "todo-uuid"}' \
  https://taskleef.com/api/columns/{columnId}/cards
PUT/api/cards/{id}

Perbarui kartu (pindahkan ke kolom atau subkolom yang berbeda).

# Move card to a different column
curl -X PUT -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"columnId": "new-column-uuid", "subColumn": "Inbox"}' \
  https://taskleef.com/api/cards/{id}

# Move card to Done subColumn
curl -X PUT -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"subColumn": "Done"}' \
  https://taskleef.com/api/cards/{id}

Nilai SubKolom

  • Inbox - Active items in the column
  • Done - Completed items within the column
  • Blocked - Items waiting on external dependencies
DELETE/api/cards/{id}

Hapus kartu dari papan (tidak menghapus todo).

Tag

GET/api/tags

Daftar semua tag untuk pengguna yang terautentikasi.

POST/api/tags

Buat tag baru.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"name": "urgent"}' \
  https://taskleef.com/api/tags
PUT/api/tags/{id}

Perbarui tag.

DELETE/api/tags/{id}

Hapus tag.

Komentar

GET/api/todos/{todoId}/comments

Dapatkan semua komentar pada sebuah todo.

POST/api/todos/{todoId}/comments

Tambahkan komentar ke sebuah todo.

curl -X POST -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"text": "This is my comment"}' \
  https://taskleef.com/api/todos/{todoId}/comments
PUT/api/comments/{id}

Perbarui komentar.

DELETE/api/comments/{id}

Hapus komentar.

Format Respons

Respons Sukses

Permintaan yang berhasil mengembalikan JSON dengan data yang diminta:

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "title": "Buy groceries",
  "description": "Milk, eggs, bread",
  "isCompleted": false,
  "createdAt": "2024-01-15T10:30:00Z"
}

Respons Kesalahan

Kesalahan mengembalikan kode status HTTP yang sesuai:

  • 400 - Bad Request (invalid input)
  • 401 - Unauthorized (missing or invalid authentication)
  • 403 - Forbidden (insufficient permissions)
  • 404 - Not Found
  • 500 - Internal Server Error

Need help? Check your Settings to manage API keys.