You can use the /jobrunner/rest/v1/jobs/byStatus?jobStatus=ACTIVE
REST API CALL to query for active jobs - pipeline status (RUNNING etc) is included in the response.
For example, I have one active job, with one running pipeline - you can see the RUNNING
status in this response:
[
{
"id": "3fd72a3f-cb97-4dc3-8a97-48af3705b6a4:metadaddy",
"name": "Job for MySQL to Kafka",
"description": null,
"organization": "metadaddy",
"creator": "admin@metadaddy",
"createTime": 1538622464738,
"lastModifiedBy": "admin@metadaddy",
"lastModifiedOn": 1539027058225,
"destroyer": null,
"deleteTime": 0,
"jobDeleted": false,
"pipelineName": "MySQL to Kafka",
"pipelineId": "e62a3b49-fc76-4c06-8075-4f59c67bd385:metadaddy",
"pipelineCommitId": "0b23cd13-220c-471a-a95c-9508a4727a77:metadaddy",
"rulesId": "accc8864-64cc-4e91-9f11-bafaae6d6261:metadaddy",
"pipelineCommitLabel": "v4",
"labels": [
"sdc-1"
],
"currentJobStatus": {
"id": "67b5ae89-53f4-4a42-b2ab-41e790c96fad:metadaddy",
"jobId": "3fd72a3f-cb97-4dc3-8a97-48af3705b6a4:metadaddy",
"pipelineCommitId": "0b23cd13-220c-471a-a95c-9508a4727a77:metadaddy",
"runCount": 10,
"user": "admin@metadaddy",
"startTime": 1539027665879,
"finishTime": 0,
"errorMessage": null,
"sdcIds": [
"4d979509-c754-11e8-b55d-db71045cb2fb"
],
"status": "ACTIVE",
"warnings": [],
"ackTrackers": [
{
"sdcId": "4d979509-c754-11e8-b55d-db71045cb2fb",
"createTime": 224556841797452,
"ackStatus": "SUCCESS",
"message": null,
"eventType": "SAVE_PIPELINE"
},
{
"sdcId": "4d979509-c754-11e8-b55d-db71045cb2fb",
"createTime": 224556885212095,
"ackStatus": "SUCCESS",
"message": null,
"eventType": "START_PIPELINE"
}
],
"pipelineOffsets": null,
"pipelineStatus": [
{
"sdcId": "4d979509-c754-11e8-b55d-db71045cb2fb",
"name": "MySQL to Kafka:3fd72a3f-cb97-4dc3-8a97-48af3705b6a4:metadaddy",
"title": "MySQL to Kafka",
"jobId": "3fd72a3f-cb97-4dc3-8a97-48af3705b6a4:metadaddy",
"localPipeline": false,
"status": "RUNNING",
"lastReportedTime": 1539027893303,
"worker": [],
"message": null,
"clusterMode": false
}
],
"edge": false
},
"parentJobId": null,
"systemJobId": null,
"numInstances": 1,
"migrateOffsets": false,
"statsRefreshInterval": 60000,
"runtimeParameters": "{\"\":\"\"}",
"edge": false,
"timeSeries": false,
"forceStopTimeout": 120000,
"provenanceMetaData": {}
}
]