The API is available at https://algobulls-todo.onrender.com/
You can see the documentation at https://algobulls-todo.onrender.com/
- Clone the repository
- Install the dependencies
pip install -r requirements.txt
- Run the server
python manage.py runserver
- The API is now available at http://localhost:8000/
- You can see the documentation at http://localhost:8000/
- You can also see the documentation at http://localhost:8000/
GET /api/tasks/
curl -X GET https://algobulls-todo.onrender.com/api/todos/ -u "username:password"
POST /api/tasks/
curl -X POST https://algobulls-todo.onrender.com/api/todos/ -u "username:password" -H "Content-Type: application/json" -d '{"title": "string", "description": "string", "status": "string", "due_date": "string", "tags": ["string"]}'
GET /api/tasks/{id}/
curl -X GET https://algobulls-todo.onrender.com/api/todos/{id}/ -u "username:password"
PUT /api/tasks/{id}/
curl -X PUT https://algobulls-todo.onrender.com/api/todos/{id}/ -u "username:password" -H "Content-Type: application/json" -d '{"title": "string", "description": "string", "status": "string", "due_date": "string", "tags": ["string"]}'
DELETE /api/tasks/{id}/
curl -X DELETE https://algobulls-todo.onrender.com/api/todos/{id}/ -u "username:password"
POST /api/auth/register/
curl -X POST https://algobulls-todo.onrender.com/api/auth/register/ -H "Content-Type: application/json" -d '{"username": "string", "password": "string"}'
This document provides detailed information about the RESTful API for the application available at https://ankitrout2903.pythonanywhere.com/.
The API uses token-based authentication. To access secured endpoints, include the authentication token in the headers of your requests.
- Method: POST
- Path:
/api/auth/register/
- Parameters: None
{
"username": "7mFeEYYHxY9u8.n",
"password": "string"
}
- Status Code: 201 Created
- Body:
{
"id": 0,
"username": "pQ6RIvu03pC6Zsx+Ws6ef87LvxwjEo0CmqCfeCqzehfhEtpHAk0AY.6AFsThgy9I5kFQkFNb4WhH6U0-qSxNZEGoA"
}
- Method: GET
- Path:
/api/todos/
- Parameters: None
- Status Code: 200 OK
- Body:
[
{
"id": 0,
"title": "string",
"description": "string",
"status": "OPEN",
"due_date": "2023-12-08T15:59:52.481Z",
"timestamp": "2023-12-08T15:59:52.481Z",
"tags": [
"string"
]
}
]
- Method: POST
- Path:
/api/todos/
- Parameters: None
{
"title": "string",
"description": "string",
"status": "OPEN",
"due_date": "2023-12-08T15:59:52.482Z",
"tags": [
"string"
]
}
- Status Code: 201 Created
- Body:
{
"id": 0,
"title": "string",
"description": "string",
"status": "OPEN",
"due_date": "2023-12-08T15:59:52.483Z",
"timestamp": "2023-12-08T15:59:52.483Z",
"tags": [
"string"
]
}
- Method: GET
- Path:
/api/todos/{id}/
- Parameters:
id
(integer) - A unique integer value identifying this todo.
- Status Code: 200 OK
- Body:
{
"id": 0,
"title": "string",
"description": "string",
"status": "OPEN",
"due_date": "2023-12-08T15:59:52.484Z",
"timestamp": "2023-12-08T15:59:52.484Z",
"tags": [
"string"
]
}
- Method: PUT
- Path:
/api/todos/{id}/
- Parameters:
id
(integer) - A unique integer value identifying this todo.
{
"title": "string",
"description": "string",
"status": "OPEN",
"due_date": "2023-12-08T15:59:52.486Z",
"tags": [
"string"
]
}
- Status Code: 200 OK
- Body:
{
"id": 0,
"title": "string",
"description": "string",
"status": "OPEN",
"due_date": "2023-12-08T15:59:52.487Z",
"timestamp": "2023-12-08T15:59:52.487Z",
"tags": [
"string"
]
}
- Method: PATCH
- Path:
/api/todos/{id}/
- Parameters:
id
(integer) - A unique integer value identifying this todo.
{
"title": "string",
"description": "string",
"status": "OPEN",
"due_date": "2023-12-08T15:59:52.490Z",
"tags": [
"string"
]
}
- Status Code: 200 OK
- Body:
{
"id": 0,
"title": "string",
"description": "string",
"status": "OPEN",
"due_date": "2023-12-08T15:59:52.495Z",
"timestamp": "2023-12-08T15:59:52.495Z",
"tags": [
"string"
]
}
- Method: DELETE
- Path:
/api/todos/{id}/
- Parameters:
id
(integer) - A unique integer value identifying this todo.
- Status Code: 204 No Content