Documentazione API di TaskLeef

API REST per gestire attività, progetti e bacheche Kanban

Ultimo aggiornamento:

Autenticazione

L'API supporta due metodi di autenticazione:

1. Autenticazione con chiave API (consigliata)

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

Per le applicazioni basate su browser, autenticati tramite l'endpoint di accesso:

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

Quindi includi il token nelle richieste successive:

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

Attività

GET/api/todos

Ottieni tutte le attività dell'utente autenticato.

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

Ottieni un'attività specifica tramite ID.

GET/api/inbox

Ottieni le attività non assegnate ad alcun progetto.

POST/api/todos

Crea una nuova attività.

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

Corpo della richiesta

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

Aggiorna un'attività esistente.

PATCH/api/todos/{id}/complete

Attiva/disattiva lo stato di completamento dell'attività.

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}

Elimina un'attività.

POST/api/todos/{parentId}/subtasks

Crea una sottoattività sotto un'attività principale.

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

Progetti

GET/api/projects

Elenca tutti i progetti dell'utente autenticato.

POST/api/projects

Crea un nuovo progetto.

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}

Ottieni un progetto specifico con le sue attività.

PUT/api/projects/{id}

Aggiorna un progetto.

DELETE/api/projects/{id}

Elimina un progetto (le attività vengono spostate nella Posta in arrivo).

Bacheche Kanban

GET/api/boards

Elenca tutte le bacheche a cui l'utente ha accesso.

POST/api/boards

Crea una nuova bacheca.

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}

Ottieni una bacheca specifica.

GET/api/boards/{boardId}/columns

Ottieni tutte le colonne di una bacheca.

GET/api/boards/{boardId}/todos

Ottieni tutte le attività che hanno schede su questa bacheca.

Colonne

POST/api/boards/{boardId}/columns

Crea una nuova colonna su una bacheca.

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}

Aggiorna una colonna (titolo, limite WIP, criteri di completamento).

GET/api/columns/{columnId}/cards

Ottieni tutte le schede di una colonna.

DELETE/api/columns/{id}

Elimina una colonna.

Schede

Le schede rappresentano le attività su una bacheca Kanban. Un'attività può avere schede su più bacheche.

POST/api/columns/{columnId}/cards

Crea una scheda per un'attività in una colonna.

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}

Aggiorna una scheda (spostala in una colonna o sottocolonna diversa).

# 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}

Valori della sottocolonna

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

Rimuovi una scheda dalla bacheca (non elimina l'attività).

Etichette

GET/api/tags

Elenca tutte le etichette dell'utente autenticato.

POST/api/tags

Crea una nuova etichetta.

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}

Aggiorna un'etichetta.

DELETE/api/tags/{id}

Elimina un'etichetta.

Commenti

GET/api/todos/{todoId}/comments

Ottieni tutti i commenti su un'attività.

POST/api/todos/{todoId}/comments

Aggiungi un commento a un'attività.

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}

Aggiorna un commento.

DELETE/api/comments/{id}

Elimina un commento.

Formato della risposta

Risposte di successo

Le richieste andate a buon fine restituiscono JSON con i dati richiesti:

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

Risposte di errore

Gli errori restituiscono i codici di stato HTTP appropriati:

  • 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.