vikunja-api/public/swagger/swagger.v1.json

2290 lines
53 KiB
JSON
Raw Permalink Normal View History

2018-06-13 13:45:53 +02:00
{
"swagger": "2.0",
2018-08-29 14:40:03 +02:00
"info": {},
2018-06-13 13:45:53 +02:00
"paths": {
"/lists": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"lists"
],
"summary": "Gets all lists owned by the current user",
"operationId": "getLists",
"responses": {
"200": {
"$ref": "#/responses/List"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
"/lists/{listID}": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"lists"
],
2018-08-30 08:09:17 +02:00
"summary": "gets one list with all todo tasks",
2018-06-13 13:45:53 +02:00
"operationId": "getList",
"parameters": [
{
"type": "string",
"description": "ID of the list to show",
"name": "listID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/List"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"lists"
],
2018-08-30 08:09:17 +02:00
"summary": "Adds an task to a list",
"operationId": "addListTask",
2018-06-13 13:45:53 +02:00
"parameters": [
{
"type": "string",
"description": "ID of the list to use",
"name": "listID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"schema": {
2018-08-30 08:09:17 +02:00
"$ref": "#/definitions/ListTask"
2018-06-13 13:45:53 +02:00
}
}
],
"responses": {
"200": {
2018-08-30 08:09:17 +02:00
"$ref": "#/responses/ListTask"
2018-06-13 13:45:53 +02:00
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"lists"
],
"summary": "Updates a list",
"operationId": "upadteList",
"parameters": [
{
"type": "string",
"description": "ID of the list to update",
"name": "listID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/List"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/List"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
"delete": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"lists"
],
2018-08-30 08:09:17 +02:00
"summary": "Deletes a list with all tasks on it",
2018-06-13 13:45:53 +02:00
"operationId": "deleteList",
"parameters": [
{
"type": "string",
"description": "ID of the list to delete",
"name": "listID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/Message"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"404": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
2018-08-29 15:13:54 +02:00
"/lists/{listID}/teams": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
2018-09-17 08:22:31 +02:00
"sharing"
2018-08-29 15:13:54 +02:00
],
"summary": "gets all teams which have access to the list",
"operationId": "getTeamsByList",
"parameters": [
{
"type": "string",
"description": "ID of the list to show",
"name": "listID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/Team"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
2018-09-17 08:22:31 +02:00
"sharing"
2018-08-29 15:13:54 +02:00
],
"summary": "adds a team to a list",
"operationId": "addTeamToList",
"parameters": [
{
"type": "string",
2018-09-17 08:22:31 +02:00
"description": "ID of the list to use",
2018-08-29 15:13:54 +02:00
"name": "listID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/TeamList"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/TeamList"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
"/lists/{listID}/teams/{teamID}": {
2018-09-19 08:23:54 +02:00
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Updates a teams access to a list",
"operationId": "updateTeamAccessToList",
"parameters": [
{
"type": "string",
"description": "ID of the list to use",
"name": "listID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "ID of the team to use",
"name": "teamID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/TeamList"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/TeamList"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
2018-08-29 15:13:54 +02:00
"delete": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
2018-09-17 08:22:31 +02:00
"sharing"
2018-08-29 15:13:54 +02:00
],
"summary": "removes a team from a list",
"operationId": "deleteTeamFromList",
"parameters": [
{
"type": "string",
2018-09-17 08:22:31 +02:00
"description": "ID of the list to use",
2018-08-29 15:13:54 +02:00
"name": "listID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "ID of the team to remove",
"name": "teamID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/Message"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
2018-09-17 08:22:31 +02:00
"/lists/{listID}/users": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "gets all users which have access to the list",
"operationId": "getUsersByList",
"parameters": [
{
"type": "string",
"description": "ID of the list to show",
"name": "listID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/User"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "adds a user to a list",
"operationId": "addUserToList",
"parameters": [
{
"type": "string",
"description": "ID of the list to use",
"name": "listID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/UserList"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/UserList"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
"/lists/{listID}/users/{userID}": {
2018-09-19 08:23:54 +02:00
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Updates a users access to a list",
"operationId": "updateUserAccessToList",
"parameters": [
{
"type": "string",
"description": "ID of the list to use",
"name": "listID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "ID of the user to use",
"name": "userID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UserList"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/UserList"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
2018-09-17 08:22:31 +02:00
"delete": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "removes a user from a list",
"operationId": "deleteUserFromList",
"parameters": [
{
"type": "string",
"description": "ID of the list to use",
"name": "listID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "ID of the user to remove",
"name": "userID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/Message"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
2018-06-13 13:45:53 +02:00
"/login": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Logs a user in. Returns a JWT-Token to authenticate requests",
"operationId": "login",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/UserLogin"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/Token"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
2018-07-02 09:09:32 +02:00
}
}
}
},
"/namespaces": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"namespaces"
],
"summary": "Get all namespaces the currently logged in user has at least read access",
"operationId": "getNamespaces",
"responses": {
"200": {
"$ref": "#/responses/Namespace"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"namespaces"
],
"summary": "Creates a new namespace owned by the currently logged in user",
"operationId": "addNamespace",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/Namespace"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/Namespace"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
"/namespaces/{namespaceID}": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"namespaces"
],
2018-08-30 08:09:17 +02:00
"summary": "gets one namespace with all todo tasks",
2018-07-02 09:09:32 +02:00
"operationId": "getNamespace",
"parameters": [
{
"type": "string",
"description": "ID of the namespace to show",
"name": "namespaceID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/Namespace"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"namespaces"
],
"summary": "Updates a namespace",
"operationId": "upadteNamespace",
"parameters": [
{
"type": "string",
"description": "ID of the namespace to update",
"name": "namespaceID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/Namespace"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/Namespace"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
2018-06-13 13:45:53 +02:00
}
}
},
"delete": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"namespaces"
],
"summary": "Deletes a namespace with all lists",
"operationId": "deleteNamespace",
"parameters": [
{
"type": "string",
"description": "ID of the namespace to delete",
"name": "namespaceID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/Message"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"404": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
2018-06-13 13:45:53 +02:00
}
},
2018-07-03 08:48:28 +02:00
"/namespaces/{namespaceID}/lists": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
2018-08-29 15:13:54 +02:00
"lists"
2018-07-03 08:48:28 +02:00
],
2018-08-29 15:13:54 +02:00
"summary": "gets all lists in that namespace",
"operationId": "getNamespaceLists",
2018-07-03 08:48:28 +02:00
"parameters": [
{
"type": "string",
2018-08-29 15:13:54 +02:00
"description": "ID of the namespace to show",
2018-07-03 08:48:28 +02:00
"name": "namespaceID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
2018-08-29 15:13:54 +02:00
"$ref": "#/responses/List"
2018-07-03 08:48:28 +02:00
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"lists"
],
"summary": "Creates a new list owned by the currently logged in user in that namespace",
"operationId": "addList",
"parameters": [
{
"type": "string",
"description": "ID of the namespace that list should belong to",
"name": "namespaceID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/List"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/List"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
2018-07-03 08:48:28 +02:00
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
2018-08-29 15:13:54 +02:00
"/namespaces/{namespaceID}/teams": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
2018-09-17 08:22:31 +02:00
"sharing"
2018-08-29 15:13:54 +02:00
],
"summary": "gets all teams which have access to that namespace",
"operationId": "getNamespaceTeams",
"parameters": [
{
"type": "string",
"description": "ID of the namespace to show",
"name": "namespaceID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/Team"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
2018-09-17 08:22:31 +02:00
"sharing"
2018-08-29 15:13:54 +02:00
],
"summary": "Gives a team access to a namespace",
2018-09-17 08:22:31 +02:00
"operationId": "giveTeamAccessToNamespace",
2018-08-29 15:13:54 +02:00
"parameters": [
{
"type": "string",
2018-09-17 08:22:31 +02:00
"description": "ID of the namespace to use",
2018-08-29 15:13:54 +02:00
"name": "namespaceID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/TeamNamespace"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/TeamNamespace"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
"/namespaces/{namespaceID}/teams/{teamID}": {
2018-09-19 08:23:54 +02:00
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Updates a teams access to a namespace",
"operationId": "updateTeamAccessToNamespace",
"parameters": [
{
"type": "string",
"description": "ID of the namespace to use",
"name": "namespaceID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "ID of the team to use",
"name": "teamID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/TeamNamespace"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/TeamNamespace"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
2018-08-29 15:13:54 +02:00
"delete": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
2018-09-17 08:22:31 +02:00
"sharing"
2018-08-29 15:13:54 +02:00
],
"summary": "Removes a team from a namespace",
"operationId": "removeTeamFromNamespace",
"parameters": [
{
"type": "string",
2018-09-17 08:22:31 +02:00
"description": "ID of the namespace to use",
2018-08-29 15:13:54 +02:00
"name": "namespaceID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "ID of the team you want to remove",
"name": "teamID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/Message"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
2018-09-17 08:22:31 +02:00
"/namespaces/{namespaceID}/users": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "gets all users which have access to that namespace",
"operationId": "getNamespaceUsers",
"parameters": [
{
"type": "string",
"description": "ID of the namespace to show",
"name": "namespaceID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/User"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Gives a user access to a namespace",
"operationId": "giveUserAccessToNamespace",
"parameters": [
{
"type": "string",
"description": "ID of the namespace to use",
"name": "namespaceID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UserNamespace"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/UserNamespace"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
"/namespaces/{namespaceID}/users/{userID}": {
2018-09-19 08:23:54 +02:00
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Updates a users access to a namespace",
"operationId": "updateUserAccessToNamespace",
"parameters": [
{
"type": "string",
"description": "ID of the namespace to use",
"name": "namespaceID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "ID of the user to use",
"name": "userID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/NamespaceUser"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/NamespaceUser"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
2018-09-17 08:22:31 +02:00
"delete": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Removes a user from a namespace",
"operationId": "removeUserFromNamespace",
"parameters": [
{
"type": "string",
"description": "ID of the namespace to use",
"name": "namespaceID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "ID of the user you want to remove",
"name": "userID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/Message"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
2018-06-13 13:45:53 +02:00
"/register": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Creates a new user account",
"operationId": "register",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
2018-08-29 14:40:03 +02:00
"$ref": "#/definitions/APIUserPassword"
2018-06-13 13:45:53 +02:00
}
}
],
"responses": {
"200": {
"$ref": "#/responses/User"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
2018-08-30 08:09:17 +02:00
"/tasks/{taskID}": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"lists"
],
"summary": "Updates a list task",
"operationId": "updateListTask",
"parameters": [
{
"type": "string",
"description": "ID of the task to update",
"name": "taskID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/ListTask"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/ListTask"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
"delete": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"lists"
],
"summary": "Deletes a list task",
"operationId": "deleteListTask",
"parameters": [
{
"type": "string",
"description": "ID of the list task to delete",
"name": "taskID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/Message"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"404": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
2018-08-29 15:13:54 +02:00
"/teams": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"teams"
],
"summary": "gets all teams the current user is part of",
"operationId": "getTeams",
"responses": {
"200": {
"$ref": "#/responses/Team"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"teams"
],
"summary": "Creates a team",
"operationId": "createTeam",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Team"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/Team"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
"/teams/{teamID}": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"teams"
],
"summary": "gets infos about the team",
"operationId": "getTeamByID",
"parameters": [
{
"type": "string",
"description": "ID of the team",
"name": "teamID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/Team"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"teams"
],
"summary": "Updates a team",
"operationId": "updateTeam",
"parameters": [
{
"type": "string",
"description": "ID of the team you want to update",
"name": "teamID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Team"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/Team"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
},
"delete": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"teams"
],
"summary": "Deletes a team",
"operationId": "deleteTeam",
"parameters": [
{
"type": "string",
"description": "ID of the team you want to delete",
"name": "teamID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/Message"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
"/teams/{teamID}/members": {
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"teams"
],
"summary": "Adds a member to a team",
"operationId": "addTeamMember",
"parameters": [
{
"type": "string",
"description": "ID of the team you want to add a member to",
"name": "teamID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/TeamMember"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/TeamMember"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
"/teams/{teamID}/members/{userID}": {
"delete": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"teams"
],
"summary": "Removes a member from a team",
"operationId": "removeTeamMember",
"parameters": [
{
"type": "string",
"description": "ID of the team you want to delete a member",
"name": "teamID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "ID of the user you want to remove from the team",
"name": "userID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/Message"
},
"400": {
"$ref": "#/responses/Message"
},
"403": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
2018-09-20 19:42:01 +02:00
}
}
}
},
2018-10-03 19:30:43 +02:00
"/user": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Shows the current user",
"operationId": "showUser",
"responses": {
"200": {
"$ref": "#/responses/User"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
"/user/password": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Shows the current user",
"operationId": "updatePassword",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/Password"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/Message"
},
"400": {
"$ref": "#/responses/Message"
},
"404": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
2018-10-27 11:33:28 +02:00
"/user/password/reset": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Resets a users password",
"operationId": "updatePassword",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/PasswordReset"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/Message"
},
"400": {
"$ref": "#/responses/Message"
},
"404": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
"/user/password/token": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Requests a token to reset a users password",
"operationId": "requestUpdatePasswordToken",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/PasswordTokenRequest"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/Message"
},
"400": {
"$ref": "#/responses/Message"
},
"404": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
}
}
}
},
2018-09-20 19:42:01 +02:00
"/users": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Lists all users",
"operationId": "list",
"parameters": [
{
2018-09-20 22:06:19 +02:00
"description": "A searchterm to search for a user by its username",
2018-09-20 19:42:01 +02:00
"name": "s",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/User"
},
"400": {
"$ref": "#/responses/Message"
},
"500": {
"$ref": "#/responses/Message"
2018-08-29 15:13:54 +02:00
}
}
}
}
},
"definitions": {
"APIUserPassword": {
"type": "object",
"title": "APIUserPassword represents a user object without timestamps and a json password field.",
"properties": {
"email": {
"type": "string",
"x-go-name": "Email"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"password": {
"type": "string",
"x-go-name": "Password"
},
"username": {
"type": "string",
"x-go-name": "Username"
}
},
"x-go-package": "code.vikunja.io/api/models"
},
"List": {
2018-08-30 08:09:17 +02:00
"description": "List represents a list of tasks",
2018-08-29 15:13:54 +02:00
"type": "object",
"properties": {
"created": {
"type": "integer",
"format": "int64",
"x-go-name": "Created"
},
"description": {
"type": "string",
"x-go-name": "Description"
},
"id": {
2018-06-13 13:45:53 +02:00
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
2018-08-30 08:09:17 +02:00
"owner": {
"$ref": "#/definitions/User"
},
"tasks": {
2018-06-13 13:45:53 +02:00
"type": "array",
"items": {
2018-08-30 08:09:17 +02:00
"$ref": "#/definitions/ListTask"
2018-06-13 13:45:53 +02:00
},
2018-08-30 08:09:17 +02:00
"x-go-name": "Tasks"
2018-06-13 13:45:53 +02:00
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"updated": {
"type": "integer",
"format": "int64",
"x-go-name": "Updated"
}
},
2018-08-29 14:40:03 +02:00
"x-go-package": "code.vikunja.io/api/models"
2018-06-13 13:45:53 +02:00
},
2018-08-30 08:09:17 +02:00
"ListTask": {
"description": "ListTask represents an task in a todolist",
2018-06-13 13:45:53 +02:00
"type": "object",
"properties": {
"created": {
"type": "integer",
"format": "int64",
"x-go-name": "Created"
},
"createdBy": {
"$ref": "#/definitions/User"
},
"description": {
"type": "string",
"x-go-name": "Description"
},
"done": {
"type": "boolean",
"x-go-name": "Done"
},
"dueDate": {
"type": "integer",
"format": "int64",
"x-go-name": "DueDateUnix"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"listID": {
"type": "integer",
"format": "int64",
"x-go-name": "ListID"
},
"reminderDate": {
"type": "integer",
"format": "int64",
"x-go-name": "ReminderUnix"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"updated": {
"type": "integer",
"format": "int64",
"x-go-name": "Updated"
}
},
2018-08-29 14:40:03 +02:00
"x-go-package": "code.vikunja.io/api/models"
2018-06-13 13:45:53 +02:00
},
2018-09-17 08:22:31 +02:00
"ListUser": {
"description": "ListUser represents a list \u003c-\u003e user relation",
"type": "object",
"properties": {
"created": {
"type": "integer",
"format": "int64",
"x-go-name": "Created"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"list_id": {
"type": "integer",
"format": "int64",
"x-go-name": "ListID"
},
"right": {
"$ref": "#/definitions/UserRight"
},
"updated": {
"type": "integer",
"format": "int64",
"x-go-name": "Updated"
},
"user_id": {
"type": "integer",
"format": "int64",
"x-go-name": "UserID"
}
},
"x-go-package": "code.vikunja.io/api/models"
},
2018-06-13 13:45:53 +02:00
"Message": {
"description": "Message is a standard message",
"type": "object",
"properties": {
"message": {
"type": "string",
"x-go-name": "Message"
}
},
2018-08-29 14:40:03 +02:00
"x-go-package": "code.vikunja.io/api/models"
2018-06-13 13:45:53 +02:00
},
2018-07-03 08:48:28 +02:00
"Namespace": {
"description": "Namespace holds informations about a namespace",
"type": "object",
"properties": {
"created": {
"type": "integer",
"format": "int64",
"x-go-name": "Created"
},
"description": {
"type": "string",
"x-go-name": "Description"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"owner": {
"$ref": "#/definitions/User"
},
"updated": {
"type": "integer",
"format": "int64",
"x-go-name": "Updated"
}
},
2018-08-29 14:40:03 +02:00
"x-go-package": "code.vikunja.io/api/models"
2018-07-03 08:48:28 +02:00
},
2018-09-17 08:22:31 +02:00
"NamespaceUser": {
"description": "NamespaceUser represents a namespace \u003c-\u003e user relation",
"type": "object",
"properties": {
"created": {
"type": "integer",
"format": "int64",
"x-go-name": "Created"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"namespace_id": {
"type": "integer",
"format": "int64",
"x-go-name": "NamespaceID"
},
"right": {
"$ref": "#/definitions/UserRight"
},
"updated": {
"type": "integer",
"format": "int64",
"x-go-name": "Updated"
},
"user_id": {
"type": "integer",
"format": "int64",
"x-go-name": "UserID"
}
},
"x-go-package": "code.vikunja.io/api/models"
},
2018-10-27 11:33:28 +02:00
"PasswordReset": {
"description": "PasswordReset holds the data to reset a password",
"type": "object",
"properties": {
"new_password": {
"type": "string",
"x-go-name": "NewPassword"
},
"token": {
"type": "string",
"x-go-name": "Token"
},
"user_id": {
"type": "integer",
"format": "int64",
"x-go-name": "UserID"
}
},
"x-go-package": "code.vikunja.io/api/models"
},
"PasswordTokenRequest": {
"description": "PasswordTokenRequest defines the request format for password reset resqest",
"type": "object",
"properties": {
"user_name": {
"type": "string",
"x-go-name": "Username"
}
},
"x-go-package": "code.vikunja.io/api/models"
},
2018-08-29 15:13:54 +02:00
"Team": {
"description": "Team holds a team object",
"type": "object",
"properties": {
"created": {
"type": "integer",
"format": "int64",
"x-go-name": "Created"
},
"created_by": {
"$ref": "#/definitions/User"
},
"description": {
"type": "string",
"x-go-name": "Description"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"members": {
"type": "array",
"items": {
"$ref": "#/definitions/TeamUser"
},
"x-go-name": "Members"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"updated": {
"type": "integer",
"format": "int64",
"x-go-name": "Updated"
}
},
"x-go-package": "code.vikunja.io/api/models"
},
"TeamList": {
"description": "TeamList defines the relation between a team and a list",
"type": "object",
"properties": {
"created": {
"type": "integer",
"format": "int64",
"x-go-name": "Created"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"list_id": {
"type": "integer",
"format": "int64",
"x-go-name": "ListID"
},
"right": {
"$ref": "#/definitions/TeamRight"
},
"team_id": {
"type": "integer",
"format": "int64",
"x-go-name": "TeamID"
},
"updated": {
"type": "integer",
"format": "int64",
"x-go-name": "Updated"
}
},
"x-go-package": "code.vikunja.io/api/models"
},
"TeamMember": {
"description": "TeamMember defines the relationship between a user and a team",
"type": "object",
"properties": {
"admin": {
"type": "boolean",
"x-go-name": "Admin"
},
"created": {
"type": "integer",
"format": "int64",
"x-go-name": "Created"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"team_id": {
"type": "integer",
"format": "int64",
"x-go-name": "TeamID"
},
"updated": {
"type": "integer",
"format": "int64",
"x-go-name": "Updated"
},
"user_id": {
"type": "integer",
"format": "int64",
"x-go-name": "UserID"
}
},
"x-go-package": "code.vikunja.io/api/models"
},
"TeamNamespace": {
"description": "TeamNamespace defines the relationship between a Team and a Namespace",
"type": "object",
"properties": {
"created": {
"type": "integer",
"format": "int64",
"x-go-name": "Created"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"namespace_id": {
"type": "integer",
"format": "int64",
"x-go-name": "NamespaceID"
},
"right": {
"$ref": "#/definitions/TeamRight"
},
"team_id": {
"type": "integer",
"format": "int64",
"x-go-name": "TeamID"
},
"updated": {
"type": "integer",
"format": "int64",
"x-go-name": "Updated"
}
},
"x-go-package": "code.vikunja.io/api/models"
},
"TeamRight": {
"description": "TeamRight defines the rights teams can have for lists/namespaces",
"type": "integer",
"format": "int64",
"x-go-package": "code.vikunja.io/api/models"
},
"TeamUser": {
"description": "TeamUser is the team member type",
"type": "object",
"properties": {
"admin": {
"type": "boolean",
"x-go-name": "Admin"
},
"email": {
"type": "string",
"x-go-name": "Email"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"username": {
"type": "string",
"x-go-name": "Username"
}
},
"x-go-package": "code.vikunja.io/api/models"
},
2018-06-13 13:45:53 +02:00
"User": {
"description": "User holds information about an user",
"type": "object",
"properties": {
"email": {
"type": "string",
"x-go-name": "Email"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"username": {
"type": "string",
"x-go-name": "Username"
}
},
2018-08-29 14:40:03 +02:00
"x-go-package": "code.vikunja.io/api/models"
2018-06-13 13:45:53 +02:00
},
"UserLogin": {
"description": "UserLogin Object to recive user credentials in JSON format",
"type": "object",
"properties": {
"password": {
"type": "string",
"x-go-name": "Password"
},
"username": {
"type": "string",
"x-go-name": "Username"
}
},
2018-08-29 14:40:03 +02:00
"x-go-package": "code.vikunja.io/api/models"
2018-09-17 08:22:31 +02:00
},
"UserRight": {
"description": "UserRight defines the rights users can have for lists/namespaces",
"type": "integer",
"format": "int64",
"x-go-package": "code.vikunja.io/api/models"
2018-06-13 13:45:53 +02:00
}
},
"responses": {
"List": {
"description": "List",
"schema": {
"$ref": "#/definitions/List"
}
},
2018-08-30 08:09:17 +02:00
"ListTask": {
"description": "ListTask",
2018-06-13 13:45:53 +02:00
"schema": {
2018-08-30 08:09:17 +02:00
"$ref": "#/definitions/ListTask"
2018-06-13 13:45:53 +02:00
}
},
"Message": {
"description": "Message",
"schema": {
"$ref": "#/definitions/Message"
}
},
2018-07-03 08:48:28 +02:00
"Namespace": {
"description": "Namespace",
"schema": {
"$ref": "#/definitions/Namespace"
}
},
2018-08-29 15:13:54 +02:00
"Team": {
"description": "Team",
"schema": {
"$ref": "#/definitions/Team"
}
},
"TeamList": {
"description": "TeamList",
"schema": {
"$ref": "#/definitions/TeamList"
}
},
"TeamMember": {
"description": "TeamMember",
"schema": {
"$ref": "#/definitions/TeamMember"
}
},
"TeamNamespace": {
"description": "TeamNamespace",
"schema": {
"$ref": "#/definitions/TeamNamespace"
}
},
2018-06-13 13:45:53 +02:00
"Token": {
"description": "Token",
"schema": {
"type": "object",
"required": [
"token"
],
"properties": {
"token": {
"description": "The token",
"type": "string",
"x-go-name": "Token"
}
}
}
},
"User": {
"description": "User Object",
"schema": {
"$ref": "#/definitions/User"
}
},
2018-09-17 08:22:31 +02:00
"UserList": {
"description": "UserList",
"schema": {
"$ref": "#/definitions/ListUser"
}
},
"UserNamespace": {
"description": "UserNamespace",
"schema": {
"$ref": "#/definitions/NamespaceUser"
}
},
2018-06-13 13:45:53 +02:00
"parameterBodies": {
"description": "parameterBodies",
"schema": {
2018-10-27 11:33:28 +02:00
"$ref": "#/definitions/PasswordTokenRequest"
2018-06-13 13:45:53 +02:00
}
}
2018-08-29 14:40:03 +02:00
}
2018-06-13 13:45:53 +02:00
}