Connecting to HTTP from an App Connect Designer instance in a containerized environment

If you're using an App Connect Designer instance within an IBM® Cloud Pak for Integration deployment or an independent deployment of the IBM App Connect Enterprise certified container, you can use an HTTP connector to connect to an HTTP endpoint.

The following instructions describe how to use a connector to create an account that connects to an HTTP endpoint. (For more information about using an App Connect Designer instance in a containerized environment, see Creating and managing flows for an API in App Connect Designer.)

To create an integration flow that passes key data between an HTTP server and other apps, you must connect App Connect to each app in the flow. The values that are needed to connect App Connect to your HTTP server depend on the type of security scheme that is configured for the endpoint. You can add an account to connect to the HTTP endpoint either from the App Connect Designer Connect > Applications and APIs page, or when you add an HTTP node to a flow in the flow editor.

Connecting to an unauthenticated public endpoint

If the endpoint is publicly available and requires no authentication, you don't need to specify any connection details. When you click Connect for HTTP from the App Connect Designer Applications and APIs page or from the flow editor, you can leave the connection fields blank and click Connect again. (In the flow editor, you use the fields for the HTTP Invoke method action to specify the URL and other configuration options to call the HTTP endpoint.)

Connecting to a secure endpoint

If the HTTP endpoint requires authentication or is on a private network, specify the necessary connection details.

  • If the endpoint is secured by using basic authentication, complete both of these fields to establish a connection:
    • For User name, specify the name of a user that is authorized to complete HTTP operations.
    • For Password, specify the password for the user.
      Note: If you're using basic authentication that requires a username with an API key as the password, specify the API key in the Password field.
  • If the endpoint requires an API key whenever a request is made, complete the following fields. For example, the endpoint might need an API key to authenticate API calls, monitor usage, or apply permissions.
    • Set the API key to the API key that is used to validate the HTTP request.
    • Set the API key location to the location where the API key is stored in the request:
      • Select header to pass the API key in the request header.
      • Select body URL encoded to pass the API key in the request body, in a URL-encoded format.
    • Set the API key name to the header or body parameter that is used to store the API key. If necessary, check your API documentation for this parameter name.
    Take note of the following considerations.
    • If you select body URL encoded as the API key location, the following rules apply.
      • The media type in the header is automatically set to content-type: application/x-www-form-urlencoded, and it overrides any Content-Type header that you set in your HTTP node. This setting indicates that the request body must be formatted as a query string of key and value pairs with an ampersand (&) separator, and encoded special characters. For example, field1=value1&field2=value2&field3=value3. The Request body value in the HTTP node is not inspected to check whether it is properly formatted into a URL-encoded string.
      • The API key name and API key are appended to the request body by using the format &apikeyname=apikeyvalue.
    • If the name in the Request headers field of your HTTP node is the same as the API key name value that is passed in a request header, the header in the connection fields takes priority.
  • To accept self-signed certificates that are trusted and used only in a nonproduction environment, set the Allow self-signed certificates field to true. The default is false.
  • If the endpoint is on a private network, complete both of these fields to establish a connection by using a private network agent.
    • For Override the HTTP endpoint hostname and port of the URL used in the flow, specify the protocol, hostname, or IP address, and the port number of the HTTP server in the format http://host:port or https://host:port.
    • Private network connection: Select the name of a private network connection that App Connect uses to connect to your private network. This list is populated with the names of private network connections that are created from the Private network connections page in the Designer instance. You see this field only if a switch server is configured for this Designer instance. For more information, see Connecting to a private network from App Connect Designer. (In App Connect Designer 12.0.10.0-r1 or earlier instances that include this field, the display name is shown as Agent name.)
The following example shows completed connection fields that use basic authentication and an API key.
Example of completed fields for connecting using basic authentication and an API key
The following example shows completed fields for a private network connection.
Example of completed fields for connecting to a private network
Connecting to an endpoint by using an override URL

To specify a URL value to override the protocol, host, and port in the HTTP endpoint URL that is being called, complete the Override the HTTP endpoint hostname and port of the URL used in the flow field and leave the Private network connection field blank. You can specify the override URL in either of these formats: http://host:port or https://host:port. You can use this setting to use the same flow to call different endpoints by setting up multiple accounts with different override URLs.

At run time, the protocol, host, and port segment of the URL that is specified in URL (fully qualified) in the HTTP node is overwritten with the override URL. For example, if the override URL for account 1 is https://testAPIhost:testPort and the URL (fully qualified) value in the HTTP node is https://APIhost:optionalPort/path?query, at run time, the URL (fully qualified) value is replaced with https://testAPIhost:testPort/path?query. Similarly, running the same (exported) flow by using another account with an override URL of https://productionAPIhost:productionPort converts the URL (fully qualified) value to https://productionAPIhost:productionPort/path?query.
An illustration of how a specified override URL replaces the value in the HTTP node

For more information about ways to connect to an HTTP endpoint from App Connect in a containerized environment, see Connecting to accounts.

Tip:

Before you use the account that is created in App Connect in a flow, rename the account to something meaningful that helps you to identify it. To rename the account on the Applications and APIs page, select the account, open its options menu (⋮), then click Rename Account.

If you configured more than one set of user credentials or generated more than one API key for the HTTP endpoint, you can connect multiple accounts to the endpoint. For example, you might configure more than one set of credentials to accommodate different rate limits or access levels). For information about setting up multiple accounts, see .