4581 lines
169 KiB
Go
4581 lines
169 KiB
Go
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
|
// This file was generated by swaggo/swag at
|
|
// 2019-01-10 00:01:27.123040428 +0100 CET m=+0.110268080
|
|
|
|
package docs
|
|
|
|
import (
|
|
"bytes"
|
|
|
|
"github.com/alecthomas/template"
|
|
"github.com/swaggo/swag"
|
|
)
|
|
|
|
var doc = `{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "This is the documentation for the [Vikunja](http://vikunja.io) API. Vikunja is a cross-plattform Todo-application with a lot of features, such as sharing lists with users or teams. \u003c!-- ReDoc-Inject: \u003csecurity-definitions\u003e --\u003e\n# Authorization\n**JWT-Auth:** Main authorization method, used for most of the requests. Needs ` + "`" + `Authorization: Bearer \u003cjwt-token\u003e` + "`" + `-header to authenticate successfully.\n\n**BasicAuth:** Only used when requesting tasks via caldav.\n\u003c!-- ReDoc-Inject: \u003csecurity-definitions\u003e --\u003e",
|
|
"title": "Vikunja API",
|
|
"contact": {
|
|
"name": "General Vikunja contact",
|
|
"url": "http://vikunja.io/en/contact/",
|
|
"email": "hello@vikunja.io"
|
|
},
|
|
"license": {
|
|
"name": "GPLv3",
|
|
"url": "http://code.vikunja.io/api/src/branch/master/LICENSE"
|
|
},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "/api/v1",
|
|
"paths": {
|
|
"/labels": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Returns all labels which are either created by the user or associated with a task the user has at least read-access to.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"labels"
|
|
],
|
|
"summary": "Get all labels 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.",
|
|
"name": "p",
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Label"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid label object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/labels/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Label"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the label",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Label not found",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Label"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid label object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not allowed to update the label.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Label not found.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Label"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not allowed to delete the label.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Label not found.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/lists": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"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.",
|
|
"name": "p",
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/lists/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Returns a list by its ID.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"list"
|
|
],
|
|
"summary": "Gets one list",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "List ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The list",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.List"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the list",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"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",
|
|
"$ref": "#/definitions/models.ListTask"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The created task object.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.ListTask"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid task object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the list",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.List"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid list object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the list",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid list object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the list",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/lists/{id}/teams": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"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.",
|
|
"name": "p",
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.TeamList"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid team list object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the list",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "The team does not exist.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/lists/{id}/users": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"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.",
|
|
"name": "p",
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.ListUser"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid user list object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the list",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "The user does not exist.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/lists/{listID}/teams/{teamID}": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.TeamList"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have admin-access to the list",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Team or list does not exist.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the list",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Team or list does not exist.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/lists/{listID}/users/{userID}": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.ListUser"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have admin-access to the list",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "User or list does not exist.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the list",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "user or list does not exist.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/v1.Token"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid user password model.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Invalid username or password.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/namespace/{id}": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Namespace"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid namespace object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the namespace",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/namespaces": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"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.",
|
|
"name": "p",
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Namespace"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid namespace object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the namespace",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/namespaces/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Namespace"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to that namespace.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid namespace object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the namespace",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/namespaces/{id}/lists": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "The namespace does not exist.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/namespaces/{id}/teams": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"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.",
|
|
"name": "p",
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.TeamNamespace"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid team namespace object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The team does not have access to the namespace",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "The team does not exist.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/namespaces/{id}/users": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"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.",
|
|
"name": "p",
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.NamespaceUser"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid user namespace object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the namespace",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "The user does not exist.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/namespaces/{namespaceID}/lists": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.List"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid list object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the list",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/namespaces/{namespaceID}/teams/{teamID}": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.TeamNamespace"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The team does not have admin-access to the namespace",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Team or namespace does not exist.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The team does not have access to the namespace",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "team or namespace does not exist.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/namespaces/{namespaceID}/users/{userID}": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.NamespaceUser"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have admin-access to the namespace",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "User or namespace does not exist.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the namespace",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "user or namespace does not exist.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.User"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "No or invalid user register object provided / User already exists.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tasks/all": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Returns all tasks on any list the user has access to.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"task"
|
|
],
|
|
"summary": "Get tasks",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
|
|
"name": "p",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Search tasks by task text.",
|
|
"name": "s",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The tasks",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.List"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tasks/all/{sortby}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Returns all tasks on any list the user has access to.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"task"
|
|
],
|
|
"summary": "Get tasks sorted",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
|
|
"name": "p",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Search tasks by task text.",
|
|
"name": "s",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "The sorting parameter. Possible values to sort by are priority, prioritydesc, priorityasc, dueadate, dueadatedesc, dueadateasc.",
|
|
"name": "sortby",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The tasks",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.List"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tasks/all/{sortby}/{startdate}/{enddate}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Returns all tasks on any list the user has access to.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"task"
|
|
],
|
|
"summary": "Get tasks sorted and within a date range",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
|
|
"name": "p",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Search tasks by task text.",
|
|
"name": "s",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "The sorting parameter. Possible values to sort by are priority, prioritydesc, priorityasc, dueadate, dueadatedesc, dueadateasc.",
|
|
"name": "sortby",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "The start date parameter. Expects a unix timestamp.",
|
|
"name": "startdate",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "The end date parameter. Expects a unix timestamp.",
|
|
"name": "enddate",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The tasks",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/models.List"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tasks/bulk": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.ListTask"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid task object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the task (aka its list)",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tasks/caldav": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BasicAuth": []
|
|
}
|
|
],
|
|
"description": "Returns a calDAV-parsable format with all tasks as calendar events. Only returns tasks with a due date. Also creates reminders when the task has one.",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"task"
|
|
],
|
|
"summary": "CalDAV-readable format with all tasks as calendar events.",
|
|
"responses": {
|
|
"200": {
|
|
"description": "The caldav events.",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Unauthorized.",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tasks/{id}": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"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",
|
|
"$ref": "#/definitions/models.ListTask"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The updated task object.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.ListTask"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid task object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the task (aka its list)",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid task ID provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the list",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tasks/{taskID}/assignees": {
|
|
"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",
|
|
"$ref": "#/definitions/models.ListTaskAssginee"
|
|
}
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Task ID",
|
|
"name": "taskID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The created assingee object.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.ListTaskAssginee"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid assignee object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tasks/{taskID}/assignees/bulk": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"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.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"assignees"
|
|
],
|
|
"summary": "Add multiple new assignees to a task",
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.ListTaskAssginee"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid assignee object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not allowed to delete the assignee.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tasks/{taskID}/labels/bulk": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Adds multiple new labels to a task.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"labels"
|
|
],
|
|
"summary": "Add multiple new labels to a task",
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.LabelTaskBulk"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid label object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tasks/{task}/labels": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"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.",
|
|
"name": "p",
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"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",
|
|
"$ref": "#/definitions/models.Label"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The created label relation object.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Label"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid label object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not allowed to add the label.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "The label does not exist.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tasks/{task}/labels/{label}": {
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"JWTKeyAuth": []
|
|
}
|
|
],
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Label"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not allowed to remove the label.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Label not found.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/teams": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"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.",
|
|
"name": "p",
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Team"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid team object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/teams/{id}": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Team"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid team object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid team object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.Message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/teams/{id}/members": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"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": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/models.TeamMember"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid member object provided.",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The user does not have access to the team",
|
|
"schema": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
|
}
|
|
},
|
|
"500": {
|
|