Generated go sdk for the vikunja api
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

4700 lines
132 KiB

---
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. <!-- ReDoc-Inject: <security-definitions>\
\ -->\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> -->"
version: "0.8+21-854fde1e4c"
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"
host: ""
basePath: "/api/v1"
paths:
/info:
get:
tags:
- "service"
summary: "Info"
description: "Returns the version, frontendurl, motd and various settings of\
\ Vikunja"
produces:
- "application/json"
parameters: []
responses:
200:
description: "OK"
schema:
$ref: "#/definitions/v1.vikunjaInfos"
/labels:
get:
tags:
- "labels"
summary: "Get all labels a user has access to"
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"
parameters:
- name: "p"
in: "query"
description: "The page number. Used for pagination. If not provided, the first\
\ page of results is returned."
required: false
type: "integer"
x-exportParamName: "P"
- name: "s"
in: "query"
description: "Search labels by label text."
required: false
type: "string"
x-exportParamName: "S"
responses:
200:
description: "The labels"
schema:
type: "array"
items:
$ref: "#/definitions/models.Label"
500:
description: "Internal error"
schema:
$ref: "#/definitions/models.Message"
security:
- JWTKeyAuth: []
put:
tags:
- "labels"
summary: "Create a label"
description: "Creates a new label."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "label"
description: "The label object"
required: true
schema:
$ref: "#/definitions/models.Label"
x-exportParamName: "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"
security:
- JWTKeyAuth: []
/labels/{id}:
get:
tags:
- "labels"
summary: "Gets one label"
description: "Returns one label by its ID."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Label ID"
required: true
type: "integer"
x-exportParamName: "Id"
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"
security:
- JWTKeyAuth: []
put:
tags:
- "labels"
summary: "Update a label"
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"
parameters:
- name: "id"
in: "path"
description: "Label ID"
required: true
type: "integer"
x-exportParamName: "Id"
- in: "body"
name: "label"
description: "The label object"
required: true
schema:
$ref: "#/definitions/models.Label"
x-exportParamName: "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"
security:
- JWTKeyAuth: []
delete:
tags:
- "labels"
summary: "Delete a label"
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"
parameters:
- name: "id"
in: "path"
description: "Label ID"
required: true
type: "integer"
x-exportParamName: "Id"
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"
security:
- JWTKeyAuth: []
/lists:
get:
tags:
- "list"
summary: "Get all lists a user has access to"
description: "Returns all lists a user has access to."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "p"
in: "query"
description: "The page number. Used for pagination. If not provided, the first\
\ page of results is returned."
required: false
type: "integer"
x-exportParamName: "P"
- name: "s"
in: "query"
description: "Search lists by title."
required: false
type: "string"
x-exportParamName: "S"
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"
security:
- JWTKeyAuth: []
/lists/{id}:
get:
tags:
- "list"
summary: "Gets one list"
description: "Returns a list by its ID."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "Id"
responses:
200:
description: "The list"
schema:
$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"
security:
- JWTKeyAuth: []
post:
tags:
- "list"
summary: "Updates a list"
description: "Updates a list. This does not include adding a task (see below)."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "Id"
- in: "body"
name: "list"
description: "The list with updated values you want to update."
required: true
schema:
$ref: "#/definitions/models.List"
x-exportParamName: "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"
security:
- JWTKeyAuth: []
put:
tags:
- "task"
summary: "Create a task"
description: "Inserts a task into a list."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "Id"
- in: "body"
name: "task"
description: "The task object"
required: true
schema:
$ref: "#/definitions/models.Task"
x-exportParamName: "Task"
responses:
200:
description: "The created task object."
schema:
$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"
security:
- JWTKeyAuth: []
delete:
tags:
- "list"
summary: "Deletes a list"
description: "Delets a list"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "Id"
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"
security:
- JWTKeyAuth: []
/lists/{id}/listusers:
get:
tags:
- "list"
summary: "Get users"
description: "Lists all users (without emailadresses). Also possible to search\
\ for a specific user."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "s"
in: "query"
description: "Search for a user by its name."
required: false
type: "string"
x-exportParamName: "S"
- name: "id"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "Id"
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"
security:
- JWTKeyAuth: []
/lists/{id}/teams:
get:
tags:
- "sharing"
summary: "Get teams on a list"
description: "Returns a list with all teams which have access on a given list."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "Id"
- name: "p"
in: "query"
description: "The page number. Used for pagination. If not provided, the first\
\ page of results is returned."
required: false
type: "integer"
x-exportParamName: "P"
- name: "s"
in: "query"
description: "Search teams by its name."
required: false
type: "string"
x-exportParamName: "S"
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"
security:
- JWTKeyAuth: []
put:
tags:
- "sharing"
summary: "Add a team to a list"
description: "Gives a team access to a list."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "Id"
- in: "body"
name: "list"
description: "The team you want to add to the list."
required: true
schema:
$ref: "#/definitions/models.TeamList"
x-exportParamName: "List"
responses:
200:
description: "The created team<->list 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"
security:
- JWTKeyAuth: []
/lists/{id}/users:
get:
tags:
- "sharing"
summary: "Get users on a list"
description: "Returns a list with all users which have access on a given list."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "Id"
- name: "p"
in: "query"
description: "The page number. Used for pagination. If not provided, the first\
\ page of results is returned."
required: false
type: "integer"
x-exportParamName: "P"
- name: "s"
in: "query"
description: "Search users by its name."
required: false
type: "string"
x-exportParamName: "S"
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"
security:
- JWTKeyAuth: []
put:
tags:
- "sharing"
summary: "Add a user to a list"
description: "Gives a user access to a list."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "Id"
- in: "body"
name: "list"
description: "The user you want to add to the list."
required: true
schema:
$ref: "#/definitions/models.ListUser"
x-exportParamName: "List"
responses:
200:
description: "The created user<->list 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"
security:
- JWTKeyAuth: []
/lists/{listID}/teams/{teamID}:
post:
tags:
- "sharing"
summary: "Update a team <-> list relation"
description: "Update a team <-> list relation. Mostly used to update the right\
\ that team has."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "listID"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "ListID"
- name: "teamID"
in: "path"
description: "Team ID"
required: true
type: "integer"
x-exportParamName: "TeamID"
- in: "body"
name: "list"
description: "The team you want to update."
required: true
schema:
$ref: "#/definitions/models.TeamList"
x-exportParamName: "List"
responses:
200:
description: "The updated team <-> 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"
security:
- JWTKeyAuth: []
delete:
tags:
- "sharing"
summary: "Delete a team from a list"
description: "Delets a team from a list. The team won't have access to the list\
\ anymore."
produces:
- "application/json"
parameters:
- name: "listID"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "ListID"
- name: "teamID"
in: "path"
description: "Team ID"
required: true
type: "integer"
x-exportParamName: "TeamID"
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"
security:
- JWTKeyAuth: []
/lists/{listID}/users/{userID}:
post:
tags:
- "sharing"
summary: "Update a user <-> list relation"
description: "Update a user <-> list relation. Mostly used to update the right\
\ that user has."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "listID"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "ListID"
- name: "userID"
in: "path"
description: "User ID"
required: true
type: "integer"
x-exportParamName: "UserID"
- in: "body"
name: "list"
description: "The user you want to update."
required: true
schema:
$ref: "#/definitions/models.ListUser"
x-exportParamName: "List"
responses:
200:
description: "The updated user <-> 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"
security:
- JWTKeyAuth: []
delete:
tags:
- "sharing"
summary: "Delete a user from a list"
description: "Delets a user from a list. The user won't have access to the list\
\ anymore."
produces:
- "application/json"
parameters:
- name: "listID"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "ListID"
- name: "userID"
in: "path"
description: "User ID"
required: true
type: "integer"
x-exportParamName: "UserID"
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"
security:
- JWTKeyAuth: []
/lists/{list}/shares:
get:
tags:
- "sharing"
summary: "Get all link shares for a list"
description: "Returns all link shares which exist for a given list"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "list"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "List"
- name: "p"
in: "query"
description: "The page number. Used for pagination. If not provided, the first\
\ page of results is returned."
required: false
type: "integer"
x-exportParamName: "P"
- name: "s"
in: "query"
description: "Search shares by hash."
required: false
type: "string"
x-exportParamName: "S"
responses:
200:
description: "The share links"
schema:
type: "array"
items:
$ref: "#/definitions/models.LinkSharing"
500:
description: "Internal error"
schema:
$ref: "#/definitions/models.Message"
security:
- JWTKeyAuth: []
put:
tags:
- "sharing"
summary: "Share a list via link"
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"
parameters:
- name: "list"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "List"
- in: "body"
name: "label"
description: "The new link share object"
required: true
schema:
$ref: "#/definitions/models.LinkSharing"
x-exportParamName: "Label"
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"
security:
- JWTKeyAuth: []
/lists/{list}/shares/{share}:
get:
tags:
- "sharing"
summary: "Get one link shares for a list"
description: "Returns one link share by its ID."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "list"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "List"
- name: "share"
in: "path"
description: "Share ID"
required: true
type: "integer"
x-exportParamName: "Share"
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"
security:
- JWTKeyAuth: []
delete:
tags:
- "sharing"
summary: "Remove a link share"
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"
parameters:
- name: "list"
in: "path"
description: "List ID"
required: true
type: "integer"
x-exportParamName: "List"
- name: "share"
in: "path"
description: "Share Link ID"
required: true
type: "integer"
x-exportParamName: "Share"
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"
security:
- JWTKeyAuth: []
/login:
post:
tags:
- "user"
summary: "Login"
description: "Logs a user in. Returns a JWT-Token to authenticate further requests."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "credentials"
description: "The login credentials"
required: true
schema:
$ref: "#/definitions/models.UserLogin"
x-exportParamName: "Credentials"
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:
tags:
- "namespace"
summary: "Updates a namespace"
description: "Updates a namespace."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Namespace ID"
required: true
type: "integer"
x-exportParamName: "Id"
- in: "body"
name: "namespace"
description: "The namespace with updated values you want to update."
required: true
schema:
$ref: "#/definitions/models.Namespace"
x-exportParamName: "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"
security:
- JWTKeyAuth: []
/namespaces:
get:
tags:
- "namespace"
summary: "Get all namespaces a user has access to"
description: "Returns all namespaces a user has access to."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "p"
in: "query"
description: "The page number. Used for pagination. If not provided, the first\
\ page of results is returned."
required: false
type: "integer"
x-exportParamName: "P"
- name: "s"
in: "query"
description: "Search namespaces by name."
required: false
type: "string"
x-exportParamName: "S"
responses:
200:
description: "The Namespaces."
schema:
type: "array"
items:
$ref: "#/definitions/models.NamespaceWithLists"
500:
description: "Internal error"
schema:
$ref: "#/definitions/models.Message"
security:
- JWTKeyAuth: []
put:
tags:
- "namespace"
summary: "Creates a new namespace"
description: "Creates a new namespace."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "namespace"
description: "The namespace you want to create."
required: true
schema:
$ref: "#/definitions/models.Namespace"
x-exportParamName: "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"
security:
- JWTKeyAuth: []
/namespaces/{id}:
get:
tags:
- "namespace"
summary: "Gets one namespace"
description: "Returns a namespace by its ID."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Namespace ID"
required: true
type: "integer"
x-exportParamName: "Id"
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"
security:
- JWTKeyAuth: []
delete:
tags:
- "namespace"
summary: "Deletes a namespace"
description: "Delets a namespace"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Namespace ID"
required: true
type: "integer"
x-exportParamName: "Id"
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"
security:
- JWTKeyAuth: []
/namespaces/{id}/lists:
get:
tags:
- "namespace"
summary: "Get all lists in a namespace"
description: "Returns all lists inside of a namespace."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Namespace ID"
required: true
type: "integer"
x-exportParamName: "Id"
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"
security:
- JWTKeyAuth: []
/namespaces/{id}/teams:
get:
tags:
- "sharing"
summary: "Get teams on a namespace"
description: "Returns a namespace with all teams which have access on a given\
\ namespace."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Namespace ID"
required: true
type: "integer"
x-exportParamName: "Id"
- name: "p"
in: "query"
description: "The page number. Used for pagination. If not provided, the first\
\ page of results is returned."
required: false
type: "integer"
x-exportParamName: "P"
- name: "s"
in: "query"
description: "Search teams by its name."
required: false
type: "string"
x-exportParamName: "S"
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"
security:
- JWTKeyAuth: []
put:
tags:
- "sharing"
summary: "Add a team to a namespace"
description: "Gives a team access to a namespace."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Namespace ID"
required: true
type: "integer"
x-exportParamName: "Id"
- in: "body"
name: "namespace"
description: "The team you want to add to the namespace."
required: true
schema:
$ref: "#/definitions/models.TeamNamespace"
x-exportParamName: "Namespace"
responses:
200:
description: "The created team<->namespace 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"
security:
- JWTKeyAuth: []
/namespaces/{id}/users:
get:
tags:
- "sharing"
summary: "Get users on a namespace"
description: "Returns a namespace with all users which have access on a given\
\ namespace."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Namespace ID"
required: true
type: "integer"
x-exportParamName: "Id"
- name: "p"
in: "query"
description: "The page number. Used for pagination. If not provided, the first\
\ page of results is returned."
required: false
type: "integer"
x-exportParamName: "P"
- name: "s"
in: "query"
description: "Search users by its name."
required: false
type: "string"
x-exportParamName: "S"
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"
security:
- JWTKeyAuth: []
put:
tags:
- "sharing"
summary: "Add a user to a namespace"
description: "Gives a user access to a namespace."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Namespace ID"
required: true
type: "integer"
x-exportParamName: "Id"
- in: "body"
name: "namespace"
description: "The user you want to add to the namespace."
required: true
schema:
$ref: "#/definitions/models.NamespaceUser"
x-exportParamName: "Namespace"
responses:
200:
description: "The created user<->namespace 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"
security:
- JWTKeyAuth: []
/namespaces/{namespaceID}/lists:
put:
tags:
- "list"
summary: "Creates a new list"
description: "Creates a new list in a given namespace. The user needs write-access\
\ to the namespace."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "namespaceID"
in: "path"
description: "Namespace ID"
required: true
type: "integer"
x-exportParamName: "NamespaceID"
- in: "body"
name: "list"
description: "The list you want to create."
required: true
schema:
$ref: "#/definitions/models.List"
x-exportParamName: "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"
security:
- JWTKeyAuth: []
/namespaces/{namespaceID}/teams/{teamID}:
post:
tags:
- "sharing"
summary: "Update a team <-> namespace relation"
description: "Update a team <-> namespace relation. Mostly used to update the\
\ right that team has."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "namespaceID"
in: "path"
description: "Namespace ID"
required: true
type: "integer"
x-exportParamName: "NamespaceID"
- name: "teamID"
in: "path"
description: "Team ID"
required: true
type: "integer"
x-exportParamName: "TeamID"
- in: "body"
name: "namespace"
description: "The team you want to update."
required: true
schema:
$ref: "#/definitions/models.TeamNamespace"
x-exportParamName: "Namespace"
responses:
200:
description: "The updated team <-> 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"
security:
- JWTKeyAuth: []
delete:
tags:
- "sharing"
summary: "Delete a team from a namespace"
description: "Delets a team from a namespace. The team won't have access to\
\ the namespace anymore."
produces:
- "application/json"
parameters:
- name: "namespaceID"
in: "path"
description: "Namespace ID"
required: true
type: "integer"
x-exportParamName: "NamespaceID"
- name: "teamID"
in: "path"
description: "team ID"
required: true
type: "integer"
x-exportParamName: "TeamID"
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"
security:
- JWTKeyAuth: []
/namespaces/{namespaceID}/users/{userID}:
post:
tags:
- "sharing"
summary: "Update a user <-> namespace relation"
description: "Update a user <-> namespace relation. Mostly used to update the\
\ right that user has."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "namespaceID"
in: "path"
description: "Namespace ID"
required: true
type: "integer"
x-exportParamName: "NamespaceID"
- name: "userID"
in: "path"
description: "User ID"
required: true
type: "integer"
x-exportParamName: "UserID"
- in: "body"
name: "namespace"
description: "The user you want to update."
required: true
schema:
$ref: "#/definitions/models.NamespaceUser"
x-exportParamName: "Namespace"
responses:
200:
description: "The updated user <-> 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"
security:
- JWTKeyAuth: []
delete:
tags:
- "sharing"
summary: "Delete a user from a namespace"
description: "Delets a user from a namespace. The user won't have access to\
\ the namespace anymore."
produces:
- "application/json"
parameters:
- name: "namespaceID"
in: "path"
description: "Namespace ID"
required: true
type: "integer"
x-exportParamName: "NamespaceID"
- name: "userID"
in: "path"
description: "user ID"
required: true
type: "integer"
x-exportParamName: "UserID"
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"
security:
- JWTKeyAuth: []
/register:
post:
tags:
- "user"
summary: "Register"
description: "Creates a new user account."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "credentials"
description: "The user credentials"
required: true
schema:
$ref: "#/definitions/models.APIUserPassword"
x-exportParamName: "Credentials"
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:
tags:
- "sharing"
summary: "Get an auth token for a share"
description: "Get a jwt auth token for a shared list from a share hash."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "share"
in: "path"
description: "The share hash"
required: true
type: "string"
x-exportParamName: "Share"
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:
tags:
- "task"
summary: "Get tasks"
description: "Returns all tasks on any list the user has access to."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "p"
in: "query"
description: "The page number. Used for pagination. If not provided, the first\
\ page of results is returned."
required: false
type: "integer"
x-exportParamName: "P"
- name: "s"
in: "query"
description: "Search tasks by task text."
required: false
type: "string"
x-exportParamName: "S"
- name: "sort"
in: "query"
description: "The sorting parameter. Possible values to sort by are priority,\
\ prioritydesc, priorityasc, duedate, duedatedesc, duedateasc."
required: false
type: "string"
x-exportParamName: "Sort"
- name: "startdate"
in: "query"
description: "The start date parameter to filter by. Expects a unix timestamp.\
\ If no end date, but a start date is specified, the end date is set to\
\ the current time."
required: false
type: "integer"
x-exportParamName: "Startdate"
- name: "enddate"
in: "query"
description: "The end date parameter to filter by. Expects a unix timestamp.\
\ If no start date, but an end date is specified, the start date is set\
\ to the current time."
required: false
type: "integer"
x-exportParamName: "Enddate"
responses:
200:
description: "The tasks"
schema:
type: "array"
items:
$ref: "#/definitions/models.Task"
500:
description: "Internal error"
schema:
$ref: "#/definitions/models.Message"
security:
- JWTKeyAuth: []
/tasks/bulk:
post:
tags:
- "task"
summary: "Update a bunch of tasks at once"
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"
parameters:
- in: "body"
name: "task"
description: "The task object. Looks like a normal task, the only difference\
\ is it uses an array of list_ids to update."
required: true
schema:
$ref: "#/definitions/models.BulkTask"
x-exportParamName: "Task"
responses:
200:
description: "The updated task object."
schema:
$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"
security:
- JWTKeyAuth: []
/tasks/{id}:
post:
tags:
- "task"
summary: "Update a task"
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"
parameters:
- name: "id"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "Id"
- in: "body"
name: "task"
description: "The task object"
required: true
schema:
$ref: "#/definitions/models.Task"
x-exportParamName: "Task"
responses:
200:
description: "The updated task object."
schema:
$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"
security:
- JWTKeyAuth: []
delete:
tags:
- "task"
summary: "Delete a task"
description: "Deletes a task from a list. This does not mean \"mark it done\"\
."
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "Id"
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:
$ref: "#/definitions/models.Message"
security:
- JWTKeyAuth: []
/tasks/{id}/attachments:
get:
tags:
- "task"
summary: "Get all attachments for one task."
description: "Get all task attachments for one task."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "Id"
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"
security:
- JWTKeyAuth: []
put:
tags:
- "task"
summary: "Upload a task attachment"
description: "Upload a task attachment. You can pass multiple files with the\
\ files form param."
consumes:
- "multipart/form-data"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "Id"
- name: "files"
in: "formData"
description: "The file, as multipart form file. You can pass multiple."
required: true
type: "string"
x-exportParamName: "Files"
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"
security:
- JWTKeyAuth: []
/tasks/{id}/attachments/{attachmentID}:
get:
tags:
- "task"
summary: "Get one attachment."
description: "Get one attachment for download. **Returns json on error.**"
produces:
- "application/octet-stream"
parameters:
- name: "id"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "Id"
- name: "attachmentID"
in: "path"
description: "Attachment ID"
required: true
type: "integer"
x-exportParamName: "AttachmentID"
responses:
200:
description: "The attachment file."
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"
security:
- JWTKeyAuth: []
delete:
tags:
- "task"
summary: "Delete an attachment"
description: "Delete an attachment."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "Id"
- name: "attachmentID"
in: "path"
description: "Attachment ID"
required: true
type: "integer"
x-exportParamName: "AttachmentID"
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"
security:
- JWTKeyAuth: []
/tasks/{taskID}/assignees:
get:
tags:
- "assignees"
summary: "Get all assignees for a task"
description: "Returns an array with all assignees for this task."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "p"
in: "query"
description: "The page number. Used for pagination. If not provided, the first\
\ page of results is returned."
required: false
type: "integer"
x-exportParamName: "P"
- name: "s"
in: "query"
description: "Search assignees by their username."
required: false
type: "string"
x-exportParamName: "S"
- name: "taskID"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "TaskID"
responses:
200:
description: "The assignees"
schema:
type: "array"
items:
$ref: "#/definitions/models.User"
500:
description: "Internal error"
schema:
$ref: "#/definitions/models.Message"
security:
- JWTKeyAuth: []
put:
tags:
- "assignees"
summary: "Add a new assignee to a task"
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"
parameters:
- in: "body"
name: "assignee"
description: "The assingee object"
required: true
schema:
$ref: "#/definitions/models.TaskAssginee"
x-exportParamName: "Assignee"
- name: "taskID"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "TaskID"
responses:
200:
description: "The created assingee object."
schema:
$ref: "#/definitions/models.TaskAssginee"
400:
description: "Invalid assignee object provided."
schema:
$ref: "#/definitions/code.vikunja.io.web.HTTPError"
500:
description: "Internal error"
schema:
$ref: "#/definitions/models.Message"
security:
- JWTKeyAuth: []
/tasks/{taskID}/assignees/bulk:
post:
tags:
- "assignees"
summary: "Add multiple new assignees to a task"
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"
parameters:
- in: "body"
name: "assignee"
description: "The array of assignees"
required: true
schema:
$ref: "#/definitions/models.BulkAssignees"
x-exportParamName: "Assignee"
- name: "taskID"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "TaskID"
responses:
200:
description: "The created assingees object."
schema:
$ref: "#/definitions/models.TaskAssginee"
400:
description: "Invalid assignee object provided."
schema:
$ref: "#/definitions/code.vikunja.io.web.HTTPError"
500:
description: "Internal error"
schema:
$ref: "#/definitions/models.Message"
security:
- JWTKeyAuth: []
/tasks/{taskID}/assignees/{userID}:
delete:
tags:
- "assignees"
summary: "Delete an assignee"
description: "Un-assign a user from a task."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "taskID"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "TaskID"
- name: "userID"
in: "path"
description: "Assignee user ID"
required: true
type: "integer"
x-exportParamName: "UserID"
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"
security:
- JWTKeyAuth: []
/tasks/{taskID}/labels/bulk:
post:
tags:
- "labels"
summary: "Update all labels on a task."
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."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "label"
description: "The array of labels"
required: true
schema:
$ref: "#/definitions/models.LabelTaskBulk"
x-exportParamName: "Label"
- name: "taskID"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "TaskID"
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"
security:
- JWTKeyAuth: []
/tasks/{taskID}/relations:
put:
tags:
- "task"
summary: "Create a new relation between two tasks"
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."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "relation"
description: "The relation object"
required: true
schema:
$ref: "#/definitions/models.TaskRelation"
x-exportParamName: "Relation"
- name: "taskID"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "TaskID"
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"
security:
- JWTKeyAuth: []
delete:
tags:
- "task"
summary: "Remove a task relation"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "relation"
description: "The relation object"
required: true
schema:
$ref: "#/definitions/models.TaskRelation"
x-exportParamName: "Relation"
- name: "taskID"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "TaskID"
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"
security:
- JWTKeyAuth: []
/tasks/{task}/labels:
get:
tags:
- "labels"
summary: "Get all labels on a task"
description: "Returns all labels which are assicociated with a given task."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "task"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "Task"
- name: "p"
in: "query"
description: "The page number. Used for pagination. If not provided, the first\
\ page of results is returned."
required: false
type: "integer"
x-exportParamName: "P"
- name: "s"
in: "query"
description: "Search labels by label text."
required: false
type: "string"
x-exportParamName: "S"
responses:
200:
description: "The labels"
schema:
type: "array"
items:
$ref: "#/definitions/models.Label"
500:
description: "Internal error"
schema:
$ref: "#/definitions/models.Message"
security:
- JWTKeyAuth: []
put:
tags:
- "labels"
summary: "Add a label to a task"
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"
parameters:
- name: "task"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "Task"
- in: "body"
name: "label"
description: "The label object"
required: true
schema:
$ref: "#/definitions/models.LabelTask"
x-exportParamName: "Label"
responses:
200:
description: "The created label relation object."
schema:
$ref: "#/definitions/models.LabelTask"
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"
security:
- JWTKeyAuth: []
/tasks/{task}/labels/{label}:
delete:
tags:
- "labels"
summary: "Remove a label from a task"
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"
parameters:
- name: "task"
in: "path"
description: "Task ID"
required: true
type: "integer"
x-exportParamName: "Task"
- name: "label"
in: "path"
description: "Label ID"
required: true
type: "integer"
x-exportParamName: "Label"
responses:
200:
description: "The label was successfully removed."
schema:
$ref: "#/definitions/models.Message"
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"
security:
- JWTKeyAuth: []
/teams:
get:
tags:
- "team"
summary: "Get teams"
description: "Returns all teams the current user is part of."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "p"
in: "query"
description: "The page number. Used for pagination. If not provided, the first\
\ page of results is returned."
required: false
type: "integer"
x-exportParamName: "P"
- name: "s"
in: "query"
description: "Search teams by its name."
required: false
type: "string"
x-exportParamName: "S"
responses:
200:
description: "The teams."
schema:
type: "array"
items:
$ref: "#/definitions/models.Team"
500:
description: "Internal error"
schema:
$ref: "#/definitions/models.Message"
security:
- JWTKeyAuth: []
put:
tags:
- "team"
summary: "Creates a new team"
description: "Creates a new team in a given namespace. The user needs write-access\
\ to the namespace."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "team"
description: "The team you want to create."
required: true
schema:
$ref: "#/definitions/models.Team"
x-exportParamName: "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"
security:
- JWTKeyAuth: []
/teams/{id}:
post:
tags:
- "team"
summary: "Updates a team"
description: "Updates a team."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Team ID"
required: true
type: "integer"
x-exportParamName: "Id"
- in: "body"
name: "team"
description: "The team with updated values you want to update."
required: true
schema:
$ref: "#/definitions/models.Team"
x-exportParamName: "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"
security:
- JWTKeyAuth: []
delete:
tags:
- "team"
summary: "Deletes a team"
description: "Delets a team. This will also remove the access for all users\
\ in that team."
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Team ID"
required: true
type: "integer"
x-exportParamName: "Id"
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"
security:
- JWTKeyAuth: []
/teams/{id}/members:
put:
tags:
- "team"
summary: "Add a user to a team"
description: "Add a user to a team."
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Team ID"
required: true
type: "integer"
x-exportParamName: "Id"
- in: "body"
name: "team"
description: "The user to be added to a team."
required: true
schema:
$ref: "#/definitions/models.TeamMember"
x-exportParamName: "Team"
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"
security:
- JWTKeyAuth: []
/teams/{id}/members/{userID}:
delete:
tags:
- "team"
summary: "Remove a user from a team"
description: "Remove a user from a team. This will also revoke any access this\
\ user might have via that team."
produces:
- "application/json"
parameters:
- name: "id"
in: "path"
description: "Team ID"
required: true
type: "integer"
x-exportParamName: "Id"
- name: "userID"
in: "path"
description: "User ID"
required: true
type: "integer"
x-exportParamName: "UserID"
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"
security:
- JWTKeyAuth: []
/user:
get:
tags:
- "user"
summary: "Get user information"
description: "Returns the current user object."
consumes:
- "application/json"
produces:
- "application/json"
parameters: []
responses:
200:
descrip