TaskLeef API-dokumentation

REST API til at administrere opgaver, projekter og Kanban-tavler

Senest opdateret:

Godkendelse

API'et understøtter to godkendelsesmetoder:

1. API-nøglegodkendelse (anbefales)

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

For browserbaserede applikationer skal du godkende via login-endpointet:

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

Inkluder derefter tokenet i efterfølgende anmodninger:

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

Opgaver

GET/api/todos

Hent alle opgaver for den godkendte bruger.

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

Hent en bestemt opgave via ID.

GET/api/inbox

Hent opgaver, der ikke er tilknyttet noget projekt.

POST/api/todos

Opret en ny opgave.

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

Anmodningstekst

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

Opdater en eksisterende opgave.

PATCH/api/todos/{id}/complete

Skift opgavens færdiggørelsesstatus.

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}

Slet en opgave.

POST/api/todos/{parentId}/subtasks

Opret en underopgave under en overordnet opgave.

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

Projekter

GET/api/projects

Vis alle projekter for den godkendte bruger.

POST/api/projects

Opret et nyt projekt.

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}

Hent et bestemt projekt med dets opgaver.

PUT/api/projects/{id}

Opdater et projekt.

DELETE/api/projects/{id}

Slet et projekt (opgaver flyttes til indbakken).

Kanban-tavler

GET/api/boards

Vis alle tavler, som brugeren har adgang til.

POST/api/boards

Opret en ny tavle.

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}

Hent en bestemt tavle.

GET/api/boards/{boardId}/columns

Hent alle kolonner på en tavle.

GET/api/boards/{boardId}/todos

Hent alle opgaver, der har kort på denne tavle.

Kolonner

POST/api/boards/{boardId}/columns

Opret en ny kolonne på en tavle.

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}

Opdater en kolonne (titel, WIP-grænse, færdig-kriterier).

GET/api/columns/{columnId}/cards

Hent alle kort i en kolonne.

DELETE/api/columns/{id}

Slet en kolonne.

Kort

Kort repræsenterer opgaver på en Kanban-tavle. En opgave kan have kort på flere tavler.

POST/api/columns/{columnId}/cards

Opret et kort til en opgave i en kolonne.

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}

Opdater et kort (flyt til en anden kolonne eller underkolonne).

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

Værdier for underkolonne

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

Fjern et kort fra tavlen (sletter ikke opgaven).

Tags

GET/api/tags

Vis alle tags for den godkendte bruger.

POST/api/tags

Opret et nyt tag.

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}

Opdater et tag.

DELETE/api/tags/{id}

Slet et tag.

Kommentarer

GET/api/todos/{todoId}/comments

Hent alle kommentarer på en opgave.

POST/api/todos/{todoId}/comments

Tilføj en kommentar til en opgave.

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}

Opdater en kommentar.

DELETE/api/comments/{id}

Slet en kommentar.

Svarformat

Succes-svar

Vellykkede anmodninger returnerer JSON med de ønskede data:

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

Fejlsvar

Fejl returnerer relevante HTTP-statuskoder:

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