Ask Your Question

How can I import an exported pipeline into SDC using curl?

asked 2018-04-24 12:51:56 -0500

jeff gravatar image

updated 2018-04-24 13:40:08 -0500

Suppose I have exported a pipeline from Data Collector and have it saved as /path/to/pipeline.json. What is the full curl command that will allow me to import that pipeline definition into a running Data Collector as a new pipeline?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-24 13:39:59 -0500

jeff gravatar image

Here is a command to accomplish the import, which works as of curl 7.54.0, using the import SDC REST API call.

curl -XPOST -u admin:admin -v -H 'Content-Type: application/json' -H 'X-Requested-By: My Import Process' -d "@/path/to/pipeline.json" http://localhost:1830/rest/v1/pipeline/dummy_id/import?autoGeneratePipelineId=true

Note that this example is using many parameters that you will need to tweak according to your own installation and needs.

  • The default (insecure) authentication mechanism that has a user named admin with password of the same. You will need to replace the authentication parameters (in this example, the -u) as required by your particular installation.
  • The default URL and port running on localhost.
  • An arbitrary value for the X-Requested-By header.
  • /path/to/pipeline.json will need to be replaced by the actual path to your JSON file.
edit flag offensive delete link more


Wonderful, this works! Thanks Jeff! Does this mean I shouldn't use the "PUT /v1/pipeline/{pipelineTitle} | Add a new Pipeline Configuration to the store" API to create a new pipeline via the API?

Keith gravatar imageKeith ( 2018-04-24 13:55:17 -0500 )edit

That method actually just creates an (empty) pipeline in the store, and you then have to do a separate POST (using the pipelineId you retrieved) to update the actual definition. So that becomes a two step process. This single method is probably easier.

jeff gravatar imagejeff ( 2018-04-24 14:25:17 -0500 )edit
Login/Signup to Answer

Question Tools



Asked: 2018-04-24 12:51:56 -0500

Seen: 2,579 times

Last updated: Apr 24 '18