Back to top

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 Items
GET/items{?access_token}

Example URI

GET https://one-list-api.herokuapp.com/items?access_token=illustriousvoyage
URI Parameters
HideShow
access_token
string (required) Example: illustriousvoyage

Your unique access token

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "text": "Learn HTML & CSS",
    "complete": true
  },
  {
    "id": 2,
    "text": "Master React",
    "complete": false
  }
]

Create a New Item
POST/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
HideShow
access_token
string (required) Example: illustriousvoyage

Your unique access token

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "item": {
    "text": "Learn about Regular Expressions"
  }
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /items/3
Body
{
  "id": 3,
  "text": "Learn about Regular Expressions",
  "complete": false
}

Singular Item

Retrieve an Item
GET/items/{id}{?access_token}

Example URI

GET https://one-list-api.herokuapp.com/items/1?access_token="illustriousvoyage"
URI Parameters
HideShow
id
number (required) Example: 1

The unique identifier of the item

access_token
string (required) Example: "illustriousvoyage"

Your unique access token

Request
HideShow
Headers
Content-Type: application/json
Response  200
HideShow
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 Item
PUT/items/{id}{?access_token}

Example URI

PUT https://one-list-api.herokuapp.com/items/1?access_token="illustriousvoyage"
URI Parameters
HideShow
id
number (required) Example: 1

The unique identifier of the item

access_token
string (required) Example: "illustriousvoyage"

Your unique access token

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "item": {
    "complete": true
  }
}
Response  204

Remove an Item
DELETE/items/{id}{?access_token}

Example URI

DELETE https://one-list-api.herokuapp.com/items/1?access_token="illustriousvoyage"
URI Parameters
HideShow
id
number (required) Example: 1

The unique identifier of the item

access_token
string (required) Example: "illustriousvoyage"

Your unique access token

Request
HideShow
Headers
Content-Type: application/json
Response  200

Generated by aglio on 16 May 2017