Certifyos Monitoring Workflow API

APIs for managing monitoring workflows

OpenAPI Specification

certifyos-monitoringworkflow-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: API for Certify application
  title: Certify API Layer Monitoring Workflow API
  version: 1.0.0
servers:
- url: http://localhost:9000
  description: Local Development Server
- url: https://api-service.staging.certifyos.com
  description: Staging Server
- url: https://api-service.internal.certifyos.com
  description: Internal Server
- url: https://api-service.test.certifyos.com
  description: Test Server
- url: https://api-service.demo.certifyos.com
  description: Demo Server
- url: https://api-service.certifyos.com
  description: Production Server
tags:
- name: MonitoringWorkflow
  description: APIs for managing monitoring workflows
paths:
  /monitoring-workflows:
    get:
      summary: Get monitoring workflows
      description: Retrieves a list of monitoring workflows based on filter criteria
      operationId: getMonitoringWorkflows
      tags:
      - MonitoringWorkflow
      parameters:
      - description: End at document ID, for backward cursor-based pagination
        name: endAtId
        in: query
        schema:
          type: string
      - description: Filter criteria as JSON object (URL encoded)
        name: filter
        in: query
        schema:
          type: string
      - description: Sort order specification
        name: order
        in: query
        schema:
          type: string
      - description: Page number (0-based), for offset-based pagination
        name: page
        in: query
        schema:
          type: integer
          format: int32
          default: '0'
      - description: Page size
        name: size
        in: query
        schema:
          type: integer
          format: int32
          default: '50'
      - description: Start after document ID, for forward cursor-based pagination
        name: startAfterId
        in: query
        schema:
          type: string
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Successfully retrieved monitoring workflows
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMonitoringWorkflowsResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized - Authentication required
        '403':
          description: Forbidden - User does not have required permissions
        '500':
          description: Internal Server Error - An unexpected error occurred
      security:
      - jwt: []
  /monitoring-workflows/assignments:
    post:
      summary: Create assignments for multiple monitoring workflows
      description: Creates assignments for multiple monitoring workflows in a single operation. Workflows are evenly distributed across the provided user IDs using round-robin distribution. Each workflow is processed independently, and results include both successful and failed assignments.
      operationId: bulkAssignMonitoringWorkflows
      tags:
      - MonitoringWorkflow
      parameters:
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkAssignMonitoringWorkflowRequest'
        required: true
      responses:
        '200':
          description: Bulk assignment operation completed. Check successful and failed arrays for individual results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkAssignMonitoringWorkflowResponse'
        '400':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized - Authentication required
        '403':
          description: Forbidden - User does not have required permissions
        '500':
          description: Internal Server Error - An unexpected error occurred
      security:
      - jwt: []
  /monitoring-workflows/bulk/status:
    put:
      summary: Bulk update monitoring workflow status
      description: Updates the monitoring status of multiple workflows to the specified status
      operationId: bulkUpdateMonitoringWorkflowStatus
      tags:
      - MonitoringWorkflow
      parameters:
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkUpdateMonitoringWorkflowStatusRequest'
        required: true
      responses:
        '200':
          description: Bulk status update completed (may include partial failures)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdateMonitoringWorkflowStatusResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized - Authentication required
        '403':
          description: Forbidden - User does not have required permissions
        '500':
          description: Internal Server Error - An unexpected error occurred
      security:
      - jwt: []
  /monitoring-workflows/unassign:
    patch:
      summary: Unassign multiple monitoring workflows
      description: Removes assignments from multiple monitoring workflows. Workflows can be specified by IDs or fetched using filter criteria.
      operationId: bulkUnassignMonitoringWorkflows
      tags:
      - MonitoringWorkflow
      parameters:
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkUnassignMonitoringWorkflowRequest'
        required: true
      responses:
        '200':
          description: Bulk unassignment operation completed. Check successful and failed arrays for individual results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUnassignMonitoringWorkflowResponse'
        '400':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized - Authentication required
        '403':
          description: Forbidden - User does not have required permissions
        '500':
          description: Internal Server Error - An unexpected error occurred
      security:
      - jwt: []
  /monitoring-workflows/{id}:
    get:
      summary: Get monitoring workflow by ID
      description: Retrieves a single monitoring workflow by its ID
      operationId: getMonitoringWorkflow
      tags:
      - MonitoringWorkflow
      parameters:
      - description: ID of the monitoring workflow to retrieve
        in: path
        required: true
        name: id
        schema:
          type: string
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Successfully retrieved the monitoring workflow
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMonitoringWorkflowResponse'
        '401':
          description: Unauthorized - Authentication required
        '403':
          description: Forbidden - User does not have required permissions
        '404':
          description: Monitoring workflow not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal Server Error - An unexpected error occurred
      security:
      - jwt: []
  /monitoring-workflows/{id}/assignment:
    post:
      summary: Create assignment for a single monitoring workflow
      description: Assigns a monitoring workflow to a specific user
      operationId: assignMonitoringWorkflow
      tags:
      - MonitoringWorkflow
      parameters:
      - description: ID of the monitoring workflow to assign
        in: path
        required: true
        name: id
        schema:
          type: string
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMonitoringWorkflowAssignmentRequest'
        required: true
      responses:
        '200':
          description: Assignment created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssignmentResult2'
        '400':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized - Authentication required
        '403':
          description: Forbidden - User does not have required permissions
        '404':
          description: Monitoring workflow not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal Server Error - An unexpected error occurred
      security:
      - jwt: []
  /monitoring-workflows/{id}/unassign:
    patch:
      summary: Unassign a single monitoring workflow
      description: Removes the assignment from a monitoring workflow
      operationId: unassignMonitoringWorkflow
      tags:
      - MonitoringWorkflow
      parameters:
      - description: ID of the monitoring workflow to unassign
        in: path
        required: true
        name: id
        schema:
          type: string
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Workflow unassigned successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnassignmentResult'
        '401':
          description: Unauthorized - Authentication required
        '403':
          description: Forbidden - User does not have required permissions
        '404':
          description: Monitoring workflow not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal Server Error - An unexpected error occurred
      security:
      - jwt: []
  /monitoring-workflows/{workflowId}/attachments:
    post:
      summary: Upload attachment to monitoring workflow row
      operationId: uploadMonitoringWorkflowAttachment
      tags:
      - MonitoringWorkflow
      parameters:
      - name: workflowId
        in: path
        required: true
        schema:
          type: string
      - name: tenant-id
        in: header
        schema:
          type: string
        required: true
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - id
              - file
              properties:
                id:
                  type: string
                  pattern: \S
                file:
                  type: string
                  format: binary
                expirationDate:
                  type: string
        required: true
      responses:
        '201':
          description: Attachment uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadMonitoringWorkflowAttachmentResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '500':
          description: Internal server error
      security:
      - jwt: []
    delete:
      summary: Delete attachment from monitoring workflow row
      operationId: deleteMonitoringWorkflowAttachment
      tags:
      - MonitoringWorkflow
      parameters:
      - name: workflowId
        in: path
        required: true
        schema:
          type: string
      - name: tenant-id
        in: header
        schema:
          type: string
        required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteAttachmentRequest2'
        required: true
      responses:
        '200':
          description: Attachment deleted successfully
          content:
            application/json: {}
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '500':
          description: Internal server error
      security:
      - jwt: []
  /monitoring-workflows/{workflowId}/pipeline-runs:
    post:
      summary: Trigger pipeline execution for monitoring workflow
      description: Triggers CAQH or NPDB pipeline execution for the specified monitoring workflow. Only CAQH and NPDB pipelines are supported.
      operationId: runMonitoringPipeline
      tags:
      - MonitoringWorkflow
      parameters:
      - description: ID of the monitoring workflow
        in: path
        required: true
        name: workflowId
        schema:
          type: string
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunPipelineRequest'
        required: true
      responses:
        '200':
          description: Successfully triggered pipeline execution
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: Unauthorized - Authentication required
        '403':
          description: Forbidden - User does not have required permissions
        '404':
          description: Monitoring workflow not found
          content:
            application/json: {}
        '500':
          description: Internal Server Error - An unexpected error occurred
      security:
      - jwt: []
    get:
      summary: Get pipeline runs for a monitoring workflow
      description: Retrieves pipeline runs for the specified monitoring workflow with optional filtering, pagination, and ordering.
      operationId: getMonitoringPipelineRuns
      tags:
      - MonitoringWorkflow
      parameters:
      - description: ID of the monitoring workflow
        in: path
        required: true
        name: workflowId
        schema:
          type: string
      - description: Cursor for cursor-based pagination
        name: cursor
        in: query
        schema:
          type: string
      - description: 'Filter criteria. Example: {"createdAt":{"gte":"2023-01-01T00:00:00Z"}}'
        name: filter
        in: query
        schema:
          type: string
      - description: Whether to include pipeline steps in the response
        name: includeSteps
        in: query
        schema:
          type: boolean
      - description: 'Sort order. Example: {"createdAt":"desc"}'
        name: order
        in: query
        schema:
          type: string
      - description: Page number (0-based), for offset-based pagination
        name: page
        in: query
        schema:
          type: integer
          format: int32
          default: '0'
      - description: Page size
        name: size
        in: query
        schema:
          type: integer
          format: int32
          default: '50'
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Successfully retrieved pipeline runs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMonitoringPipelineRunsResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: Unauthorized - Authentication required
        '403':
          description: Forbidden - User does not have required permissions
        '404':
          description: Monitoring workflow not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal Server Error - An unexpected error occurred
      security:
      - jwt: []
  /monitoring-workflows/{workflowId}/pipeline-runs/{id}:
    get:
      summary: Get a specific pipeline run for a monitoring workflow
      description: Retrieves a specific pipeline run by ID for the specified monitoring workflow
      operationId: getMonitoringPipelineRunById
      tags:
      - MonitoringWorkflow
      parameters:
      - description: ID of the pipeline run
        in: path
        required: true
        name: id
        schema:
          type: string
      - description: ID of the monitoring workflow
        in: path
        required: true
        name: workflowId
        schema:
          type: string
      - description: Whether to include pipeline steps in the response
        name: includeSteps
        in: query
        schema:
          type: boolean
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Successfully retrieved pipeline run
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitoringWorkflowDataPipelineRequestResponse'
        '401':
          description: Unauthorized - Authentication required
        '403':
          description: Forbidden - User does not have required permissions
        '404':
          description: Pipeline run or monitoring workflow not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal Server Error - An unexpected error occurred
      security:
      - jwt: []
  /monitoring-workflows/{workflowId}/records/{recordId}/verify:
    patch:
      summary: Verify a record in a monitoring workflow section
      description: Marks a specific record as verified by setting verifiedBy (current user) and verifiedDate (current timestamp). The recordId format is '{section}-{index}' (e.g., 'dea-0', 'licenses-1'). This is an atomic operation that only modifies verification fields without affecting other data.
      operationId: verifyMonitoringWorkflowRecord
      tags:
      - MonitoringWorkflow
      parameters:
      - description: Record identifier in format '{section}-{index}' (e.g., 'dea-0', 'licenses-1', 'boardCertifications-2')
        example: dea-0
        in: path
        required: true
        name: recordId
        schema:
          type: string
          pattern: \S
      - description: Monitoring workflow ID
        example: mw_1234567890
        in: path
        required: true
        name: workflowId
        schema:
          type: string
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Record verified successfully
          content:
            application/json:
              example:
                workflowId: mw_1234567890
                recordId: dea-0
                section: dea
                index: 0
                verifiedBy: user_abc123
                verifiedDate: '2024-10-29T15:30:00Z'
                message: Record verified successfully
              schema:
                type: object
        '400':
          description: Bad request - Invalid record ID format or record not found
          content:
            application/json:
              example:
                errors:
                - 'Invalid record ID format. Expected format: {section}-{index} (e.g., ''dea-0'')'
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: Unauthorized - Authentication required
        '403':
          description: Forbidden - Insufficient permissions
        '404':
          description: Monitoring workflow not found or record not found in section
        '500':
          description: Internal server error
      security:
      - jwt: []
  /monitoring-workflows/{workflowId}/status:
    put:
      summary: Update monitoring workflow status
      description: Updates the monitoring status of a workflow to the specified status
      operationId: updateMonitoringWorkflowStatus
      tags:
      - MonitoringWorkflow
      parameters:
      - description: ID of the monitoring workflow
        in: path
        required: true
        name: workflowId
        schema:
          type: string
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMonitoringWorkflowStatusRequest'
        required: true
      responses:
        '200':
          description: Successfully updated the monitoring workflow status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitoringWorkflowResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized - Authentication required
        '403':
          description: Forbidden - User does not have required permissions
        '404':
          description: Monitoring workflow not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal Server Error - An unexpected error occurred
      security:
      - jwt: []
  /monitoring-workflows/{workflowId}/supporting-documents:
    put:
      summary: Update supporting documents for a monitoring workflow using replace-all pattern
      description: Replaces the entire supporting documents array with the provided list (RESTful PUT semantics).
      operationId: updateSupportingDocumentsForMonitoringWorkflow
      tags:
      - MonitoringWorkflow
      parameters:
      - description: Monitoring workflow ID
        example: mw_1234567890
        in: path
        required: true
        name: workflowId
        schema:
          type: string
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      requestBody:
        description: Array of all supporting documents (desired state). Documents not included will be removed.
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/MonitoringSupportingDocumentUpdateRequest'
        required: true
      responses:
        '200':
          description: Supporting documents updated successfully
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request - Invalid input or validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: Unauthorized - Authentication required
        '403':
          description: Forbidden - Insufficient permissions
        '404':
          description: Monitoring workflow not found
        '500':
          description: Internal server error
      security:
      - jwt: []
    post:
      summary: Create a new supporting document for a monitoring workflow
      description: Upload a new supporting document file for the specified monitoring workflow
      operationId: createSupportingDocumentForMonitoringWorkflow
      tags:
      - MonitoringWorkflow
      parameters:
      - description: Monitoring workflow ID
        example: mw_1234567890
        in: path
        required: true
        name: workflowId
        schema:
          type: string
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                fileType:
                  type: string
                  pattern: \S
                state:
                  type: string
                expirationDate:
                  type: string
              required:
              - fileType
        required: true
      responses:
        '201':
          description: Supporting document uploaded successfully
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request - Invalid input, e.g., file is missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: Unauthorized - Authentication required
        '403':
          description: Forbidden - Insufficient permissions
        '404':
          description: Monitoring workflow not found
        '500':
          description: Internal server error
      security:
      - jwt: []
  /monitoring-workflows/{workflowId}/{sectionName}:
    post:
      summary: Create a new record in any monitoring workflow section
      description: 'Generic endpoint to create records in sections: appVerifications, boardCertifications, cds, dea, educationTraining, hospitalAffiliations, licenses, licensureActions, malpracticeInsurance, npdbReports, performanceIndicators, practiceLocations, professionalIds, sanctions, siteVisits, specialties, supportingDocuments'
      operationId: createMonitoringWorkflowSectionRecord
      tags:
      - MonitoringWorkflow
      parameters:
      - description: 'Section name. Available sections: appVerifications, boardCertifications, cds, dea, educationTraining, hospitalAffiliations, licenses, licensureActions, malpracticeInsurance, npdbReports, performanceIndicators, practiceLocations, professionalIds, sanctions, siteVisits, specialties, supportingDocuments'
        example: appVerifications
        in: path
        required: true
        name: sectionName
        schema:
          type: string
          pattern: \S
      - description: Monitoring workflow ID
        example: UUID
        in: path
        required: true
        name: workflowId
        schema:
          type: string
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      requestBody:
        description: Request body schema varies by section. Use the appropriate schema based on sectionName.
        content:
          application/json:
            examples: {}
            schema:
              $ref: '#/components/schemas/JsonNode'
        required: true
      responses:
        '201':
          description: Record created successfully
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request - Invalid section name, input, or validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: Unauthorized - Authentication required
          content:
            application/json: {}
        '403':
          description: Forbidden - Insufficient permissions
          content:
            application/json: {}
        '404':
          description: Monitoring workflow not found
          content:
            application/json: {}
        '500':
          description: Internal server error
          content:
            application/json: {}
      security:
      - jwt: []
  /monitoring-workflows/{workflowId}/{sectionName}/{recordId}:
    patch:
      summary: Update a single record in any monitoring workflow section
      description: 'Generic endpoint to update records by recordId format: ''{section}-{index}''. Works for all CRUD-enabled sections.'
      operationId: updateMonitoringWorkflowSectionRecord
      tags:
      - MonitoringWorkflow
      parameters:
      - description: 'Record identifier format: ''{section}-{index}'' (e.g., ''appVerifications-0'')'
        example: appVerifications-0
        in: path
        required: true
        name: recordId
        schema:
          type: string
          pattern: \S
      - description: 'Section name. Available sections: appVerifications, boardCertifications, cds, dea, educationTraining, hospitalAffiliations, licenses, licensureActions, malpracticeInsurance, npdbReports, performanceIndicators, practiceLocations, professionalIds, sanctions, siteVisits, specialties, supportingDocuments'
        example: appVerifications
        in: path
        required: true
        name: sectionName
        schema:
          type: string
          pattern: \S
      - description: Monitoring workflow ID
        example: mw_1234567890
        in: path
        required: true
        name: workflowId
        schema:
          type: string
      - description: Tenant ID
        required: true
        name: tenant-id
        in: header
        schema:
          type: string
      requestBody:
        description: Request body schema varies by section. Use the appropriate schema based on sectionName.
        content:
          application/json:
            examples: {}
            schema:
              $ref: '#/components/schemas/JsonNode'
        required: true
      responses:
        '200':
          description: Record updated successfully
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request - Invalid record ID format, section name, or validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: Unauthorized - Authentication required
          content:
            application/json: {}
        '403':
          description: Forbidden - Insufficient permissions
          content:
            application/json: {}
        '404':
          description: Monitoring workflow not found or record not found
          content:
            application/json: {}
        '500':
          description: Internal server error
          content:
            application/json: {}
      security:
      - jwt: []
    delete:
      summary: Delete a record from any monitoring workflow section
      descripti

# --- truncated at 32 KB (179 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/certifyos/refs/heads/main/openapi/certifyos-monitoringworkflow-api-openapi.yml