KBEC-00357 - How do I get the pipeline runtime ID?

Article ID:360032826552
1 minute readKnowledge base
On this page

Problem

How do I find the flowRuntimeId for a pipeline run?

Solution

You may need to retrieve the flowRuntimeId for running various commands (such as ectool getPipelineRuntimeDetails), which will not work with the pipeline runtime name.

Using ectool

getPipelineRuntimes API can be used to get all flowRuntimes associated with a pipeline. Following ectool request can be used to get the latest flowRuntime and corresponding Id:

ectool getPipelineRuntimes --pipelineName testPipeline --projectName testProject --sortOrder descending --maxResults 1

Using Web UI

To find this UUID easily, go to the pipeline run in the web UI. The URL for this page will contain two UUIDs. For example:

https://192.168.158.7/flow/#pipeline-run/105d6064-e298-11e6-ba7f-080027f1374e/2014811b-e2a3-11e6-800e-080027f1374e

The first UUID is the pipeline definition ID. The second one (2014811b-e2a3-11e6-800e-080027f1374e), is the pipeline run ID.

You can then run ectool as follows:

ectool getPipelineRuntimeDetails --flowRuntimeIds 2014811b-e2a3-11e6-800e-080027f1374e
This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.