HTTP Router

HTTP Router

 

This page is no longer maintained (Nov 12, 2025). For the most current information, go to HTTP Router

In this article

Overview

Use this Snap to route documents to output views based on the incoming HTTP request method. This Snap is primarily meant for use in Pipelines executed through Triggered Tasks. The Snap matches the HTTP request method used in the Triggered Task and routes the document to the corresponding output view as configured for the request method.

The input data must contain the correct content-type header based on your use case, else your pipeline fails.

Snap Type

HTTP Routers Snap is a Flow-type Snap that executes HTTP requests.

Prerequisites

None.

Support for Ultra Pipelines

Works in Ultra Pipelines.

Limitations and Known Issues

None.

Snap Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description 

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description 

Input 

Document

  • Min: 1

  • Max: 1

  • Mapper Snap

  • Copy Snap

  • JSON Generator

A document containing the data to be processed based on the incoming HTTP request. 

Output

Document

  • Min: 1

  • Max: ∞

  • Mapper Snap

  • Union Snap

  • JSON Formatter

If the input document is routed to more than one output views, they are all instances of the same input document. The Pipeline may fail if any downstream Snap attempts to modify the same document without copying it.

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:

  • Stop Pipeline Execution: Stops the current pipeline execution when the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the rest of the records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings

  • Asterisk (*): Indicates a mandatory field.

  • Suggestion icon (

    ): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon (

    ): Indicates whether the value is an expression (if enabled) or static (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon (

     ): Indicates that you can add fields in the field set.

  • Remove icon (

    ): Indicates that you can remove fields from the field set.

 

Field Name

Type

Description

Field Name

Type

Description

Label

String

Default Value: N/A
ExampleHTTP Router

Routes*

 

 

Use this field set to define/map one output view each to one or more of the request methods supported. Click 

 to add a new row and define the values accordingly.

 

Request method

String/Expression/Suggestion

Select or enter one request method per row, depending on the different HTTP requests expected from the Triggered task. The following different request methods are supported:

  • GET

  • POST

  • PUT

  • PATCH

  • DELETE

  • HEAD

This field allows an additional value OTHER to handle request methods coming from the Triggered Task that are not configured in this Snap.

Default Value: N/A
ExampleGET

Output view name

Dropdown list

Select an output view name from this dropdown list list for each Request method selected. 

Map the value OTHER to an output view that suits your exception-handling requirements. For example, an incoming request method DELETE or HEAD in the overview image is routed to output4 that corresponds to the value OTHER.

Configure output views beforehand

Ensure that the required number of output views are added for the Snap from the Views tab. These output views will then be listed in this field for you to select.

Default Value: N/A
Exampleoutput3

Snap Execution

Dropdown list

Select one of the three following modes in which the Snap executes:

  • Validate & Execute. Performs limited execution of the Snap and generates a data preview during Pipeline validation, then performs full execution of the Snap (unlimited records) during Pipeline runtime.

  • Execute only. Performs full execution of the Snap during Pipeline execution without generating preview data.

  • Disabled. Disables the Snap and all Snaps downstream from it.

Default Value: Validate & Execute
ExampleExecute only