Skip to content

kirupha2000/todo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API service for a TODO app

APIs

The TODO application has the following APIs to create and manipulate tasks

ListAll

Lists all tasks

GET http://localhost:8080/tasks

URI parameters:

Name In Required Type Description
sortBy Query False String Field to sort by
orderBy Query False String Order to sort by - can take the values asc or desc
outdatedOnly Query False Boolean Lists outdated tasks
priority Query False Integer Priority to filter by

Example:

GET http://localhost:8080/tasks?sortBy=dueDate&orderBy=desc&priority=3&outdatedOnly=true

FindById

Finds a task, identified by the id field

GET http://localhost:8080/tasks/{id}

URI parameters:

Name In Required Type Description
id Path True Long Id of task to find

Example:

GET http://localhost:8080/tasks/5

AddTask

Adds a task

POST http://localhost:8080/tasks

URI parameters:

None

Request Body:

Name Required MediaType Description
requestBody True JSON Task to add in JSON \ Other conditions:
  • Priority should be included
  • Id should not be included

Example:

POST http://localhost:8080/tasks

Request Body:

{
	"title": "Simple task 2",
	"priority": 4
}

UpdateTask

Updates a task, identified by the id field

PATCH http://localhost:8080/tasks/{id}

URI parameters:

Name In Required Type Description
id Path True Long Id of task to update

Request Body:

Name Required MediaType Description
requestBody True JSON Task to update in JSON \ Other conditions:
  • Id should not be included

Example:

PATCH http://localhost:8080/tasks/3

Request Body:

{
	"title": "Updated task",
	"priority": 4,
	"status": "Done"
}

References

About

A simple API service for a TODO application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages