Ask Your Question

How do I access pipeline running time via API?

asked 2019-06-11 12:40:17 -0500

Carol gravatar image

updated 2019-06-11 12:57:19 -0500

metadaddy gravatar image

Is it possible to access programmatically (rather than real time through the topology GUI) the running time of a pipeline?

I would like to know when a pipeline (or job) is reaching a specific runtime (eg 45 min) and then send a notification/alert at that time, or possibly even stop it.

In the past, i've created a Job for a pipeline, and then when scheduling it, i created both a Start task, and an End task. It works as advertised. Ideally i would prefer not to setup a bunch of these "stop" tasks in the Scheduler to run all the time ... i would prefer to detect if possible when something is running longer than anticipated and then do something about it.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-06-11 12:56:00 -0500

jeff gravatar image

The /v1/pipeline/{pipelineId}/status API method can provide this information. Here is a sample response, below. Note the status and timeStamp attributes.

  "pipelineId": "Pipeline5f417a17-d595-4ea6-d3e9-902f6fbac43e",
  "rev": "0",
  "user": "admin",
  "status": "RUNNING",
  "message": null,
  "timeStamp": 1560275553373,
  "attributes": {
    "IS_REMOTE_PIPELINE": false,
  "executionMode": "STANDALONE",
  "metrics": null,
  "retryAttempt": 0,
  "nextRetryTimeStamp": 0,
  "name": "Pipeline5f417a17-d595-4ea6-d3e9-902f6fbac43e"
edit flag offensive delete link more


Thanks so much for this info !

Carol gravatar imageCarol ( 2019-06-11 14:22:28 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-06-11 12:40:17 -0500

Seen: 107 times

Last updated: Jun 11 '19