Run Triggered Task

The SnapLogic Platform offers various ways to run Tasks. Because Triggered Tasks allow API consumers to invoke a pipeline through a URL, it's essential to consider how and where the task is executed.

Note: The cloud URL for a Triggered Task running on a Groundplex does not support asynchronous pipeline execution.

You can invoke a Triggered Task using one of the following methods.

  1. In Classic Manager, navigate to the target task, and click to open the context menu:
  2. Click Details.
  3. Click Execute for the URL to run the pipeline.
    Alternatively, you can click to copy the URL, and then paste it into a browser.
    Note: Executing the Task by clicking Execute in Manager automatically picks up the authentication credentials.
    Note: Duplicate Task Executions: If a Task fails to start with the same reason for multiple times in a row, then subsequent skips are not displayed on the Task details page.

From a Client Machine:

  • In your browser window, copy and paste the URL generated for the target task.
    Note: Authentication: The external URL created for a task requires you to be authenticated with the SnapLogic servers. When using a web browser to access the URL, you might not have to provide credentials since you might already be logged into the Designer. Using other methods to request the Task URL requires you to provide credentials using HTTP Basic Authentication. Alternatively, you can run tasks from a CLI using Curl commands.
For information on API Management aspect of Triggered Tasks, see API Management.
Note: If your account is locked or your password expired, you can still execute Triggered Tasks; however, you cannot invoke SnapLogic Public APIs, and your Scheduled Tasks will fail to execute.

CURL Command Examples of Triggered Tasks

This section covers some examples of using the CURL command-line tool to access Task URLs. The following are only examples of the syntax and are not functioning URLs. Run a pipeline that takes no input and has an unlinked output view that writes documents:

$ curl -u '[email protected]:mypassword' 'https://elastic.snaplogic.com/api/1/rest/slsched/feed/example/jobs/test-reader'
{ "msg" : "Hello, World!" }

Run a pipeline that takes a parameter and has an unlinked output view that writes a document:

$ curl -u '[email protected]:mypassword' 'https://elastic.snaplogic.com/api/1/rest/slsched/feed/example/jobs/test-hello?Name=John'
{ "msg" : "Hello, John!" }

Run a pipeline using a Bearer token for authentication through a header:

$ curl -H 'Authorization: Bearer Xrcuwn2zVLqR7KXXXXXXXXX' 'https://elastic.snaplogic.com/api/1/rest/slsched/feed/example/jobs/test-hello?Name=John'
{ "msg" : "Hello, John!" }

Run a pipeline using a Bearer token for authentication through the bearer_token query parameter:

$ curl -H 'Authorization: Bearer Xrcuwn2zVLqR7KXXXXXXXXX' 'https://elastic.snaplogic.com/api/1/rest/slsched/feed/example/jobs/test-hello?Name=John'
{ "msg" : "Hello, John!" }

Run a pipeline using a Bearer token for authentication through the bearer_token query parameter:

$ curl 'https://elastic.snaplogic.com/api/1/rest/slsched/feed/example/jobs/test-hello?Name=John&bearer_token=Xrcuwn2zVLqR7KXXXXXXXXX'
{ "msg" : "Hello, John!" }

Run a pipeline that accepts a JSON document and transforms it:

$ curl -u '[email protected]:mypassword' --data-binary '{ "name" : "Bob" }' --header "Content-Type:application/json" https://elastic.snaplogic.com/api/1/rest/slsched/feed/example/jobs/test-transformer
{ "msg" : "Hello, Bob!" }