MonitoringWorkflow

Bulk-assign workflows to one or more users

Distributes multiple monitoring workflows evenly across the provided user IDs using round-robin assignment. Use this endpoint to assign many workflows in a single call instead of one at a time via POST /monitoring-workflows/{id}/assignment. The request body must supply either workflowIds or filter to identify which workflows to assign — at least one is required. Workflows currently in REVIEWED_BY_CERTIFYOS status are automatically excluded from assignment and appear in the response failed array. Requires one of: MONITORING_WORKFLOW_ASSIGN, MONITORING_WORKFLOW_ASSIGN_SELF, or MONITORING_WORKFLOW_BULK_ASSIGN. The tenant-id header is mandatory. Always returns HTTP 200, even when every individual assignment fails — check the successful and failed arrays for per-workflow outcomes.

post/monitoring-workflows/assignments

Headers

tenant-idstring required

Tenant ID

Request body

workflowIdsstring[]

List of monitoring workflow IDs to assign. Either workflowIds or filter must be provided.

assignTostring[] required

List of user IDs to assign workflows to. Workflows will be evenly distributed across these users

filterstring

Filter criteria as JSON string (URL encoded). Used to fetch workflow IDs when workflowIds is not provided. See GET /monitoring-workflows endpoint documentation for filter format.

Example request

{
  "workflowIds": [
    "44c8fa75-15a1-4790-a0dd-139058d1f86d",
    "55d9fb86-26b2-5801-b1ee-240169e2f97e"
  ],
  "assignTo": [
    "user_123456",
    "user_789012"
  ],
  "filter": "{\"data.monitoringStatus\":{\"eq\":\"PENDING\"}}"
}

Response

Bulk assignment completed. successful/failed are arrays of {workflowId, assignment: {assignedTo, assignedBy, assignedAt}, error}assignment is populated on success, error on failure. totalProcessed, successCount, and failureCount summarize the batch.

totalProcessedinteger

Total number of workflows processed

successCountinteger

Number of successful assignments

failureCountinteger

Number of failed assignments

Example response

{
  "successful": [
    {
      "workflowId": "44c8fa75-15a1-4790-a0dd-139058d1f86d",
      "assignment": {
        "assignedTo": "user_789012",
        "assignedBy": "user_345678",
        "assignedAt": "2021-01-01T00:00:00Z"
      }
    }
  ],
  "failed": [
    {
      "workflowId": "44c8fa75-15a1-4790-a0dd-139058d1f86d",
      "assignment": {
        "assignedTo": "user_789012",
        "assignedBy": "user_345678",
        "assignedAt": "2021-01-01T00:00:00Z"
      }
    }
  ]
}

Changes