vikunja-api/pkg/swagger/swagger.yaml

3085 lines
86 KiB
YAML
Raw Normal View History

basePath: /api/v1
definitions:
models.APIUserPassword:
properties:
email:
2019-01-03 23:22:06 +01:00
description: The user's email address
maxLength: 250
type: string
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this user.
type: integer
password:
2019-01-03 23:22:06 +01:00
description: The user's password in clear text. Only used when registering
the user.
maxLength: 250
minLength: 8
type: string
username:
2019-01-03 23:22:06 +01:00
description: The username of the username. Is always unique.
maxLength: 250
minLength: 3
type: string
type: object
2019-01-08 20:13:07 +01:00
models.BulkAssignees:
properties:
assignees:
description: A list with all assignees
items:
$ref: '#/definitions/models.User'
type: array
type: object
2018-12-28 22:49:46 +01:00
models.BulkTask:
properties:
2018-12-29 15:29:50 +01:00
assignees:
2019-01-03 23:22:06 +01:00
description: An array of users who are assigned to this task
2018-12-29 15:29:50 +01:00
items:
$ref: '#/definitions/models.User'
type: array
2018-12-28 22:49:46 +01:00
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this task was created. You cannot change
this value.
2018-12-28 22:49:46 +01:00
type: integer
createdBy:
$ref: '#/definitions/models.User'
2019-01-03 23:22:06 +01:00
description: The user who initially created the task.
2018-12-28 22:49:46 +01:00
type: object
description:
2019-01-03 23:22:06 +01:00
description: The task description.
maxLength: 250
2018-12-28 22:49:46 +01:00
type: string
done:
description: Whether a task is done or not.
2018-12-28 22:49:46 +01:00
type: boolean
dueDate:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when the task is due.
2018-12-28 22:49:46 +01:00
type: integer
endDate:
2019-01-03 23:22:06 +01:00
description: When this task ends.
2018-12-28 22:49:46 +01:00
type: integer
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this task.
2018-12-28 22:49:46 +01:00
type: integer
2018-12-31 02:18:41 +01:00
labels:
2019-01-03 23:22:06 +01:00
description: An array of labels which are associated with this task.
2018-12-31 02:18:41 +01:00
items:
$ref: '#/definitions/models.Label'
type: array
listID:
description: The list this task belongs to.
type: integer
2018-12-28 22:49:46 +01:00
parentTaskID:
2019-01-03 23:22:06 +01:00
description: If the task is a subtask, this is the id of its parent.
2018-12-28 22:49:46 +01:00
type: integer
priority:
2019-01-03 23:22:06 +01:00
description: The task priority. Can be anything you want, it is possible to
sort by this later.
2018-12-28 22:49:46 +01:00
type: integer
reminderDates:
2019-01-03 23:22:06 +01:00
description: An array of unix timestamps when the user wants to be reminded
of the task.
2018-12-28 22:49:46 +01:00
items:
type: integer
type: array
repeatAfter:
2019-01-03 23:22:06 +01:00
description: An amount in seconds this task repeats itself. If this is set,
when marking the task as done, it will mark itself as "undone" and then
increase all remindes and the due date by its amount.
2018-12-28 22:49:46 +01:00
type: integer
startDate:
2019-01-03 23:22:06 +01:00
description: When this task starts.
2018-12-28 22:49:46 +01:00
type: integer
subtasks:
2019-01-03 23:22:06 +01:00
description: An array of subtasks.
2018-12-28 22:49:46 +01:00
items:
$ref: '#/definitions/models.ListTask'
type: array
task_ids:
2019-01-03 23:22:06 +01:00
description: A list of task ids to update
2018-12-28 22:49:46 +01:00
items:
type: integer
type: array
text:
2019-01-03 23:22:06 +01:00
description: The task text. This is what you'll see in the list.
maxLength: 250
minLength: 3
2018-12-28 22:49:46 +01:00
type: string
updated:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this task was last updated. You cannot
change this value.
2018-12-28 22:49:46 +01:00
type: integer
type: object
models.EmailConfirm:
properties:
token:
2019-01-03 23:22:06 +01:00
description: The email confirm token sent via email.
type: string
type: object
2018-12-31 02:18:41 +01:00
models.Label:
properties:
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this label was created. You cannot change
this value.
2018-12-31 02:18:41 +01:00
type: integer
created_by:
$ref: '#/definitions/models.User'
2019-01-03 23:22:06 +01:00
description: The user who created this label
2018-12-31 02:18:41 +01:00
type: object
description:
2019-01-03 23:22:06 +01:00
description: The label description.
maxLength: 250
2018-12-31 02:18:41 +01:00
type: string
hex_color:
2019-01-03 23:22:06 +01:00
description: The color this label has
maxLength: 6
2018-12-31 02:18:41 +01:00
type: string
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this label.
2018-12-31 02:18:41 +01:00
type: integer
title:
2019-01-03 23:22:06 +01:00
description: The title of the lable. You'll see this one on tasks associated
with it.
maxLength: 250
minLength: 3
2018-12-31 02:18:41 +01:00
type: string
updated:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this label was last updated. You cannot
change this value.
2018-12-31 02:18:41 +01:00
type: integer
type: object
2019-03-21 07:40:56 +01:00
models.LabelTask:
properties:
created:
description: A unix timestamp when this task was created. You cannot change
this value.
type: integer
label_id:
description: The label id you want to associate with a task.
type: integer
type: object
2019-01-10 00:08:12 +01:00
models.LabelTaskBulk:
properties:
labels:
description: All labels you want to update at once.
2019-01-10 00:08:12 +01:00
items:
$ref: '#/definitions/models.Label'
type: array
type: object
models.List:
properties:
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this list was created. You cannot change
this value.
type: integer
description:
2019-01-03 23:22:06 +01:00
description: The description of the list.
maxLength: 1000
type: string
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this list.
type: integer
owner:
$ref: '#/definitions/models.User'
2019-01-03 23:22:06 +01:00
description: The user who created this list.
type: object
tasks:
2019-01-03 23:22:06 +01:00
description: An array of tasks which belong to the list.
items:
$ref: '#/definitions/models.ListTask'
type: array
title:
2019-01-03 23:22:06 +01:00
description: The title of the list. You'll see this in the namespace overview.
maxLength: 250
minLength: 3
type: string
updated:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this list was last updated. You cannot
change this value.
type: integer
type: object
models.ListTask:
properties:
2018-12-29 15:29:50 +01:00
assignees:
2019-01-03 23:22:06 +01:00
description: An array of users who are assigned to this task
2018-12-29 15:29:50 +01:00
items:
$ref: '#/definitions/models.User'
type: array
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this task was created. You cannot change
this value.
type: integer
createdBy:
$ref: '#/definitions/models.User'
2019-01-03 23:22:06 +01:00
description: The user who initially created the task.
type: object
description:
2019-01-03 23:22:06 +01:00
description: The task description.
maxLength: 250
type: string
done:
description: Whether a task is done or not.
type: boolean
dueDate:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when the task is due.
type: integer
2018-12-22 16:45:16 +01:00
endDate:
2019-01-03 23:22:06 +01:00
description: When this task ends.
2018-12-22 16:45:16 +01:00
type: integer
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this task.
type: integer
2018-12-31 02:18:41 +01:00
labels:
2019-01-03 23:22:06 +01:00
description: An array of labels which are associated with this task.
2018-12-31 02:18:41 +01:00
items:
$ref: '#/definitions/models.Label'
type: array
listID:
description: The list this task belongs to.
type: integer
2018-12-01 03:00:57 +01:00
parentTaskID:
2019-01-03 23:22:06 +01:00
description: If the task is a subtask, this is the id of its parent.
2018-12-01 03:00:57 +01:00
type: integer
2018-12-02 01:49:30 +01:00
priority:
2019-01-03 23:22:06 +01:00
description: The task priority. Can be anything you want, it is possible to
sort by this later.
2018-12-02 01:49:30 +01:00
type: integer
2018-11-21 16:03:47 +01:00
reminderDates:
2019-01-03 23:22:06 +01:00
description: An array of unix timestamps when the user wants to be reminded
of the task.
2018-11-21 16:03:47 +01:00
items:
type: integer
type: array
2018-11-26 21:24:00 +01:00
repeatAfter:
2019-01-03 23:22:06 +01:00
description: An amount in seconds this task repeats itself. If this is set,
when marking the task as done, it will mark itself as "undone" and then
increase all remindes and the due date by its amount.
2018-11-26 21:24:00 +01:00
type: integer
2018-12-22 16:45:16 +01:00
startDate:
2019-01-03 23:22:06 +01:00
description: When this task starts.
2018-12-22 16:45:16 +01:00
type: integer
2018-12-01 03:00:57 +01:00
subtasks:
2019-01-03 23:22:06 +01:00
description: An array of subtasks.
2018-12-01 03:00:57 +01:00
items:
$ref: '#/definitions/models.ListTask'
type: array
text:
2019-01-03 23:22:06 +01:00
description: The task text. This is what you'll see in the list.
maxLength: 250
minLength: 3
type: string
updated:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this task was last updated. You cannot
change this value.
type: integer
type: object
2019-01-08 20:13:07 +01:00
models.ListTaskAssginee:
properties:
created:
type: integer
user_id:
type: integer
type: object
models.ListUser:
properties:
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this relation was created. You cannot change
this value.
type: integer
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this list <-> user relation.
type: integer
right:
2019-01-03 23:22:06 +01:00
default: 0
description: The right this user has. 0 = Read only, 1 = Read & Write, 2 =
Admin. See the docs for more details.
maximum: 2
type: integer
updated:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this relation was last updated. You cannot
change this value.
type: integer
userID:
2019-01-03 23:22:06 +01:00
description: The user id.
type: integer
type: object
models.Message:
properties:
message:
2019-01-03 23:22:06 +01:00
description: A standard message.
type: string
type: object
models.Namespace:
properties:
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this namespace was created. You cannot
change this value.
type: integer
description:
2019-01-03 23:22:06 +01:00
description: The description of the namespace
maxLength: 250
type: string
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this namespace.
type: integer
name:
2019-01-03 23:22:06 +01:00
description: The name of this namespace.
maxLength: 250
minLength: 5
type: string
owner:
$ref: '#/definitions/models.User'
2019-01-03 23:22:06 +01:00
description: The user who owns this namespace
type: object
updated:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this namespace was last updated. You cannot
change this value.
type: integer
type: object
models.NamespaceUser:
properties:
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this relation was created. You cannot change
this value.
type: integer
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this namespace <-> user relation.
type: integer
right:
2019-01-03 23:22:06 +01:00
default: 0
description: The right this user has. 0 = Read only, 1 = Read & Write, 2 =
Admin. See the docs for more details.
maximum: 2
type: integer
updated:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this relation was last updated. You cannot
change this value.
type: integer
userID:
2019-01-03 23:22:06 +01:00
description: The user id.
type: integer
type: object
models.NamespaceWithLists:
properties:
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this namespace was created. You cannot
change this value.
type: integer
description:
2019-01-03 23:22:06 +01:00
description: The description of the namespace
maxLength: 250
type: string
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this namespace.
type: integer
lists:
items:
$ref: '#/definitions/models.List'
type: array
name:
2019-01-03 23:22:06 +01:00
description: The name of this namespace.
maxLength: 250
minLength: 5
type: string
owner:
$ref: '#/definitions/models.User'
2019-01-03 23:22:06 +01:00
description: The user who owns this namespace
type: object
updated:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this namespace was last updated. You cannot
change this value.
type: integer
type: object
models.PasswordReset:
properties:
new_password:
2019-01-03 23:22:06 +01:00
description: The new password for this user.
type: string
token:
2019-01-03 23:22:06 +01:00
description: The previously issued reset token.
type: string
type: object
models.PasswordTokenRequest:
properties:
email:
2019-01-03 23:22:06 +01:00
maxLength: 250
type: string
type: object
models.Team:
properties:
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this relation was created. You cannot change
this value.
type: integer
createdBy:
$ref: '#/definitions/models.User'
2019-01-03 23:22:06 +01:00
description: The user who created this team.
type: object
description:
2019-01-03 23:22:06 +01:00
description: The team's description.
maxLength: 250
minLength: 0
type: string
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this team.
type: integer
members:
2019-01-03 23:22:06 +01:00
description: An array of all members in this team.
items:
$ref: '#/definitions/models.TeamUser'
type: array
name:
2019-01-03 23:22:06 +01:00
description: The name of this team.
maxLength: 250
minLength: 5
type: string
updated:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this relation was last updated. You cannot
change this value.
type: integer
type: object
models.TeamList:
properties:
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this relation was created. You cannot change
this value.
type: integer
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this list <-> team relation.
type: integer
right:
2019-01-03 23:22:06 +01:00
default: 0
description: The right this team has. 0 = Read only, 1 = Read & Write, 2 =
Admin. See the docs for more details.
maximum: 2
type: integer
teamID:
2019-01-03 23:22:06 +01:00
description: The team id.
type: integer
updated:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this relation was last updated. You cannot
change this value.
type: integer
type: object
models.TeamMember:
properties:
admin:
2019-01-03 23:22:06 +01:00
description: Whether or not the member is an admin of the team. See the docs
for more about what a team admin can do
type: boolean
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this relation was created. You cannot change
this value.
type: integer
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this team member relation.
type: integer
userID:
2019-01-03 23:22:06 +01:00
description: The id of the member.
type: integer
type: object
models.TeamNamespace:
properties:
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this relation was created. You cannot change
this value.
type: integer
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this namespace <-> team relation.
type: integer
right:
2019-01-03 23:22:06 +01:00
default: 0
description: The right this team has. 0 = Read only, 1 = Read & Write, 2 =
Admin. See the docs for more details.
maximum: 2
type: integer
teamID:
2019-01-03 23:22:06 +01:00
description: The team id.
type: integer
2019-01-08 20:13:07 +01:00
updated:
description: A unix timestamp when this relation was last updated. You cannot
change this value.
type: integer
type: object
models.TeamUser:
properties:
admin:
2019-01-03 23:22:06 +01:00
description: Whether or not the member is an admin of the team. See the docs
for more about what a team admin can do
type: boolean
2018-11-21 16:03:47 +01:00
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this task was created. You cannot change
this value.
2018-11-21 16:03:47 +01:00
type: integer
email:
description: The user's email address.
2019-01-03 23:22:06 +01:00
maxLength: 250
type: string
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this user.
type: integer
2018-11-21 16:03:47 +01:00
updated:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this task was last updated. You cannot
change this value.
2018-11-21 16:03:47 +01:00
type: integer
username:
description: The username of the user. Is always unique.
2019-01-03 23:22:06 +01:00
maxLength: 250
minLength: 3
type: string
type: object
models.TeamWithRight:
properties:
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this relation was created. You cannot change
this value.
type: integer
createdBy:
$ref: '#/definitions/models.User'
2019-01-03 23:22:06 +01:00
description: The user who created this team.
type: object
description:
2019-01-03 23:22:06 +01:00
description: The team's description.
maxLength: 250
minLength: 0
type: string
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this team.
type: integer
members:
2019-01-03 23:22:06 +01:00
description: An array of all members in this team.
items:
$ref: '#/definitions/models.TeamUser'
type: array
name:
2019-01-03 23:22:06 +01:00
description: The name of this team.
maxLength: 250
minLength: 5
type: string
right:
type: integer
updated:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this relation was last updated. You cannot
change this value.
type: integer
type: object
models.User:
properties:
2018-11-21 16:03:47 +01:00
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this task was created. You cannot change
this value.
2018-11-21 16:03:47 +01:00
type: integer
email:
description: The user's email address.
2019-01-03 23:22:06 +01:00
maxLength: 250
type: string
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this user.
type: integer
2018-11-21 16:03:47 +01:00
updated:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this task was last updated. You cannot
change this value.
2018-11-21 16:03:47 +01:00
type: integer
username:
description: The username of the user. Is always unique.
2019-01-03 23:22:06 +01:00
maxLength: 250
minLength: 3
type: string
type: object
models.UserLogin:
properties:
password:
2019-01-03 23:22:06 +01:00
description: The password for the user.
type: string
username:
2019-01-03 23:22:06 +01:00
description: The username used to log in.
type: string
type: object
models.UserWithRight:
properties:
2018-11-21 16:03:47 +01:00
created:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this task was created. You cannot change
this value.
2018-11-21 16:03:47 +01:00
type: integer
email:
description: The user's email address.
2019-01-03 23:22:06 +01:00
maxLength: 250
type: string
id:
2019-01-03 23:22:06 +01:00
description: The unique, numeric id of this user.
type: integer
right:
type: integer
2018-11-21 16:03:47 +01:00
updated:
2019-01-03 23:22:06 +01:00
description: A unix timestamp when this task was last updated. You cannot
change this value.
2018-11-21 16:03:47 +01:00
type: integer
username:
description: The username of the user. Is always unique.
2019-01-03 23:22:06 +01:00
maxLength: 250
minLength: 3
type: string
type: object
v1.Token:
properties:
token:
type: string
type: object
v1.UserPassword:
properties:
new_password:
type: string
old_password:
type: string
type: object
host: '{{.Host}}'
info:
2019-01-03 23:22:06 +01:00
contact:
email: hello@vikunja.io
name: General Vikunja contact
url: http://vikunja.io/en/contact/
description: '<!-- ReDoc-Inject: <security-definitions> -->'
license:
name: GPLv3
2019-01-03 23:22:06 +01:00
url: http://code.vikunja.io/api/src/branch/master/LICENSE
title: Vikunja API
version: '{{.Version}}'
paths:
2018-12-31 02:18:41 +01:00
/labels:
get:
consumes:
- application/json
description: Returns an array with all assignees for this task.
2018-12-31 02:18:41 +01:00
parameters:
- description: The page number. Used for pagination. If not provided, the first
page of results is returned.
in: query
name: p
type: integer
- description: Search assignees by their username.
2018-12-31 02:18:41 +01:00
in: query
name: s
type: string
produces:
- application/json
responses:
"200":
description: The assignees
2018-12-31 02:18:41 +01:00
schema:
items:
$ref: '#/definitions/models.User'
2018-12-31 02:18:41 +01:00
type: array
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Get all assignees for a task
2018-12-31 02:18:41 +01:00
tags:
- assignees
2018-12-31 02:18:41 +01:00
put:
consumes:
- application/json
description: Creates a new label.
parameters:
- description: The label object
in: body
name: label
required: true
schema:
$ref: '#/definitions/models.Label'
type: object
produces:
- application/json
responses:
"200":
description: The created label object.
schema:
$ref: '#/definitions/models.Label'
type: object
"400":
description: Invalid label object provided.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
2018-12-31 02:18:41 +01:00
summary: Create a label
tags:
- labels
/labels/{id}:
delete:
consumes:
- application/json
description: Delete an existing label. The user needs to be the creator of the
label to be able to do this.
parameters:
- description: Label ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The label was successfully deleted.
schema:
$ref: '#/definitions/models.Label'
type: object
"403":
description: Not allowed to delete the label.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: Label not found.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
2018-12-31 02:18:41 +01:00
summary: Delete a label
tags:
- labels
get:
consumes:
- application/json
description: Returns one label by its ID.
parameters:
- description: Label ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The label
schema:
$ref: '#/definitions/models.Label'
type: object
"403":
description: The user does not have access to the label
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: Label not found
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
2018-12-31 02:18:41 +01:00
summary: Gets one label
tags:
- labels
put:
consumes:
- application/json
description: Update an existing label. The user needs to be the creator of the
label to be able to do this.
parameters:
- description: Label ID
in: path
name: id
required: true
type: integer
- description: The label object
in: body
name: label
required: true
schema:
$ref: '#/definitions/models.Label'
type: object
produces:
- application/json
responses:
"200":
description: The created label object.
schema:
$ref: '#/definitions/models.Label'
type: object
"400":
description: Invalid label object provided.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: Not allowed to update the label.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: Label not found.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
2018-12-31 02:18:41 +01:00
summary: Update a label
tags:
- labels
/lists:
get:
consumes:
- application/json
description: Returns all lists a user has access to.
parameters:
- description: The page number. Used for pagination. If not provided, the first
page of results is returned.
in: query
name: p
type: integer
- description: Search lists by title.
in: query
name: s
type: string
produces:
- application/json
responses:
"200":
description: The lists
schema:
items:
$ref: '#/definitions/models.List'
type: array
"403":
description: The user does not have access to the list
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Get all lists a user has access to
tags:
- list
/lists/{id}:
delete:
description: Delets a list
parameters:
- description: List ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The list was successfully deleted.
schema:
$ref: '#/definitions/models.Message'
type: object
"400":
description: Invalid list object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: The user does not have access to the list
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Deletes a list
tags:
- list
get:
consumes:
- application/json
description: Returns a team by its ID.
parameters:
- description: Team ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The team
schema:
$ref: '#/definitions/models.Team'
type: object
"403":
description: The user does not have access to the team
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Gets one team
tags:
- team
post:
consumes:
- application/json
description: Updates a list. This does not include adding a task (see below).
parameters:
- description: List ID
in: path
name: id
required: true
type: integer
- description: The list with updated values you want to update.
in: body
name: list
required: true
schema:
$ref: '#/definitions/models.List'
type: object
produces:
- application/json
responses:
"200":
description: The updated list.
schema:
$ref: '#/definitions/models.List'
type: object
"400":
description: Invalid list object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: The user does not have access to the list
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Updates a list
tags:
- list
put:
consumes:
- application/json
description: Inserts a task into a list.
parameters:
- description: List ID
in: path
name: id
required: true
type: integer
- description: The task object
in: body
name: task
required: true
schema:
$ref: '#/definitions/models.ListTask'
type: object
produces:
- application/json
responses:
"200":
description: The created task object.
schema:
$ref: '#/definitions/models.ListTask'
type: object
"400":
description: Invalid task object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: The user does not have access to the list
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Create a task
tags:
- task
/lists/{id}/teams:
get:
consumes:
- application/json
description: Returns a list with all teams which have access on a given list.
parameters:
- description: List ID
in: path
name: id
required: true
type: integer
- description: The page number. Used for pagination. If not provided, the first
page of results is returned.
in: query
name: p
type: integer
- description: Search teams by its name.
in: query
name: s
type: string
produces:
- application/json
responses:
"200":
description: The teams with their right.
schema:
items:
$ref: '#/definitions/models.TeamWithRight'
type: array
"403":
description: No right to see the list.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Get teams on a list
tags:
- sharing
put:
consumes:
- application/json
description: Gives a team access to a list.
parameters:
- description: List ID
in: path
name: id
required: true
type: integer
- description: The team you want to add to the list.
in: body
name: list
required: true
schema:
$ref: '#/definitions/models.TeamList'
type: object
produces:
- application/json
responses:
"200":
description: The created team<->list relation.
schema:
$ref: '#/definitions/models.TeamList'
type: object
"400":
description: Invalid team list object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: The user does not have access to the list
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: The team does not exist.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Add a team to a list
tags:
- sharing
/lists/{id}/users:
get:
consumes:
- application/json
description: Returns a list with all users which have access on a given list.
parameters:
- description: List ID
in: path
name: id
required: true
type: integer
- description: The page number. Used for pagination. If not provided, the first
page of results is returned.
in: query
name: p
type: integer
- description: Search users by its name.
in: query
name: s
type: string
produces:
- application/json
responses:
"200":
description: The users with the right they have.
schema:
items:
$ref: '#/definitions/models.UserWithRight'
type: array
"403":
description: No right to see the list.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Get users on a list
tags:
- sharing
put:
consumes:
- application/json
description: Gives a user access to a list.
parameters:
- description: List ID
in: path
name: id
required: true
type: integer
- description: The user you want to add to the list.
in: body
name: list
required: true
schema:
$ref: '#/definitions/models.ListUser'
type: object
produces:
- application/json
responses:
"200":
description: The created user<->list relation.
schema:
$ref: '#/definitions/models.ListUser'
type: object
"400":
description: Invalid user list object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: The user does not have access to the list
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: The user does not exist.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Add a user to a list
tags:
- sharing
/lists/{listID}/teams/{teamID}:
delete:
description: Delets a team from a list. The team won't have access to the list
anymore.
parameters:
- description: List ID
in: path
name: listID
required: true
type: integer
- description: Team ID
in: path
name: teamID
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The team was successfully deleted.
schema:
$ref: '#/definitions/models.Message'
type: object
"403":
description: The user does not have access to the list
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: Team or list does not exist.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Delete a team from a list
tags:
- sharing
post:
consumes:
- application/json
description: Update a team <-> list relation. Mostly used to update the right
that team has.
parameters:
- description: List ID
in: path
name: listID
required: true
type: integer
- description: Team ID
in: path
name: teamID
required: true
type: integer
- description: The team you want to update.
in: body
name: list
required: true
schema:
$ref: '#/definitions/models.TeamList'
type: object
produces:
- application/json
responses:
"200":
description: The updated team <-> list relation.
schema:
$ref: '#/definitions/models.TeamList'
type: object
"403":
description: The user does not have admin-access to the list
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: Team or list does not exist.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Update a team <-> list relation
tags:
- sharing
/lists/{listID}/users/{userID}:
delete:
description: Delets a user from a list. The user won't have access to the list
anymore.
parameters:
- description: List ID
in: path
name: listID
required: true
type: integer
- description: User ID
in: path
name: userID
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The user was successfully removed from the list.
schema:
$ref: '#/definitions/models.Message'
type: object
"403":
description: The user does not have access to the list
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: user or list does not exist.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Delete a user from a list
tags:
- sharing
post:
consumes:
- application/json
description: Update a user <-> list relation. Mostly used to update the right
that user has.
parameters:
- description: List ID
in: path
name: listID
required: true
type: integer
- description: User ID
in: path
name: userID
required: true
type: integer
- description: The user you want to update.
in: body
name: list
required: true
schema:
$ref: '#/definitions/models.ListUser'
type: object
produces:
- application/json
responses:
"200":
description: The updated user <-> list relation.
schema:
$ref: '#/definitions/models.ListUser'
type: object
"403":
description: The user does not have admin-access to the list
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: User or list does not exist.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Update a user <-> list relation
tags:
- sharing
/login:
post:
consumes:
- application/json
description: Logs a user in. Returns a JWT-Token to authenticate further requests.
parameters:
- description: The login credentials
in: body
name: credentials
required: true
schema:
$ref: '#/definitions/models.UserLogin'
type: object
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/v1.Token'
type: object
"400":
description: Invalid user password model.
schema:
$ref: '#/definitions/models.Message'
type: object
"403":
description: Invalid username or password.
schema:
$ref: '#/definitions/models.Message'
type: object
summary: Login
tags:
- user
/namespace/{id}:
post:
consumes:
- application/json
description: Updates a namespace.
parameters:
- description: Namespace ID
in: path
name: id
required: true
type: integer
- description: The namespace with updated values you want to update.
in: body
name: namespace
required: true
schema:
$ref: '#/definitions/models.Namespace'
type: object
produces:
- application/json
responses:
"200":
description: The updated namespace.
schema:
$ref: '#/definitions/models.Namespace'
type: object
"400":
description: Invalid namespace object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: The user does not have access to the namespace
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Updates a namespace
tags:
- namespace
/namespaces:
get:
consumes:
- application/json
description: Returns all namespaces a user has access to.
parameters:
- description: The page number. Used for pagination. If not provided, the first
page of results is returned.
in: query
name: p
type: integer
- description: Search namespaces by name.
in: query
name: s
type: string
produces:
- application/json
responses:
"200":
description: The Namespaces.
schema:
items:
$ref: '#/definitions/models.NamespaceWithLists'
type: array
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Get all namespaces a user has access to
tags:
- namespace
put:
consumes:
- application/json
description: Creates a new namespace.
parameters:
- description: The namespace you want to create.
in: body
name: namespace
required: true
schema:
$ref: '#/definitions/models.Namespace'
type: object
produces:
- application/json
responses:
"200":
description: The created namespace.
schema:
$ref: '#/definitions/models.Namespace'
type: object
"400":
description: Invalid namespace object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: The user does not have access to the namespace
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Creates a new namespace
tags:
- namespace
/namespaces/{id}:
delete:
description: Delets a namespace
parameters:
- description: Namespace ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The namespace was successfully deleted.
schema:
$ref: '#/definitions/models.Message'
type: object
"400":
description: Invalid namespace object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: The user does not have access to the namespace
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Deletes a namespace
tags:
- namespace
get:
consumes:
- application/json
description: Returns a namespace by its ID.
parameters:
- description: Namespace ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The Namespace
schema:
$ref: '#/definitions/models.Namespace'
type: object
"403":
description: The user does not have access to that namespace.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Gets one namespace
tags:
- namespace
/namespaces/{id}/lists:
get:
consumes:
- application/json
description: Returns all lists inside of a namespace.
parameters:
- description: Namespace ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The lists.
schema:
items:
$ref: '#/definitions/models.List'
type: array
"403":
description: No access to that namespace.
schema:
$ref: '#/definitions/models.Message'
type: object
"404":
description: The namespace does not exist.
schema:
$ref: '#/definitions/models.Message'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Get all lists in a namespace
tags:
- namespace
/namespaces/{id}/teams:
get:
consumes:
- application/json
description: Returns a namespace with all teams which have access on a given
namespace.
parameters:
- description: Namespace ID
in: path
name: id
required: true
type: integer
- description: The page number. Used for pagination. If not provided, the first
page of results is returned.
in: query
name: p
type: integer
- description: Search teams by its name.
in: query
name: s
type: string
produces:
- application/json
responses:
"200":
description: The teams with the right they have.
schema:
items:
$ref: '#/definitions/models.TeamWithRight'
type: array
"403":
description: No right to see the namespace.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Get teams on a namespace
tags:
- sharing
put:
consumes:
- application/json
description: Gives a team access to a namespace.
parameters:
- description: Namespace ID
in: path
name: id
required: true
type: integer
- description: The team you want to add to the namespace.
in: body
name: namespace
required: true
schema:
$ref: '#/definitions/models.TeamNamespace'
type: object
produces:
- application/json
responses:
"200":
description: The created team<->namespace relation.
schema:
$ref: '#/definitions/models.TeamNamespace'
type: object
"400":
description: Invalid team namespace object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: The team does not have access to the namespace
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: The team does not exist.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Add a team to a namespace
tags:
- sharing
/namespaces/{id}/users:
get:
consumes:
- application/json
description: Returns a namespace with all users which have access on a given
namespace.
parameters:
- description: Namespace ID
in: path
name: id
required: true
type: integer
- description: The page number. Used for pagination. If not provided, the first
page of results is returned.
in: query
name: p
type: integer
- description: Search users by its name.
in: query
name: s
type: string
produces:
- application/json
responses:
"200":
description: The users with the right they have.
schema:
items:
$ref: '#/definitions/models.UserWithRight'
type: array
"403":
description: No right to see the namespace.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Get users on a namespace
tags:
- sharing
put:
consumes:
- application/json
description: Gives a user access to a namespace.
parameters:
- description: Namespace ID
in: path
name: id
required: true
type: integer
- description: The user you want to add to the namespace.
in: body
name: namespace
required: true
schema:
$ref: '#/definitions/models.NamespaceUser'
type: object
produces:
- application/json
responses:
"200":
description: The created user<->namespace relation.
schema:
$ref: '#/definitions/models.NamespaceUser'
type: object
"400":
description: Invalid user namespace object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: The user does not have access to the namespace
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: The user does not exist.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Add a user to a namespace
tags:
- sharing
/namespaces/{namespaceID}/lists:
put:
consumes:
- application/json
description: Creates a new list in a given namespace. The user needs write-access
to the namespace.
parameters:
- description: Namespace ID
in: path
name: namespaceID
required: true
type: integer
- description: The list you want to create.
in: body
name: list
required: true
schema:
$ref: '#/definitions/models.List'
type: object
produces:
- application/json
responses:
"200":
description: The created list.
schema:
$ref: '#/definitions/models.List'
type: object
"400":
description: Invalid list object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: The user does not have access to the list
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Creates a new list
tags:
- list
/namespaces/{namespaceID}/teams/{teamID}:
delete:
description: Delets a team from a namespace. The team won't have access to the
namespace anymore.
parameters:
- description: Namespace ID
in: path
name: namespaceID
required: true
type: integer
- description: team ID
in: path
name: teamID
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The team was successfully deleted.
schema:
$ref: '#/definitions/models.Message'
type: object
"403":
description: The team does not have access to the namespace
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: team or namespace does not exist.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Delete a team from a namespace
tags:
- sharing
post:
consumes:
- application/json
description: Update a team <-> namespace relation. Mostly used to update the
right that team has.
parameters:
- description: Namespace ID
in: path
name: namespaceID
required: true
type: integer
- description: Team ID
in: path
name: teamID
required: true
type: integer
- description: The team you want to update.
in: body
name: namespace
required: true
schema:
$ref: '#/definitions/models.TeamNamespace'
type: object
produces:
- application/json
responses:
"200":
description: The updated team <-> namespace relation.
schema:
$ref: '#/definitions/models.TeamNamespace'
type: object
"403":
description: The team does not have admin-access to the namespace
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: Team or namespace does not exist.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Update a team <-> namespace relation
tags:
- sharing
/namespaces/{namespaceID}/users/{userID}:
delete:
description: Delets a user from a namespace. The user won't have access to the
namespace anymore.
parameters:
- description: Namespace ID
in: path
name: namespaceID
required: true
type: integer
- description: user ID
in: path
name: userID
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The user was successfully deleted.
schema:
$ref: '#/definitions/models.Message'
type: object
"403":
description: The user does not have access to the namespace
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: user or namespace does not exist.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Delete a user from a namespace
tags:
- sharing
post:
consumes:
- application/json
description: Update a user <-> namespace relation. Mostly used to update the
right that user has.
parameters:
- description: Namespace ID
in: path
name: namespaceID
required: true
type: integer
- description: User ID
in: path
name: userID
required: true
type: integer
- description: The user you want to update.
in: body
name: namespace
required: true
schema:
$ref: '#/definitions/models.NamespaceUser'
type: object
produces:
- application/json
responses:
"200":
description: The updated user <-> namespace relation.
schema:
$ref: '#/definitions/models.NamespaceUser'
type: object
"403":
description: The user does not have admin-access to the namespace
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: User or namespace does not exist.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Update a user <-> namespace relation
tags:
- sharing
/register:
post:
consumes:
- application/json
description: Creates a new user account.
parameters:
- description: The user credentials
in: body
name: credentials
required: true
schema:
$ref: '#/definitions/models.APIUserPassword'
type: object
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.User'
type: object
"400":
description: No or invalid user register object provided / User already
exists.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
summary: Register
tags:
- user
/tasks/{id}:
delete:
description: Deletes a task from a list. This does not mean "mark it done".
parameters:
- description: Task ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The created task object.
schema:
$ref: '#/definitions/models.Message'
type: object
"400":
description: Invalid task ID provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: The user does not have access to the list
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Delete a task
tags:
- task
post:
consumes:
- application/json
2019-01-10 00:08:12 +01:00
description: Updates a task. This includes marking it as done. Assignees you
pass will be updated, see their individual endpoints for more details on how
this is done. To update labels, see the description of the endpoint.
parameters:
- description: Task ID
in: path
name: id
required: true
type: integer
- description: The task object
in: body
name: task
required: true
schema:
$ref: '#/definitions/models.ListTask'
type: object
produces:
- application/json
responses:
"200":
description: The updated task object.
schema:
$ref: '#/definitions/models.ListTask'
type: object
"400":
description: Invalid task object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: The user does not have access to the task (aka its list)
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Update a task
tags:
- task
2018-12-31 02:18:41 +01:00
/tasks/{task}/labels:
get:
consumes:
- application/json
description: Returns all labels which are assicociated with a given task.
parameters:
- description: Task ID
in: path
name: task
required: true
type: integer
- description: The page number. Used for pagination. If not provided, the first
page of results is returned.
in: query
name: p
type: integer
- description: Search labels by label text.
in: query
name: s
type: string
produces:
- application/json
responses:
"200":
description: The labels
schema:
items:
$ref: '#/definitions/models.Label'
type: array
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
2018-12-31 02:18:41 +01:00
summary: Get all labels on a task
tags:
- labels
put:
consumes:
- application/json
description: Add a label to a task. The user needs to have write-access to the
list to be able do this.
parameters:
- description: Task ID
in: path
name: task
required: true
type: integer
- description: The label object
in: body
name: label
required: true
schema:
2019-03-21 07:40:56 +01:00
$ref: '#/definitions/models.LabelTask'
2018-12-31 02:18:41 +01:00
type: object
produces:
- application/json
responses:
"200":
description: The created label relation object.
schema:
2019-03-21 07:40:56 +01:00
$ref: '#/definitions/models.LabelTask'
2018-12-31 02:18:41 +01:00
type: object
"400":
description: Invalid label object provided.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: Not allowed to add the label.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: The label does not exist.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
2018-12-31 02:18:41 +01:00
summary: Add a label to a task
tags:
- labels
/tasks/{task}/labels/{label}:
delete:
consumes:
- application/json
description: Remove a label from a task. The user needs to have write-access
to the list to be able do this.
parameters:
- description: Task ID
in: path
name: task
required: true
type: integer
- description: Label ID
in: path
name: label
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The label was successfully removed.
schema:
2019-03-21 07:40:56 +01:00
$ref: '#/definitions/models.Message'
2018-12-31 02:18:41 +01:00
type: object
"403":
description: Not allowed to remove the label.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: Label not found.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
2018-12-31 02:18:41 +01:00
summary: Remove a label from a task
tags:
- labels
2019-01-08 20:13:07 +01:00
/tasks/{taskID}/assignees:
put:
consumes:
- application/json
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.
parameters:
- description: The assingee object
in: body
name: assignee
required: true
schema:
$ref: '#/definitions/models.ListTaskAssginee'
type: object
- description: Task ID
in: path
name: taskID
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The created assingee object.
schema:
$ref: '#/definitions/models.ListTaskAssginee'
type: object
"400":
description: Invalid assignee object provided.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
- JWTKeyAuth: []
summary: Add a new assignee to a task
tags:
- assignees
/tasks/{taskID}/assignees/{userID}:
delete:
consumes:
- application/json
description: Un-assign a user from a task.
parameters:
- description: Task ID
in: path
name: taskID
required: true
type: integer
- description: Assignee user ID
in: path
name: userID
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The assignee was successfully deleted.
schema:
$ref: '#/definitions/models.Message'
type: object
"403":
description: Not allowed to delete the assignee.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
- JWTKeyAuth: []
summary: Delete an assignee
tags:
- assignees
/tasks/{taskID}/assignees/bulk:
2019-01-10 00:08:12 +01:00
post:
2019-01-08 20:13:07 +01:00
consumes:
- application/json
2019-01-10 00:08:12 +01:00
description: Adds multiple new assignees to a task. The assignee needs to have
access to the list, the doer must be able to edit this task. Every user not
in the list will be unassigned from the task, pass an empty array to unassign
everyone.
2019-01-08 20:13:07 +01:00
parameters:
- description: The array of assignees
in: body
name: assignee
required: true
schema:
$ref: '#/definitions/models.BulkAssignees'
type: object
- description: Task ID
in: path
name: taskID
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The created assingees object.
schema:
$ref: '#/definitions/models.ListTaskAssginee'
type: object
"400":
description: Invalid assignee object provided.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
- JWTKeyAuth: []
2019-01-10 00:08:12 +01:00
summary: Add multiple new assignees to a task
2019-01-08 20:13:07 +01:00
tags:
- assignees
2019-01-10 00:08:12 +01:00
/tasks/{taskID}/labels/bulk:
post:
consumes:
- application/json
description: Updates all labels on a task. Every label which is not passed but
exists on the task will be deleted. Every label which does not exist on the
task will be added. All labels which are passed and already exist on the task
won't be touched.
2019-01-10 00:08:12 +01:00
parameters:
- description: The array of labels
in: body
name: label
required: true
schema:
$ref: '#/definitions/models.LabelTaskBulk'
type: object
- description: Task ID
in: path
name: taskID
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The updated labels object.
schema:
$ref: '#/definitions/models.LabelTaskBulk'
type: object
"400":
description: Invalid label object provided.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
- JWTKeyAuth: []
summary: Update all labels on a task.
2019-01-10 00:08:12 +01:00
tags:
- labels
2018-12-25 21:45:26 +01:00
/tasks/all:
2018-12-02 01:49:30 +01:00
get:
consumes:
- application/json
description: Returns all tasks on any list the user has access to.
parameters:
- description: The page number. Used for pagination. If not provided, the first
page of results is returned.
in: query
name: p
type: integer
- description: Search tasks by task text.
in: query
name: s
type: string
- description: The sorting parameter. Possible values to sort by are priority,
prioritydesc, priorityasc, dueadate, dueadatedesc, dueadateasc.
in: query
name: sort
2018-12-02 01:49:30 +01:00
type: string
- description: The start date parameter to filter by. Expects a unix timestamp.
2019-04-23 10:34:06 +02:00
If no end date, but a start date is specified, the end date is set to the
current time.
2018-12-25 21:45:26 +01:00
in: query
name: startdate
2018-12-25 21:45:26 +01:00
type: integer
- description: The end date parameter to filter by. Expects a unix timestamp.
2019-04-23 10:34:06 +02:00
If no start date, but an end date is specified, the start date is set to
the current time.
2018-12-25 21:45:26 +01:00
in: query
name: enddate
type: integer
2018-12-25 21:45:26 +01:00
produces:
- application/json
responses:
"200":
description: The tasks
schema:
items:
$ref: '#/definitions/models.ListTask'
2018-12-25 21:45:26 +01:00
type: array
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Get tasks
2018-12-25 21:45:26 +01:00
tags:
- task
2018-12-28 22:49:46 +01:00
/tasks/bulk:
post:
consumes:
- application/json
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.'
parameters:
- description: The task object. Looks like a normal task, the only difference
is it uses an array of list_ids to update.
in: body
name: task
required: true
schema:
$ref: '#/definitions/models.BulkTask'
type: object
produces:
- application/json
responses:
"200":
description: The updated task object.
schema:
$ref: '#/definitions/models.ListTask'
type: object
"400":
description: Invalid task object provided.
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: The user does not have access to the task (aka its list)
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
2018-12-28 22:49:46 +01:00
summary: Update a bunch of tasks at once
tags:
- task
/tasks/caldav:
get:
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
responses:
"200":
description: The caldav events.
schema:
type: string
"403":
description: Unauthorized.
schema:
type: string
security:
- BasicAuth: []
summary: CalDAV-readable format with all tasks as calendar events.
tags:
- task
/teams:
get:
consumes:
- application/json
description: Returns all teams the current user is part of.
parameters:
- description: The page number. Used for pagination. If not provided, the first
page of results is returned.
in: query
name: p
type: integer
- description: Search teams by its name.
in: query
name: s
type: string
produces:
- application/json
responses:
"200":
description: The teams.
schema:
items:
$ref: '#/definitions/models.Team'
type: array
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Get teams
tags:
- team
put:
consumes:
- application/json
description: Creates a new team in a given namespace. The user needs write-access
to the namespace.
parameters:
- description: The team you want to create.
in: body
name: team
required: true
schema:
$ref: '#/definitions/models.Team'
type: object
produces:
- application/json
responses:
"200":
description: The created team.
schema:
$ref: '#/definitions/models.Team'
type: object
"400":
description: Invalid team object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Creates a new team
tags:
- team
/teams/{id}:
delete:
description: Delets a team. This will also remove the access for all users in
that team.
parameters:
- description: Team ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The team was successfully deleted.
schema:
$ref: '#/definitions/models.Message'
type: object
"400":
description: Invalid team object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Deletes a team
tags:
- team
post:
consumes:
- application/json
description: Updates a team.
parameters:
- description: Team ID
in: path
name: id
required: true
type: integer
- description: The team with updated values you want to update.
in: body
name: team
required: true
schema:
$ref: '#/definitions/models.Team'
type: object
produces:
- application/json
responses:
"200":
description: The updated team.
schema:
$ref: '#/definitions/models.Team'
type: object
"400":
description: Invalid team object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Updates a team
tags:
- team
/teams/{id}/members:
put:
consumes:
- application/json
description: Add a user to a team.
parameters:
- description: Team ID
in: path
name: id
required: true
type: integer
- description: The user to be added to a team.
in: body
name: team
required: true
schema:
$ref: '#/definitions/models.TeamMember'
type: object
produces:
- application/json
responses:
"200":
description: The newly created member object
schema:
$ref: '#/definitions/models.TeamMember'
type: object
"400":
description: Invalid member object provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"403":
description: The user does not have access to the team
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Add a user to a team
tags:
- team
/teams/{id}/members/{userID}:
delete:
description: Remove a user from a team. This will also revoke any access this
user might have via that team.
parameters:
- description: Team ID
in: path
name: id
required: true
type: integer
- description: User ID
in: path
name: userID
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The user was successfully removed from the team.
schema:
$ref: '#/definitions/models.Message'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Remove a user from a team
tags:
- team
/user:
get:
consumes:
- application/json
description: Returns the current user object.
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.User'
type: object
"404":
description: User does not exist.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal server error.
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Get user information
tags:
- user
/user/confirm:
post:
consumes:
- application/json
description: Confirms the email of a newly registered user.
parameters:
- description: The token.
in: body
name: credentials
required: true
schema:
$ref: '#/definitions/models.EmailConfirm'
type: object
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Message'
type: object
"412":
description: Bad token provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
summary: Confirm the email of a new user
tags:
- user
/user/password:
post:
consumes:
- application/json
description: Lets the current user change its password.
parameters:
- description: The current and new password.
in: body
name: userPassword
required: true
schema:
$ref: '#/definitions/v1.UserPassword'
type: object
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Message'
type: object
"400":
description: Something's invalid.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"404":
description: User does not exist.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal server error.
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Change password
tags:
- user
/user/password/reset:
post:
consumes:
- application/json
description: Resets a user email with a previously reset token.
parameters:
- description: The token with the new password.
in: body
name: credentials
required: true
schema:
$ref: '#/definitions/models.PasswordReset'
type: object
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Message'
type: object
"400":
description: Bad token provided.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
summary: Resets a password
tags:
- user
/user/password/token:
post:
consumes:
- application/json
description: Requests a token to reset a users password. The token is sent via
email.
parameters:
- description: The username of the user to request a token for.
in: body
name: credentials
required: true
schema:
$ref: '#/definitions/models.PasswordTokenRequest'
type: object
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.Message'
type: object
"404":
description: The user does not exist.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
summary: Request password reset token
tags:
- user
/users:
get:
consumes:
- application/json
description: Lists all users (without emailadresses). Also possible to search
for a specific user.
parameters:
- description: Search for a user by its name.
in: query
name: s
type: string
produces:
- application/json
responses:
"200":
description: All (found) users.
schema:
items:
$ref: '#/definitions/models.User'
type: array
"400":
description: Something's invalid.
schema:
2018-12-01 02:59:17 +01:00
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
"500":
description: Internal server error.
schema:
$ref: '#/definitions/models.Message'
type: object
security:
2019-01-03 23:22:06 +01:00
- JWTKeyAuth: []
summary: Get users
tags:
- user
securityDefinitions:
2019-01-03 23:22:06 +01:00
BasicAuth:
type: basic
JWTKeyAuth:
in: header
name: Authorization
type: apiKey
swagger: "2.0"