Documentation de l'API TaskLeef

API REST pour gérer les tâches, les projets et les tableaux Kanban

Dernière mise à jour :

Authentification

L'API prend en charge deux méthodes d'authentification :

1. Authentification par clé API (recommandée)

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. Jeton Bearer JWT

Pour les applications basées sur navigateur, authentifiez-vous via le point de terminaison de connexion :

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

Incluez ensuite le jeton dans les requêtes suivantes :

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

Tâches

GET/api/todos

Récupère toutes les tâches de l'utilisateur authentifié.

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

Récupère une tâche spécifique par son ID.

GET/api/inbox

Récupère les tâches qui ne sont assignées à aucun projet.

POST/api/todos

Crée une nouvelle tâche.

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

Corps de la requête

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

Met à jour une tâche existante.

PATCH/api/todos/{id}/complete

Bascule le statut d'achèvement de la tâche.

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}

Supprime une tâche.

POST/api/todos/{parentId}/subtasks

Crée une sous-tâche sous une tâche parente.

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

Projets

GET/api/projects

Liste tous les projets de l'utilisateur authentifié.

POST/api/projects

Crée un nouveau projet.

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}

Récupère un projet spécifique avec ses tâches.

PUT/api/projects/{id}

Met à jour un projet.

DELETE/api/projects/{id}

Supprime un projet (les tâches sont déplacées vers la boîte de réception).

Tableaux Kanban

GET/api/boards

Liste tous les tableaux auxquels l'utilisateur a accès.

POST/api/boards

Crée un nouveau tableau.

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}

Récupère un tableau spécifique.

GET/api/boards/{boardId}/columns

Récupère toutes les colonnes d'un tableau.

GET/api/boards/{boardId}/todos

Récupère toutes les tâches ayant des cartes sur ce tableau.

Colonnes

POST/api/boards/{boardId}/columns

Crée une nouvelle colonne sur un tableau.

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}

Met à jour une colonne (titre, limite WIP, critères de fin).

GET/api/columns/{columnId}/cards

Récupère toutes les cartes d'une colonne.

DELETE/api/columns/{id}

Supprime une colonne.

Cartes

Les cartes représentent des tâches sur un tableau Kanban. Une tâche peut avoir des cartes sur plusieurs tableaux.

POST/api/columns/{columnId}/cards

Crée une carte pour une tâche dans une colonne.

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}

Met à jour une carte (déplacement vers une autre colonne ou sous-colonne).

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

Valeurs de sous-colonne

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

Retire une carte du tableau (ne supprime pas la tâche).

Étiquettes

GET/api/tags

Liste toutes les étiquettes de l'utilisateur authentifié.

POST/api/tags

Crée une nouvelle étiquette.

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}

Met à jour une étiquette.

DELETE/api/tags/{id}

Supprime une étiquette.

Commentaires

GET/api/todos/{todoId}/comments

Récupère tous les commentaires d'une tâche.

POST/api/todos/{todoId}/comments

Ajoute un commentaire à une tâche.

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}

Met à jour un commentaire.

DELETE/api/comments/{id}

Supprime un commentaire.

Format de réponse

Réponses de succès

Les requêtes réussies renvoient du JSON avec les données demandées :

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

Réponses d'erreur

Les erreurs renvoient les codes de statut HTTP appropriés :

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