Workload Management API overview

Use the Workload Management API to programmatically manage and create queues and work items in your Control Room.

Workload management queues

Workload management queues contain work items that are distributed for processing to unattended bot runners within a device pool.

Filters allow you to refine what is returned in the response body. Read more about filters in Filters in an API request body.

List queues
POST http://<your_control_room_url>/v2/wlm/queues/list
Body parameters: This request body example includes filters, sorting, and page control to refine the response.
{
  "filter": {
    "operator": "NONE",
    "operands": [
      null
    ],
    "field": "string",
    "value": "string"
  },
  "sort": [
    {
      "field": "string",
      "direction": "asc"
    }
  ],
  "page": {
    "offset": 0,
    "length": 0
  }
}

Make a post request to return a list of all workload management queues, or use filters in the request body to refine the response results. Request and response examples:

Use filters to retrieve selected workload management queues

Workload management work items

Create a work item in a queue
POST http://<your_control_room_url>/v2/wlm/queues/{id}/workitems
URL parameter:

.../queues/{id}/... : The numeric value that identifies a workload management queue that lists work items.

Body parameters: The generic request example does not identify the details of the JSON object.
{
  "workItems": [
    {
      "json": {}
    }
  ]
}
The following request body example includes a JSON object listing the mandatory key-value pairs that represent a workload management work item.
{
  "workItems": [],
  "json": {
    "Id": "string",
    "Customer Name": "string",
    "Amount": "number",
    "email": "string",
    "Invoice Date": "ISO 8601 date and time notation"
  }
}

A JSON object has key-value pairs that are required for specific workload management implementations. Make a post request to add a new work item to an existing queue.

Update a work item in a queue
PUT http://<your_control_room_url>/v2/wlm/queues/{id}/workitems/{id}
URL parameters:
  • .../queues/{id}/... : The numeric value that identifies a workload management queue that lists work items.
  • .../workitems/{id} : The numeric value that identifies a workload management work item within a queue.
Body parameters:
{
  "version": 0,
  "status": "Enum",
  "result": "string",
  "json": {}
}
The following request body example includes a JSON object listing the mandatory key-value pairs that represent a workload management work item.
{
  "version": "0",
  "result": "",
  "status": "Enum",
  "json": {
    "Id": "string",
    "Customer Name": "string",
    "Amount": "number",
    "email": "string",
    "Invoice Date": "ISO 8601 date and time notation"
  }
}
Status enum array values:
Enum:
[ READY_TO_RUN, DATA_ERROR, UNKNOWN, STAGED, QUEUED, ACTIVE, UNSUCCESSFUL, SUCCESSFUL, ON_HOLD ]

Click the link for a step by step example of how to update a work item Update work item data, results and status.

List work items in a queue
POST http://<your_control_room_url>/v2/wlm/queues/{id}/workitems/list
URL parameter:

.../queues/{id}/... : The numeric value that identifies a workload management queue that lists work items.

Body parameters: This request body example includes filters, sorting, and page control to refine the response.
{
  "filter": {
    "operator": "NONE",
    "operands": [
      null
    ],
    "field": "string",
    "value": "string"
  },
  "sort": [
    {
      "field": "string",
      "direction": "asc"
    }
  ],
  "page": {
    "offset": 0,
    "length": 0
  }
}
Delete work items from a queue
POST http://<your_control_room_url>/v2/wlm/queues/{id}/workitems/delete
URL parameter:

.../queues/{id}/... : The numeric value that identifies a workload management queue that lists work items.

Body parameters:
{
  "workitemIds": [
    0,
    1,
    2
  ]
}

Click the link for a step by step example of how to delete work items from a queue Delete work items in a queue.