Versions Compared

Key

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

...

Table of Contents
maxLevel2
absoluteUrltrue

Overview

Use this transform-type Snap to call the OpenAPI endpoint associated with your application. You can perform operations, such as GET or PUT, upon the endpoint based on the endpoint's configuration to accomplish the following tasks:

  • Download and process the endpoint's OpenAPI specification.

  • Provide the input schema suggestions for a selected base path and operation.
  • Prepare and execute HTTP requests and process HTTP responses.


Prerequisites

  • A valid OpenAPI account with relevant permissions.
  • A valid OpenAPI specification.

...

Input/OutputType of ViewNumber of ViewsExamples of Upstream and Downstream SnapsDescription
Input 

Document

  • Min: 0
  • Max: 2
  • Mapper SnapCopy Snap
  • JSON Parser
A document containing all the information required by the Snap. You can add the second input view to supply the OpenAPI specification.
Output

Document

  • Min: 0
  • Max: 2
  • JSON Formatter + File Writer
  • Mapper
  • The HTTP response for the specified operation in the first output view. 
  • Parts and referred objects of the specification related to the selected path and operation in the second output view.

...

Parameter NameData TypeDescriptionDefault ValueExample 
LabelStringRequired. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your Pipeline.OpenAPIRead Employee List
OpenAPI specificationString

Enter the URL for the OpenAPI specification

JSON

JSON or YAML file. Alternatively, upload the OpenAPI specification

's JSON

file to the SLDB by clicking the Image Modified button. 

Supported file protocols are:

  • http://
  • https://
  • sldb:///

Syntax for file path in SLDB:

  • Same project as the Pipeline:
    sldb://<filename>.
json 
  • json
    sldb://
openapi
  • <filename>.yaml
    <filename>.json
  • Different project:
    sldb://<project_space>/<project>/<filename>.json
    sldb://Docmentation/OpenAPI/openapi.json
N/A

https://petstore3.swagger.io/api/v3/openapi.json

sldb:///openapi.json

openapi.json

OpenAPI base URLString/Suggestion

Required. Enter the OpenAPI base URL for the HTTP request. The Snap appends the base URL with the OpenAPI path field's value to form the full URL.

Alternatively, click the icon to select the OpenAPI base URL for the HTTP request. The Snap suggests the Base URL associated with the OpenAPI specification. We recommend you to refer to the target OpenAPI server documentation for the accuracy of the suggestion.

N/Ahttps://petstore3.swagger.io/api/v3
OpenAPI pathString

Required. Enter the path defined for the given OpenAPI URL. Alternatively, click the  to retrieve a list of available paths based on the value in the OpenAPI specification field. However, Snap suggestions work only when the OpenAPI specification field's value is not a Pipeline/upstream parameter.

N/A/pet/{petId}
OperationString
Required. Specify the operation to perform on HTTP method to run on the endpoint. Alternatively, click the  to retrieve a list of available operations based on the value in the OpenAPI specification field. However, Snap suggestions work only when the OpenAPI specification field's value is not a Pipeline/upstream parameter.
N/Aget
Number of retriesInteger

Enter the maximum number of retry attempts in case of a failure in execution.

03
Retry interval (seconds)Integer

Specify the minimum number of seconds to wait before the next retry.

13
HTTP Headers

Add HTTP header key-value pairs. This field set contains the following fields:

  • Headers
  • Values

Headers

String

Specify the key name for HTTP Header.

N/A

filters

ValuesStringSpecify the value for HTTP Header key.N/Afirstname==johnny
Query Parameters

Add query parameters to the request URL. They are appended to the HTTP request URL.

This field set contains the following fields:

  • Parameters
  • Values
ParametersStringEnter the name of the Query ParameterN/AAPIKey
ValuesString Enter the value of the Query ParameterN/A84rhsfdfy8vgioavgf
Advanced properties

Use this field set to specify additional parameters for the intended operation. Most of these parameters control how you display the output, for example, Pagination interval (seconds) and Maximum pages. Specify each parameter as a separate row. Click  to add a new row.

This field set consists of the following fields:

  • Properties
  • Values
PropertiesString

Select and specify additional parameters for the intended operations upon the endpoint. 

Available options are:

  • Has next. Enter an expression that is evaluated with the output document to true or false indicating whether the Snap must get the next page. Depending on the server implementation, the hasNext information is contained in the response headers or entity. The value of this parameter must be expression-enabled. The Snap stops the pagination when this parameter is evaluated to false or the number of pages reaches the Maximum pages parameter value.
  • Next URL. Enter an expression that is evaluated with the output document to a URL that the Snap uses to get the next page. Depending on the server implementation, the next page URL information is contained in the response headers or entity. The value of this parameter must be expression-enabled.
  • Pagination interval (seconds). The number of seconds for the Snap to wait before attempting to get to the next page.
  • Maximum pages. The maximum number of pages to download. Use -1 is for unlimited pagination.
  • Enable process array. If the schema of the response entity is expected to be an array as specified in the endpoint’s OpenAPI specification, the Snap parses the array and writes a stream of output documents to the output view without other HTTP response data such as status line or headers. You can also disable this Snap behavior by entering false for this parameter.
  • Multipart file content key. The key name used for the file content in the input data and the multipart form-data.
  • Multipart filename key. The key name used for the filename in the input data and the multipart form-data.
N/A

Has next

Next URL

ValuesString/Integer

Enter the values to use for the additional parameters that you specify above.

Note

Even if you do not specify any values for the above parameters, the Snap will use the default values at runtime. 



Has next. None

Next URL. None

Pagination interval. None

Maximum pages. -1 (for unlimited pagination)

Enable process array. true

Multipart file content key. file

Multipart filename key. name

  • Has next.
    $entity.['has-more']
    $entity.nextPageToken != null
  • Next URL.
    https://petstore3.swagger.io/api/v3/pet/findByStatus?status=sold&offset=" + $entity.offset 
  • Pagination interval. 3
  • Maximum pages.
    10, -1
  • Enable process array. false
  • Multipart file content key. uploadFile
  • Multipart filename key. filename
Snap ExecutionString

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.

Validate & ExecuteExecute only

...