Chapter 5. Connecting to API clients

In an integration, to connect to a REST or a SOAP API, you must have created a connector for that API. See Integrating Applications with Fuse Online, Adding and managing API client connectors.

When a connector for the API that you want to connect to is available in Fuse Online, the steps for connecting to that API are:

5.1. Registering Fuse Online as a REST API client

Before Fuse Online creates a REST API client connector, it prompts you to indicate the API’s security requirements. For APIs that use the OAuth protocol, when Fuse Online creates the connector it also adds an entry for the API to the Fuse Online Settings page. This is where you provide the API client ID and the API client secret that authorize Fuse Online to access the API.

If the API you want to connect to does not use OAuth, skip this section and see Creating a REST API client connection.

Prerequisite

You must know the URL for the OAuth custom application setting page for the REST API that you want to connect to.

Procedure

  1. In Fuse Online:

    1. On the Settings page, near the top, to the right of the callback URL, click Copy Callback URL to copy the callback URL for your Fuse Online environment to the clipboard. You will need this URL later in this procedure.
    2. Look for the name of the API you want to connect to and click it to display its client ID and client secret fields.
  2. In another browser window, you must register Fuse Online as an OAuth client of the API you want to connect to. The exact steps for doing this vary for each API service. Typically, the API service provides an OAuth custom application setting page. Go to that page and do the following:

    1. Provide the Fuse Online callback URL, which you copied at the beginning of this procedure.
    2. Respond to any other prompts that require your input.
    3. Obtain the client ID and client secret that the API service assigns to your Fuse Online environment.
  3. Return to the Fuse Online Settings page entry for the API service you are registering with and do the following:

    1. Paste the assigned client ID.
    2. Paste the assigned client secret.
    3. Click Save.

5.2. Creating a REST API client connection

In an integration, to connect to a REST API, create a connection to that REST API, which you can then add to any number of integrations.

Prerequisites

  • You created a connector for the REST API that you want to connect to.
  • If the REST API uses the OAuth protocol then you registered you Fuse Online environment as a client application that can access that REST API.

Procedure

  1. In Fuse Online, in the left panel, click Connections to display any available connections.
  2. Click Create Connection to display available connectors.
  3. Click the connector for the API that you want to create a connection for.
  4. On the configuration page, provide the requested information. The definition of the API determines what Fuse Online prompts for.

    Typically, an API service has security requirements and Fuse Online prompts for security input according to the particular security type that the OpenAPI document defines. The security type can be one of the following:

    Security type

    Fuse Online displays

    HTTP Basic Authentication

    Input fields for user name and password.

    OAuth 2.0

    A button for you to click so that Fuse Online can verify its registration credentials for connecting to the API. These credentials were provided when the connector was created.

    API Key

    Input field for an API key, which you must obtain from the API service.

  5. Click Validate. Fuse Online validates connection parameters. For example, it checks for valid host/address URLs.
  6. Click Next.
  7. On the Name connection page:

    1. In the Name field, enter your choice of a name that helps you distinguish this connection from any other connections.
    2. In the Description field, optionally enter any information that is helpful to know about this connection.
    3. Click Save. You can now choose the connection that you created and add it to an integration.

5.3. Creating a SOAP API client connection

In an integration, to connect to a SOAP API, create a connection to that SOAP API, which you can then add to any number of integrations.

Prerequisite

  • You created a connector for the SOAP API that you want to connect to.

Procedure

  1. In Fuse Online, in the left panel, click Connections to display any available connections.
  2. Click Create Connection to display available connectors.
  3. Click the connector for the API that you want to create a connection for.
  4. On the configuration page, provide the requested information. The definition of the API determines what Fuse Online prompts for.
  5. On the connection configuration page:

    1. Accept or edit the SOAP Endpoint address.
    2. Select an Authentication type (None, Basic, or WS-Security Username Token) to use when invoking the WSDL endpoint. For Basic Authentication, HTTPS is supported. Typically, an API service has security requirements and Fuse Online prompts for security input according to the particular security type that the WSDL file defines.

      Note: SAML is not supported.

    3. Select a WS-Security Password Type (None, Text, or Digest).
    4. Specify username and password.
    5. Select Timestamp if you want Fuse Online to add a timestamp to the WS-Security header.
    6. Select Username Token Nonce if you want Fuse Online to add a Nonce element to the WS-Security Username Token header. For Username Token profiles, both Text and Digest passwords are supported.

      For more information about how to use the UsernameToken with the Web Services Security (WSS) specification, see this OASIS document.

    7. Select Username Token Created if you want Fuse Online to add a timestamp element to the WS-Security Username Token header.

      Note: Due to a lack of an OASIS/W3C standard for verifying connections to SOAP endpoints, SOAP connectors do not support validation.

  6. Click Next.
  7. On the Name connection page:

    1. In the Name field, enter your choice of a name that helps you distinguish this connection from any other connections.
    2. In the Description field, optionally enter any information that is helpful to know about this connection.
    3. Click Save. You can now choose the connection that you created and add it to an integration.

5.4. Adding an API client connection to an integration

In an integration, to connect to a REST or SOAP API, add a step that connects to that API.

In this release, a connection to a REST or SOAP API can be a step that is in the middle of a flow or it can be the finish connection in a simple integration. In other words, a connection to a REST or SOAP API cannot be a start connection.

Prerequisites

  • You created a connection to the REST or SOAP API.
  • You are creating or editing a flow.
  • The flow already has its start connection.
  • Fuse Online is prompting you to select a finish connection or to add to the integration.

Procedure

  1. On the Add to Integration page, click the plus sign where you want to add the connection. Skip this step if Fuse Online is prompting you to choose the finish connection.
  2. On the page that displays available steps, click the API connection that you want to add to the flow.
  3. Select the action that you want the connection to perform. The actions that are available are based on the resource operations specified in the OpenAPI document or WSDL file that was uploaded to Fuse Online and that describes the API that you are connecting to.
  4. Depending on the action you select, enter any parameters that Fuse Online prompts for.
  5. Click Next.

Result

The connection appears in the integration visualization where you added it.