Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
todo-list-example
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IT1901
todo-list-example
Commits
0d62184f
Commit
0d62184f
authored
2 years ago
by
George Adrian Stoica
Browse files
Options
Downloads
Patches
Plain Diff
docs: adds an updated description of todo list API
parent
8f7edadf
No related branches found
No related tags found
No related merge requests found
Pipeline
#190958
passed
2 years ago
Stage: test
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
todolist/docs/restapi.md
+135
-0
135 additions, 0 deletions
todolist/docs/restapi.md
with
135 additions
and
0 deletions
todolist/docs/restapi.md
0 → 100644
+
135
−
0
View file @
0d62184f
# Todo list API
## Base endpoint
Methods:
*
GET - retrieves a list of todo lists from the server
*
URI: host:port/todo
<http://localhost:8080/todo>
*
parameters: none
*
available: jetty, springboot
*
returns JSON with the todo lists
```
json
{
"lists"
:[
{
"name"
:
"todo1"
},
{
"name"
:
"todo2"
}
]
}
```
## list
<http://localhost:8080/todo/list/{name}>
Methods:
*
GET - retrieves the specified list content from the server
*
URI: host:port/todo/list/{name}
<http://localhost:8080/todo/list/todo1>
*
parameters: none
*
available: jetty, springboot
*
returns JSON with the todo list content
```
json
{
"name"
:
"todo1"
,
"items"
:[
{
"text"
:
null
,
"checked"
:
false
}
]
}
```
*
PUT creates a list with the desired name if it does not exist or updates the existing list otherwise
*
URI: host:port/todo/list/{name}
*
parameters:
*
body - application/json; charset=UTF-8
*
list content
```
json
{
"name"
:
"todo3"
,
"items"
:[
{
"text"
:
"item3"
,
"checked"
:
true
}
]
}
```
*
available: jetty, springboot
*
returns
*
Content-Type: application/json
*
json with boolean true on success
```
json
true
```
*
DELETE - delete the list with the name {name}
*
URI: host:port/todo/list/{name}
*
parameters: none
*
available: jetty, springboot
*
returns
*
Content-Type: application/json
*
json with boolean true on success
```
json
true
```
*
POST - rename a list
*
URI: host:port/todo/list/{name}/rename
*
parameters - form / body
*
application/x-www-form-urlencoded; charset=UTF-8
*
newName={newName}
*
available: jetty, springboot
*
returns
*
Content-Type: application/json
*
json with boolean true on success
```
json
true
```
## settings
<http://localhost:8080/todo/settings>
*
the fxui client is not sending currently any requests for the settings
Methods:
*
GET - retrieves the settings
*
URI: host:port/todo/settings
<http://localhost:8080/todo/settings>
*
parameters: none
*
available: jetty
*
returns JSON with the settings content
```
json
{
"todoItemsSortOrder"
:
"NONE"
}
```
*
PUT - replaces the settings
*
URI: host:port/todo/settings
<http://localhost:8080/todo/settings>
*
parameters:
*
body - application/json; charset=UTF-8
*
list content
```
json
{
"todoItemsSortOrder"
:
"CHECKED_UNCHECKED"
}
```
*
todoItemsSortOrder can take the following values:
*
NONE
*
CHECKED_UNCHECKED
*
UNCHECKED_CHECKED
*
If any other values are sent the todoItemsSortOrder will be set to
*NONE*
*
available: jetty
*
returns JSON with the settings content
```
json
{
"todoItemsSortOrder"
:
"NONE"
}
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment