Sharing of lists via public links (#94)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag at
|
||||
// 2019-07-21 23:56:59.485456403 +0200 CEST m=+0.091837160
|
||||
// 2019-08-31 22:48:49.201391811 +0200 CEST m=+0.228973511
|
||||
|
||||
package swagger
|
||||
|
||||
@ -32,7 +32,7 @@ var doc = `{
|
||||
"paths": {
|
||||
"/info": {
|
||||
"get": {
|
||||
"description": "Returns the version, frontendurl and motd of Vikunja",
|
||||
"description": "Returns the version, frontendurl, motd and various settings of Vikunja",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@ -58,7 +58,7 @@ var doc = `{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns an array with all assignees for this task.",
|
||||
"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"
|
||||
],
|
||||
@ -66,9 +66,9 @@ var doc = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"assignees"
|
||||
"labels"
|
||||
],
|
||||
"summary": "Get all assignees for a task",
|
||||
"summary": "Get all labels a user has access to",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
@ -78,18 +78,18 @@ var doc = `{
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Search assignees by their username.",
|
||||
"description": "Search labels by label text.",
|
||||
"name": "s",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The assignees",
|
||||
"description": "The labels",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.User"
|
||||
"$ref": "#/definitions/models.Label"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1266,6 +1266,269 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/lists/{list}/shares": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns all link shares which exist for a given list",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"sharing"
|
||||
],
|
||||
"summary": "Get all link shares for a list",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "List ID",
|
||||
"name": "list",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
|
||||
"name": "p",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Search shares by hash.",
|
||||
"name": "s",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The share links",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.LinkSharing"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Share a list via link. The user needs to have write-access to the list to be able do this.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"sharing"
|
||||
],
|
||||
"summary": "Share a list via link",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "List ID",
|
||||
"name": "list",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "The new link share object",
|
||||
"name": "label",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.LinkSharing"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The created link share object.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.LinkSharing"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid link share object provided.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Not allowed to add the list share.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "The list does not exist.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/lists/{list}/shares/{share}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns one link share by its ID.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"sharing"
|
||||
],
|
||||
"summary": "Get one link shares for a list",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "List ID",
|
||||
"name": "list",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Share ID",
|
||||
"name": "share",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The share links",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.LinkSharing"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "No access to the list",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Share Link not found.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Remove a link share. The user needs to have write-access to the list to be able do this.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"sharing"
|
||||
],
|
||||
"summary": "Remove a link share",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "List ID",
|
||||
"name": "list",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Share Link ID",
|
||||
"name": "share",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The link was successfully removed.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Not allowed to remove the link.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Share Link not found.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/login": {
|
||||
"post": {
|
||||
"description": "Logs a user in. Returns a JWT-Token to authenticate further requests.",
|
||||
@ -2337,6 +2600,53 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/shares/{share}/auth": {
|
||||
"post": {
|
||||
"description": "Get a jwt auth token for a shared list from a share hash.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"sharing"
|
||||
],
|
||||
"summary": "Get an auth token for a share",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "The share hash",
|
||||
"name": "share",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The valid jwt auth token.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/v1.Token"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid link share object provided.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks/all": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -2593,6 +2903,63 @@ var doc = `{
|
||||
}
|
||||
},
|
||||
"/tasks/{taskID}/assignees": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns an array with all assignees for this task.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"assignees"
|
||||
],
|
||||
"summary": "Get all assignees for a task",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
|
||||
"name": "p",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Search assignees by their username.",
|
||||
"name": "s",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Task ID",
|
||||
"name": "taskID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The assignees",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.User"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
@ -3896,6 +4263,48 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.LinkSharing": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created": {
|
||||
"description": "A unix timestamp when this list was shared. You cannot change this value.",
|
||||
"type": "integer"
|
||||
},
|
||||
"hash": {
|
||||
"description": "The public id to get this shared list",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "The ID of the shared thing",
|
||||
"type": "integer"
|
||||
},
|
||||
"list": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.List"
|
||||
},
|
||||
"right": {
|
||||
"description": "The right this list is shared with. 0 = Read only, 1 = Read \u0026 Write, 2 = Admin. See the docs for more details.",
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"maximum": 2
|
||||
},
|
||||
"shared_by": {
|
||||
"description": "The user who shared this list",
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.User"
|
||||
},
|
||||
"sharing_type": {
|
||||
"description": "The kind of this link. 0 = undefined, 1 = without password, 2 = with password (currently not implemented).",
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"maximum": 2
|
||||
},
|
||||
"updated": {
|
||||
"description": "A unix timestamp when this share was last updated. You cannot change this value.",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.List": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -3935,118 +4344,6 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Task": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"assignees": {
|
||||
"description": "An array of users who are assigned to this task",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.User"
|
||||
}
|
||||
},
|
||||
"created": {
|
||||
"description": "A unix timestamp when this task was created. You cannot change this value.",
|
||||
"type": "integer"
|
||||
},
|
||||
"createdBy": {
|
||||
"description": "The user who initially created the task.",
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.User"
|
||||
},
|
||||
"description": {
|
||||
"description": "The task description.",
|
||||
"type": "string"
|
||||
},
|
||||
"done": {
|
||||
"description": "Whether a task is done or not.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"doneAt": {
|
||||
"description": "The unix timestamp when a task was marked as done.",
|
||||
"type": "integer"
|
||||
},
|
||||
"dueDate": {
|
||||
"description": "A unix timestamp when the task is due.",
|
||||
"type": "integer"
|
||||
},
|
||||
"endDate": {
|
||||
"description": "When this task ends.",
|
||||
"type": "integer"
|
||||
},
|
||||
"hexColor": {
|
||||
"description": "The task color in hex",
|
||||
"type": "string",
|
||||
"maxLength": 6
|
||||
},
|
||||
"id": {
|
||||
"description": "The unique, numeric id of this task.",
|
||||
"type": "integer"
|
||||
},
|
||||
"labels": {
|
||||
"description": "An array of labels which are associated with this task.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.Label"
|
||||
}
|
||||
},
|
||||
"listID": {
|
||||
"description": "The list this task belongs to.",
|
||||
"type": "integer"
|
||||
},
|
||||
"parentTaskID": {
|
||||
"description": "If the task is a subtask, this is the id of its parent.",
|
||||
"type": "integer"
|
||||
},
|
||||
"priority": {
|
||||
"description": "The task priority. Can be anything you want, it is possible to sort by this later.",
|
||||
"type": "integer"
|
||||
},
|
||||
"reminderDates": {
|
||||
"description": "An array of unix timestamps when the user wants to be reminded of the task.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"repeatAfter": {
|
||||
"description": "An amount in seconds this task repeats itself. If this is set, when marking the task as done, it will mark itself as \"undone\" and then increase all remindes and the due date by its amount.",
|
||||
"type": "integer"
|
||||
},
|
||||
"startDate": {
|
||||
"description": "When this task starts.",
|
||||
"type": "integer"
|
||||
},
|
||||
"subtasks": {
|
||||
"description": "An array of subtasks.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.Task"
|
||||
}
|
||||
},
|
||||
"text": {
|
||||
"description": "The task text. This is what you'll see in the list.",
|
||||
"type": "string",
|
||||
"maxLength": 250,
|
||||
"minLength": 3
|
||||
},
|
||||
"updated": {
|
||||
"description": "A unix timestamp when this task was last updated. You cannot change this value.",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.TaskAssginee": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created": {
|
||||
"type": "integer"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ListUser": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -4202,6 +4499,118 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Task": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"assignees": {
|
||||
"description": "An array of users who are assigned to this task",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.User"
|
||||
}
|
||||
},
|
||||
"created": {
|
||||
"description": "A unix timestamp when this task was created. You cannot change this value.",
|
||||
"type": "integer"
|
||||
},
|
||||
"createdBy": {
|
||||
"description": "The user who initially created the task.",
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.User"
|
||||
},
|
||||
"description": {
|
||||
"description": "The task description.",
|
||||
"type": "string"
|
||||
},
|
||||
"done": {
|
||||
"description": "Whether a task is done or not.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"doneAt": {
|
||||
"description": "The unix timestamp when a task was marked as done.",
|
||||
"type": "integer"
|
||||
},
|
||||
"dueDate": {
|
||||
"description": "A unix timestamp when the task is due.",
|
||||
"type": "integer"
|
||||
},
|
||||
"endDate": {
|
||||
"description": "When this task ends.",
|
||||
"type": "integer"
|
||||
},
|
||||
"hexColor": {
|
||||
"description": "The task color in hex",
|
||||
"type": "string",
|
||||
"maxLength": 6
|
||||
},
|
||||
"id": {
|
||||
"description": "The unique, numeric id of this task.",
|
||||
"type": "integer"
|
||||
},
|
||||
"labels": {
|
||||
"description": "An array of labels which are associated with this task.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.Label"
|
||||
}
|
||||
},
|
||||
"listID": {
|
||||
"description": "The list this task belongs to.",
|
||||
"type": "integer"
|
||||
},
|
||||
"parentTaskID": {
|
||||
"description": "If the task is a subtask, this is the id of its parent.",
|
||||
"type": "integer"
|
||||
},
|
||||
"priority": {
|
||||
"description": "The task priority. Can be anything you want, it is possible to sort by this later.",
|
||||
"type": "integer"
|
||||
},
|
||||
"reminderDates": {
|
||||
"description": "An array of unix timestamps when the user wants to be reminded of the task.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"repeatAfter": {
|
||||
"description": "An amount in seconds this task repeats itself. If this is set, when marking the task as done, it will mark itself as \"undone\" and then increase all remindes and the due date by its amount.",
|
||||
"type": "integer"
|
||||
},
|
||||
"startDate": {
|
||||
"description": "When this task starts.",
|
||||
"type": "integer"
|
||||
},
|
||||
"subtasks": {
|
||||
"description": "An array of subtasks.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.Task"
|
||||
}
|
||||
},
|
||||
"text": {
|
||||
"description": "The task text. This is what you'll see in the list.",
|
||||
"type": "string",
|
||||
"maxLength": 250,
|
||||
"minLength": 3
|
||||
},
|
||||
"updated": {
|
||||
"description": "A unix timestamp when this task was last updated. You cannot change this value.",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.TaskAssginee": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created": {
|
||||
"type": "integer"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Team": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -4499,6 +4908,9 @@ var doc = `{
|
||||
"frontend_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"link_sharing_enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"motd": {
|
||||
"type": "string"
|
||||
},
|
||||
|
@ -19,7 +19,7 @@
|
||||
"paths": {
|
||||
"/info": {
|
||||
"get": {
|
||||
"description": "Returns the version, frontendurl and motd of Vikunja",
|
||||
"description": "Returns the version, frontendurl, motd and various settings of Vikunja",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@ -45,7 +45,7 @@
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns an array with all assignees for this task.",
|
||||
"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"
|
||||
],
|
||||
@ -53,9 +53,9 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"assignees"
|
||||
"labels"
|
||||
],
|
||||
"summary": "Get all assignees for a task",
|
||||
"summary": "Get all labels a user has access to",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
@ -65,18 +65,18 @@
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Search assignees by their username.",
|
||||
"description": "Search labels by label text.",
|
||||
"name": "s",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The assignees",
|
||||
"description": "The labels",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.User"
|
||||
"$ref": "#/definitions/models.Label"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -475,7 +475,7 @@
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.ListTask"
|
||||
"$ref": "#/definitions/models.Task"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -484,7 +484,7 @@
|
||||
"description": "The created task object.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.ListTask"
|
||||
"$ref": "#/definitions/models.Task"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
@ -1253,6 +1253,269 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/lists/{list}/shares": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns all link shares which exist for a given list",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"sharing"
|
||||
],
|
||||
"summary": "Get all link shares for a list",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "List ID",
|
||||
"name": "list",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
|
||||
"name": "p",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Search shares by hash.",
|
||||
"name": "s",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The share links",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.LinkSharing"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Share a list via link. The user needs to have write-access to the list to be able do this.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"sharing"
|
||||
],
|
||||
"summary": "Share a list via link",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "List ID",
|
||||
"name": "list",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "The new link share object",
|
||||
"name": "label",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.LinkSharing"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The created link share object.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.LinkSharing"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid link share object provided.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Not allowed to add the list share.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "The list does not exist.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/lists/{list}/shares/{share}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns one link share by its ID.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"sharing"
|
||||
],
|
||||
"summary": "Get one link shares for a list",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "List ID",
|
||||
"name": "list",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Share ID",
|
||||
"name": "share",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The share links",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.LinkSharing"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "No access to the list",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Share Link not found.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Remove a link share. The user needs to have write-access to the list to be able do this.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"sharing"
|
||||
],
|
||||
"summary": "Remove a link share",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "List ID",
|
||||
"name": "list",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Share Link ID",
|
||||
"name": "share",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The link was successfully removed.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Not allowed to remove the link.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Share Link not found.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/login": {
|
||||
"post": {
|
||||
"description": "Logs a user in. Returns a JWT-Token to authenticate further requests.",
|
||||
@ -2324,6 +2587,53 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/shares/{share}/auth": {
|
||||
"post": {
|
||||
"description": "Get a jwt auth token for a shared list from a share hash.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"sharing"
|
||||
],
|
||||
"summary": "Get an auth token for a share",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "The share hash",
|
||||
"name": "share",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The valid jwt auth token.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/v1.Token"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid link share object provided.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks/all": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -2380,7 +2690,7 @@
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.ListTask"
|
||||
"$ref": "#/definitions/models.Task"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -2429,7 +2739,7 @@
|
||||
"description": "The updated task object.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.ListTask"
|
||||
"$ref": "#/definitions/models.Task"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
@ -2489,7 +2799,7 @@
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.ListTask"
|
||||
"$ref": "#/definitions/models.Task"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -2498,7 +2808,7 @@
|
||||
"description": "The updated task object.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.ListTask"
|
||||
"$ref": "#/definitions/models.Task"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
@ -2580,6 +2890,63 @@
|
||||
}
|
||||
},
|
||||
"/tasks/{taskID}/assignees": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns an array with all assignees for this task.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"assignees"
|
||||
],
|
||||
"summary": "Get all assignees for a task",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
|
||||
"name": "p",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Search assignees by their username.",
|
||||
"name": "s",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Task ID",
|
||||
"name": "taskID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The assignees",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.User"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
@ -2605,7 +2972,7 @@
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.ListTaskAssginee"
|
||||
"$ref": "#/definitions/models.TaskAssginee"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -2621,7 +2988,7 @@
|
||||
"description": "The created assingee object.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.ListTaskAssginee"
|
||||
"$ref": "#/definitions/models.TaskAssginee"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
@ -2683,7 +3050,7 @@
|
||||
"description": "The created assingees object.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.ListTaskAssginee"
|
||||
"$ref": "#/definitions/models.TaskAssginee"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
@ -3789,7 +4156,7 @@
|
||||
"description": "An array of subtasks.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.ListTask"
|
||||
"$ref": "#/definitions/models.Task"
|
||||
}
|
||||
},
|
||||
"task_ids": {
|
||||
@ -3882,6 +4249,48 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.LinkSharing": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created": {
|
||||
"description": "A unix timestamp when this list was shared. You cannot change this value.",
|
||||
"type": "integer"
|
||||
},
|
||||
"hash": {
|
||||
"description": "The public id to get this shared list",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "The ID of the shared thing",
|
||||
"type": "integer"
|
||||
},
|
||||
"list": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.List"
|
||||
},
|
||||
"right": {
|
||||
"description": "The right this list is shared with. 0 = Read only, 1 = Read \u0026 Write, 2 = Admin. See the docs for more details.",
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"maximum": 2
|
||||
},
|
||||
"shared_by": {
|
||||
"description": "The user who shared this list",
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.User"
|
||||
},
|
||||
"sharing_type": {
|
||||
"description": "The kind of this link. 0 = undefined, 1 = without password, 2 = with password (currently not implemented).",
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"maximum": 2
|
||||
},
|
||||
"updated": {
|
||||
"description": "A unix timestamp when this share was last updated. You cannot change this value.",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.List": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -3906,7 +4315,7 @@
|
||||
"description": "An array of tasks which belong to the list.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.ListTask"
|
||||
"$ref": "#/definitions/models.Task"
|
||||
}
|
||||
},
|
||||
"title": {
|
||||
@ -3921,118 +4330,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ListTask": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"assignees": {
|
||||
"description": "An array of users who are assigned to this task",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.User"
|
||||
}
|
||||
},
|
||||
"created": {
|
||||
"description": "A unix timestamp when this task was created. You cannot change this value.",
|
||||
"type": "integer"
|
||||
},
|
||||
"createdBy": {
|
||||
"description": "The user who initially created the task.",
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.User"
|
||||
},
|
||||
"description": {
|
||||
"description": "The task description.",
|
||||
"type": "string"
|
||||
},
|
||||
"done": {
|
||||
"description": "Whether a task is done or not.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"doneAt": {
|
||||
"description": "The unix timestamp when a task was marked as done.",
|
||||
"type": "integer"
|
||||
},
|
||||
"dueDate": {
|
||||
"description": "A unix timestamp when the task is due.",
|
||||
"type": "integer"
|
||||
},
|
||||
"endDate": {
|
||||
"description": "When this task ends.",
|
||||
"type": "integer"
|
||||
},
|
||||
"hexColor": {
|
||||
"description": "The task color in hex",
|
||||
"type": "string",
|
||||
"maxLength": 6
|
||||
},
|
||||
"id": {
|
||||
"description": "The unique, numeric id of this task.",
|
||||
"type": "integer"
|
||||
},
|
||||
"labels": {
|
||||
"description": "An array of labels which are associated with this task.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.Label"
|
||||
}
|
||||
},
|
||||
"listID": {
|
||||
"description": "The list this task belongs to.",
|
||||
"type": "integer"
|
||||
},
|
||||
"parentTaskID": {
|
||||
"description": "If the task is a subtask, this is the id of its parent.",
|
||||
"type": "integer"
|
||||
},
|
||||
"priority": {
|
||||
"description": "The task priority. Can be anything you want, it is possible to sort by this later.",
|
||||
"type": "integer"
|
||||
},
|
||||
"reminderDates": {
|
||||
"description": "An array of unix timestamps when the user wants to be reminded of the task.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"repeatAfter": {
|
||||
"description": "An amount in seconds this task repeats itself. If this is set, when marking the task as done, it will mark itself as \"undone\" and then increase all remindes and the due date by its amount.",
|
||||
"type": "integer"
|
||||
},
|
||||
"startDate": {
|
||||
"description": "When this task starts.",
|
||||
"type": "integer"
|
||||
},
|
||||
"subtasks": {
|
||||
"description": "An array of subtasks.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.ListTask"
|
||||
}
|
||||
},
|
||||
"text": {
|
||||
"description": "The task text. This is what you'll see in the list.",
|
||||
"type": "string",
|
||||
"maxLength": 250,
|
||||
"minLength": 3
|
||||
},
|
||||
"updated": {
|
||||
"description": "A unix timestamp when this task was last updated. You cannot change this value.",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ListTaskAssginee": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created": {
|
||||
"type": "integer"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ListUser": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -4188,6 +4485,118 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Task": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"assignees": {
|
||||
"description": "An array of users who are assigned to this task",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.User"
|
||||
}
|
||||
},
|
||||
"created": {
|
||||
"description": "A unix timestamp when this task was created. You cannot change this value.",
|
||||
"type": "integer"
|
||||
},
|
||||
"createdBy": {
|
||||
"description": "The user who initially created the task.",
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.User"
|
||||
},
|
||||
"description": {
|
||||
"description": "The task description.",
|
||||
"type": "string"
|
||||
},
|
||||
"done": {
|
||||
"description": "Whether a task is done or not.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"doneAt": {
|
||||
"description": "The unix timestamp when a task was marked as done.",
|
||||
"type": "integer"
|
||||
},
|
||||
"dueDate": {
|
||||
"description": "A unix timestamp when the task is due.",
|
||||
"type": "integer"
|
||||
},
|
||||
"endDate": {
|
||||
"description": "When this task ends.",
|
||||
"type": "integer"
|
||||
},
|
||||
"hexColor": {
|
||||
"description": "The task color in hex",
|
||||
"type": "string",
|
||||
"maxLength": 6
|
||||
},
|
||||
"id": {
|
||||
"description": "The unique, numeric id of this task.",
|
||||
"type": "integer"
|
||||
},
|
||||
"labels": {
|
||||
"description": "An array of labels which are associated with this task.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.Label"
|
||||
}
|
||||
},
|
||||
"listID": {
|
||||
"description": "The list this task belongs to.",
|
||||
"type": "integer"
|
||||
},
|
||||
"parentTaskID": {
|
||||
"description": "If the task is a subtask, this is the id of its parent.",
|
||||
"type": "integer"
|
||||
},
|
||||
"priority": {
|
||||
"description": "The task priority. Can be anything you want, it is possible to sort by this later.",
|
||||
"type": "integer"
|
||||
},
|
||||
"reminderDates": {
|
||||
"description": "An array of unix timestamps when the user wants to be reminded of the task.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"repeatAfter": {
|
||||
"description": "An amount in seconds this task repeats itself. If this is set, when marking the task as done, it will mark itself as \"undone\" and then increase all remindes and the due date by its amount.",
|
||||
"type": "integer"
|
||||
},
|
||||
"startDate": {
|
||||
"description": "When this task starts.",
|
||||
"type": "integer"
|
||||
},
|
||||
"subtasks": {
|
||||
"description": "An array of subtasks.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.Task"
|
||||
}
|
||||
},
|
||||
"text": {
|
||||
"description": "The task text. This is what you'll see in the list.",
|
||||
"type": "string",
|
||||
"maxLength": 250,
|
||||
"minLength": 3
|
||||
},
|
||||
"updated": {
|
||||
"description": "A unix timestamp when this task was last updated. You cannot change this value.",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.TaskAssginee": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created": {
|
||||
"type": "integer"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Team": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -4485,6 +4894,9 @@
|
||||
"frontend_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"link_sharing_enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"motd": {
|
||||
"type": "string"
|
||||
},
|
||||
|
@ -98,7 +98,7 @@ definitions:
|
||||
subtasks:
|
||||
description: An array of subtasks.
|
||||
items:
|
||||
$ref: '#/definitions/models.ListTask'
|
||||
$ref: '#/definitions/models.Task'
|
||||
type: array
|
||||
task_ids:
|
||||
description: A list of task ids to update
|
||||
@ -170,6 +170,42 @@ definitions:
|
||||
$ref: '#/definitions/models.Label'
|
||||
type: array
|
||||
type: object
|
||||
models.LinkSharing:
|
||||
properties:
|
||||
created:
|
||||
description: A unix timestamp when this list was shared. You cannot change
|
||||
this value.
|
||||
type: integer
|
||||
hash:
|
||||
description: The public id to get this shared list
|
||||
type: string
|
||||
id:
|
||||
description: The ID of the shared thing
|
||||
type: integer
|
||||
list:
|
||||
$ref: '#/definitions/models.List'
|
||||
type: object
|
||||
right:
|
||||
default: 0
|
||||
description: The right this list is shared with. 0 = Read only, 1 = Read &
|
||||
Write, 2 = Admin. See the docs for more details.
|
||||
maximum: 2
|
||||
type: integer
|
||||
shared_by:
|
||||
$ref: '#/definitions/models.User'
|
||||
description: The user who shared this list
|
||||
type: object
|
||||
sharing_type:
|
||||
default: 0
|
||||
description: The kind of this link. 0 = undefined, 1 = without password, 2
|
||||
= with password (currently not implemented).
|
||||
maximum: 2
|
||||
type: integer
|
||||
updated:
|
||||
description: A unix timestamp when this share was last updated. You cannot
|
||||
change this value.
|
||||
type: integer
|
||||
type: object
|
||||
models.List:
|
||||
properties:
|
||||
created:
|
||||
@ -189,7 +225,7 @@ definitions:
|
||||
tasks:
|
||||
description: An array of tasks which belong to the list.
|
||||
items:
|
||||
$ref: '#/definitions/models.ListTask'
|
||||
$ref: '#/definitions/models.Task'
|
||||
type: array
|
||||
title:
|
||||
description: The title of the list. You'll see this in the namespace overview.
|
||||
@ -201,94 +237,6 @@ definitions:
|
||||
change this value.
|
||||
type: integer
|
||||
type: object
|
||||
models.ListTask:
|
||||
properties:
|
||||
assignees:
|
||||
description: An array of users who are assigned to this task
|
||||
items:
|
||||
$ref: '#/definitions/models.User'
|
||||
type: array
|
||||
created:
|
||||
description: A unix timestamp when this task was created. You cannot change
|
||||
this value.
|
||||
type: integer
|
||||
createdBy:
|
||||
$ref: '#/definitions/models.User'
|
||||
description: The user who initially created the task.
|
||||
type: object
|
||||
description:
|
||||
description: The task description.
|
||||
type: string
|
||||
done:
|
||||
description: Whether a task is done or not.
|
||||
type: boolean
|
||||
doneAt:
|
||||
description: The unix timestamp when a task was marked as done.
|
||||
type: integer
|
||||
dueDate:
|
||||
description: A unix timestamp when the task is due.
|
||||
type: integer
|
||||
endDate:
|
||||
description: When this task ends.
|
||||
type: integer
|
||||
hexColor:
|
||||
description: The task color in hex
|
||||
maxLength: 6
|
||||
type: string
|
||||
id:
|
||||
description: The unique, numeric id of this task.
|
||||
type: integer
|
||||
labels:
|
||||
description: An array of labels which are associated with this task.
|
||||
items:
|
||||
$ref: '#/definitions/models.Label'
|
||||
type: array
|
||||
listID:
|
||||
description: The list this task belongs to.
|
||||
type: integer
|
||||
parentTaskID:
|
||||
description: If the task is a subtask, this is the id of its parent.
|
||||
type: integer
|
||||
priority:
|
||||
description: The task priority. Can be anything you want, it is possible to
|
||||
sort by this later.
|
||||
type: integer
|
||||
reminderDates:
|
||||
description: An array of unix timestamps when the user wants to be reminded
|
||||
of the task.
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
repeatAfter:
|
||||
description: An amount in seconds this task repeats itself. If this is set,
|
||||
when marking the task as done, it will mark itself as "undone" and then
|
||||
increase all remindes and the due date by its amount.
|
||||
type: integer
|
||||
startDate:
|
||||
description: When this task starts.
|
||||
type: integer
|
||||
subtasks:
|
||||
description: An array of subtasks.
|
||||
items:
|
||||
$ref: '#/definitions/models.ListTask'
|
||||
type: array
|
||||
text:
|
||||
description: The task text. This is what you'll see in the list.
|
||||
maxLength: 250
|
||||
minLength: 3
|
||||
type: string
|
||||
updated:
|
||||
description: A unix timestamp when this task was last updated. You cannot
|
||||
change this value.
|
||||
type: integer
|
||||
type: object
|
||||
models.ListTaskAssginee:
|
||||
properties:
|
||||
created:
|
||||
type: integer
|
||||
user_id:
|
||||
type: integer
|
||||
type: object
|
||||
models.ListUser:
|
||||
properties:
|
||||
created:
|
||||
@ -412,6 +360,94 @@ definitions:
|
||||
maxLength: 250
|
||||
type: string
|
||||
type: object
|
||||
models.Task:
|
||||
properties:
|
||||
assignees:
|
||||
description: An array of users who are assigned to this task
|
||||
items:
|
||||
$ref: '#/definitions/models.User'
|
||||
type: array
|
||||
created:
|
||||
description: A unix timestamp when this task was created. You cannot change
|
||||
this value.
|
||||
type: integer
|
||||
createdBy:
|
||||
$ref: '#/definitions/models.User'
|
||||
description: The user who initially created the task.
|
||||
type: object
|
||||
description:
|
||||
description: The task description.
|
||||
type: string
|
||||
done:
|
||||
description: Whether a task is done or not.
|
||||
type: boolean
|
||||
doneAt:
|
||||
description: The unix timestamp when a task was marked as done.
|
||||
type: integer
|
||||
dueDate:
|
||||
description: A unix timestamp when the task is due.
|
||||
type: integer
|
||||
endDate:
|
||||
description: When this task ends.
|
||||
type: integer
|
||||
hexColor:
|
||||
description: The task color in hex
|
||||
maxLength: 6
|
||||
type: string
|
||||
id:
|
||||
description: The unique, numeric id of this task.
|
||||
type: integer
|
||||
labels:
|
||||
description: An array of labels which are associated with this task.
|
||||
items:
|
||||
$ref: '#/definitions/models.Label'
|
||||
type: array
|
||||
listID:
|
||||
description: The list this task belongs to.
|
||||
type: integer
|
||||
parentTaskID:
|
||||
description: If the task is a subtask, this is the id of its parent.
|
||||
type: integer
|
||||
priority:
|
||||
description: The task priority. Can be anything you want, it is possible to
|
||||
sort by this later.
|
||||
type: integer
|
||||
reminderDates:
|
||||
description: An array of unix timestamps when the user wants to be reminded
|
||||
of the task.
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
repeatAfter:
|
||||
description: An amount in seconds this task repeats itself. If this is set,
|
||||
when marking the task as done, it will mark itself as "undone" and then
|
||||
increase all remindes and the due date by its amount.
|
||||
type: integer
|
||||
startDate:
|
||||
description: When this task starts.
|
||||
type: integer
|
||||
subtasks:
|
||||
description: An array of subtasks.
|
||||
items:
|
||||
$ref: '#/definitions/models.Task'
|
||||
type: array
|
||||
text:
|
||||
description: The task text. This is what you'll see in the list.
|
||||
maxLength: 250
|
||||
minLength: 3
|
||||
type: string
|
||||
updated:
|
||||
description: A unix timestamp when this task was last updated. You cannot
|
||||
change this value.
|
||||
type: integer
|
||||
type: object
|
||||
models.TaskAssginee:
|
||||
properties:
|
||||
created:
|
||||
type: integer
|
||||
user_id:
|
||||
type: integer
|
||||
type: object
|
||||
models.Team:
|
||||
properties:
|
||||
created:
|
||||
@ -652,6 +688,8 @@ definitions:
|
||||
properties:
|
||||
frontend_url:
|
||||
type: string
|
||||
link_sharing_enabled:
|
||||
type: boolean
|
||||
motd:
|
||||
type: string
|
||||
version:
|
||||
@ -678,7 +716,8 @@ info:
|
||||
paths:
|
||||
/info:
|
||||
get:
|
||||
description: Returns the version, frontendurl and motd of Vikunja
|
||||
description: Returns the version, frontendurl, motd and various settings of
|
||||
Vikunja
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@ -694,14 +733,15 @@ paths:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Returns an array with all assignees for this task.
|
||||
description: Returns all labels which are either created by the user or associated
|
||||
with a task the user has at least read-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 assignees by their username.
|
||||
- description: Search labels by label text.
|
||||
in: query
|
||||
name: s
|
||||
type: string
|
||||
@ -709,10 +749,10 @@ paths:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The assignees
|
||||
description: The labels
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/models.User'
|
||||
$ref: '#/definitions/models.Label'
|
||||
type: array
|
||||
"500":
|
||||
description: Internal error
|
||||
@ -721,9 +761,9 @@ paths:
|
||||
type: object
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Get all assignees for a task
|
||||
summary: Get all labels a user has access to
|
||||
tags:
|
||||
- assignees
|
||||
- labels
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
@ -1057,7 +1097,7 @@ paths:
|
||||
name: task
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.ListTask'
|
||||
$ref: '#/definitions/models.Task'
|
||||
type: object
|
||||
produces:
|
||||
- application/json
|
||||
@ -1065,7 +1105,7 @@ paths:
|
||||
"200":
|
||||
description: The created task object.
|
||||
schema:
|
||||
$ref: '#/definitions/models.ListTask'
|
||||
$ref: '#/definitions/models.Task'
|
||||
type: object
|
||||
"400":
|
||||
description: Invalid task object provided.
|
||||
@ -1320,6 +1360,184 @@ paths:
|
||||
summary: Add a user to a list
|
||||
tags:
|
||||
- sharing
|
||||
/lists/{list}/shares:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Returns all link shares which exist for a given list
|
||||
parameters:
|
||||
- description: List ID
|
||||
in: path
|
||||
name: list
|
||||
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 shares by hash.
|
||||
in: query
|
||||
name: s
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The share links
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/models.LinkSharing'
|
||||
type: array
|
||||
"500":
|
||||
description: Internal error
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
type: object
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Get all link shares for a list
|
||||
tags:
|
||||
- sharing
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Share a list via link. The user needs to have write-access to the
|
||||
list to be able do this.
|
||||
parameters:
|
||||
- description: List ID
|
||||
in: path
|
||||
name: list
|
||||
required: true
|
||||
type: integer
|
||||
- description: The new link share object
|
||||
in: body
|
||||
name: label
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.LinkSharing'
|
||||
type: object
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The created link share object.
|
||||
schema:
|
||||
$ref: '#/definitions/models.LinkSharing'
|
||||
type: object
|
||||
"400":
|
||||
description: Invalid link share object provided.
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
"403":
|
||||
description: Not allowed to add the list share.
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
"404":
|
||||
description: The list 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:
|
||||
- JWTKeyAuth: []
|
||||
summary: Share a list via link
|
||||
tags:
|
||||
- sharing
|
||||
/lists/{list}/shares/{share}:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Remove a link share. The user needs to have write-access to the
|
||||
list to be able do this.
|
||||
parameters:
|
||||
- description: List ID
|
||||
in: path
|
||||
name: list
|
||||
required: true
|
||||
type: integer
|
||||
- description: Share Link ID
|
||||
in: path
|
||||
name: share
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The link was successfully removed.
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
type: object
|
||||
"403":
|
||||
description: Not allowed to remove the link.
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
"404":
|
||||
description: Share Link not found.
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal error
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
type: object
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Remove a link share
|
||||
tags:
|
||||
- sharing
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Returns one link share by its ID.
|
||||
parameters:
|
||||
- description: List ID
|
||||
in: path
|
||||
name: list
|
||||
required: true
|
||||
type: integer
|
||||
- description: Share ID
|
||||
in: path
|
||||
name: share
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The share links
|
||||
schema:
|
||||
$ref: '#/definitions/models.LinkSharing'
|
||||
type: object
|
||||
"403":
|
||||
description: No access to the list
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
"404":
|
||||
description: Share Link not found.
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal error
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
type: object
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Get one link shares for 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
|
||||
@ -2232,6 +2450,38 @@ paths:
|
||||
summary: Register
|
||||
tags:
|
||||
- user
|
||||
/shares/{share}/auth:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get a jwt auth token for a shared list from a share hash.
|
||||
parameters:
|
||||
- description: The share hash
|
||||
in: path
|
||||
name: share
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The valid jwt auth token.
|
||||
schema:
|
||||
$ref: '#/definitions/v1.Token'
|
||||
type: object
|
||||
"400":
|
||||
description: Invalid link share object provided.
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal error
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
type: object
|
||||
summary: Get an auth token for a share
|
||||
tags:
|
||||
- sharing
|
||||
/tasks/{id}:
|
||||
delete:
|
||||
description: Deletes a task from a list. This does not mean "mark it done".
|
||||
@ -2286,7 +2536,7 @@ paths:
|
||||
name: task
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.ListTask'
|
||||
$ref: '#/definitions/models.Task'
|
||||
type: object
|
||||
produces:
|
||||
- application/json
|
||||
@ -2294,7 +2544,7 @@ paths:
|
||||
"200":
|
||||
description: The updated task object.
|
||||
schema:
|
||||
$ref: '#/definitions/models.ListTask'
|
||||
$ref: '#/definitions/models.Task'
|
||||
type: object
|
||||
"400":
|
||||
description: Invalid task object provided.
|
||||
@ -2452,6 +2702,44 @@ paths:
|
||||
tags:
|
||||
- labels
|
||||
/tasks/{taskID}/assignees:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Returns an array with all assignees for this task.
|
||||
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.
|
||||
in: query
|
||||
name: s
|
||||
type: string
|
||||
- description: Task ID
|
||||
in: path
|
||||
name: taskID
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The assignees
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/models.User'
|
||||
type: array
|
||||
"500":
|
||||
description: Internal error
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
type: object
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Get all assignees for a task
|
||||
tags:
|
||||
- assignees
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
@ -2463,7 +2751,7 @@ paths:
|
||||
name: assignee
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.ListTaskAssginee'
|
||||
$ref: '#/definitions/models.TaskAssginee'
|
||||
type: object
|
||||
- description: Task ID
|
||||
in: path
|
||||
@ -2476,7 +2764,7 @@ paths:
|
||||
"200":
|
||||
description: The created assingee object.
|
||||
schema:
|
||||
$ref: '#/definitions/models.ListTaskAssginee'
|
||||
$ref: '#/definitions/models.TaskAssginee'
|
||||
type: object
|
||||
"400":
|
||||
description: Invalid assignee object provided.
|
||||
@ -2559,7 +2847,7 @@ paths:
|
||||
"200":
|
||||
description: The created assingees object.
|
||||
schema:
|
||||
$ref: '#/definitions/models.ListTaskAssginee'
|
||||
$ref: '#/definitions/models.TaskAssginee'
|
||||
type: object
|
||||
"400":
|
||||
description: Invalid assignee object provided.
|
||||
@ -2659,7 +2947,7 @@ paths:
|
||||
description: The tasks
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/models.ListTask'
|
||||
$ref: '#/definitions/models.Task'
|
||||
type: array
|
||||
"500":
|
||||
description: Internal error
|
||||
@ -2693,7 +2981,7 @@ paths:
|
||||
"200":
|
||||
description: The updated task object.
|
||||
schema:
|
||||
$ref: '#/definitions/models.ListTask'
|
||||
$ref: '#/definitions/models.Task'
|
||||
type: object
|
||||
"400":
|
||||
description: Invalid task object provided.
|
||||
|
Reference in New Issue
Block a user