TKDO
TKDo is a simple API allowing CRUD operations on tasks.
Resource Group ¶
Health Check ¶
User ¶
Create UserPOST/users
Creates a given user
Example URI
POST http://localhost:8080//users
Request
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
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 TasksGET/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
- page
number
(optional) Default: 0 Example: 3page number to return, zero indexed
- page_size
number
(optional) Default: 50 Example: 25maximum number of objects to return
Request
Headers
Content-Type: application/json; charset=utf-8
token: authentication_token
uid: 00000000-0000-0000-0000-000000000000
Response
200
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
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 TaskPOST/tasks
Example URI
POST http://localhost:8080//tasks
Request
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
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 TaskGET/tasks/{id}
Example URI
GET http://localhost:8080//tasks/60853a85-681d-4620-9677-946bbfdc8fbc
URI Parameters
- id
string
(required) Example: 60853a85-681d-4620-9677-946bbfdc8fbcunique identifier of the task
Request
Headers
Content-Type: application/json; charset=utf-8
token: authentication_token
uid: 00000000-0000-0000-0000-000000000000
Response
200
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
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 taskPUT/tasks/{id}
Example URI
PUT http://localhost:8080//tasks/60853a85-681d-4620-9677-946bbfdc8fbc
URI Parameters
- id
string
(required) Example: 60853a85-681d-4620-9677-946bbfdc8fbcunique identifier of the task
Request
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
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
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 taskDELETE/tasks/{id}
Example URI
DELETE http://localhost:8080//tasks/60853a85-681d-4620-9677-946bbfdc8fbc
URI Parameters
- id
string
(required) Example: 60853a85-681d-4620-9677-946bbfdc8fbcunique identifier of the task
Request
Headers
Content-Type: application/json; charset=utf-8
uid: 00000000-0000-0000-0000-000000000000
Response
200
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
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"
]
}
Task Search ¶
Task SearchGET/tasks/search{?name,type}
Example URI
GET http://localhost:8080//tasks/search?name='buy apples'&type=
URI Parameters
- name
string
(optional) Example: 'buy apples'name of the task
- type
enum
(optional)type of the task
Request
Headers
Content-Type: application/json; charset=utf-8
token: authentication_token
uid: 00000000-0000-0000-0000-000000000000
Response
200
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
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"
]
}