Todo App (1.2.0)

Download OpenAPI specification:Download

Api description for TodoApp

Authentication

api_key

Security Scheme Type API Key
Header parameter name: X-API-KEY

auth

Operations about authentication

Logs user in using an external identity service

path Parameters
provider
required
string
Value: "google"

The name of the used identity provider

Responses

200

The login response

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

get /auth/{provider}/login

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/auth/{provider}/login

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "apiKey": "The apiKey"
}

Logs out current logged in user session

Authorizations:

Responses

200

The request was executed, but no data is available

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

get /auth/logout

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/auth/logout

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "code": 100401,
  • "message": "There was an error"
}

user

Operations about user

getCurrentUser

Gets the current user

Authorizations:

Responses

200

Single user

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

get /user/current

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/user/current

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "3fa85f64-2222-4562-b3fc-2c963f66afa6",
  • "username": "string",
  • "email": "user@example.com",
  • "userStatus": 0,
  • "apiKeys":
    [
    ]
}

todo

Everything about your Todos

Add a new todo

Authorizations:
api_key (write:todos)
Request Body schema: application/json

The new todo object

title
string
description
string
url
string
status
string
Enum: "open" "scheduled" "completed" "deleted"

current status

dueDate
string <date-time>
createDate
string <date-time>

Responses

200

Single todo

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

post /todo

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/todo

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "title": "Bring carrots",
  • "description": "More detailed description and additional notes",
  • "status": "open",
  • "dueDate": "2021-06-20T12:54:33Z",
  • "createDate": "2021-06-20T12:54:33Z"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "3fa85f64-0000-4562-b3fc-2c963f66afa6",
  • "title": "Bring carrots",
  • "description": "More detailed description and additional notes",
  • "status": "open",
  • "dueDate": "2021-06-20T12:54:33Z",
  • "createDate": "2021-06-20T12:54:33Z"
}

Get all Todos

Authorizations:
query Parameters
status
Array of strings
Items Enum: "open" "scheduled" "completed" "deleted"

Status values that need to be considered for filter

Responses

200

List of todos

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

get /todo

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/todo

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Find todo by ID

Returns a single todo

Authorizations:
path Parameters
todoId
required
string <uuid>
Example: 3fa85f64-0000-4562-b3fc-2c963f66afa6

ID of todo

Responses

200

Single todo

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

get /todo/{todoId}

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/todo/{todoId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "3fa85f64-0000-4562-b3fc-2c963f66afa6",
  • "title": "Bring carrots",
  • "description": "More detailed description and additional notes",
  • "status": "open",
  • "dueDate": "2021-06-20T12:54:33Z",
  • "createDate": "2021-06-20T12:54:33Z"
}

Deletes a todo

Authorizations:
path Parameters
todoId
required
string <uuid>
Example: 3fa85f64-0000-4562-b3fc-2c963f66afa6

ID of todo

Responses

204

The request was executed, but no data is available

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

delete /todo/{todoId}

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/todo/{todoId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "code": 100401,
  • "message": "There was an error"
}

Updates a todo

Authorizations:
path Parameters
todoId
required
string <uuid>
Example: 3fa85f64-0000-4562-b3fc-2c963f66afa6

ID of todo

Request Body schema: application/json
title
string
description
string
url
string
status
string
Enum: "open" "scheduled" "completed" "deleted"

current status

dueDate
string <date-time>
createDate
string <date-time>

Responses

200

Single todo

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

patch /todo/{todoId}

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/todo/{todoId}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "title": "Bring carrots",
  • "description": "More detailed description and additional notes",
  • "status": "open",
  • "dueDate": "2021-06-20T12:54:33Z",
  • "createDate": "2021-06-20T12:54:33Z"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "3fa85f64-0000-4562-b3fc-2c963f66afa6",
  • "title": "Bring carrots",
  • "description": "More detailed description and additional notes",
  • "status": "open",
  • "dueDate": "2021-06-20T12:54:33Z",
  • "createDate": "2021-06-20T12:54:33Z"
}

Change position of a todo

Returns a single todo

Authorizations:
path Parameters
todoId
required
string <uuid>
Example: 3fa85f64-0000-4562-b3fc-2c963f66afa6

ID of todo

Request Body schema: application/json

If left empty, the tag is moved to the end

beforeTodo
string <uuid>

Responses

204

The request was executed, but no data is available

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

post /todo/{todoId}/position

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/todo/{todoId}/position

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "beforeTodo": "3fa85f64-0000-4562-b3fc-2c963f66afa6"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "code": 100401,
  • "message": "There was an error"
}

tag

Operations about tags Tags exist to organize the todos into groups

getAllTags

Get all tags

Authorizations:

Responses

200

List of tags

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

get /tag

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/tag

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

addTag

Add a new tag

Authorizations:
Request Body schema: application/json
name
string
priority
integer <int64>

Responses

200

Single tag

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

post /tag

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/tag

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "Groceries",
  • "priority": 0
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "3fa85f64-1111-4562-b3fc-2c963f66afa6",
  • "name": "Groceries",
  • "priority": 0
}

getTag

Get Tag information

Authorizations:
path Parameters
tagId
required
string <uuid>
Example: 3fa85f64-1111-4562-b3fc-2c963f66afa6

The tag id

Responses

200

Single tag

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

get /tag/{tagId}

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/tag/{tagId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "3fa85f64-1111-4562-b3fc-2c963f66afa6",
  • "name": "Groceries",
  • "priority": 0
}

deleteTag

Delete a tag

Authorizations:
path Parameters
tagId
required
string <uuid>
Example: 3fa85f64-1111-4562-b3fc-2c963f66afa6

The tag id

Responses

204

The request was executed, but no data is available

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

delete /tag/{tagId}

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/tag/{tagId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "code": 100401,
  • "message": "There was an error"
}

Updates a tag

Authorizations:
path Parameters
tagId
required
string <uuid>
Example: 3fa85f64-1111-4562-b3fc-2c963f66afa6

The tag id

Request Body schema: application/json
name
string
priority
integer <int64>

Responses

200

Single tag

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

patch /tag/{tagId}

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/tag/{tagId}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "Groceries",
  • "priority": 0
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "3fa85f64-1111-4562-b3fc-2c963f66afa6",
  • "name": "Groceries",
  • "priority": 0
}

changeTagPosition

Change the position of the tag {tagId}

Authorizations:
path Parameters
tagId
required
string <uuid>
Example: 3fa85f64-1111-4562-b3fc-2c963f66afa6

The tag id

Request Body schema: application/json

If left empty, the tag is moved to the end

beforeTag
string <uuid>

Responses

204

The request was executed, but no data is available

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

post /tag/{tagId}/position

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/tag/{tagId}/position

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "beforeTag": "3fa85f64-1111-4562-b3fc-2c963f66afa6"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "code": 100401,
  • "message": "There was an error"
}

getLinksForTag

Get all links for a tag

Authorizations:
path Parameters
tagId
required
string <uuid>
Example: 3fa85f64-1111-4562-b3fc-2c963f66afa6

The tag id

Responses

200

List of TagTodoLink

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

get /tag/{tagId}/link

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/tag/{tagId}/link

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

getLinkForTagToTodo

Get the link

Authorizations:
path Parameters
tagId
required
string <uuid>
Example: 3fa85f64-1111-4562-b3fc-2c963f66afa6

The tag id

todoId
required
string <uuid>
Example: 3fa85f64-0000-4562-b3fc-2c963f66afa6

The todo id

Responses

200

Single link between a tag and a todo

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

get /tag/{tagId}/link/{todoId}

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/tag/{tagId}/link/{todoId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "3fa85f64-3333-4562-b3fc-2c963f66afa6",
  • "todoId": "3fa85f64-0000-4562-b3fc-2c963f66afa6",
  • "tagId": "3fa85f64-1111-4562-b3fc-2c963f66afa6",
  • "priority": 0
}

addLinkTagWithTodo

Link a {todoId} within a tag {tagId}

Authorizations:
path Parameters
tagId
required
string <uuid>
Example: 3fa85f64-1111-4562-b3fc-2c963f66afa6

The tag id

todoId
required
string <uuid>
Example: 3fa85f64-0000-4562-b3fc-2c963f66afa6

The todo id

Request Body schema: application/json

If left empty, the todo has the lowest priority

todoId
required
string <uuid>
tagId
required
string <uuid>
priority
integer <int64>

Internal field used for positioning

Responses

200

Single tag

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

post /tag/{tagId}/link/{todoId}

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/tag/{tagId}/link/{todoId}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "todoId": "3fa85f64-0000-4562-b3fc-2c963f66afa6",
  • "tagId": "3fa85f64-1111-4562-b3fc-2c963f66afa6",
  • "priority": 0
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "3fa85f64-1111-4562-b3fc-2c963f66afa6",
  • "name": "Groceries",
  • "priority": 0
}

patchLinkTagWithTodo

Link a {todoId} within a tag {tagId}

Authorizations:
path Parameters
tagId
required
string <uuid>
Example: 3fa85f64-1111-4562-b3fc-2c963f66afa6

The tag id

todoId
required
string <uuid>
Example: 3fa85f64-0000-4562-b3fc-2c963f66afa6

The todo id

Request Body schema: application/json

Update the link

todoId
required
string <uuid>
tagId
required
string <uuid>
priority
integer <int64>

Internal field used for positioning

Responses

200

Single tag

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

patch /tag/{tagId}/link/{todoId}

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/tag/{tagId}/link/{todoId}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "todoId": "3fa85f64-0000-4562-b3fc-2c963f66afa6",
  • "tagId": "3fa85f64-1111-4562-b3fc-2c963f66afa6",
  • "priority": 0
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "3fa85f64-1111-4562-b3fc-2c963f66afa6",
  • "name": "Groceries",
  • "priority": 0
}

deleteLinkTagWithTodo

Remove {todoId} from tag {tagId}

Authorizations:
path Parameters
tagId
required
string <uuid>
Example: 3fa85f64-1111-4562-b3fc-2c963f66afa6

The tag id

todoId
required
string <uuid>
Example: 3fa85f64-0000-4562-b3fc-2c963f66afa6

The todo id

Responses

204

The request was executed, but no data is available

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

delete /tag/{tagId}/link/{todoId}

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/tag/{tagId}/link/{todoId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "code": 100401,
  • "message": "There was an error"
}

search

search

Search for todos and tags

Authorizations:
Request Body schema: application/json
term
required
string

Search for this search term

Responses

200

Result with the matched items

401

No or invalid authorization provided

404

The entity was not found

405

The request was not understood or invalid

post /search

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/search

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "term": "Carrots"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "todos":
    [
    ],
  • "tags":
    [
    ]
}

mail

mailCreateTodo

Create a new todo via mail

Authorizations:
Request Body schema: application/json
headers
required
object

Additional email information, like subject, sender, ...

plain
required
string

Description for the todo

Responses

204

no response

post /mail

Main Api Endpoint

https://todo-server-golang.herokuapp.com/v2/mail

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "headers":
    {
    },
  • "plain": "Buy carrots"
}