vikunja-api/pkg/swagger/docs.go

5375 lines
198 KiB
Go
Raw Normal View History

// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2019-11-02 21:06:44.848486087 +0100 CET m=+0.175638002
2019-02-17 20:53:04 +01:00
package swagger
import (
"bytes"
2019-10-16 22:52:29 +02:00
"encoding/json"
"strings"
"github.com/alecthomas/template"
"github.com/swaggo/swag"
)
var doc = `{
2019-10-16 22:52:29 +02:00
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
2019-10-16 22:52:29 +02:00
"description": "{{.Description}}",
"title": "{{.Title}}",
2019-01-03 23:22:06 +01:00
"contact": {
"name": "General Vikunja contact",
"url": "http://vikunja.io/en/contact/",
"email": "hello@vikunja.io"
},
"license": {
2019-01-03 23:22:06 +01:00
"name": "GPLv3",
"url": "http://code.vikunja.io/api/src/branch/master/LICENSE"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
2019-10-16 22:52:29 +02:00
"basePath": "{{.BasePath}}",
"paths": {
2019-07-16 00:54:38 +02:00
"/info": {
"get": {
"description": "Returns the version, frontendurl, motd and various settings of Vikunja",
2019-07-16 00:54:38 +02:00
"produces": [
"application/json"
],
"tags": [
"service"
],
"summary": "Info",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/v1.vikunjaInfos"
}
}
}
}
},
2018-12-31 02:18:41 +01:00
"/labels": {
"get": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
2018-12-31 02:18:41 +01:00
}
],
"description": "Returns all labels which are either created by the user or associated with a task the user has at least read-access to.",
2018-12-31 02:18:41 +01:00
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"labels"
2018-12-31 02:18:41 +01:00
],
"summary": "Get all labels a user has access to",
2018-12-31 02:18:41 +01:00
"parameters": [
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
2019-10-23 23:11:40 +02:00
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.",
"name": "per_page",
2018-12-31 02:18:41 +01:00
"in": "query"
},
{
"type": "string",
"description": "Search labels by label text.",
2018-12-31 02:18:41 +01:00
"name": "s",
"in": "query"
}
],
"responses": {
"200": {
"description": "The labels",
2018-12-31 02:18:41 +01:00
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.Label"
2018-12-31 02:18:41 +01:00
}
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"put": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
2018-12-31 02:18:41 +01:00
}
],
"description": "Creates a new label.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"labels"
],
"summary": "Create a label",
"parameters": [
{
"description": "The label object",
"name": "label",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.Label"
}
}
],
"responses": {
"200": {
"description": "The created label object.",
"schema": {
"$ref": "#/definitions/models.Label"
}
},
"400": {
"description": "Invalid label object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/labels/{id}": {
"get": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
2018-12-31 02:18:41 +01:00
}
],
"description": "Returns one label by its ID.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"labels"
],
"summary": "Gets one label",
"parameters": [
{
"type": "integer",
"description": "Label ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The label",
"schema": {
"$ref": "#/definitions/models.Label"
}
},
"403": {
"description": "The user does not have access to the label",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "Label not found",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"put": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
2018-12-31 02:18:41 +01:00
}
],
"description": "Update an existing label. The user needs to be the creator of the label to be able to do this.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"labels"
],
"summary": "Update a label",
"parameters": [
{
"type": "integer",
"description": "Label ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "The label object",
"name": "label",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.Label"
}
}
],
"responses": {
"200": {
"description": "The created label object.",
"schema": {
"$ref": "#/definitions/models.Label"
}
},
"400": {
"description": "Invalid label object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "Not allowed to update the label.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "Label not found.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"delete": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
2018-12-31 02:18:41 +01:00
}
],
"description": "Delete an existing label. The user needs to be the creator of the label to be able to do this.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"labels"
],
"summary": "Delete a label",
"parameters": [
{
"type": "integer",
"description": "Label ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The label was successfully deleted.",
"schema": {
"$ref": "#/definitions/models.Label"
}
},
"403": {
"description": "Not allowed to delete the label.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "Label not found.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/lists": {
"get": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Returns all lists a user has access to.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"list"
],
"summary": "Get all lists a user has access to",
"parameters": [
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
2019-10-23 23:11:40 +02:00
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.",
"name": "per_page",
"in": "query"
},
{
"type": "string",
"description": "Search lists by title.",
"name": "s",
"in": "query"
}
],
"responses": {
"200": {
"description": "The lists",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.List"
}
}
},
"403": {
"description": "The user does not have access to the list",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/lists/{id}": {
"get": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Returns a team by its ID.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"team"
],
"summary": "Gets one team",
"parameters": [
{
"type": "integer",
"description": "Team ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The team",
"schema": {
"$ref": "#/definitions/models.Team"
}
},
"403": {
"description": "The user does not have access to the team",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"put": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Inserts a task into a list.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"task"
],
"summary": "Create a task",
"parameters": [
{
"type": "integer",
"description": "List ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "The task object",
"name": "task",
"in": "body",
"required": true,
"schema": {
"type": "object",
2019-08-14 22:19:04 +02:00
"$ref": "#/definitions/models.Task"
}
}
],
"responses": {
"200": {
"description": "The created task object.",
"schema": {
2019-08-14 22:19:04 +02:00
"$ref": "#/definitions/models.Task"
}
},
"400": {
"description": "Invalid task object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the list",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"post": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Updates a list. This does not include adding a task (see below).",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"list"
],
"summary": "Updates a list",
"parameters": [
{
"type": "integer",
"description": "List ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "The list with updated values you want to update.",
"name": "list",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.List"
}
}
],
"responses": {
"200": {
"description": "The updated list.",
"schema": {
"$ref": "#/definitions/models.List"
}
},
"400": {
"description": "Invalid list object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the list",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"delete": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Delets a list",
"produces": [
"application/json"
],
"tags": [
"list"
],
"summary": "Deletes a list",
"parameters": [
{
"type": "integer",
"description": "List ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The list was successfully deleted.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"400": {
"description": "Invalid list object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the list",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/lists/{id}/listusers": {
"get": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Lists all users (without emailadresses). Also possible to search for a specific user.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"list"
],
"summary": "Get users",
"parameters": [
{
"type": "string",
"description": "Search for a user by its name.",
"name": "s",
"in": "query"
},
{
"type": "integer",
"description": "List ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "All (found) users.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.User"
}
}
},
"400": {
"description": "Something's invalid.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"401": {
"description": "The user does not have the right to see the list.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal server error.",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/lists/{id}/teams": {
"get": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Returns a list with all teams which have access on a given list.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Get teams on a list",
"parameters": [
{
"type": "integer",
"description": "List ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
2019-10-23 23:11:40 +02:00
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.",
"name": "per_page",
"in": "query"
},
{
"type": "string",
"description": "Search teams by its name.",
"name": "s",
"in": "query"
}
],
"responses": {
"200": {
"description": "The teams with their right.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.TeamWithRight"
}
}
},
"403": {
"description": "No right to see the list.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"put": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Gives a team access to a list.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Add a team to a list",
"parameters": [
{
"type": "integer",
"description": "List ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "The team you want to add to the list.",
"name": "list",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.TeamList"
}
}
],
"responses": {
"200": {
"description": "The created team\u003c-\u003elist relation.",
"schema": {
"$ref": "#/definitions/models.TeamList"
}
},
"400": {
"description": "Invalid team list object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the list",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "The team does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/lists/{id}/users": {
"get": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Returns a list with all users which have access on a given list.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Get users on a list",
"parameters": [
{
"type": "integer",
"description": "List ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
2019-10-23 23:11:40 +02:00
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.",
"name": "per_page",
"in": "query"
},
{
"type": "string",
"description": "Search users by its name.",
"name": "s",
"in": "query"
}
],
"responses": {
"200": {
"description": "The users with the right they have.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.UserWithRight"
}
}
},
"403": {
"description": "No right to see the list.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"put": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Gives a user access to a list.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Add a user to a list",
"parameters": [
{
"type": "integer",
"description": "List ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "The user you want to add to the list.",
"name": "list",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.ListUser"
}
}
],
"responses": {
"200": {
"description": "The created user\u003c-\u003elist relation.",
"schema": {
"$ref": "#/definitions/models.ListUser"
}
},
"400": {
"description": "Invalid user list object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the list",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "The user does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/lists/{listID}/teams/{teamID}": {
"post": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Update a team \u003c-\u003e list relation. Mostly used to update the right that team has.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Update a team \u003c-\u003e list relation",
"parameters": [
{
"type": "integer",
"description": "List ID",
"name": "listID",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Team ID",
"name": "teamID",
"in": "path",
"required": true
},
{
"description": "The team you want to update.",
"name": "list",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.TeamList"
}
}
],
"responses": {
"200": {
"description": "The updated team \u003c-\u003e list relation.",
"schema": {
"$ref": "#/definitions/models.TeamList"
}
},
"403": {
"description": "The user does not have admin-access to the list",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "Team or list does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"delete": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Delets a team from a list. The team won't have access to the list anymore.",
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Delete a team from a list",
"parameters": [
{
"type": "integer",
"description": "List ID",
"name": "listID",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Team ID",
"name": "teamID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The team was successfully deleted.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"403": {
"description": "The user does not have access to the list",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "Team or list does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/lists/{listID}/users/{userID}": {
"post": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Update a user \u003c-\u003e list relation. Mostly used to update the right that user has.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Update a user \u003c-\u003e list relation",
"parameters": [
{
"type": "integer",
"description": "List ID",
"name": "listID",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "User ID",
"name": "userID",
"in": "path",
"required": true
},
{
"description": "The user you want to update.",
"name": "list",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.ListUser"
}
}
],
"responses": {
"200": {
"description": "The updated user \u003c-\u003e list relation.",
"schema": {
"$ref": "#/definitions/models.ListUser"
}
},
"403": {
"description": "The user does not have admin-access to the list",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "User or list does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"delete": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Delets a user from a list. The user won't have access to the list anymore.",
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Delete a user from a list",
"parameters": [
{
"type": "integer",
"description": "List ID",
"name": "listID",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "User ID",
"name": "userID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The user was successfully removed from the list.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"403": {
"description": "The user does not have access to the list",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "user or list does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/lists/{list}/shares": {
"get": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Returns all link shares which exist for a given list",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Get all link shares for a list",
"parameters": [
{
"type": "integer",
"description": "List ID",
"name": "list",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
2019-10-23 23:11:40 +02:00
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.",
"name": "per_page",
"in": "query"
},
{
"type": "string",
"description": "Search shares by hash.",
"name": "s",
"in": "query"
}
],
"responses": {
"200": {
"description": "The share links",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.LinkSharing"
}
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"put": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Share a list via link. The user needs to have write-access to the list to be able do this.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Share a list via link",
"parameters": [
{
"type": "integer",
"description": "List ID",
"name": "list",
"in": "path",
"required": true
},
{
"description": "The new link share object",
"name": "label",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.LinkSharing"
}
}
],
"responses": {
"200": {
"description": "The created link share object.",
"schema": {
"$ref": "#/definitions/models.LinkSharing"
}
},
"400": {
"description": "Invalid link share object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "Not allowed to add the list share.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "The list does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/lists/{list}/shares/{share}": {
"get": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Returns one link share by its ID.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Get one link shares for a list",
"parameters": [
{
"type": "integer",
"description": "List ID",
"name": "list",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Share ID",
"name": "share",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The share links",
"schema": {
"$ref": "#/definitions/models.LinkSharing"
}
},
"403": {
"description": "No access to the list",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "Share Link not found.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"delete": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Remove a link share. The user needs to have write-access to the list to be able do this.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Remove a link share",
"parameters": [
{
"type": "integer",
"description": "List ID",
"name": "list",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Share Link ID",
"name": "share",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The link was successfully removed.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"403": {
"description": "Not allowed to remove the link.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "Share Link not found.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/login": {
"post": {
"description": "Logs a user in. Returns a JWT-Token to authenticate further requests.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Login",
"parameters": [
{
"description": "The login credentials",
"name": "credentials",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.UserLogin"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/v1.Token"
}
},
"400": {
"description": "Invalid user password model.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"403": {
"description": "Invalid username or password.",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/namespace/{id}": {
"post": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Updates a namespace.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"namespace"
],
"summary": "Updates a namespace",
"parameters": [
{
"type": "integer",
"description": "Namespace ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "The namespace with updated values you want to update.",
"name": "namespace",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.Namespace"
}
}
],
"responses": {
"200": {
"description": "The updated namespace.",
"schema": {
"$ref": "#/definitions/models.Namespace"
}
},
"400": {
"description": "Invalid namespace object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the namespace",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/namespaces": {
"get": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Returns all namespaces a user has access to.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"namespace"
],
"summary": "Get all namespaces a user has access to",
"parameters": [
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
2019-10-23 23:11:40 +02:00
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.",
"name": "per_page",
"in": "query"
},
{
"type": "string",
"description": "Search namespaces by name.",
"name": "s",
"in": "query"
}
],
"responses": {
"200": {
"description": "The Namespaces.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.NamespaceWithLists"
}
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"put": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Creates a new namespace.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"namespace"
],
"summary": "Creates a new namespace",
"parameters": [
{
"description": "The namespace you want to create.",
"name": "namespace",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.Namespace"
}
}
],
"responses": {
"200": {
"description": "The created namespace.",
"schema": {
"$ref": "#/definitions/models.Namespace"
}
},
"400": {
"description": "Invalid namespace object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the namespace",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/namespaces/{id}": {
"get": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Returns a namespace by its ID.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"namespace"
],
"summary": "Gets one namespace",
"parameters": [
{
"type": "integer",
"description": "Namespace ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The Namespace",
"schema": {
"$ref": "#/definitions/models.Namespace"
}
},
"403": {
"description": "The user does not have access to that namespace.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"delete": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Delets a namespace",
"produces": [
"application/json"
],
"tags": [
"namespace"
],
"summary": "Deletes a namespace",
"parameters": [
{
"type": "integer",
"description": "Namespace ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The namespace was successfully deleted.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"400": {
"description": "Invalid namespace object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the namespace",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/namespaces/{id}/lists": {
"get": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Returns all lists inside of a namespace.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"namespace"
],
"summary": "Get all lists in a namespace",
"parameters": [
{
"type": "integer",
"description": "Namespace ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The lists.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.List"
}
}
},
"403": {
"description": "No access to that namespace.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"404": {
"description": "The namespace does not exist.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/namespaces/{id}/teams": {
"get": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Returns a namespace with all teams which have access on a given namespace.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Get teams on a namespace",
"parameters": [
{
"type": "integer",
"description": "Namespace ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
2019-10-23 23:11:40 +02:00
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.",
"name": "per_page",
"in": "query"
},
{
"type": "string",
"description": "Search teams by its name.",
"name": "s",
"in": "query"
}
],
"responses": {
"200": {
"description": "The teams with the right they have.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.TeamWithRight"
}
}
},
"403": {
"description": "No right to see the namespace.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"put": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Gives a team access to a namespace.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Add a team to a namespace",
"parameters": [
{
"type": "integer",
"description": "Namespace ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "The team you want to add to the namespace.",
"name": "namespace",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.TeamNamespace"
}
}
],
"responses": {
"200": {
"description": "The created team\u003c-\u003enamespace relation.",
"schema": {
"$ref": "#/definitions/models.TeamNamespace"
}
},
"400": {
"description": "Invalid team namespace object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "The team does not have access to the namespace",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "The team does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/namespaces/{id}/users": {
"get": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Returns a namespace with all users which have access on a given namespace.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Get users on a namespace",
"parameters": [
{
"type": "integer",
"description": "Namespace ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
2019-10-23 23:11:40 +02:00
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.",
"name": "per_page",
"in": "query"
},
{
"type": "string",
"description": "Search users by its name.",
"name": "s",
"in": "query"
}
],
"responses": {
"200": {
"description": "The users with the right they have.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.UserWithRight"
}
}
},
"403": {
"description": "No right to see the namespace.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"put": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Gives a user access to a namespace.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Add a user to a namespace",
"parameters": [
{
"type": "integer",
"description": "Namespace ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "The user you want to add to the namespace.",
"name": "namespace",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.NamespaceUser"
}
}
],
"responses": {
"200": {
"description": "The created user\u003c-\u003enamespace relation.",
"schema": {
"$ref": "#/definitions/models.NamespaceUser"
}
},
"400": {
"description": "Invalid user namespace object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the namespace",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "The user does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/namespaces/{namespaceID}/lists": {
"put": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Creates a new list in a given namespace. The user needs write-access to the namespace.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"list"
],
"summary": "Creates a new list",
"parameters": [
{
"type": "integer",
"description": "Namespace ID",
"name": "namespaceID",
"in": "path",
"required": true
},
{
"description": "The list you want to create.",
"name": "list",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.List"
}
}
],
"responses": {
"200": {
"description": "The created list.",
"schema": {
"$ref": "#/definitions/models.List"
}
},
"400": {
"description": "Invalid list object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the list",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/namespaces/{namespaceID}/teams/{teamID}": {
"post": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Update a team \u003c-\u003e namespace relation. Mostly used to update the right that team has.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Update a team \u003c-\u003e namespace relation",
"parameters": [
{
"type": "integer",
"description": "Namespace ID",
"name": "namespaceID",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Team ID",
"name": "teamID",
"in": "path",
"required": true
},
{
"description": "The team you want to update.",
"name": "namespace",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.TeamNamespace"
}
}
],
"responses": {
"200": {
"description": "The updated team \u003c-\u003e namespace relation.",
"schema": {
"$ref": "#/definitions/models.TeamNamespace"
}
},
"403": {
"description": "The team does not have admin-access to the namespace",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "Team or namespace does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"delete": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Delets a team from a namespace. The team won't have access to the namespace anymore.",
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Delete a team from a namespace",
"parameters": [
{
"type": "integer",
"description": "Namespace ID",
"name": "namespaceID",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "team ID",
"name": "teamID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The team was successfully deleted.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"403": {
"description": "The team does not have access to the namespace",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "team or namespace does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/namespaces/{namespaceID}/users/{userID}": {
"post": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Update a user \u003c-\u003e namespace relation. Mostly used to update the right that user has.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Update a user \u003c-\u003e namespace relation",
"parameters": [
{
"type": "integer",
"description": "Namespace ID",
"name": "namespaceID",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "User ID",
"name": "userID",
"in": "path",
"required": true
},
{
"description": "The user you want to update.",
"name": "namespace",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.NamespaceUser"
}
}
],
"responses": {
"200": {
"description": "The updated user \u003c-\u003e namespace relation.",
"schema": {
"$ref": "#/definitions/models.NamespaceUser"
}
},
"403": {
"description": "The user does not have admin-access to the namespace",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "User or namespace does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"delete": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Delets a user from a namespace. The user won't have access to the namespace anymore.",
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Delete a user from a namespace",
"parameters": [
{
"type": "integer",
"description": "Namespace ID",
"name": "namespaceID",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "user ID",
"name": "userID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The user was successfully deleted.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"403": {
"description": "The user does not have access to the namespace",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "user or namespace does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/register": {
"post": {
"description": "Creates a new user account.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Register",
"parameters": [
{
"description": "The user credentials",
"name": "credentials",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.APIUserPassword"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.User"
}
},
"400": {
"description": "No or invalid user register object provided / User already exists.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/shares/{share}/auth": {
"post": {
"description": "Get a jwt auth token for a shared list from a share hash.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sharing"
],
"summary": "Get an auth token for a share",
2018-12-25 21:45:26 +01:00
"parameters": [
{
"type": "string",
"description": "The share hash",
"name": "share",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The valid jwt auth token.",
"schema": {
"$ref": "#/definitions/v1.Token"
}
},
"400": {
"description": "Invalid link share object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/tasks/all": {
"get": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Returns one task by its ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"task"
],
"summary": "Get one task",
"parameters": [
{
"type": "integer",
"description": "The task ID",
"name": "ID",
"in": "path",
"required": true
2018-12-25 21:45:26 +01:00
}
],
"responses": {
"200": {
"description": "The task",
2018-12-25 21:45:26 +01:00
"schema": {
"$ref": "#/definitions/models.Task"
}
},
"404": {
"description": "Task not found",
"schema": {
"$ref": "#/definitions/models.Message"
2018-12-25 21:45:26 +01:00
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
2018-12-28 22:49:46 +01:00
"/tasks/bulk": {
"post": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
2018-12-28 22:49:46 +01:00
}
],
"description": "Updates a bunch of tasks at once. This includes marking them as done. Note: although you could supply another ID, it will be ignored. Use task_ids instead.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"task"
],
"summary": "Update a bunch of tasks at once",
"parameters": [
{
"description": "The task object. Looks like a normal task, the only difference is it uses an array of list_ids to update.",
"name": "task",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.BulkTask"
}
}
],
"responses": {
"200": {
"description": "The updated task object.",
"schema": {
2019-08-14 22:19:04 +02:00
"$ref": "#/definitions/models.Task"
2018-12-28 22:49:46 +01:00
}
},
"400": {
"description": "Invalid task object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the task (aka its list)",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/tasks/{id}": {
"post": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
2019-01-10 00:08:12 +01:00
"description": "Updates a task. This includes marking it as done. Assignees you pass will be updated, see their individual endpoints for more details on how this is done. To update labels, see the description of the endpoint.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"task"
],
"summary": "Update a task",
"parameters": [
{
"type": "integer",
"description": "Task ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "The task object",
"name": "task",
"in": "body",
"required": true,
"schema": {
"type": "object",
2019-08-14 22:19:04 +02:00
"$ref": "#/definitions/models.Task"
}
}
],
"responses": {
"200": {
"description": "The updated task object.",
"schema": {
2019-08-14 22:19:04 +02:00
"$ref": "#/definitions/models.Task"
}
},
"400": {
"description": "Invalid task object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the task (aka its list)",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"delete": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Deletes a task from a list. This does not mean \"mark it done\".",
"produces": [
"application/json"
],
"tags": [
"task"
],
"summary": "Delete a task",
"parameters": [
{
"type": "integer",
"description": "Task ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The created task object.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"400": {
"description": "Invalid task ID provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the list",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
2019-10-16 22:52:29 +02:00
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/tasks/{id}/attachments": {
"get": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Get all task attachments for one task.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"task"
],
"summary": "Get all attachments for one task.",
"parameters": [
{
"type": "integer",
"description": "Task ID",
"name": "id",
"in": "path",
"required": true
2019-10-23 23:11:40 +02:00
},
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.",
"name": "per_page",
"in": "query"
2019-10-16 22:52:29 +02:00
}
],
"responses": {
"200": {
"description": "All attachments for this task",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.TaskAttachment"
}
}
},
"403": {
"description": "No access to this task.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"404": {
"description": "The task does not exist.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"put": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Upload a task attachment. You can pass multiple files with the files form param.",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"task"
],
"summary": "Upload a task attachment",
"parameters": [
{
"type": "integer",
"description": "Task ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "The file, as multipart form file. You can pass multiple.",
"name": "files",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "Attachments were uploaded successfully.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"403": {
"description": "No access to the task.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"404": {
"description": "The task does not exist.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/tasks/{id}/attachments/{attachmentID}": {
"get": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Get one attachment for download. **Returns json on error.**",
"produces": [
"application/octet-stream"
],
"tags": [
"task"
],
"summary": "Get one attachment.",
"parameters": [
{
"type": "integer",
"description": "Task ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Attachment ID",
"name": "attachmentID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The attachment file.",
"schema": {
"type": ""
}
},
"403": {
"description": "No access to this task.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"404": {
"description": "The task does not exist.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"delete": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Delete an attachment.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"task"
],
"summary": "Delete an attachment",
"parameters": [
{
"type": "integer",
"description": "Task ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Attachment ID",
"name": "attachmentID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The attachment was deleted successfully.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"403": {
"description": "No access to this task.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"404": {
"description": "The task does not exist.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
2019-01-08 20:13:07 +01:00
"/tasks/{taskID}/assignees": {
"get": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Returns an array with all assignees for this task.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"assignees"
],
"summary": "Get all assignees for a task",
"parameters": [
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
2019-10-23 23:11:40 +02:00
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.",
"name": "per_page",
"in": "query"
},
{
"type": "string",
"description": "Search assignees by their username.",
"name": "s",
"in": "query"
},
{
"type": "integer",
"description": "Task ID",
"name": "taskID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The assignees",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.User"
}
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
2019-01-08 20:13:07 +01:00
"put": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Adds a new assignee to a task. The assignee needs to have access to the list, the doer must be able to edit this task.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"assignees"
],
"summary": "Add a new assignee to a task",
"parameters": [
{
"description": "The assingee object",
"name": "assignee",
"in": "body",
"required": true,
"schema": {
"type": "object",
2019-08-14 22:19:04 +02:00
"$ref": "#/definitions/models.TaskAssginee"
2019-01-08 20:13:07 +01:00
}
},
{
"type": "integer",
"description": "Task ID",
"name": "taskID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The created assingee object.",
"schema": {
2019-08-14 22:19:04 +02:00
"$ref": "#/definitions/models.TaskAssginee"
2019-01-08 20:13:07 +01:00
}
},
"400": {
"description": "Invalid assignee object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/tasks/{taskID}/assignees/bulk": {
2019-01-10 00:08:12 +01:00
"post": {
2019-01-08 20:13:07 +01:00
"security": [
{
"JWTKeyAuth": []
}
],
2019-01-10 00:08:12 +01:00
"description": "Adds multiple new assignees to a task. The assignee needs to have access to the list, the doer must be able to edit this task. Every user not in the list will be unassigned from the task, pass an empty array to unassign everyone.",
2019-01-08 20:13:07 +01:00
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"assignees"
],
2019-01-10 00:08:12 +01:00
"summary": "Add multiple new assignees to a task",
2019-01-08 20:13:07 +01:00
"parameters": [
{
"description": "The array of assignees",
"name": "assignee",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.BulkAssignees"
}
},
{
"type": "integer",
"description": "Task ID",
"name": "taskID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The created assingees object.",
"schema": {
2019-08-14 22:19:04 +02:00
"$ref": "#/definitions/models.TaskAssginee"
2019-01-08 20:13:07 +01:00
}
},
"400": {
"description": "Invalid assignee object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/tasks/{taskID}/assignees/{userID}": {
"delete": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Un-assign a user from a task.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"assignees"
],
"summary": "Delete an assignee",
"parameters": [
{
"type": "integer",
"description": "Task ID",
"name": "taskID",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Assignee user ID",
"name": "userID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The assignee was successfully deleted.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"403": {
"description": "Not allowed to delete the assignee.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
2019-01-10 00:08:12 +01:00
"/tasks/{taskID}/labels/bulk": {
"post": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Updates all labels on a task. Every label which is not passed but exists on the task will be deleted. Every label which does not exist on the task will be added. All labels which are passed and already exist on the task won't be touched.",
2019-01-10 00:08:12 +01:00
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"labels"
],
"summary": "Update all labels on a task.",
2019-01-10 00:08:12 +01:00
"parameters": [
{
"description": "The array of labels",
"name": "label",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.LabelTaskBulk"
}
},
{
"type": "integer",
"description": "Task ID",
"name": "taskID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The updated labels object.",
"schema": {
"$ref": "#/definitions/models.LabelTaskBulk"
}
},
"400": {
"description": "Invalid label object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
2019-09-25 20:44:41 +02:00
"/tasks/{taskID}/relations": {
"put": {
"security": [
{
"JWTKeyAuth": []
}
],
2019-10-16 22:52:29 +02:00
"description": "Creates a new relation between two tasks. The user needs to have update rights on the base task and at least read rights on the other task. Both tasks do not need to be on the same list. Take a look at the docs for available task relation kinds.",
2019-09-25 20:44:41 +02:00
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"task"
],
"summary": "Create a new relation between two tasks",
"parameters": [
{
"description": "The relation object",
"name": "relation",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.TaskRelation"
}
},
{
"type": "integer",
"description": "Task ID",
"name": "taskID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The created task relation object.",
"schema": {
"$ref": "#/definitions/models.TaskRelation"
}
},
"400": {
"description": "Invalid task relation object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"delete": {
"security": [
{
"JWTKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"task"
],
"summary": "Remove a task relation",
"parameters": [
{
"description": "The relation object",
"name": "relation",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.TaskRelation"
}
},
{
"type": "integer",
"description": "Task ID",
"name": "taskID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The task relation was successfully deleted.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"400": {
"description": "Invalid task relation object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "The task relation was not found.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
2018-12-31 02:18:41 +01:00
"/tasks/{task}/labels": {
"get": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
2018-12-31 02:18:41 +01:00
}
],
"description": "Returns all labels which are assicociated with a given task.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"labels"
],
"summary": "Get all labels on a task",
"parameters": [
{
"type": "integer",
"description": "Task ID",
"name": "task",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
2019-10-23 23:11:40 +02:00
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.",
"name": "per_page",
2018-12-31 02:18:41 +01:00
"in": "query"
},
{
"type": "string",
"description": "Search labels by label text.",
"name": "s",
"in": "query"
}
],
"responses": {
"200": {
"description": "The labels",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.Label"
}
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"put": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
2018-12-31 02:18:41 +01:00
}
],
"description": "Add a label to a task. The user needs to have write-access to the list to be able do this.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"labels"
],
"summary": "Add a label to a task",
"parameters": [
{
"type": "integer",
"description": "Task ID",
"name": "task",
"in": "path",
"required": true
},
{
"description": "The label object",
"name": "label",
"in": "body",
"required": true,
"schema": {
"type": "object",
2019-03-21 07:40:56 +01:00
"$ref": "#/definitions/models.LabelTask"
2018-12-31 02:18:41 +01:00
}
}
],
"responses": {
"200": {
"description": "The created label relation object.",
"schema": {
2019-03-21 07:40:56 +01:00
"$ref": "#/definitions/models.LabelTask"
2018-12-31 02:18:41 +01:00
}
},
"400": {
"description": "Invalid label object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "Not allowed to add the label.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "The label does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/tasks/{task}/labels/{label}": {
"delete": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
2018-12-31 02:18:41 +01:00
}
],
"description": "Remove a label from a task. The user needs to have write-access to the list to be able do this.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"labels"
],
"summary": "Remove a label from a task",
"parameters": [
{
"type": "integer",
"description": "Task ID",
"name": "task",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Label ID",
"name": "label",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The label was successfully removed.",
"schema": {
2019-03-21 07:40:56 +01:00
"$ref": "#/definitions/models.Message"
2018-12-31 02:18:41 +01:00
}
},
"403": {
"description": "Not allowed to remove the label.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "Label not found.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/teams": {
"get": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Returns all teams the current user is part of.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"team"
],
"summary": "Get teams",
"parameters": [
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
2019-10-23 23:11:40 +02:00
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.",
"name": "per_page",
"in": "query"
},
{
"type": "string",
"description": "Search teams by its name.",
"name": "s",
"in": "query"
}
],
"responses": {
"200": {
"description": "The teams.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.Team"
}
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"put": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Creates a new team in a given namespace. The user needs write-access to the namespace.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"team"
],
"summary": "Creates a new team",
"parameters": [
{
"description": "The team you want to create.",
"name": "team",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.Team"
}
}
],
"responses": {
"200": {
"description": "The created team.",
"schema": {
"$ref": "#/definitions/models.Team"
}
},
"400": {
"description": "Invalid team object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/teams/{id}": {
"post": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Updates a team.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"team"
],
"summary": "Updates a team",
"parameters": [
{
"type": "integer",
"description": "Team ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "The team with updated values you want to update.",
"name": "team",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.Team"
}
}
],
"responses": {
"200": {
"description": "The updated team.",
"schema": {
"$ref": "#/definitions/models.Team"
}
},
"400": {
"description": "Invalid team object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
},
"delete": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Delets a team. This will also remove the access for all users in that team.",
"produces": [
"application/json"
],
"tags": [
"team"
],
"summary": "Deletes a team",
"parameters": [
{
"type": "integer",
"description": "Team ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The team was successfully deleted.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"400": {
"description": "Invalid team object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/teams/{id}/members": {
"put": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Add a user to a team.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"team"
],
"summary": "Add a user to a team",
"parameters": [
{
"type": "integer",
"description": "Team ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "The user to be added to a team.",
"name": "team",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.TeamMember"
}
}
],
"responses": {
"200": {
"description": "The newly created member object",
"schema": {
"$ref": "#/definitions/models.TeamMember"
}
},
"400": {
"description": "Invalid member object provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the team",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/teams/{id}/members/{userID}": {
"delete": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Remove a user from a team. This will also revoke any access this user might have via that team.",
"produces": [
"application/json"
],
"tags": [
"team"
],
"summary": "Remove a user from a team",
"parameters": [
{
"type": "integer",
"description": "Team ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "User ID",
"name": "userID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The user was successfully removed from the team.",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/user": {
"get": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Returns the current user object.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Get user information",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.User"
}
},
"404": {
"description": "User does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal server error.",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/user/confirm": {
"post": {
"description": "Confirms the email of a newly registered user.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Confirm the email of a new user",
"parameters": [
{
"description": "The token.",
"name": "credentials",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.EmailConfirm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"412": {
"description": "Bad token provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/user/password": {
"post": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Lets the current user change its password.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Change password",
"parameters": [
{
"description": "The current and new password.",
"name": "userPassword",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/v1.UserPassword"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"400": {
"description": "Something's invalid.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"404": {
"description": "User does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal server error.",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/user/password/reset": {
"post": {
"description": "Resets a user email with a previously reset token.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Resets a password",
"parameters": [
{
"description": "The token with the new password.",
"name": "credentials",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.PasswordReset"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"400": {
"description": "Bad token provided.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/user/password/token": {
"post": {
"description": "Requests a token to reset a users password. The token is sent via email.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Request password reset token",
"parameters": [
{
"description": "The username of the user to request a token for.",
"name": "credentials",
"in": "body",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/models.PasswordTokenRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"404": {
"description": "The user does not exist.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/users": {
"get": {
"security": [
{
2019-01-03 23:22:06 +01:00
"JWTKeyAuth": []
}
],
"description": "Lists all users (without emailadresses). Also possible to search for a specific user.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Get users",
"parameters": [
{
"type": "string",
"description": "Search for a user by its name.",
"name": "s",
"in": "query"
}
],
"responses": {
"200": {
"description": "All (found) users.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.User"
}
}
},
"400": {
"description": "Something's invalid.",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
},
"500": {
"description": "Internal server error.",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
}
},
"definitions": {
"code.vikunja.io.web.HTTPError": {"type": "object","properties": {"code": {"type": "integer"},"message": {"type": "string"}}},
2019-10-16 22:52:29 +02:00
"files.File": {
"type": "object",
"properties": {
"created": {
"type": "string"
},
"id": {
"type": "integer"
},
"mime": {
"type": "string"
},
"name": {
"type": "string"
},
"size": {
"type": "integer"
}
}
},
"models.APIUserPassword": {
"type": "object",
"properties": {
"email": {
2019-01-03 23:22:06 +01:00
"description": "The user's email address",
"type": "string",
"maxLength": 250
},
"id": {
2019-01-03 23:22:06 +01:00
"description": "The unique, numeric id of this user.",
"type": "integer"
},
"password": {
2019-01-03 23:22:06 +01:00
"description": "The user's password in clear text. Only used when registering the user.",
"type": "string",
"maxLength": 250,
"minLength": 8
},
"username": {
2019-01-03 23:22:06 +01:00
"description": "The username of the username. Is always unique.",
"type": "string",
"maxLength": 250,
"minLength": 3
}
}
},
2019-01-08 20:13:07 +01:00
"models.BulkAssignees": {
"type": "object",
"properties": {
"assignees": {
"description": "A list with all assignees",
"type": "array",
"items": {
"$ref": "#/definitions/models.User"
}
}
}
},
2018-12-28 22:49:46 +01:00
"models.BulkTask": {
"type": "object",
"properties": {
2018-12-29 15:29:50 +01:00
"assignees": {
2019-01-03 23:22:06 +01:00
"description": "An array of users who are assigned to this task",
2018-12-29 15:29:50 +01:00
"type": "array",
"items": {
"$ref": "#/definitions/models.User"
}
},
2019-10-16 22:52:29 +02:00
"attachments": {
"description": "All attachments this task has",
"type": "array",
"items": {
"$ref": "#/definitions/models.TaskAttachment"
}
},
2018-12-28 22:49:46 +01:00
"created": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this task was created. You cannot change this value.",
2018-12-28 22:49:46 +01:00
"type": "integer"
},
"createdBy": {
2019-01-03 23:22:06 +01:00
"description": "The user who initially created the task.",
2018-12-28 22:49:46 +01:00
"type": "object",
"$ref": "#/definitions/models.User"
},
"description": {
2019-01-03 23:22:06 +01:00
"description": "The task description.",
"type": "string"
2018-12-28 22:49:46 +01:00
},
"done": {
"description": "Whether a task is done or not.",
2018-12-28 22:49:46 +01:00
"type": "boolean"
},
2019-05-22 19:48:48 +02:00
"doneAt": {
"description": "The unix timestamp when a task was marked as done.",
"type": "integer"
},
2018-12-28 22:49:46 +01:00
"dueDate": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when the task is due.",
2018-12-28 22:49:46 +01:00
"type": "integer"
},
"endDate": {
2019-01-03 23:22:06 +01:00
"description": "When this task ends.",
2018-12-28 22:49:46 +01:00
"type": "integer"
},
2019-04-30 11:26:37 +02:00
"hexColor": {
"description": "The task color in hex",
"type": "string",
"maxLength": 6
},
2018-12-28 22:49:46 +01:00
"id": {
2019-01-03 23:22:06 +01:00
"description": "The unique, numeric id of this task.",
2018-12-28 22:49:46 +01:00
"type": "integer"
},
2018-12-31 02:18:41 +01:00
"labels": {
2019-01-03 23:22:06 +01:00
"description": "An array of labels which are associated with this task.",
2018-12-31 02:18:41 +01:00
"type": "array",
"items": {
"$ref": "#/definitions/models.Label"
}
},
"listID": {
"description": "The list this task belongs to.",
"type": "integer"
},
2019-09-21 12:52:10 +02:00
"percentDone": {
"description": "Determines how far a task is left from being done",
"type": "number"
},
2018-12-28 22:49:46 +01:00
"priority": {
2019-01-03 23:22:06 +01:00
"description": "The task priority. Can be anything you want, it is possible to sort by this later.",
2018-12-28 22:49:46 +01:00
"type": "integer"
},
2019-09-25 20:44:41 +02:00
"related_tasks": {
"description": "All related tasks, grouped by their relation kind",
"type": "object",
"$ref": "#/definitions/models.RelatedTaskMap"
},
2018-12-28 22:49:46 +01:00
"reminderDates": {
2019-01-03 23:22:06 +01:00
"description": "An array of unix timestamps when the user wants to be reminded of the task.",
2018-12-28 22:49:46 +01:00
"type": "array",
"items": {
"type": "integer"
}
},
"repeatAfter": {
2019-01-03 23:22:06 +01:00
"description": "An amount in seconds this task repeats itself. If this is set, when marking the task as done, it will mark itself as \"undone\" and then increase all remindes and the due date by its amount.",
2018-12-28 22:49:46 +01:00
"type": "integer"
},
"startDate": {
2019-01-03 23:22:06 +01:00
"description": "When this task starts.",
2018-12-28 22:49:46 +01:00
"type": "integer"
},
"task_ids": {
2019-01-03 23:22:06 +01:00
"description": "A list of task ids to update",
2018-12-28 22:49:46 +01:00
"type": "array",
"items": {
"type": "integer"
}
},
"text": {
2019-01-03 23:22:06 +01:00
"description": "The task text. This is what you'll see in the list.",
"type": "string",
"maxLength": 250,
"minLength": 3
2018-12-28 22:49:46 +01:00
},
"updated": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this task was last updated. You cannot change this value.",
2018-12-28 22:49:46 +01:00
"type": "integer"
}
}
},
"models.EmailConfirm": {
"type": "object",
"properties": {
"token": {
2019-01-03 23:22:06 +01:00
"description": "The email confirm token sent via email.",
"type": "string"
}
}
},
2018-12-31 02:18:41 +01:00
"models.Label": {
"type": "object",
"properties": {
"created": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this label was created. You cannot change this value.",
2018-12-31 02:18:41 +01:00
"type": "integer"
},
"created_by": {
2019-01-03 23:22:06 +01:00
"description": "The user who created this label",
2018-12-31 02:18:41 +01:00
"type": "object",
"$ref": "#/definitions/models.User"
},
"description": {
2019-01-03 23:22:06 +01:00
"description": "The label description.",
"type": "string"
2018-12-31 02:18:41 +01:00
},
"hex_color": {
2019-01-03 23:22:06 +01:00
"description": "The color this label has",
"type": "string",
"maxLength": 6
2018-12-31 02:18:41 +01:00
},
"id": {
2019-01-03 23:22:06 +01:00
"description": "The unique, numeric id of this label.",
2018-12-31 02:18:41 +01:00
"type": "integer"
},
"title": {
2019-01-03 23:22:06 +01:00
"description": "The title of the lable. You'll see this one on tasks associated with it.",
"type": "string",
"maxLength": 250,
"minLength": 3
2018-12-31 02:18:41 +01:00
},
"updated": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this label was last updated. You cannot change this value.",
2018-12-31 02:18:41 +01:00
"type": "integer"
}
}
},
2019-03-21 07:40:56 +01:00
"models.LabelTask": {
"type": "object",
"properties": {
"created": {
"description": "A unix timestamp when this task was created. You cannot change this value.",
"type": "integer"
},
"label_id": {
"description": "The label id you want to associate with a task.",
"type": "integer"
}
}
},
2019-01-10 00:08:12 +01:00
"models.LabelTaskBulk": {
"type": "object",
"properties": {
"labels": {
"description": "All labels you want to update at once.",
2019-01-10 00:08:12 +01:00
"type": "array",
"items": {
"$ref": "#/definitions/models.Label"
}
}
}
},
"models.LinkSharing": {
"type": "object",
"properties": {
"created": {
"description": "A unix timestamp when this list was shared. You cannot change this value.",
"type": "integer"
},
"hash": {
"description": "The public id to get this shared list",
"type": "string"
},
"id": {
"description": "The ID of the shared thing",
"type": "integer"
},
"right": {
"description": "The right this list is shared with. 0 = Read only, 1 = Read \u0026 Write, 2 = Admin. See the docs for more details.",
"type": "integer",
"default": 0,
"maximum": 2
},
"shared_by": {
"description": "The user who shared this list",
"type": "object",
"$ref": "#/definitions/models.User"
},
"sharing_type": {
"description": "The kind of this link. 0 = undefined, 1 = without password, 2 = with password (currently not implemented).",
"type": "integer",
"default": 0,
"maximum": 2
},
"updated": {
"description": "A unix timestamp when this share was last updated. You cannot change this value.",
"type": "integer"
}
}
},
"models.List": {
"type": "object",
"properties": {
"created": {
"description": "A unix timestamp when this list was created. You cannot change this value.",
"type": "integer"
},
"description": {
"description": "The description of the list.",
"type": "string"
},
"id": {
"description": "The unique, numeric id of this list.",
2018-11-26 21:24:00 +01:00
"type": "integer"
},
"owner": {
"description": "The user who created this list.",
"type": "object",
"$ref": "#/definitions/models.User"
2018-12-22 16:45:16 +01:00
},
"tasks": {
"description": "An array of tasks which belong to the list.",
2018-12-01 03:00:57 +01:00
"type": "array",
"items": {
2019-08-14 22:19:04 +02:00
"$ref": "#/definitions/models.Task"
2018-12-01 03:00:57 +01:00
}
},
"title": {
"description": "The title of the list. You'll see this in the namespace overview.",
2019-01-03 23:22:06 +01:00
"type": "string",
"maxLength": 250,
"minLength": 3
},
"updated": {
"description": "A unix timestamp when this list was last updated. You cannot change this value.",
2019-01-08 20:13:07 +01:00
"type": "integer"
}
}
},
"models.ListUser": {
"type": "object",
"properties": {
"created": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this relation was created. You cannot change this value.",
"type": "integer"
},
"id": {
2019-01-03 23:22:06 +01:00
"description": "The unique, numeric id of this list \u003c-\u003e user relation.",
"type": "integer"
},
"right": {
2019-01-03 23:22:06 +01:00
"description": "The right this user has. 0 = Read only, 1 = Read \u0026 Write, 2 = Admin. See the docs for more details.",
"type": "integer",
"default": 0,
"maximum": 2
},
"updated": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this relation was last updated. You cannot change this value.",
"type": "integer"
},
2019-07-16 00:54:38 +02:00
"userID": {
"description": "The username.",
"type": "string"
}
}
},
"models.Message": {
"type": "object",
"properties": {
"message": {
2019-01-03 23:22:06 +01:00
"description": "A standard message.",
"type": "string"
}
}
},
"models.Namespace": {
"type": "object",
"properties": {
"created": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this namespace was created. You cannot change this value.",
"type": "integer"
},
"description": {
2019-01-03 23:22:06 +01:00
"description": "The description of the namespace",
"type": "string"
},
"id": {
2019-01-03 23:22:06 +01:00
"description": "The unique, numeric id of this namespace.",
"type": "integer"
},
"name": {
2019-01-03 23:22:06 +01:00
"description": "The name of this namespace.",
"type": "string",
"maxLength": 250,
"minLength": 5
},
"owner": {
2019-01-03 23:22:06 +01:00
"description": "The user who owns this namespace",
"type": "object",
"$ref": "#/definitions/models.User"
},
"updated": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this namespace was last updated. You cannot change this value.",
"type": "integer"
}
}
},
"models.NamespaceUser": {
"type": "object",
"properties": {
"created": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this relation was created. You cannot change this value.",
"type": "integer"
},
"id": {
2019-01-03 23:22:06 +01:00
"description": "The unique, numeric id of this namespace \u003c-\u003e user relation.",
"type": "integer"
},
"right": {
2019-01-03 23:22:06 +01:00
"description": "The right this user has. 0 = Read only, 1 = Read \u0026 Write, 2 = Admin. See the docs for more details.",
"type": "integer",
"default": 0,
"maximum": 2
},
"updated": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this relation was last updated. You cannot change this value.",
"type": "integer"
},
"userID": {
"description": "The username.",
"type": "string"
}
}
},
"models.NamespaceWithLists": {
"type": "object",
"properties": {
"created": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this namespace was created. You cannot change this value.",
"type": "integer"
},
"description": {
2019-01-03 23:22:06 +01:00
"description": "The description of the namespace",
"type": "string"
},
"id": {
2019-01-03 23:22:06 +01:00
"description": "The unique, numeric id of this namespace.",
"type": "integer"
},
"lists": {
"type": "array",
"items": {
"$ref": "#/definitions/models.List"
}
},
"name": {
2019-01-03 23:22:06 +01:00
"description": "The name of this namespace.",
"type": "string",
"maxLength": 250,
"minLength": 5
},
"owner": {
2019-01-03 23:22:06 +01:00
"description": "The user who owns this namespace",
"type": "object",
"$ref": "#/definitions/models.User"
},
"updated": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this namespace was last updated. You cannot change this value.",
"type": "integer"
}
}
},
"models.PasswordReset": {
"type": "object",
"properties": {
"new_password": {
2019-01-03 23:22:06 +01:00
"description": "The new password for this user.",
"type": "string"
},
"token": {
2019-01-03 23:22:06 +01:00
"description": "The previously issued reset token.",
"type": "string"
}
}
},
"models.PasswordTokenRequest": {
"type": "object",
"properties": {
"email": {
2019-01-03 23:22:06 +01:00
"type": "string",
"maxLength": 250
}
}
},
2019-09-25 20:44:41 +02:00
"models.RelatedTaskMap": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"assignees": {
"description": "An array of users who are assigned to this task",
"type": "array",
"items": {
"$ref": "#/definitions/models.User"
}
},
2019-10-16 22:52:29 +02:00
"attachments": {
"description": "All attachments this task has",
"type": "array",
"items": {
"$ref": "#/definitions/models.TaskAttachment"
}
},
2019-09-25 20:44:41 +02:00
"created": {
"description": "A unix timestamp when this task was created. You cannot change this value.",
"type": "integer"
},
"createdBy": {
"description": "The user who initially created the task.",
"type": "object",
"$ref": "#/definitions/models.User"
},
"description": {
"description": "The task description.",
"type": "string"
},
"done": {
"description": "Whether a task is done or not.",
"type": "boolean"
},
"doneAt": {
"description": "The unix timestamp when a task was marked as done.",
"type": "integer"
},
"dueDate": {
"description": "A unix timestamp when the task is due.",
"type": "integer"
},
"endDate": {
"description": "When this task ends.",
"type": "integer"
},
"hexColor": {
"description": "The task color in hex",
"type": "string",
"maxLength": 6
},
"id": {
"description": "The unique, numeric id of this task.",
"type": "integer"
},
"labels": {
"description": "An array of labels which are associated with this task.",
"type": "array",
"items": {
"$ref": "#/definitions/models.Label"
}
},
"listID": {
"description": "The list this task belongs to.",
"type": "integer"
},
"percentDone": {
"description": "Determines how far a task is left from being done",
"type": "number"
},
"priority": {
"description": "The task priority. Can be anything you want, it is possible to sort by this later.",
"type": "integer"
},
"related_tasks": {
"description": "All related tasks, grouped by their relation kind",
"type": "object",
"$ref": "#/definitions/models.RelatedTaskMap"
},
"reminderDates": {
"description": "An array of unix timestamps when the user wants to be reminded of the task.",
"type": "array",
"items": {
"type": "integer"
}
},
"repeatAfter": {
"description": "An amount in seconds this task repeats itself. If this is set, when marking the task as done, it will mark itself as \"undone\" and then increase all remindes and the due date by its amount.",
"type": "integer"
},
"startDate": {
"description": "When this task starts.",
"type": "integer"
},
"text": {
"description": "The task text. This is what you'll see in the list.",
"type": "string",
"maxLength": 250,
"minLength": 3
},
"updated": {
"description": "A unix timestamp when this task was last updated. You cannot change this value.",
"type": "integer"
}
}
}
}
},
"models.Task": {
"type": "object",
"properties": {
"assignees": {
"description": "An array of users who are assigned to this task",
"type": "array",
"items": {
"$ref": "#/definitions/models.User"
}
},
2019-10-16 22:52:29 +02:00
"attachments": {
"description": "All attachments this task has",
"type": "array",
"items": {
"$ref": "#/definitions/models.TaskAttachment"
}
},
"created": {
"description": "A unix timestamp when this task was created. You cannot change this value.",
"type": "integer"
},
"createdBy": {
"description": "The user who initially created the task.",
"type": "object",
"$ref": "#/definitions/models.User"
},
"description": {
"description": "The task description.",
"type": "string"
},
"done": {
"description": "Whether a task is done or not.",
"type": "boolean"
},
"doneAt": {
"description": "The unix timestamp when a task was marked as done.",
"type": "integer"
},
"dueDate": {
"description": "A unix timestamp when the task is due.",
"type": "integer"
},
"endDate": {
"description": "When this task ends.",
"type": "integer"
},
"hexColor": {
"description": "The task color in hex",
"type": "string",
"maxLength": 6
},
"id": {
"description": "The unique, numeric id of this task.",
"type": "integer"
},
"labels": {
"description": "An array of labels which are associated with this task.",
"type": "array",
"items": {
"$ref": "#/definitions/models.Label"
}
},
"listID": {
"description": "The list this task belongs to.",
"type": "integer"
},
2019-09-21 12:52:10 +02:00
"percentDone": {
"description": "Determines how far a task is left from being done",
"type": "number"
},
"priority": {
"description": "The task priority. Can be anything you want, it is possible to sort by this later.",
"type": "integer"
},
2019-09-25 20:44:41 +02:00
"related_tasks": {
"description": "All related tasks, grouped by their relation kind",
"type": "object",
"$ref": "#/definitions/models.RelatedTaskMap"
},
"reminderDates": {
"description": "An array of unix timestamps when the user wants to be reminded of the task.",
"type": "array",
"items": {
"type": "integer"
}
},
"repeatAfter": {
"description": "An amount in seconds this task repeats itself. If this is set, when marking the task as done, it will mark itself as \"undone\" and then increase all remindes and the due date by its amount.",
"type": "integer"
},
"startDate": {
"description": "When this task starts.",
"type": "integer"
},
"text": {
"description": "The task text. This is what you'll see in the list.",
"type": "string",
"maxLength": 250,
"minLength": 3
},
"updated": {
"description": "A unix timestamp when this task was last updated. You cannot change this value.",
"type": "integer"
}
}
},
"models.TaskAssginee": {
"type": "object",
"properties": {
"created": {
"type": "integer"
},
"user_id": {
"type": "integer"
}
}
},
2019-10-16 22:52:29 +02:00
"models.TaskAttachment": {
"type": "object",
"properties": {
"created": {
"type": "integer"
},
"created_by": {
"type": "object",
"$ref": "#/definitions/models.User"
},
"file": {
"type": "object",
"$ref": "#/definitions/files.File"
},
"id": {
"type": "integer"
},
"task_id": {
"type": "integer"
}
}
},
2019-09-25 20:44:41 +02:00
"models.TaskRelation": {
"type": "object",
"properties": {
"created": {
"description": "A unix timestamp when this label was created. You cannot change this value.",
"type": "integer"
},
"created_by": {
"description": "The user who created this relation",
"type": "object",
"$ref": "#/definitions/models.User"
},
"other_task_id": {
"description": "The ID of the other task, the task which is being related.",
"type": "integer"
},
"relation_kind": {
"description": "The kind of the relation.",
"type": "string"
},
"task_id": {
"description": "The ID of the \"base\" task, the task which has a relation to another.",
"type": "integer"
}
}
},
"models.Team": {
"type": "object",
"properties": {
"created": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this relation was created. You cannot change this value.",
"type": "integer"
},
"createdBy": {
2019-01-03 23:22:06 +01:00
"description": "The user who created this team.",
"type": "object",
"$ref": "#/definitions/models.User"
},
"description": {
2019-01-03 23:22:06 +01:00
"description": "The team's description.",
"type": "string"
},
"id": {
2019-01-03 23:22:06 +01:00
"description": "The unique, numeric id of this team.",
"type": "integer"
},
"members": {
2019-01-03 23:22:06 +01:00
"description": "An array of all members in this team.",
"type": "array",
"items": {
"$ref": "#/definitions/models.TeamUser"
}
},
"name": {
2019-01-03 23:22:06 +01:00
"description": "The name of this team.",
"type": "string",
"maxLength": 250,
"minLength": 5
},
"updated": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this relation was last updated. You cannot change this value.",
"type": "integer"
}
}
},
"models.TeamList": {
"type": "object",
"properties": {
"created": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this relation was created. You cannot change this value.",
"type": "integer"
},
"id": {
2019-01-03 23:22:06 +01:00
"description": "The unique, numeric id of this list \u003c-\u003e team relation.",
"type": "integer"
},
"right": {
2019-01-03 23:22:06 +01:00
"description": "The right this team has. 0 = Read only, 1 = Read \u0026 Write, 2 = Admin. See the docs for more details.",
"type": "integer",
"default": 0,
"maximum": 2
},
"teamID": {
2019-01-03 23:22:06 +01:00
"description": "The team id.",
"type": "integer"
},
"updated": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this relation was last updated. You cannot change this value.",
"type": "integer"
}
}
},
"models.TeamMember": {
"type": "object",
"properties": {
"admin": {
2019-01-03 23:22:06 +01:00
"description": "Whether or not the member is an admin of the team. See the docs for more about what a team admin can do",
"type": "boolean"
},
"created": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this relation was created. You cannot change this value.",
"type": "integer"
},
"id": {
2019-01-03 23:22:06 +01:00
"description": "The unique, numeric id of this team member relation.",
"type": "integer"
},
"username": {
"description": "The username of the member. We use this to prevent automated user id entering.",
"type": "string"
}
}
},
"models.TeamNamespace": {
"type": "object",
"properties": {
"created": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this relation was created. You cannot change this value.",
"type": "integer"
},
"id": {
2019-01-03 23:22:06 +01:00
"description": "The unique, numeric id of this namespace \u003c-\u003e team relation.",
"type": "integer"
},
"right": {
2019-01-03 23:22:06 +01:00
"description": "The right this team has. 0 = Read only, 1 = Read \u0026 Write, 2 = Admin. See the docs for more details.",
"type": "integer",
"default": 0,
"maximum": 2
},
"teamID": {
2019-01-03 23:22:06 +01:00
"description": "The team id.",
"type": "integer"
2019-01-08 20:13:07 +01:00
},
"updated": {
"description": "A unix timestamp when this relation was last updated. You cannot change this value.",
"type": "integer"
}
}
},
"models.TeamUser": {
"type": "object",
"properties": {
"admin": {
2019-01-03 23:22:06 +01:00
"description": "Whether or not the member is an admin of the team. See the docs for more about what a team admin can do",
"type": "boolean"
},
"avatarUrl": {
"description": "The users md5-hashed email address, used to get the avatar from gravatar and the likes.",
"type": "string"
},
2018-11-21 16:03:47 +01:00
"created": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this task was created. You cannot change this value.",
2018-11-21 16:03:47 +01:00
"type": "integer"
},
"email": {
"description": "The user's email address.",
2019-01-03 23:22:06 +01:00
"type": "string",
"maxLength": 250
},
"id": {
2019-01-03 23:22:06 +01:00
"description": "The unique, numeric id of this user.",
"type": "integer"
},
2018-11-21 16:03:47 +01:00
"updated": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this task was last updated. You cannot change this value.",
2018-11-21 16:03:47 +01:00
"type": "integer"
},
"username": {
"description": "The username of the user. Is always unique.",
2019-01-03 23:22:06 +01:00
"type": "string",
"maxLength": 250,
"minLength": 3
}
}
},
"models.TeamWithRight": {
"type": "object",
"properties": {
"created": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this relation was created. You cannot change this value.",
"type": "integer"
},
"createdBy": {
2019-01-03 23:22:06 +01:00
"description": "The user who created this team.",
"type": "object",
"$ref": "#/definitions/models.User"
},
"description": {
2019-01-03 23:22:06 +01:00
"description": "The team's description.",
"type": "string"
},
"id": {
2019-01-03 23:22:06 +01:00
"description": "The unique, numeric id of this team.",
"type": "integer"
},
"members": {
2019-01-03 23:22:06 +01:00
"description": "An array of all members in this team.",
"type": "array",
"items": {
"$ref": "#/definitions/models.TeamUser"
}
},
"name": {
2019-01-03 23:22:06 +01:00
"description": "The name of this team.",
"type": "string",
"maxLength": 250,
"minLength": 5
},
"right": {
"type": "integer"
},
"updated": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this relation was last updated. You cannot change this value.",
"type": "integer"
}
}
},
"models.User": {
"type": "object",
"properties": {
"avatarUrl": {
"description": "The users md5-hashed email address, used to get the avatar from gravatar and the likes.",
"type": "string"
},
2018-11-21 16:03:47 +01:00
"created": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this task was created. You cannot change this value.",
2018-11-21 16:03:47 +01:00
"type": "integer"
},
"email": {
"description": "The user's email address.",
2019-01-03 23:22:06 +01:00
"type": "string",
"maxLength": 250
},
"id": {
2019-01-03 23:22:06 +01:00
"description": "The unique, numeric id of this user.",
"type": "integer"
},
2018-11-21 16:03:47 +01:00
"updated": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this task was last updated. You cannot change this value.",
2018-11-21 16:03:47 +01:00
"type": "integer"
},
"username": {
"description": "The username of the user. Is always unique.",
2019-01-03 23:22:06 +01:00
"type": "string",
"maxLength": 250,
"minLength": 3
}
}
},
"models.UserLogin": {
"type": "object",
"properties": {
"password": {
2019-01-03 23:22:06 +01:00
"description": "The password for the user.",
"type": "string"
},
"username": {
2019-01-03 23:22:06 +01:00
"description": "The username used to log in.",
"type": "string"
}
}
},
"models.UserWithRight": {
"type": "object",
"properties": {
"avatarUrl": {
"description": "The users md5-hashed email address, used to get the avatar from gravatar and the likes.",
"type": "string"
},
2018-11-21 16:03:47 +01:00
"created": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this task was created. You cannot change this value.",
2018-11-21 16:03:47 +01:00
"type": "integer"
},
"email": {
"description": "The user's email address.",
2019-01-03 23:22:06 +01:00
"type": "string",
"maxLength": 250
},
"id": {
2019-01-03 23:22:06 +01:00
"description": "The unique, numeric id of this user.",
"type": "integer"
},
"right": {
"type": "integer"
},
2018-11-21 16:03:47 +01:00
"updated": {
2019-01-03 23:22:06 +01:00
"description": "A unix timestamp when this task was last updated. You cannot change this value.",
2018-11-21 16:03:47 +01:00
"type": "integer"
},
"username": {
"description": "The username of the user. Is always unique.",
2019-01-03 23:22:06 +01:00
"type": "string",
"maxLength": 250,
"minLength": 3
}
}
},
"v1.Token": {
"type": "object",
"properties": {
"token": {
"type": "string"
}
}
},
"v1.UserPassword": {
"type": "object",
"properties": {
"new_password": {
"type": "string"
},
"old_password": {
"type": "string"
}
}
2019-07-16 00:54:38 +02:00
},
"v1.vikunjaInfos": {
"type": "object",
"properties": {
"frontend_url": {
"type": "string"
},
"link_sharing_enabled": {
"type": "boolean"
},
2019-10-16 22:52:29 +02:00
"max_file_size": {
2019-10-23 23:11:40 +02:00
"type": "string"
2019-10-16 22:52:29 +02:00
},
2019-07-16 00:54:38 +02:00
"motd": {
"type": "string"
},
"version": {
"type": "string"
}
}
}
},
"securityDefinitions": {
2019-01-03 23:22:06 +01:00
"BasicAuth": {
"type": "basic"
},
"JWTKeyAuth": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}`
type swaggerInfo struct {
Version string
Host string
BasePath string
2019-10-16 22:52:29 +02:00
Schemes []string
Title string
Description string
}
// SwaggerInfo holds exported Swagger Info so clients can modify it
2019-10-16 22:52:29 +02:00
var SwaggerInfo = swaggerInfo{
Version: "",
Host: "",
BasePath: "/api/v1",
Schemes: []string{},
Title: "Vikunja API",
2019-10-23 23:11:40 +02:00
Description: "# Pagination\nEvery endpoint capable of pagination will return two headers:\n* `x-pagination-total-pages`: The total number of available pages for this request\n* `x-pagination-result-count`: The number of items returned for this request.\n# Authorization\n**JWT-Auth:** Main authorization method, used for most of the requests. Needs `Authorization: Bearer <jwt-token>`-header to authenticate successfully.\n\n**BasicAuth:** Only used when requesting tasks via caldav.\n<!-- ReDoc-Inject: <security-definitions> -->",
2019-10-16 22:52:29 +02:00
}
type s struct{}
func (s *s) ReadDoc() string {
2019-10-16 22:52:29 +02:00
sInfo := SwaggerInfo
sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
t, err := template.New("swagger_info").Funcs(template.FuncMap{
"marshal": func(v interface{}) string {
a, _ := json.Marshal(v)
return string(a)
},
}).Parse(doc)
if err != nil {
return doc
}
var tpl bytes.Buffer
2019-10-16 22:52:29 +02:00
if err := t.Execute(&tpl, sInfo); err != nil {
return doc
}
return tpl.String()
}
func init() {
swag.Register(swag.Name, &s{})
}