Back to top

TKDO

TKDo is a simple API allowing CRUD operations on tasks.

Resource Group

Health Check

Get
GET/hc

No-op to say the server is up or not

Example URI

GET http://localhost:8080//hc
Response  200

User

Create User
POST/users

Creates a given user

Example URI

POST http://localhost:8080//users
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "Pat Smith",
  "email": "something@something.com"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "description": "user's name"
    },
    "email": {
      "type": "string",
      "description": "email address for the user"
    }
  },
  "required": [
    "name",
    "email"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "Pat Smith",
  "email": "something@something.com"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "description": "user's name"
    },
    "email": {
      "type": "string",
      "description": "email address for the user"
    }
  },
  "required": [
    "name",
    "email"
  ]
}

List Tasks

List Tasks
GET/tasks{?page,page_size}

Use to get a list of tasks.

Example URI

GET http://localhost:8080//tasks?page=3&page_size=25
URI Parameters
HideShow
page
number (optional) Default: 0 Example: 3

page number to return, zero indexed

page_size
number (optional) Default: 50 Example: 25

maximum number of objects to return

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
token: authentication_token
uid: 00000000-0000-0000-0000-000000000000
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
[
  {
    "id": "60853a85-681d-4620-9677-946bbfdc8fbc",
    "status": "open",
    "name": "clean the gutters",
    "taskType": "basic|recurring"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  401
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "msg": "what went wrong"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "msg": {
      "type": "string",
      "description": "A description of what the error is"
    }
  },
  "required": [
    "msg"
  ]
}

Create A Task

Create A Task
POST/tasks

Example URI

POST http://localhost:8080//tasks
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
token: authentication_token
uid: 00000000-0000-0000-0000-000000000000
Body
{
  "name": "clean the gutters",
  "taskType": "basic|recurring"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "name of the task"
    },
    "taskType": {
      "type": "string",
      "enum": [
        "basic|recurring"
      ]
    }
  },
  "required": [
    "name",
    "taskType"
  ]
}
Response  201
Response  401
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "msg": "what went wrong"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "msg": {
      "type": "string",
      "description": "A description of what the error is"
    }
  },
  "required": [
    "msg"
  ]
}

Working with a Task

Get a Task
GET/tasks/{id}

Example URI

GET http://localhost:8080//tasks/60853a85-681d-4620-9677-946bbfdc8fbc
URI Parameters
HideShow
id
string (required) Example: 60853a85-681d-4620-9677-946bbfdc8fbc

unique identifier of the task

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
token: authentication_token
uid: 00000000-0000-0000-0000-000000000000
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": "60853a85-681d-4620-9677-946bbfdc8fbc",
  "status": "open",
  "name": "clean the gutters",
  "taskType": "basic|recurring"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "unique identifier of the task"
    },
    "status": {
      "type": "string",
      "description": "status of the task"
    },
    "name": {
      "type": "string",
      "description": "name of the task"
    },
    "taskType": {
      "type": "string",
      "enum": [
        "basic|recurring"
      ]
    }
  },
  "required": [
    "status",
    "name",
    "taskType"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "msg": "what went wrong"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "msg": {
      "type": "string",
      "description": "A description of what the error is"
    }
  },
  "required": [
    "msg"
  ]
}

Update a task
PUT/tasks/{id}

Example URI

PUT http://localhost:8080//tasks/60853a85-681d-4620-9677-946bbfdc8fbc
URI Parameters
HideShow
id
string (required) Example: 60853a85-681d-4620-9677-946bbfdc8fbc

unique identifier of the task

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
uid: 00000000-0000-0000-0000-000000000000
Body
{
  "id": "60853a85-681d-4620-9677-946bbfdc8fbc",
  "status": "open",
  "name": "clean the gutters",
  "taskType": "basic|recurring"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "unique identifier of the task"
    },
    "status": {
      "type": "string",
      "description": "status of the task"
    },
    "name": {
      "type": "string",
      "description": "name of the task"
    },
    "taskType": {
      "type": "string",
      "enum": [
        "basic|recurring"
      ]
    }
  },
  "required": [
    "status",
    "name",
    "taskType"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": "60853a85-681d-4620-9677-946bbfdc8fbc",
  "status": "open",
  "name": "clean the gutters",
  "taskType": "basic|recurring"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "unique identifier of the task"
    },
    "status": {
      "type": "string",
      "description": "status of the task"
    },
    "name": {
      "type": "string",
      "description": "name of the task"
    },
    "taskType": {
      "type": "string",
      "enum": [
        "basic|recurring"
      ]
    }
  },
  "required": [
    "status",
    "name",
    "taskType"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "msg": "what went wrong"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "msg": {
      "type": "string",
      "description": "A description of what the error is"
    }
  },
  "required": [
    "msg"
  ]
}

Delete a task
DELETE/tasks/{id}

Example URI

DELETE http://localhost:8080//tasks/60853a85-681d-4620-9677-946bbfdc8fbc
URI Parameters
HideShow
id
string (required) Example: 60853a85-681d-4620-9677-946bbfdc8fbc

unique identifier of the task

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
uid: 00000000-0000-0000-0000-000000000000
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": "60853a85-681d-4620-9677-946bbfdc8fbc",
  "status": "open",
  "name": "clean the gutters",
  "taskType": "basic|recurring"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "unique identifier of the task"
    },
    "status": {
      "type": "string",
      "description": "status of the task"
    },
    "name": {
      "type": "string",
      "description": "name of the task"
    },
    "taskType": {
      "type": "string",
      "enum": [
        "basic|recurring"
      ]
    }
  },
  "required": [
    "status",
    "name",
    "taskType"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "msg": "what went wrong"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "msg": {
      "type": "string",
      "description": "A description of what the error is"
    }
  },
  "required": [
    "msg"
  ]
}

Generated by aglio on 25 Aug 2022