openapi: 3.0.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
paths:
  /tasks:
    get:
      tags:
        - Tasks
      summary: Find all tasks
      description: ""
      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
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/totalProperty
                  page:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/pageProperty
                  pages:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/pagesProperty
                  links:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/linksProperty
                  results:
                    type: array
                    items:
                      $ref: "#/components/schemas/Task"
            application/xml:
              schema:
                type: object
                properties:
                  total:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/totalProperty
                  page:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/pageProperty
                  pages:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/pagesProperty
                  links:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/linksProperty
                  results:
                    type: array
                    items:
                      $ref: "#/components/schemas/Task"
  "/tasks/container/{id}":
    get:
      tags:
        - Tasks
      summary: Find all tasks by container
      description: ""
      parameters:
        - name: id
          in: path
          description: ID of content container
          required: true
          schema:
            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
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/totalProperty
                  page:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/pageProperty
                  pages:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/pagesProperty
                  links:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/linksProperty
                  results:
                    type: array
                    items:
                      $ref: "#/components/schemas/Task"
            application/xml:
              schema:
                type: object
                properties:
                  total:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/totalProperty
                  page:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/pageProperty
                  pages:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/pagesProperty
                  links:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/linksProperty
                  results:
                    type: array
                    items:
                      $ref: "#/components/schemas/Task"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 404
                  message:
                    type: string
                    example: Content container not found!
            application/xml:
              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: ""
      parameters:
        - in: path
          name: id
          description: The id of content container
          required: true
          schema:
            type: integer
      requestBody:
        $ref: "#/components/requestBodies/Body"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Task"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 403
                  message:
                    type: string
                    example: You are not allowed to create task!
        "404":
          description: Not found
          content:
            application/json:
              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
          content:
            application/json:
              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
      parameters:
        - name: id
          in: path
          description: The id of content container
          required: true
          schema:
            type: integer
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: Records successfully deleted!
        "404":
          description: Not found
          content:
            application/json:
              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: ""
      parameters:
        - name: id
          in: path
          description: The id of the task
          required: true
          schema:
            type: integer
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Task"
        "404":
          description: Not found
          content:
            application/json:
              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: ""
      parameters:
        - name: id
          in: path
          description: The id of the task
          required: true
          schema:
            type: integer
      requestBody:
        $ref: "#/components/requestBodies/Body"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Task"
        "403":
          description: Forbidden
          content:
            application/json:
              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
          content:
            application/json:
              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
          content:
            application/json:
              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
      parameters:
        - name: id
          in: path
          description: The id of the task
          required: true
          schema:
            type: integer
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: Task successfully deleted!
        "404":
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 404
                  message:
                    type: string
                    example: Task not found
  "/tasks/task/{id}/processed":
    patch:
      tags:
        - Task management
      summary: Change task status
      description: ""
      parameters:
        - name: id
          in: path
          description: The id of the task
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            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.
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: Status successfully changed.
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 400
                  message:
                    type: string
                    example: Invalid status!
        "403":
          description: Forbidden
          content:
            application/json:
              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
          content:
            application/json:
              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: ""
      parameters:
        - name: id
          in: path
          description: The id of the task
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            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.
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: Task successfully reverted.
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 400
                  message:
                    type: string
                    example: Invalid status!
        "403":
          description: Forbidden
          content:
            application/json:
              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
          content:
            application/json:
              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: ""
      parameters:
        - in: path
          name: id
          description: The id of the task
          required: true
          schema:
            type: integer
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                files:
                  description: The files to upload.
                  type: array
                  items:
                    type: file
              required:
                - files
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: Files successfully uploaded.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 400
                  message:
                    type: string
                    example: No files to upload.
        "404":
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 404
                  message:
                    type: string
                    example: Content record not found!
        "500":
          description: Internal server error
          content:
            application/json:
              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: ""
      parameters:
        - in: path
          name: id
          description: The id of the task
          required: true
          schema:
            type: integer
        - in: path
          name: fileId
          required: true
          description: The id of file to remove.
          schema:
            type: integer
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: File successfully removed.
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 403
                  message:
                    type: string
                    example: Insufficient permissions!
        "404":
          description: Not found
          content:
            application/json:
              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
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 500
                  message:
                    type: string
                    example: Internal error while removing file.
  "/tasks/lists/container/{id}":
    get:
      tags:
        - Task List
      summary: Find all task lists by container
      description: ""
      parameters:
        - name: id
          in: path
          description: ID of content container
          required: true
          schema:
            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
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/totalProperty
                  page:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/pageProperty
                  pages:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/pagesProperty
                  links:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/linksProperty
                  results:
                    type: array
                    items:
                      $ref: "#/components/schemas/TaskList"
            application/xml:
              schema:
                type: object
                properties:
                  total:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/totalProperty
                  page:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/pageProperty
                  pages:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/pagesProperty
                  links:
                    $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/components/schemas/linksProperty
                  results:
                    type: array
                    items:
                      $ref: "#/components/schemas/TaskList"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 404
                  message:
                    type: string
                    example: Content container not found!
            application/xml:
              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: ""
      parameters:
        - in: path
          name: id
          description: The id of content container
          required: true
          schema:
            type: integer
      requestBody:
        $ref: "#/components/requestBodies/Body2"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskList"
        "404":
          description: Not found
          content:
            application/json:
              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
          content:
            application/json:
              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: ""
      parameters:
        - name: id
          in: path
          description: The id of the task list
          required: true
          schema:
            type: integer
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskList"
        "404":
          description: Not found
          content:
            application/json:
              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: ""
      parameters:
        - name: id
          in: path
          description: The id of the task list
          required: true
          schema:
            type: integer
      requestBody:
        $ref: "#/components/requestBodies/Body2"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskList"
        "404":
          description: Not found
          content:
            application/json:
              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
          content:
            application/json:
              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
      parameters:
        - name: id
          in: path
          description: The id of the task list
          required: true
          schema:
            type: integer
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: Task list successfully deleted!
        "404":
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 404
                  message:
                    type: string
                    example: Task list not found
servers:
  - url: /api/v1
components:
  requestBodies:
    Body:
      content:
        application/json:
          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#/components/schemas/Content
      description: Task information
    Body2:
      content:
        application/json:
          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
      description: Task list information
  securitySchemes:
    _ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/common.yaml#/securityDefinitions
  schemas:
    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: "#/components/schemas/Reminder"
        max_users:
          type: integer
          format: int64
          example: null
        color:
          type: string
          example: null
        task_list:
          $ref: "#/components/schemas/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#/components/schemas/UserShort
        content:
          $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/content.yaml#/components/schemas/Content
        percentage:
          type: integer
          format: int64
          example: 0
        checklist:
          type: array
          items:
            $ref: "#/components/schemas/Checklist"
        assigned_users:
          type: array
          items:
            $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/user.yaml#/components/schemas/UserShort
        responsible_users:
          type: array
          items:
            $ref: https://raw.githubusercontent.com/humhub/rest/master/docs/swagger/user.yaml#/components/schemas/UserShort
    TaskParams:
      in: body
      name: body
      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#/components/schemas/Content
      x-s2o-delete: true
    TaskListParams:
      in: body
      name: body
      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
      x-s2o-delete: true
    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
