Base URL: http://localhost:3001/api/v1
Status values: TODO, IN_PROGRESS, IN_REVIEW, DONE
Priority values: LOW, MEDIUM, HIGH
POST /tareas
Create a new task and assign it to a user.
Requires authentication. Admin or Project Manager.
Request body
Priority level (e.g. HIGH, MEDIUM, LOW).
Due date in YYYY-MM-DD format. Must not be in the past.
ID of the user the task is assigned to.
ID of the project this task belongs to.
Example request
curl -X POST http://localhost:3001/api/v1/tareas \
-H "Authorization: Bearer <accessToken>" \
-H "Content-Type: application/json" \
-d '{
"titulo": "Build login page",
"descripcion": "Implement the login UI and connect to /login endpoint.",
"prioridad": "HIGH",
"due_date": "2026-06-30",
"id_usuario": 42,
"project_id": 12
}'
Example response — 201 Created
{
"success": true,
"message": "Task created.",
"data": {
"id_tarea": 101,
"titulo": "Build login page",
"descripcion": "Implement the login UI and connect to /login endpoint.",
"prioridad": "HIGH",
"due_date": "2026-06-30",
"status": "TODO",
"assigned_to": 42,
"proyecto_id": 12
}
}
GET /tareas
Returns all tasks assigned to the authenticated user.
Requires authentication. Any role.
Example request
curl http://localhost:3001/api/v1/tareas \
-H "Authorization: Bearer <accessToken>"
Example response — 200 OK
{
"success": true,
"message": "Tasks retrieved.",
"data": [
{
"id_tarea": 101,
"titulo": "Build login page",
"prioridad": "HIGH",
"status": "IN_PROGRESS",
"due_date": "2026-06-30",
"proyecto_id": 12
}
]
}
GET /tareas/adm
Returns all tasks across all projects. Results are paginated.
Requires authentication. Admin only.
Query parameters
Page number. Defaults to 1.
Number of tasks per page. Defaults to 10.
Example request
curl "http://localhost:3001/api/v1/tareas/adm?page=1&limit=10" \
-H "Authorization: Bearer <accessToken>"
Example response — 200 OK
{
"success": true,
"message": "All tasks retrieved.",
"data": [
{ "id_tarea": 101, "titulo": "Build login page", "status": "IN_PROGRESS", "assigned_to": 42 },
{ "id_tarea": 102, "titulo": "Write unit tests", "status": "TODO", "assigned_to": 43 }
]
}
GET /tareas/proyecto
Returns all tasks belonging to a specific project.
Requires authentication. Admin or Project Manager.
Request body
ID of the project to retrieve tasks for.
Example request
curl -X GET http://localhost:3001/api/v1/tareas/proyecto \
-H "Authorization: Bearer <accessToken>" \
-H "Content-Type: application/json" \
-d '{ "id_proyecto": 12 }'
Example response — 200 OK
{
"success": true,
"message": "Tasks retrieved.",
"data": [
{ "id_tarea": 101, "titulo": "Build login page", "status": "IN_PROGRESS" },
{ "id_tarea": 102, "titulo": "Write unit tests", "status": "TODO" }
]
}
PUT /tareas/curso/dev
Move the authenticated developer’s own task to IN_PROGRESS.
Requires authentication. Developer only.
Request body
ID of the task to move to IN_PROGRESS.
Example request
curl -X PUT http://localhost:3001/api/v1/tareas/curso/dev \
-H "Authorization: Bearer <accessToken>" \
-H "Content-Type: application/json" \
-d '{ "id_tarea": 101 }'
Example response — 200 OK
{
"success": true,
"message": "Task moved to IN_PROGRESS.",
"data": { "id_tarea": 101, "status": "IN_PROGRESS" }
}
PUT /tareas/curso
Move any task to IN_PROGRESS.
Requires authentication. Admin or Project Manager.
Request body
ID of the task to move to IN_PROGRESS.
Example request
curl -X PUT http://localhost:3001/api/v1/tareas/curso \
-H "Authorization: Bearer <accessToken>" \
-H "Content-Type: application/json" \
-d '{ "id_tarea": 101 }'
Example response — 200 OK
{
"success": true,
"message": "Task moved to IN_PROGRESS.",
"data": { "id_tarea": 101, "status": "IN_PROGRESS" }
}
PUT /tareas/review/dev
Move the authenticated developer’s own task to IN_REVIEW.
Requires authentication. Developer only.
Request body
ID of the task to move to IN_REVIEW.
Example request
curl -X PUT http://localhost:3001/api/v1/tareas/review/dev \
-H "Authorization: Bearer <accessToken>" \
-H "Content-Type: application/json" \
-d '{ "id_tarea": 101 }'
Example response — 200 OK
{
"success": true,
"message": "Task moved to IN_REVIEW.",
"data": { "id_tarea": 101, "status": "IN_REVIEW" }
}
PUT /tareas/review
Move any task to IN_REVIEW.
Requires authentication. Admin or Project Manager.
Request body
ID of the task to move to IN_REVIEW.
Example request
curl -X PUT http://localhost:3001/api/v1/tareas/review \
-H "Authorization: Bearer <accessToken>" \
-H "Content-Type: application/json" \
-d '{ "id_tarea": 101 }'
Example response — 200 OK
{
"success": true,
"message": "Task moved to IN_REVIEW.",
"data": { "id_tarea": 101, "status": "IN_REVIEW" }
}
PUT /tareas/done
Mark a task as DONE.
Requires authentication. Admin or Project Manager.
Request body
ID of the task to mark as DONE.
Example request
curl -X PUT http://localhost:3001/api/v1/tareas/done \
-H "Authorization: Bearer <accessToken>" \
-H "Content-Type: application/json" \
-d '{ "id_tarea": 101 }'
Example response — 200 OK
{
"success": true,
"message": "Task marked as DONE.",
"data": { "id_tarea": 101, "status": "DONE" }
}
PUT /tareas/actualizar
Fully update a task’s fields.
Requires authentication. Admin only.
Request body
ID of the task to update.
Priority level. One of LOW, MEDIUM, HIGH.
Due date in ISO 8601 format.
ID of the user to assign the task to.
ID of the project to move the task to.
Example request
curl -X PUT http://localhost:3001/api/v1/tareas/actualizar \
-H "Authorization: Bearer <accessToken>" \
-H "Content-Type: application/json" \
-d '{
"id_tarea": 101,
"titulo": "Build login page (revised)",
"prioridad": "MEDIUM",
"due_date": "2026-07-15",
"assigned_to": 43,
"proyecto_id": 12
}'
Example response — 200 OK
{
"success": true,
"message": "Task updated.",
"data": {
"id_tarea": 101,
"titulo": "Build login page (revised)",
"prioridad": "MEDIUM",
"due_date": "2026-07-15",
"assigned_to": 43,
"proyecto_id": 12
}
}
DELETE /tarea
Delete a task permanently.
Requires authentication. Admin or Project Manager.
Request body
ID of the task to delete.
Example request
curl -X DELETE http://localhost:3001/api/v1/tarea \
-H "Authorization: Bearer <accessToken>" \
-H "Content-Type: application/json" \
-d '{ "id_tarea": 101 }'
Example response — 200 OK
{
"success": true,
"message": "Task deleted.",
"data": { "id_tarea": 101 }
}