Simple Todo List

A Simple todo list

Use the Content-Type header to define the payload content e.g.

Content-Type: application/json

Set Content-Type header to application/xml if you want to send in XML.

Content-Type: application/xml

You can control the returned data format by setting the Accept header

You can request XML response by setting the Accept header.

i.e. for XML use

Accept: application/xml

You can request JSON response by setting the Accept header.

i.e. for JSON use

Accept: application/json

Some requests can be filtered by adding query params of fieldname=value. Where only matching items will be returned.

e.g. /thing?size=2&status=true

Model

Things

todo

Fields:
Fieldname Type Validation
idAUTO_INCREMENT
  • Mandatory?: true
Example: "83"
titleSTRING
  • Value can not be empty
  • Maximum length allowed is 50
  • Mandatory?: true
Example: "A title"
doneStatusBOOLEAN
  • Mandatory?: false
Example: "false"
descriptionSTRING
  • Maximum length allowed is 200
  • Mandatory?: false
Example: "my description"

Example JSON Output from API calls


{
  "todos": [
    {
      "id": 83,
      "title": "A title",
      "doneStatus": false,
      "description": "my description"
    }
  ]
}

Example XML Output from API calls


<todos>
  <todo>
    <doneStatus>false</doneStatus>
    <description>my description</description>
    <id>83</id>
    <title>A title</title>
</todo>
</todos>

Example JSON Input to API calls


{
  "title": "A title",
  "doneStatus": false,
  "description": "my description"
}

Example XML Input to API calls


<todo>
  <doneStatus>false</doneStatus>
  <description>my description</description>
  <title>A title</title>
</todo>

API

The API takes body with objects using the field definitions and examples shown in the model.

End Points

/todos

e.g. /todos

This endpoint can be filtered with fields as URL Query Parameters.

e.g. /todos?description=my%20description

/todos/:id

e.g. /todos/:id

/challenger/:guid

e.g. /challenger/:guid

/challenger

e.g. /challenger

/challenger/database/:guid

e.g. /challenger/database/:guid

/challenges

e.g. /challenges

/heartbeat

e.g. /heartbeat

/secret/token

e.g. /secret/token

/secret/note

e.g. /secret/note

[download swagger file]