Create a Swagger Connection

Create a Connection to Swagger in Hero Platform_

    1. Open Hero Platform_.

    2. Open Integration from the navigation menu and select Connections.
        

   3. Click Create New Connection.
        

   4. Give the Connection a name and select Swagger from the drop-down list for Connection type.

        

   5. The Swagger connection details screen pops up with fields that need to be configured.

  • Select the Swagger authentication type from the drop-down menu.
    • Fill out the authentication information based on the authentication type.
      • OAuth2 (Client Credentials Flow)
      • OAuth2 (Authentication Code Flow)
      • Basic Authentication
      • No Authentication
  • Click Load from file and select your Swagger file or copy and paste it into the box provided. (JSON or YAML format)
    • After selecting the file, the Swagger schema is displayed.
  • Click the Refresh icon to import the base URL from the schema or enter the base URL.

    If the IP for the Base URL in the Swagger Connection is in the following ranges it will be restricted/error:

    • 10.0.0.0/8
    • 169.254.0.0/16
    • 172.16.0.0/12
    • 192.168.0.0/16

    If a the IP of the URL resides in one of these ranges, it can be overridden by the following commands from the customer’s Hero Platform_ sys admin:

    • -Dsecurity.restricted-ip-ranges.0=<ip>/<range>
    • -Dfeatures.restrict-ip-ranges=off
  • To test a Swagger connection, Automation Hero recommends selecting an HTTP method and endpoint that (if possible):

    • doesn’t require any parameters.

    • results a non-html response.

    • uses the same authentication method as the connection.

    If the test method or test endpoint is not configured correctly, the test might produce a false positive or false negative result.

    If there is not an endpoint to use for testing, the connector can still be used in the Flow.

    WARNING: Testing the connection sends a real HTTP request. Avoid the usage of endpoints that modify or trigger actions.

       

     6. Click Test connection. A confirmation message is displayed if the connection has been established in Hero Platform_.

        

     7. Click OK to finish saving the Connection in Hero Platform_.