The To_Do_App API provides a simple and efficient way to manage tasks, including creating, updating, deleting, and filtering tasks by status and priority. This API also supports user authentication with features for user registration, login, and logout.
https://To_Do_App
- Endpoint:
POST /api/v1/auth/register
- Description: Registers a new user.
- Request Body:
{ "firstname": "John", "lastname": "Doe", "email": "john.doe@example.com", "password": "password123", "confirmPassword": "password123", "phoneNumber": "1234567890" }
- Response:
{ "responseCode": "200", "responseMessage": "Registration successful", "registrationInfo": { "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "token": "eyJhb..." } }
- Endpoint:
POST /api/v1/auth/login
- Description: Logs in an existing user.
- Request Body:
{ "email": "john.doe@example.com", "password": "password123" }
- Response:
{ "responseCode": "200", "responseMessage": "Login successful", "loginInfo": { "email": "john.doe@example.com", "token": "eyJhb..." } }
- Endpoint:
POST /api/v1/auth/logout
- Description: Logs out the authenticated user.
- Headers:
- Authorization: Bearer token
- Response:
{ "responseCode": "200", "responseMessage": "Logout successful" }
- Endpoint:
GET /api/v1/task
- Description: Retrieves all tasks, with optional filtering by status and priority.
- Query Parameters:
status
(optional): Filter by task status (pending
,in_progress
,completed
).priority
(optional): Filter by task priority (high
,medium
,low
,none
).
- Response:
[ { "id": 1, "title": "Complete project documentation", "description": "Finalize and submit the project documentation for review.", "priority": "high", "status": "in_progress" } ]
- Endpoint:
POST /api/v1/task
- Description: Creates a new task.
- Request Body:
{ "title": "New Task Title", "description": "Task description here" }
- Response:
{ "responseCode": "200", "responseMessage": "Task created successfully" }
- Endpoint:
PUT /api/v1/task/{taskId}
- Description: Updates an existing task.
- Path Parameters:
taskId
: ID of the task to update.
- Request Body:
{ "title": "Updated Task Title", "description": "Updated task description" }
- Response:
{ "id": 1, "title": "Updated Task Title", "description": "Updated task description", "priority": "medium", "status": "pending" }
- Endpoint:
DELETE /api/v1/task/{taskId}
- Description: Deletes a task by ID.
- Path Parameters:
taskId
: ID of the task to delete.
- Response:
{ "responseCode": "200", "responseMessage": "Task deleted successfully" }
- Endpoint:
PATCH /api/v1/task/{taskId}/priority
- Description: Updates the priority of a task.
- Path Parameters:
taskId
: ID of the task.
- Request Body:
{ "priority": "high" }
- Response:
{ "responseCode": "200", "responseMessage": "Priority updated successfully" }
- Endpoint:
PATCH /api/v1/task/{taskId}/status
- Description: Updates the status of a task.
- Path Parameters:
taskId
: ID of the task.
- Request Body:
{ "status": "completed" }
- Response:
{ "responseCode": "200", "responseMessage": "Status updated successfully" }
{
"id": "Long",
"title": "String",
"description": "String",
"priority": "String",
"status": "String"
}
{
"title": "String",
"description": "String"
}
{
"priority": "String"
}
{
"status": "String"
}
{
"responseCode": "String",
"responseMessage": "String",
"registrationInfo": {
"firstName": "String",
"lastName": "String",
"email": "String",
"token": "String"
}
}
All errors are returned in the following format:
{
"responseCode": "Error_Code",
"responseMessage": "Detailed error message"
}
The To_Do_App API is a robust solution for managing tasks and user authentication. It offers flexibility with filters and comprehensive task management capabilities. For any issues or further assistance, please contact the development team.