One List
One List is a simple API allowing consumers to manage a TODO list.
Authentication
One List API uses token authentication. Your token can be any text you wish. As long as you use the same token between requests, you’ll have access to the same list items.
Items ¶
Item Collections ¶
List ItemsGET/items{?access_token}
Example URI
GET https://one-list-api.herokuapp.com/items?access_token=illustriousvoyage
URI Parameters
- access_token
string
(required) Example: illustriousvoyageYour unique access token
Response
200
Headers
Content-Type: application/json
Body
[
{
"id": 1,
"text": "Learn HTML & CSS",
"complete": true
},
{
"id": 2,
"text": "Master React",
"complete": false
}
]
Create a New ItemPOST/items{?access_token}
You may create new items using this action. It takes a JSON object containing the task text.
Example URI
POST https://one-list-api.herokuapp.com/items?access_token=illustriousvoyage
URI Parameters
- access_token
string
(required) Example: illustriousvoyageYour unique access token
Request
Headers
Content-Type: application/json
Body
{
"item": {
"text": "Learn about Regular Expressions"
}
}
Response
201
Headers
Content-Type: application/json
Location: /items/3
Body
{
"id": 3,
"text": "Learn about Regular Expressions",
"complete": false
}
Singular Item ¶
Retrieve an ItemGET/items/{id}{?access_token}
Example URI
GET https://one-list-api.herokuapp.com/items/1?access_token="illustriousvoyage"
URI Parameters
- id
number
(required) Example: 1The unique identifier of the item
- access_token
string
(required) Example: "illustriousvoyage"Your unique access token
Request
Headers
Content-Type: application/json
Response
200
Headers
Content-Type: application/json
Body
{
"text": "Hello, world!",
"complete": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "The task at hand"
},
"complete": {
"type": "boolean",
"description": "Whether or not the task has been completed."
}
},
"required": [
"text"
]
}
Update an ItemPUT/items/{id}{?access_token}
Example URI
PUT https://one-list-api.herokuapp.com/items/1?access_token="illustriousvoyage"
URI Parameters
- id
number
(required) Example: 1The unique identifier of the item
- access_token
string
(required) Example: "illustriousvoyage"Your unique access token
Request
Headers
Content-Type: application/json
Body
{
"item": {
"complete": true
}
}
Response
204
Remove an ItemDELETE/items/{id}{?access_token}
Example URI
DELETE https://one-list-api.herokuapp.com/items/1?access_token="illustriousvoyage"
URI Parameters
- id
number
(required) Example: 1The unique identifier of the item
- access_token
string
(required) Example: "illustriousvoyage"Your unique access token
Request
Headers
Content-Type: application/json
Response
200