Status | ||||
---|---|---|---|---|
|
Table of Contents |
---|
What is the PIPEFORCE
...
Rest API?
The PIPEFORCE HTTP Rest API allows you to manage any aspect of the PIPEFORCE platform via RESTful HTTP calls. You can setup automation and data integration apps. Execute commands and automation pipelines remotely. Manage users, webhooks, configs, gateway endpoints and much more using this API.
Here is a list A full list of all available endpoints of this API can be found in the API documentation.
Here is an overview of the most important entry-endpoints:
Path | Method | Description | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| Execute adhoc
See: https://pipeforce.github.io/api#/Pipeline%20API
| ||||||||||||||||||||||||||||||||||||||
|
| Store | ||||||||||||||||||||||||||||||||||||||
|
| Load and execute
| ||||||||||||||||||||||||||||||||||||||
|
| Return | ||||||||||||||||||||||||||||||||||||||
|
| Delete | ||||||||||||||||||||||||||||||||||||||
|
| Create, read, update and delete persisted JSON documents, attachments and other data types in the persistence DB, called the Property Store. | ||||||||||||||||||||||||||||||||||||||
|
| Execute
See here for a full list of available commands: |
For more details see the API Documentation.
Execute pipeline (adhoc)
Info |
---|
For security reasons, executing adhoc pipelines is by default restricted to admin, support and developer users in DEV stage only. For production stage you should always consider to use persisted pipelines instead. |
...
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 pipeline (persisted)
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
:
...