Status | ||||
---|---|---|---|---|
|
Table of Contents |
---|
What is the
...
PIPEFORCE HTTP API?
The Pipeline PIPEFORCE HTTP API allows you to manage and execute pipelines or commands any aspect of the PIPEFORCE platform via RESTful HTTP requestscalls. Here is a list of the most important endpoints:
...
For more details see the API Documentation.
Execute adhoc pipeline
In order to execute an adhoc pipeline (= execute a pipeline without persisting it), you can send a HTTP POST
request to this endpoint url with the pipeline script as YAML or JSON in the body:
...
Info |
---|
|
The most common usage scenario is to send a pipeline YAML script to the server and execute it there without storing it.
...
You can also send and execute a pipeline in JSON format this way. In this case you have to set the Content-Type
header to application/json
instead.
Example: No body
In case you would like to execute a pipeline YAML script without a message body, you can run this:
Code Block | ||
---|---|---|
| ||
curl -u 'username:password' \ -X POST "https://hub-try.pipeforce.org/api/v3/pipeline" \ -H "Content-Type: application/yaml" \ --data-binary @- << EOF pipeline: - drive.read: path: /my.pdf - pdf.stamp: text: "Hello World!" - drive.save: path: /my-stamped.pdf EOF |
Example: With body embedded in the pipeline
In case you would like to execute a pipeline YAML script with message body, which is embedded inside the YAML, you can run it like this example shows:
Code Block | ||
---|---|---|
| ||
curl -u 'username:password' \ -X POST "https://hub-try.pipeforce.org/api/v3/pipeline" \ -H "Content-Type: application/yaml" \ --data-binary @- << EOF pipeline: - log: message: "BODY: ${body.text}" body: {"text": "Hello World!"} EOF |
Example: With multipart body
Let's assume you would like to execute a pipeline and additionally processing one or more files in this same pipeline which must be placed in the body.
...
Note that the pipeline has the part name pipeline
and one or more files must all have the name file
.
Execute persisted pipeline
A persisted pipeline is one which is stored in the property store.
...
Code Block |
---|
https://hub-NS.pipeforce.net/api/v3/pipeline:{path} |
Info |
---|
|
...
Code Block |
---|
https://hub-NS.pipeforce.net/api/v3/pipeline:uuid:{uuid} |
Info |
---|
|
...
For more details about managing persisted pipelines, see the API documentation.
Example: Load and Execute persisted pipeline
In this example, a pipeline persisted under path global/app/myapp/pipeline/mypipeline
will be loaded and executed at the backend without any body or request parameters:
Code Block | ||
---|---|---|
| ||
curl -u 'username:password' \ -X POST 'https://hub-NS.pipeforce.net/api/v3/pipeline:global/app/myapp/pipeline/mypipeline' |
Example: Persist a pipeline (save it in property store)
In this example a new persisted pipeline will be created under path global/app/myapp/pipeline/newpipeline
:
...