Duplicating a Pipeline or Pipeline Stage

As of Fusion 1.1.4.....

There is no easy way to duplicate a pipeline or a pipeline stage in the UI.  So it must be done via the API.

I'd suggest creating the new pipeline in the UI, and then using the following to copy over the stages.  Let's assume you create a new pipeline named 'TomcatExamples' which you want to use similar pipeline as 'conn_logging' with a few minor changes.

This curl statement would download a JSON structure to a file, representing the pipeline you wish to copy (named 'conn_logging')

curl -u admin:password123 -o conn_logging.json http://localhost:8764/api/apollo/index-pipelines/conn_logging

Open the "conn_logging.json" file in a text editor and change the "id" value to match the id of the new pipeline you created ('TomcatExamples').

{
  "id" : "TomcatExamples",
  "stages" : [ {
    "type" : "index-logging",

Then run this curl command to PUT the JSON file back.

curl -u admin:password123 -X PUT -H 'Content-type: application/json' -d "@./conn_logging.json" http://localhost:8764/api/apollo/index-pipelines/TomcatExamples

Now you can go back to the UI and finish doing modifications there.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk