OpenAPI

In this article

Overview

Use this 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.

Support for Ultra Pipelines


Works in Ultra Pipelines

Limitations

None.

Known Issues

None.

Snap Input and Output

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

Document

  • Min: 0
  • Max: 2
  • Mapper
  • 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.

Snap Settings

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 or YAML file. Alternatively, upload the OpenAPI specification file to the SLDB by clicking the  button. 

Supported file protocols are:

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

Syntax for file path in SLDB:

  • Same project as the Pipeline:
    sldb://<filename>.json
    sldb://<filename>.yaml

    <filename>.json
  • Different project:
    sldb://<project_space>/<project>/<filename>.json
    sldb://Docmentation/OpenAPI/openapi.json

    This Snap supports external files referenced in this field and gets the data from the referenced files upon connecting to the file location. For example, $ref: 'reference to definition'

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 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
Pass throughCheckboxSelect this checkbox to enable the snap to pass the input document to the output view under the key original.SelectedDeselected
Display headers for GetCheckboxSelect this checkbox to display headers data for the Get request similar to Post requests, else the Snap displays all the entities directly in the output.DeselectedSelected
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
Trust all certificatesCheckbox

Select this checkbox to trust all certificates, such as self-signed certificates. Deselect this checkbox when there is a third-party signed certificate to be separately authenticated.

DeselectedSelected
Enable URL EncodingCheckboxSelect this checkbox to automatically encode the URL of the request path.DeselectedSelected
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. These parameters are appended to the HTTP request URL.

Query parameters defined here will not be used if those parameters are defined as part of the OpenAPI specification.

This field set contains the following fields:

  • Parameters
  • Values
ParametersStringEnter the name of the Query ParameterN/AAPIKey
ValuesString Enter the value of the Query Parameter