ProcessMaker Tasks API

Task and token management

OpenAPI Specification

processmaker-tasks-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: ProcessMaker Platform RESTful Environment Variables Tasks API
  description: 'The ProcessMaker Platform RESTful API provides programmatic access to all platform functionality including process design, case management, task handling, user management, and enterprise integrations. The API is BPMN 2.0 compliant and follows the OpenAPI specification with interactive Swagger UI documentation auto-generated by Swagger/L5-Swagger.

    '
  version: 1.0.0
  contact:
    email: info@processmaker.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://{organization}.processmaker.net/api/1.0
  description: ProcessMaker Cloud instance
  variables:
    organization:
      default: myorg
      description: Your ProcessMaker organization subdomain
security:
- bearerAuth: []
tags:
- name: Tasks
  description: Task and token management
paths:
  /tasks:
    get:
      tags:
      - Tasks
      summary: Returns all tasks
      operationId: getTasks
      parameters:
      - name: process_request_id
        in: query
        schema:
          type: integer
      - name: all_tasks
        in: query
        schema:
          type: boolean
      - $ref: '#/components/parameters/filter'
      - $ref: '#/components/parameters/order_by'
      - $ref: '#/components/parameters/order_direction'
      - $ref: '#/components/parameters/include'
      responses:
        '200':
          description: List of tasks
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskCollection'
  /tasks/{task_id}:
    get:
      tags:
      - Tasks
      summary: Get task by ID
      operationId: getTasksById
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: integer
      - $ref: '#/components/parameters/include'
      responses:
        '200':
          description: Single task
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '404':
          $ref: '#/components/responses/404'
    put:
      tags:
      - Tasks
      summary: Update a task
      operationId: updateTask
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  example: COMPLETED
                data:
                  type: object
      responses:
        '200':
          description: Updated task
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '404':
          $ref: '#/components/responses/404'
        '422':
          $ref: '#/components/responses/422'
components:
  responses:
    '422':
      description: Unprocessable Entity
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              errors:
                type: object
    '404':
      description: Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
  parameters:
    filter:
      name: filter
      in: query
      description: 'Filter results by string. Searches Name, Description, and Status. Status must match exactly. Others can be a substring.

        '
      schema:
        type: string
    order_by:
      name: order_by
      in: query
      description: Field to order results by
      schema:
        type: string
    include:
      name: include
      in: query
      description: Include data from related models in payload. Comma separated list.
      schema:
        type: string
        default: ''
    order_direction:
      name: order_direction
      in: query
      schema:
        type: string
        enum:
        - asc
        - desc
        default: asc
  schemas:
    Task:
      type: object
      properties:
        id:
          type: integer
        status:
          type: string
          enum:
          - ACTIVE
          - CLOSED
          - TRIGGERED
        element_id:
          type: string
        element_type:
          type: string
        element_name:
          type: string
        process_id:
          type: integer
        process_request_id:
          type: integer
        user_id:
          type: integer
          nullable: true
        due_at:
          type: string
          format: date-time
          nullable: true
        completed_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        data:
          type: object
    Metadata:
      type: object
      properties:
        total:
          type: integer
        count:
          type: integer
        per_page:
          type: integer
        current_page:
          type: integer
        total_pages:
          type: integer
        sort_by:
          type: string
        sort_order:
          type: string
        search:
          type: string
    TaskCollection:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Task'
        meta:
          $ref: '#/components/schemas/Metadata'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT