%PDF- %PDF-
| Direktori : /home/vacivi36/intranet.vacivitta.com.br/protected/modules/tasks/docs/swagger/ |
| Current File : /home/vacivi36/intranet.vacivitta.com.br/protected/modules/tasks/docs/swagger/task.yaml |
swagger: '2.0'
info:
description: |
Welcome to the HumHub tasks module API reference.
version: 1.0.0
title: HumHub - Tasks API
contact:
email: info@humhub.com
license:
name: AGPLv2
url: 'https://www.humhub.org/en/licences'
basePath: /api/v1
paths:
'/tasks':
get:
tags:
- Tasks
summary: Find all tasks
description: ''
produces:
- application/json
- application/xml
parameters:
- $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/parameters/pageParam'
- $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/parameters/limitParam'
responses:
'200':
description: Success
schema:
type: object
properties:
total:
$ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/totalProperty'
page:
$ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/pageProperty'
pages:
$ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/pagesProperty'
links:
$ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/linksProperty'
results:
type: array
items:
$ref: '#/definitions/Task'
'/tasks/container/{id}':
get:
tags:
- Tasks
summary: Find all tasks by container
description: ''
produces:
- application/json
- application/xml
parameters:
- name: id
in: path
description: ID of content container
required: true
type: integer
- $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/parameters/pageParam'
- $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/parameters/limitParam'
responses:
200:
description: Success
schema:
type: object
properties:
total:
$ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/totalProperty'
page:
$ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/pageProperty'
pages:
$ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/pagesProperty'
links:
$ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/linksProperty'
results:
type: array
items:
$ref: '#/definitions/Task'
404:
description: Not found
schema:
type: object
properties:
code:
type: integer
example: 404
message:
type: string
example: Content container not found!
post:
tags:
- Task
summary: Create new task
description: ''
produces:
- application/json
parameters:
- in: path
name: id
description: The id of content container
required: true
type: integer
- $ref: "#/definitions/TaskParams"
responses:
200:
description: Success
schema:
$ref: "#/definitions/Task"
403:
description: Forbidden
schema:
type: object
properties:
code:
type: integer
example: 403
message:
type: string
example: You are not allowed to create task!
404:
description: Not found
schema:
type: object
properties:
code:
type: integer
example: 404
message:
type: string
example: Content container not found!
422:
description: Validation failed
500:
description: Internal server error
schema:
type: object
properties:
code:
type: integer
example: 500
message:
type: string
example: Internal error while save valid task!
delete:
tags:
- Tasks
summary: Deletes a tasks by container
produces:
- application/json
parameters:
- name: id
in: path
description: The id of content container
required: true
type: integer
responses:
200:
description: Success
schema:
type: object
properties:
code:
type: integer
example: 200
message:
type: string
example: Records successfully deleted!
404:
description: Not found
schema:
type: object
properties:
code:
type: integer
example: 404
message:
type: string
example: Content container not found!
'/tasks/task/{id}':
get:
tags:
- Task
summary: Get task by id
description: ''
produces:
- application/json
parameters:
- name: id
in: path
description: The id of the task
required: true
type: integer
responses:
200:
description: Success
schema:
$ref: "#/definitions/Task"
404:
description: Not found
schema:
type: object
properties:
code:
type: integer
example: 404
message:
type: string
example: Task not found
put:
tags:
- Task
summary: Update task by id
description: ''
produces:
- application/json
parameters:
- name: id
in: path
description: The id of the task
required: true
type: integer
- $ref: "#/definitions/TaskParams"
responses:
200:
description: Success
schema:
$ref: "#/definitions/Task"
403:
description: Forbidden
schema:
type: object
properties:
code:
type: integer
example: 403
message:
type: string
example: You are not allowed to edit this task!
404:
description: Not found
schema:
type: object
properties:
code:
type: integer
example: 404
message:
type: string
example: Task not found
422:
description: Validation failed
500:
description: Internal server error
schema:
type: object
properties:
code:
type: integer
example: 500
message:
type: string
example: Internal error while update task!
delete:
tags:
- Task
summary: Delete the task by id
produces:
- application/json
parameters:
- name: id
in: path
description: The id of the task
required: true
type: integer
responses:
200:
description: Success
schema:
type: object
properties:
code:
type: integer
example: 200
message:
type: string
example: Task successfully deleted!
404:
description: Not found
schema:
type: object
properties:
code:
type: integer
example: 404
message:
type: string
example: Task not found
#-----------------------------------------------------------------------------------------------------------------------
# Begin Task Management
#-----------------------------------------------------------------------------------------------------------------------
'/tasks/task/{id}/processed':
patch:
tags:
- Task management
summary: Change task status
description: ''
produces:
- application/json
parameters:
- name: id
in: path
description: The id of the task
required: true
type: integer
- name: body
in: body
required: true
schema:
type: object
required:
- status
properties:
title:
type: integer
format: int64
enum: [1,2,3,5]
example: 2
description: >
Participant type:
* 1 - pending.
* 2 - in progress.
* 3 - pending review.
* 5 - completed.
responses:
200:
description: Success
schema:
type: object
properties:
code:
type: integer
example: 200
message:
type: string
example: Status successfully changed.
400:
description: Bad request
schema:
type: object
properties:
code:
type: integer
example: 400
message:
type: string
example: Invalid status!
403:
description: Forbidden
schema:
type: object
properties:
code:
type: integer
example: 403
message:
type: string
example: You are not allowed to change status of this task!
404:
description: Not found
schema:
type: object
properties:
code:
type: integer
example: 404
message:
type: string
example: Task not found
'/tasks/task/{id}/revert':
patch:
tags:
- Task management
summary: Revert task
description: ''
produces:
- application/json
parameters:
- name: id
in: path
description: The id of the task
required: true
type: integer
- name: body
in: body
required: true
schema:
type: object
required:
- status
properties:
title:
type: integer
format: int64
enum: [1,2,3,4]
example: 2
description: >
Participant type:
* 1 - pending.
* 2 - in progress.
* 3 - pending review.
* 4 - completed.
responses:
200:
description: Success
schema:
type: object
properties:
code:
type: integer
example: 200
message:
type: string
example: Task successfully reverted.
400:
description: Bad request
schema:
type: object
properties:
code:
type: integer
example: 400
message:
type: string
example: Invalid status!
403:
description: Forbidden
schema:
type: object
properties:
code:
type: integer
example: 403
message:
type: string
example: You are not allowed to revert this task!
404:
description: Not found
schema:
type: object
properties:
code:
type: integer
example: 404
message:
type: string
example: Task not found
'/tasks/task/{id}/upload-files':
post:
tags:
- Task management
summary: Attach files to task
description: ''
produces:
- application/json
consumes:
- multipart/form-data
parameters:
- in: path
name: id
description: The id of the task
required: true
type: integer
- in: formData
name: files
type: array
required: true
description: The files to upload.
items:
type: file
responses:
200:
description: Success
schema:
type: object
properties:
code:
type: integer
example: 200
message:
type: string
example: Files successfully uploaded.
400:
description: Bad Request
schema:
type: object
properties:
code:
type: integer
example: 400
message:
type: string
example: No files to upload.
404:
description: Not found
schema:
type: object
properties:
code:
type: integer
example: 404
message:
type: string
example: Content record not found!
500:
description: Internal server error
schema:
type: object
properties:
code:
type: integer
example: 500
message:
type: string
example: Internal error while saving file.
'/tasks/task/{id}/remove-file/{fileId}':
delete:
tags:
- Task management
summary: Remove file from task
description: ''
produces:
- application/json
parameters:
- in: path
name: id
description: The id of the task
required: true
type: integer
- in: path
name: fileId
required: true
description: The id of file to remove.
responses:
200:
description: Success
schema:
type: object
properties:
code:
type: integer
example: 200
message:
type: string
example: File successfully removed.
403:
description: Forbidden
schema:
type: object
properties:
code:
type: integer
example: 403
message:
type: string
example: Insufficient permissions!
404:
description: Not found
schema:
type: object
properties:
code:
type: integer
example: 404
message:
type: string
example: Could not find requested content record or file!
500:
description: Internal server error
schema:
type: object
properties:
code:
type: integer
example: 500
message:
type: string
example: Internal error while removing file.
#-----------------------------------------------------------------------------------------------------------------------
# Begin Task List
#-----------------------------------------------------------------------------------------------------------------------
'/tasks/lists/container/{id}':
get:
tags:
- Task List
summary: Find all task lists by container
description: ''
produces:
- application/json
- application/xml
parameters:
- name: id
in: path
description: ID of content container
required: true
type: integer
- $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/parameters/pageParam'
- $ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/parameters/limitParam'
responses:
200:
description: Success
schema:
type: object
properties:
total:
$ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/totalProperty'
page:
$ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/pageProperty'
pages:
$ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/pagesProperty'
links:
$ref: 'https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/properties/linksProperty'
results:
type: array
items:
$ref: '#/definitions/TaskList'
404:
description: Not found
schema:
type: object
properties:
code:
type: integer
example: 404
message:
type: string
example: Content container not found!
post:
tags:
- Task List
summary: Create new task list
description: ''
produces:
- application/json
parameters:
- in: path
name: id
description: The id of content container
required: true
type: integer
- $ref: "#/definitions/TaskListParams"
responses:
200:
description: Success
schema:
$ref: "#/definitions/TaskList"
404:
description: Not found
schema:
type: object
properties:
code:
type: integer
example: 404
message:
type: string
example: Content container not found!
422:
description: Validation failed
500:
description: Internal server error
schema:
type: object
properties:
code:
type: integer
example: 500
message:
type: string
example: Internal error while save valid task list!
'/tasks/list/{id}':
get:
tags:
- Task List
summary: Get task list by id
description: ''
produces:
- application/json
parameters:
- name: id
in: path
description: The id of the task list
required: true
type: integer
responses:
200:
description: Success
schema:
$ref: "#/definitions/TaskList"
404:
description: Not found
schema:
type: object
properties:
code:
type: integer
example: 404
message:
type: string
example: Task list not found
put:
tags:
- Task List
summary: Update task list by id
description: ''
produces:
- application/json
parameters:
- name: id
in: path
description: The id of the task list
required: true
type: integer
- $ref: "#/definitions/TaskListParams"
responses:
200:
description: Success
schema:
$ref: "#/definitions/TaskList"
404:
description: Not found
schema:
type: object
properties:
code:
type: integer
example: 404
message:
type: string
example: Task list not found
422:
description: Validation failed
500:
description: Internal server error
schema:
type: object
properties:
code:
type: integer
example: 500
message:
type: string
example: Internal error while update task list!
delete:
tags:
- Task List
summary: Delete the task list by id
produces:
- application/json
parameters:
- name: id
in: path
description: The id of the task list
required: true
type: integer
responses:
200:
description: Success
schema:
type: object
properties:
code:
type: integer
example: 200
message:
type: string
example: Task list successfully deleted!
404:
description: Not found
schema:
type: object
properties:
code:
type: integer
example: 404
message:
type: string
example: Task list not found
securityDefinitions:
$ref: "https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/securityDefinitions"
definitions:
Task:
type: object
properties:
id:
type: integer
format: int64
readOnly: true
example: 6
title:
type: string
example: Space task by API
description:
type: string
example: Space task by API description
status:
type: integer
format: int64
example: 1
start_datetime:
type: string
format: datetime
example: "2019-02-27 10:00:00"
end_datetime:
type: string
format: datetime
example: "2019-02-28 17:59:00"
scheduling:
type: integer
format: int64
example: 1
all_day:
type: integer
format: int64
example: 0
reminders:
type: array
items:
$ref: "#/definitions/Reminder"
max_users:
type: integer
format: int64
example: null
color:
type: string
example: null
task_list:
type: object
$ref: "#/definitions/TaskList"
cal_mode:
type: integer
format: int64
example: 1
review:
type: integer
format: int64
example: 1
created_at:
type: string
example: 2019-03-05 15:35:02
created_by:
$ref: "https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/user.yaml#/definitions/UserShort"
content:
$ref: "https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/content.yaml#/definitions/Content"
percentage:
type: integer
format: int64
example: 0
checklist:
type: array
items:
$ref: "#/definitions/Checklist"
assigned_users:
type: array
items:
$ref: "https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/user.yaml#/definitions/UserShort"
responsible_users:
type: array
items:
$ref: "https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/user.yaml#/definitions/UserShort"
TaskParams:
in: body
name: body
required: true
description: Task information
schema:
type: object
required:
- Task
- TaskForm
properties:
Task:
type: object
required:
- title
properties:
title:
type: string
example: New task by api
description:
type: string
example: Api task description
task_list_id:
type: integer
format: int64
example: 9
scheduling:
type: integer
format: int64
example: 1
all_day:
type: integer
format: int64
example: 0
selectedReminders:
type: array
description: Id's of reminder mode
items:
type: integer
format: int64
example:
- 1
- 4
cal_mode:
type: integer
format: int64
example: 1
description: Add schedule to the space calendar
assignedUsers:
type: array
description: guid's of user
items:
type: string
example:
- ad82fbfa-9621-489f-993a-0cf6d8be5747
- 231acc8c-a8f5-4450-8b96-f670ffc1496b
responsibleUsers:
type: array
description: guid's of user
items:
type: string
example:
- ad82fbfa-9621-489f-993a-0cf6d8be5747
review:
type: integer
format: int64
example: 1
description: Review by responsible user
TaskForm:
type: object
required:
- start_date
- end_date
- start_time
- end_time
properties:
is_public:
type: integer
format: int64
example: 1
start_date:
type: string
format: date
description: Required if Task scheduling param is set
example: "2019-03-23"
start_time:
type: string
description: Required if Task scheduling param is set and Task all_day param isn't set
example: "10:00"
end_date:
type: string
format: date
description: Required if Task scheduling param is set
example: "2019-03-25"
end_time:
type: string
description: Required if Task scheduling param is set and Task all_day param isn't set
example: "20:30"
timeZone:
type: string
example: America/Los_Angeles
newItems:
type: array
description: Checklist items
items:
type: string
example:
- first item
- second item
content:
$ref: "https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/content.yaml#/definitions/Content"
TaskListParams:
in: body
name: body
required: true
description: Task list information
schema:
type: object
required:
- TaskList
- TaskListSettings
properties:
TaskList:
type: object
required:
- title
properties:
name:
type: string
example: New task list by api
color:
type: string
example: "#6fdbe8"
TaskListSettings:
type: object
properties:
hide_if_completed:
type: integer
format: int64
default: 1
example: 1
Checklist:
type: object
properties:
id:
type: integer
format: int64
readOnly: true
example: 14
task_id:
type: integer
format: int64
example: 6
title:
type: string
example: first item
description:
type: string
example: item description
completed:
type: integer
format: int64
example: 0
sort_order:
type: integer
format: int64
example: 0
Reminder:
type: object
properties:
id:
type: integer
format: int64
readOnly: true
example: 14
task_id:
type: integer
format: int64
example: 6
reminder_mode:
type: integer
format: int64
example: 3
start_reminder_sent:
type: integer
format: int64
example: 0
end_reminder_sent:
type: integer
format: int64
example: 0
TaskList:
type: object
properties:
id:
type: integer
format: int64
example: 9
name:
type: string
example: Task list name
contentcontainer_id:
type: integer
format: int64
example: 2
parent_id:
type: integer
format: int64
example: null
color:
type: string
example: "#d1ad0e"
settings:
type: object
properties:
hide_if_completed:
type: integer
format: int64
example: 1
sort_order:
type: integer
format: int64
example: 0