Jobs, RPA and Monitoring API¶
These API actions cover the things operations teams watch in Monitor: scheduled job runs, job history, RPA tasks, and the processing monitor.
Use them to build a watchdog that finds a failed or stalled job and runs it again, to feed an operations dashboard, or to rerun an RPA task with a corrected payload, without anyone opening Monitor.
All actions follow the conventions in the Introduction: POST https://{tenant}/api/{Group}/{Action}, the TempIdentityToken header, a JSON body, and the { Success, MessageKey, Data } envelope. Every body property is optional unless the entry says it is required. An empty body {} returns the first page with the defaults.
At a glance
- Groups
V1_JobsAPIandV1_RPAAPI, and two queries inV1_ProcessingAPI - Token features Query Jobs, Manage Jobs, Get Bots, Manage Bots, Read Batches
- Paging 20 rows by default, at most 1000 per call
- No total count Page until a call returns fewer rows than you asked for
- Spec definitions
FilterJobParameter,FilterJobHistoryParameter,RunJobParameter,QueryRPATasksParameter,ResumbitRPATasksParameter,WorkItemQueryParameter,WorkItemHistoryQueryParameter
Actions at a glance¶
| Action | Token feature |
|---|---|
V1_JobsAPI/QueryForJobRuns |
Query Jobs |
V1_JobsAPI/QueryForJobHistories |
Query Jobs |
V1_JobsAPI/ResubmitJob |
Manage Jobs |
V1_RPAAPI/QueryForLatestRPATasks |
Get Bots |
V1_RPAAPI/ResubmitRPATask |
Manage Bots |
V1_ProcessingAPI/QueryForWorkItems |
Read Batches |
V1_ProcessingAPI/QueryForWorkItemHistories |
Read Batches |
graph TD
Q["QueryForJobRuns: JobStatus Error"] --> H["QueryForJobHistories: JobID, read ExceptionMessage"]
H --> D{"Fix needed first?"}
D -->|"no"| R["ResubmitJob: JobInstanceID = JobID"]
D -->|"yes"| P["Fix the cause, then ResubmitJob"]
R --> V["QueryForJobRuns: check Status and LastRuntime"]
Shared values¶
- Job status
JobStatus, also used by the Processing queries asStatus. Values:New,Active,Paused,Stopped,Complete,Manual,Hold,Breakout,Archive,Error,Deleted. - RPA task status
RPATaskStatus. Values:Queued,Running,Complete,Cancelled,Hold,Error,Unknown. - Sort direction
Direction.AscendingorDescending. The default isAscendingfor the Jobs and Processing queries andDescendingfor the RPA query. - Dates ISO 8601 date-times, for example
"2026-10-07T00:00:00Z".
Scheduled jobs (V1_JobsAPI)¶
These are the jobs in the Jobs app and in Monitor > All Jobs: imports, exports, maintenance and the other scheduled jobs.
QueryForJobRuns¶
Returns the current state of each job: the same data as Monitor > All Jobs.
- Action
V1_JobsAPI/QueryForJobRuns - Token feature Query Jobs
- Body
FilterJobParameter, fields in the table below. - Returns A list of
{ Status, JobID, JobDisplayName, LastRuntime, NextRuntime }.JobIDis the job instance id thatResubmitJobtakes.
| Field | Type | Meaning |
|---|---|---|
JobDisplayName |
String | The job name as the Jobs app shows it. Not case-sensitive. |
JobID |
Guid | One job |
JobStatus |
Job status | One status |
LastRuntimeOnOrAfter |
Date-time | Only jobs whose last run started at or after this time |
OrderBy |
Status, LastRunDate or Id |
|
Direction |
Ascending (default) or Descending |
|
PageIndex, PageSize |
Integers | PageIndex default 0. PageSize default 20, at most 1000. |
QueryForJobHistories¶
Returns the run history of jobs: the same data as Monitor > Jobs History. Use it to read why a run failed.
- Action
V1_JobsAPI/QueryForJobHistories - Token feature Query Jobs
- Body
FilterJobHistoryParameter, fields in the table below. - Returns A list of
{ JobInstanceID, JobScriptId, ExecutionId, JobDisplayName, ServiceName, JobStatus, EntryDate, EventDescription, ExceptionMessage }. - EventDescription Names the history event (for example
Processing.Job.Start.ExecuteJob). - ExceptionMessage The error text of a failed run, or null.
| Field | Type | Meaning |
|---|---|---|
JobID |
Guid | One job (the JobID from QueryForJobRuns) |
JobDisplayName |
String | Case-sensitive here, unlike QueryForJobRuns |
JobStatus |
Job status | |
EntryDateOnOrAfter |
Date-time | Only entries at or after this time |
OrderBy, Direction |
As above | |
Skip, Take |
Integers | Skip default 0. Take default 20, at most 1000. |
ResubmitJob¶
Runs a job now, as Run does in the Jobs app.
- Action
V1_JobsAPI/ResubmitJob - Token feature Manage Jobs
- Body
RunJobParameter.JobInstanceID(guid, required). Use theJobIDfromQueryForJobRuns. - Returns
Success: trueand an emptyDataobject. The run starts in the background; check it withQueryForJobRunsorQueryForJobHistories.
RPA tasks (V1_RPAAPI)¶
An RPA task is one request to an RPA automation. Each rerun adds a run, so the task identifier has the form {TaskNumber}.{RunNumber}, for example 12.3 for the third run of task 12.
QueryForLatestRPATasks¶
Returns the latest run of each RPA task.
- Action
V1_RPAAPI/QueryForLatestRPATasks - Token feature Get Bots
- Body
QueryRPATasksParameter, fields in the table below. - Returns A list of
{ TaskIdentifier, Status, Message, BotName, Runstamp, Automation, Process, LastUpdated }. - Message The latest message of the latest run.
- Runstamp The label built from the automation's jobstamp template, or empty.
| Field | Type | Meaning |
|---|---|---|
TaskIdentifier |
String, "12.1" |
One task. Only the task number counts; the latest run is always returned. An empty or malformed value is rejected. |
Status |
RPA task status | |
BotName |
String | Tasks whose latest run ran on this bot. Not case-sensitive. A name that matches no bot is rejected. |
Automation |
String | Not case-sensitive. A name that matches no automation is rejected. |
Process |
String | Not case-sensitive. A blank value is rejected; a name that matches nothing returns no tasks. |
LastUpdateTimeAfter |
Date-time | Strictly after this time. It is compared as sent, with no conversion to or from UTC. |
OrderBy |
JobNumber, Status, CriticalLogMessage, AutomationName, BotName or LastUpdated (default) |
|
Direction |
Descending (default) or Ascending |
|
PageIndex, PageSize |
Integers | PageIndex default 0. PageSize default 20, at most 1000. |
ResubmitRPATask¶
Reruns an RPA task, with its original payload or a new one.
- Action
V1_RPAAPI/ResubmitRPATask - Token feature Manage Bots
- Body
ResumbitRPATasksParameter(spelled as in the spec):TaskIdentifier(string, required,"12.1"),Payload(string, optional; omit it to rerun with the original payload). - Returns
Success: true. - Fails with
TaskIdentifier is required.,'{id}' is not a valid task identifier., orBot failed to restart.
Processing monitor (V1_ProcessingAPI)¶
The rest of V1_ProcessingAPI is legacy (Process Designer). These two actions are current. They read the processing service's monitor data and its work item event history, limited to the workflows the token's user can view. For one work item in a Workflow designer workflow, V1_KWorkItemAPI/GetWorkState and GetWorkflowHistory are the direct source. See the KWorkItem API reference.
QueryForWorkItems¶
Returns current work items, filtered and paged.
- Action
V1_ProcessingAPI/QueryForWorkItems - Token feature Read Batches
- Body
WorkItemQueryParameter, fields in the table below. - Returns A list of
{ WorkItemId, HoldId, LastUpdated, WorkItemName, Status, Process, Step, UserToken, Properties: [ { Name, Value } ] }. - UserToken The user who holds the lock, if any.
| Field | Type | Meaning |
|---|---|---|
WorkitemName |
String | Not case-sensitive. %, _ and [ are matched as plain characters, not wildcards. |
WorkitemId |
Guid | One work item |
Status |
Job status values | One status |
LastUpdatedOnOrAfter |
Date-time | |
OrderBy |
WorkitemName, WorkItemStatus (default) or LastRuntime |
|
Direction |
Ascending (default) or Descending |
|
PageIndex, PageSize |
Integers | PageIndex default 0. PageSize default 20, at most 1000. |
QueryForWorkItemHistories¶
Returns work item history events.
- Action
V1_ProcessingAPI/QueryForWorkItemHistories - Token feature Read Batches
- Body
WorkItemHistoryQueryParameter, fields in the table below. - Returns A list of
{ WorkitemId, Level, EntryDate, Process, Step, EventDescription, Properties }.LevelisErrororInformational. Note the casingWorkitemIdin this result. - Spec quirk The spec names the response
DataResponseBatchMonitorWorkItemDataDTO, but its items areWorkitemHistoryQueryResult. A client generated from the spec can need a manual type for the result.
| Field | Type | Meaning |
|---|---|---|
WorkItemId |
Guid | |
EntryDateOnOrAfter |
Date-time | |
Status |
Job status values | |
OrderBy |
EntryDate (default), Status or WorkItemId |
|
Direction |
Ascending (default) or Descending |
|
Skip, Take |
Integers | Skip default 0. Take default 20, at most 1000. |
Errors you will see¶
- HTTP 401 The token does not have the feature in the table above. Edit the token and add it.
- HTTP 412, bad input The message names your input (an unknown bot or automation name, a malformed task identifier, a blank
Process). Correct the value. These are not retryable. - HTTP 412, restart failed
Bot failed to restart. The RPA service could not restart the task. Check the bot in Monitor and try again later. - Empty list Nothing matched, or the page is past the end. For RPA, check that
LastUpdateTimeAfteris in the zone the tasks were recorded in.
Related¶
- Find and resubmit failed jobs: a complete watchdog script.
- Authentication: the token features.
- Events Dictionary: job and RPA events in your own event store.
- Introduction