Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this article

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Overview

This use case demonstrates how you can use SnapLogic Data Science to configure SnapLogic Pipelines as REST APIs to receive requests from external applications. Currently, we support the following two types of REST APIs that are called tasks in SnapLogic:

...


Triggered TaskUltra Task
ObjectiveTrigger the API using a URLReal-time API that has a very low response time
LatencyHighVery low
Resource ConsumptionStart a new Pipeline execution for each requestThe Pipeline is active all the time
Number of DocumentsAny number of input/output documents1 input document for 1 output document

This document explains how you can use the SnapLogic platform to run the Pipelines as APIs and is structured as follows:

  • Data Science API Pipeline: Describes the Pipeline you must build to run as an API.
  • Request format: Describes the request format to send API requests.
  • Configuring and managing Ultra Tasks: Describes how to schedule and manage Ultra Tasks.
  • Testing Ultra Tasks: Describes how to test the Ultra Tasks.

...

  1. Click Create in the Create Task dialog and click Show tasks in this project in Manager to go to the Manager page.
  2. Click the task name to edit the task settings.



  3. Click  next to the task, and then click Details. The task detail popup appears, complete with the HTTP Endpoint URL.



  4. Click Details to see the task statistics. You can see that there are 7 API instances that have started so far.

    Image Modified

However, only 2 API instances are running as shown in the following image from the Dashboard page. The API instance stops, and a new one is created if the Pipeline fails.

Testing Ultra Tasks

There are many tools that you can use to test your Ultra Tasks (APIs). However, if you would like to have a regression/automated test, we recommend that you build a Pipeline to do this, so you can schedule it to run on a daily/weekly basis.

Pipeline

Use the JSON Generator Snap to generate a sample request and use the REST Post Snap to send a request to the Ultra Task. You can download this Pipeline here.

...