Skip to end of banner
Go to start of banner

Designing Pipelines to be Triggered Tasks

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Supported HTTP Methods

You can design your Pipelines to act like REST APIs. You can run Triggered Tasks using the following HTTP Methods from both Cloudplex and Groundplex instances:

  • POST
  • PUT
  • PATCH
  • HEAD
  • GET

Pipeline Design for GET Requests

Triggered Tasks support viewing the output of a Pipeline. When you execute a Pipeline using a Triggered Task URL, the output can be included as response to the HTTP request. You can create a Pipeline to be used in this manner by leaving one output view unconnected.  For example, a Pipeline that consists solely of a File Reader Snap would return the contents of the file when the Task URL is requested.  

This feature works with both document and binary views.  

  • Document view: the response consists of a JSON-encoded array of each document read from the view. If the output document contains a Status field that is an integer, it is treated as the HTTP response status code.
  • Binary stream: the binary data's header is sent back to the client as the HTTP response header. The body of the binary data is directly streamed back to the client. You can use a formatter Snap, like the XML or CSV Formatter Snaps, to transform the output of a document view into a binary view if the default JSON-encoding does not work.


Pipeline Design for POST Requests

You can POST input to a Pipeline. If you send a document to a Pipeline, you can leave one input view unlinked and then do an HTTP POST call to the task URL. The content of the POST request is then turned into a document and fed into the Pipeline.

Consider the following options:

  • If the input view accepts documents, then the content of the POST request should be a JSON-encoded object or an array-of-objects.  
  • If it is a single object, that value is fed into the Pipeline.  
  • If it is an array of objects, each object will be separately fed into the Pipeline as documents.
  • If the input view accepts binary streams, a single stream containing the raw contents of the POST request is fed into the view.
  • Only one unlinked output view is supported; if more than one unlinked view is found, an error is returned when trying to request the Task URL.
  • The On-premises URL should be used when receiving data from a Pipeline running in an Groundplex.
  • No labels