mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
436 lines
14 KiB
YAML
436 lines
14 KiB
YAML
/api/v1/tasks:
|
|
get:
|
|
tags:
|
|
- tasks
|
|
summary: "List tasks"
|
|
description: "Lists tasks, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the tasks, these are handled by the TaskFilters class which defines the methods available"
|
|
operationId: getTasks
|
|
parameters:
|
|
- $ref: "#/components/parameters/X-API-TOKEN"
|
|
- $ref: "#/components/parameters/X-Requested-With"
|
|
- $ref: "#/components/parameters/include"
|
|
- $ref: "#/components/parameters/index"
|
|
responses:
|
|
200:
|
|
description: "A list of tasks"
|
|
headers:
|
|
X-MINIMUM-CLIENT-VERSION:
|
|
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
|
X-RateLimit-Remaining:
|
|
$ref: "#/components/headers/X-RateLimit-Remaining"
|
|
X-RateLimit-Limit:
|
|
$ref: "#/components/headers/X-RateLimit-Limit"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Task'
|
|
meta:
|
|
type: object
|
|
$ref: '#/components/schemas/Meta'
|
|
401:
|
|
$ref: "#/components/responses/401"
|
|
403:
|
|
$ref: "#/components/responses/403"
|
|
422:
|
|
$ref: '#/components/responses/422'
|
|
429:
|
|
$ref: '#/components/responses/429'
|
|
5XX:
|
|
description: 'Server error'
|
|
default:
|
|
$ref: "#/components/responses/default"
|
|
post:
|
|
tags:
|
|
- tasks
|
|
summary: "Create task"
|
|
description: "Adds an task to a company"
|
|
operationId: storeTask
|
|
parameters:
|
|
- $ref: "#/components/parameters/X-API-TOKEN"
|
|
- $ref: "#/components/parameters/X-Requested-With"
|
|
- $ref: "#/components/parameters/include"
|
|
responses:
|
|
200:
|
|
description: "Returns the saved task object"
|
|
headers:
|
|
X-MINIMUM-CLIENT-VERSION:
|
|
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
|
X-RateLimit-Remaining:
|
|
$ref: "#/components/headers/X-RateLimit-Remaining"
|
|
X-RateLimit-Limit:
|
|
$ref: "#/components/headers/X-RateLimit-Limit"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Task"
|
|
401:
|
|
$ref: "#/components/responses/401"
|
|
403:
|
|
$ref: "#/components/responses/403"
|
|
422:
|
|
$ref: '#/components/responses/422'
|
|
429:
|
|
$ref: '#/components/responses/429'
|
|
5XX:
|
|
description: 'Server error'
|
|
default:
|
|
$ref: "#/components/responses/default"
|
|
"/api/v1/tasks/{id}":
|
|
get:
|
|
tags:
|
|
- tasks
|
|
summary: "Show task"
|
|
description: "Displays a task by id"
|
|
operationId: showTask
|
|
parameters:
|
|
- $ref: "#/components/parameters/X-API-TOKEN"
|
|
- $ref: "#/components/parameters/X-Requested-With"
|
|
- $ref: "#/components/parameters/include"
|
|
- name: id
|
|
in: path
|
|
description: "The Task Hashed ID"
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: string
|
|
example: D2J234DFA
|
|
responses:
|
|
200:
|
|
description: "Returns the task object"
|
|
headers:
|
|
X-MINIMUM-CLIENT-VERSION:
|
|
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
|
X-RateLimit-Remaining:
|
|
$ref: "#/components/headers/X-RateLimit-Remaining"
|
|
X-RateLimit-Limit:
|
|
$ref: "#/components/headers/X-RateLimit-Limit"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Task"
|
|
401:
|
|
$ref: "#/components/responses/401"
|
|
403:
|
|
$ref: "#/components/responses/403"
|
|
422:
|
|
$ref: '#/components/responses/422'
|
|
429:
|
|
$ref: '#/components/responses/429'
|
|
5XX:
|
|
description: 'Server error'
|
|
default:
|
|
$ref: "#/components/responses/default"
|
|
put:
|
|
tags:
|
|
- tasks
|
|
summary: "Update task"
|
|
description: "Handles the updating of a task by id"
|
|
operationId: updateTask
|
|
parameters:
|
|
- $ref: "#/components/parameters/X-API-TOKEN"
|
|
- $ref: "#/components/parameters/X-Requested-With"
|
|
- $ref: "#/components/parameters/include"
|
|
- name: id
|
|
in: path
|
|
description: "The task Hashed ID"
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: string
|
|
example: D2J234DFA
|
|
responses:
|
|
200:
|
|
description: "Returns the task object"
|
|
headers:
|
|
X-MINIMUM-CLIENT-VERSION:
|
|
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
|
X-RateLimit-Remaining:
|
|
$ref: "#/components/headers/X-RateLimit-Remaining"
|
|
X-RateLimit-Limit:
|
|
$ref: "#/components/headers/X-RateLimit-Limit"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Task"
|
|
401:
|
|
$ref: "#/components/responses/401"
|
|
403:
|
|
$ref: "#/components/responses/403"
|
|
422:
|
|
$ref: '#/components/responses/422'
|
|
429:
|
|
$ref: '#/components/responses/429'
|
|
5XX:
|
|
description: 'Server error'
|
|
default:
|
|
$ref: "#/components/responses/default"
|
|
delete:
|
|
tags:
|
|
- tasks
|
|
summary: "Delete task"
|
|
description: "Handles the deletion of a task by id"
|
|
operationId: deleteTask
|
|
parameters:
|
|
- $ref: "#/components/parameters/X-API-TOKEN"
|
|
- $ref: "#/components/parameters/X-Requested-With"
|
|
- $ref: "#/components/parameters/include"
|
|
- name: id
|
|
in: path
|
|
description: "The Task Hashed ID"
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: string
|
|
example: D2J234DFA
|
|
responses:
|
|
200:
|
|
description: "Returns a HTTP status"
|
|
headers:
|
|
X-MINIMUM-CLIENT-VERSION:
|
|
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
|
X-RateLimit-Remaining:
|
|
$ref: "#/components/headers/X-RateLimit-Remaining"
|
|
X-RateLimit-Limit:
|
|
$ref: "#/components/headers/X-RateLimit-Limit"
|
|
401:
|
|
$ref: "#/components/responses/401"
|
|
403:
|
|
$ref: "#/components/responses/403"
|
|
422:
|
|
$ref: '#/components/responses/422'
|
|
429:
|
|
$ref: '#/components/responses/429'
|
|
5XX:
|
|
description: 'Server error'
|
|
default:
|
|
$ref: "#/components/responses/default"
|
|
"/api/v1/tasks/{id}/edit":
|
|
get:
|
|
tags:
|
|
- tasks
|
|
summary: "Edit task"
|
|
description: "Displays a task by id"
|
|
operationId: editTask
|
|
parameters:
|
|
- $ref: "#/components/parameters/X-API-TOKEN"
|
|
- $ref: "#/components/parameters/X-Requested-With"
|
|
- $ref: "#/components/parameters/include"
|
|
- name: id
|
|
in: path
|
|
description: "The Task Hashed ID"
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: string
|
|
example: D2J234DFA
|
|
responses:
|
|
200:
|
|
description: "Returns the client object"
|
|
headers:
|
|
X-MINIMUM-CLIENT-VERSION:
|
|
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
|
X-RateLimit-Remaining:
|
|
$ref: "#/components/headers/X-RateLimit-Remaining"
|
|
X-RateLimit-Limit:
|
|
$ref: "#/components/headers/X-RateLimit-Limit"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Task"
|
|
401:
|
|
$ref: "#/components/responses/401"
|
|
403:
|
|
$ref: "#/components/responses/403"
|
|
422:
|
|
$ref: '#/components/responses/422'
|
|
429:
|
|
$ref: '#/components/responses/429'
|
|
5XX:
|
|
description: 'Server error'
|
|
default:
|
|
$ref: "#/components/responses/default"
|
|
/api/v1/tasks/create:
|
|
get:
|
|
tags:
|
|
- tasks
|
|
summary: "Blank task"
|
|
description: "Returns a blank task with default values"
|
|
operationId: getTasksCreate
|
|
parameters:
|
|
- $ref: "#/components/parameters/X-API-TOKEN"
|
|
- $ref: "#/components/parameters/X-Requested-With"
|
|
- $ref: "#/components/parameters/include"
|
|
responses:
|
|
200:
|
|
description: "A blank task object"
|
|
headers:
|
|
X-MINIMUM-CLIENT-VERSION:
|
|
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
|
X-RateLimit-Remaining:
|
|
$ref: "#/components/headers/X-RateLimit-Remaining"
|
|
X-RateLimit-Limit:
|
|
$ref: "#/components/headers/X-RateLimit-Limit"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Task"
|
|
401:
|
|
$ref: "#/components/responses/401"
|
|
403:
|
|
$ref: "#/components/responses/403"
|
|
422:
|
|
$ref: '#/components/responses/422'
|
|
429:
|
|
$ref: '#/components/responses/429'
|
|
5XX:
|
|
description: 'Server error'
|
|
default:
|
|
$ref: "#/components/responses/default"
|
|
/api/v1/tasks/bulk:
|
|
post:
|
|
tags:
|
|
- tasks
|
|
summary: "Bulk task actions"
|
|
description: ""
|
|
operationId: bulkTasks
|
|
parameters:
|
|
- $ref: "#/components/parameters/X-API-TOKEN"
|
|
- $ref: "#/components/parameters/X-Requested-With"
|
|
- $ref: "#/components/parameters/index"
|
|
requestBody:
|
|
description: "User credentials"
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
description: "Array of hashed IDs to be bulk 'actioned"
|
|
type: integer
|
|
example: "[0,1,2,3]"
|
|
responses:
|
|
200:
|
|
description: "The Task User response"
|
|
headers:
|
|
X-MINIMUM-CLIENT-VERSION:
|
|
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
|
X-RateLimit-Remaining:
|
|
$ref: "#/components/headers/X-RateLimit-Remaining"
|
|
X-RateLimit-Limit:
|
|
$ref: "#/components/headers/X-RateLimit-Limit"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Task"
|
|
401:
|
|
$ref: "#/components/responses/401"
|
|
403:
|
|
$ref: "#/components/responses/403"
|
|
422:
|
|
$ref: '#/components/responses/422'
|
|
429:
|
|
$ref: '#/components/responses/429'
|
|
5XX:
|
|
description: 'Server error'
|
|
default:
|
|
$ref: "#/components/responses/default"
|
|
"/api/v1/tasks/{id}/upload":
|
|
post:
|
|
tags:
|
|
- tasks
|
|
summary: "Uploads a task document"
|
|
description: "Handles the uploading of a document to a task"
|
|
operationId: uploadTask
|
|
parameters:
|
|
- $ref: "#/components/parameters/X-API-TOKEN"
|
|
- $ref: "#/components/parameters/X-Requested-With"
|
|
- $ref: "#/components/parameters/include"
|
|
- name: id
|
|
in: path
|
|
description: "The Task Hashed ID"
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: string
|
|
example: D2J234DFA
|
|
requestBody:
|
|
description: "File Upload Body"
|
|
required: true
|
|
content:
|
|
multipart/form-data:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
_method:
|
|
type: string
|
|
example: PUT
|
|
documents:
|
|
type: array
|
|
items:
|
|
description: "Array of binary documents for upload"
|
|
type: string
|
|
format: binary
|
|
responses:
|
|
200:
|
|
description: "Returns the Task object"
|
|
headers:
|
|
X-MINIMUM-CLIENT-VERSION:
|
|
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
|
X-RateLimit-Remaining:
|
|
$ref: "#/components/headers/X-RateLimit-Remaining"
|
|
X-RateLimit-Limit:
|
|
$ref: "#/components/headers/X-RateLimit-Limit"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Task"
|
|
401:
|
|
$ref: "#/components/responses/401"
|
|
403:
|
|
$ref: "#/components/responses/403"
|
|
422:
|
|
$ref: '#/components/responses/422'
|
|
429:
|
|
$ref: '#/components/responses/429'
|
|
5XX:
|
|
description: 'Server error'
|
|
default:
|
|
$ref: "#/components/responses/default"
|
|
/api/v1/tasks/sort:
|
|
post:
|
|
tags:
|
|
- tasks
|
|
summary: "Sort tasks on KanBan"
|
|
description: "Sorts tasks after drag and drop on the KanBan."
|
|
operationId: sortTasks
|
|
parameters:
|
|
- $ref: "#/components/parameters/X-API-TOKEN"
|
|
- $ref: "#/components/parameters/X-Requested-With"
|
|
- $ref: "#/components/parameters/include"
|
|
responses:
|
|
200:
|
|
description: "Returns an Ok, 200 HTTP status"
|
|
headers:
|
|
X-MINIMUM-CLIENT-VERSION:
|
|
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
|
X-RateLimit-Remaining:
|
|
$ref: "#/components/headers/X-RateLimit-Remaining"
|
|
X-RateLimit-Limit:
|
|
$ref: "#/components/headers/X-RateLimit-Limit"
|
|
401:
|
|
$ref: "#/components/responses/401"
|
|
403:
|
|
$ref: "#/components/responses/403"
|
|
422:
|
|
$ref: '#/components/responses/422'
|
|
429:
|
|
$ref: '#/components/responses/429'
|
|
5XX:
|
|
description: 'Server error'
|
|
default:
|
|
$ref: "#/components/responses/default" |