ProcessMaker Users API

User account management

OpenAPI Specification

processmaker-users-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: ProcessMaker Platform RESTful Environment Variables Users 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: Users
  description: User account management
paths:
  /users:
    get:
      tags:
      - Users
      summary: Returns all users
      operationId: getUsers
      parameters:
      - $ref: '#/components/parameters/status'
      - $ref: '#/components/parameters/filter'
      - $ref: '#/components/parameters/order_by'
      - $ref: '#/components/parameters/order_direction'
      - $ref: '#/components/parameters/per_page'
      - $ref: '#/components/parameters/include'
      - name: exclude_ids
        in: query
        description: Comma-separated user IDs to exclude
        schema:
          type: string
      responses:
        '200':
          description: List of users
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserCollection'
    post:
      tags:
      - Users
      summary: Save a new user
      operationId: createUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserEditable'
      responses:
        '201':
          description: Created user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '422':
          $ref: '#/components/responses/422'
  /users/{user_id}:
    get:
      tags:
      - Users
      summary: Get single user by ID
      operationId: getUserById
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Single user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '404':
          $ref: '#/components/responses/404'
    put:
      tags:
      - Users
      summary: Update a user
      operationId: updateUser
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserEditable'
      responses:
        '204':
          description: No content
        '404':
          $ref: '#/components/responses/404'
    delete:
      tags:
      - Users
      summary: Delete a user
      operationId: deleteUser
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: No content
        '404':
          $ref: '#/components/responses/404'
  /users/restore:
    put:
      tags:
      - Users
      summary: Restore a soft deleted user
      operationId: restoreUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
      responses:
        '200':
          description: Success
  /users_task_count:
    get:
      tags:
      - Users
      summary: Returns all users and their total tasks
      operationId: getUsersTaskCount
      parameters:
      - $ref: '#/components/parameters/filter'
      - name: include_ids
        in: query
        description: Comma-separated user IDs to include
        schema:
          type: string
      responses:
        '200':
          description: Users with task counts
          content:
            application/json:
              schema:
                type: object
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:
    status:
      name: status
      in: query
      description: Filter by status - ACTIVE or INACTIVE
      schema:
        type: string
        enum:
        - ACTIVE
        - INACTIVE
    per_page:
      name: per_page
      in: query
      schema:
        type: integer
        default: 10
    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
    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
    order_by:
      name: order_by
      in: query
      description: Field to order results by
      schema:
        type: string
  schemas:
    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
    User:
      allOf:
      - $ref: '#/components/schemas/UserEditable'
      - type: object
        properties:
          id:
            type: integer
          created_at:
            type: string
            format: date-time
          updated_at:
            type: string
            format: date-time
          deleted_at:
            type: string
            format: date-time
            nullable: true
          is_administrator:
            type: boolean
          fullname:
            type: string
    UserCollection:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/User'
        meta:
          $ref: '#/components/schemas/Metadata'
    UserEditable:
      type: object
      required:
      - username
      - firstname
      - lastname
      - email
      - password
      - status
      properties:
        username:
          type: string
        firstname:
          type: string
        lastname:
          type: string
        email:
          type: string
          format: email
        password:
          type: string
          format: password
        status:
          type: string
          enum:
          - ACTIVE
          - INACTIVE
        timezone:
          type: string
        datetime_format:
          type: string
        language:
          type: string
        avatar:
          type: string
        phone:
          type: string
        cell:
          type: string
        title:
          type: string
        address:
          type: string
        city:
          type: string
        state:
          type: string
        postal:
          type: string
        country:
          type: string
        expires_at:
          type: string
          format: date-time
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT