Fetching Pet Information by Status

We want to retrieve a list of all the available pets in the pet store. This Pipeline demonstrates how we can use the OpenAPI Snap to accomplish this task:

  1. We must query the status parameter with the available value to view a list of all pets with the available status. We pass this value to the $parameters.query.status parameter in the OpenAPI specification using a Mapper Snap configured as shown below:


  2. Based on the above configuration the Mapper Snap maps the value available to the $parameters.query.status parameter as shown in the Mapper Snap's output below:


  3. We configure the OpenAPI Snap to call the pet store's API using the OpenAPI specification, base URL, OpenAPI path, and operation type as shown below:


  4. Upon successful execution, the OpenAPI Snap retrieves the information from the endpoint as shown in the Snap's output preview below:


    This is how we can retrieve information based on specified parameters using the OpenAPI Snap. Additionally, we can add a JSON Formatter and File Writer downstream of the OpenAPI Snap to write the above output into a local file.

To reuse the pipeline:
  1. Download and import the pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide pipeline parameters as applicable.