HTTP account details

To establish a connection to an HTTP endpoint, you must add an account that defines the account details to connect with. You can define these details by creating a configuration object in the App Connect Dashboard, the Red Hat® OpenShift® web console or CLI, or the Kubernetes CLI.

Account parameters

If you've configured more than one set of user credentials or generated more than one API key for an HTTP endpoint (for example, to accommodate different rate limits or access levels), you can define multiple accounts for the endpoint.

For each account that you require, you can specify a new set of account details in any of the following ways:

  • If you are using the App Connect Dashboard, either complete the Account details fields in the Create configuration panel, or specify the account parameters in an accounts.yaml file before importing it into the Create configuration panel. For more information, see Accounts type.
  • If you are using the Red Hat OpenShift web console or CLI, or the Kubernetes CLI, specify the account parameters in an accounts.yaml file, and then use this configuration file to create a configuration object. For more information, see Creating the file for a configuration object of type Accounts.

The set of required and optional Account fields or parameters are listed in the following table.

The values required to connect to your HTTP server are dependent on the type of security scheme that is configured for the endpoint.

Connecting to an un-authenticated public endpoint

If the endpoint is publicly available and requires no authentication, you don't need to specify any connection details, but must specify an account name by using the name parameter.

Connecting with basic authentication

If the HTTP endpoint is secured using basic authentication, you must specify a username and password by using the username and password parameters.

Connecting to an endpoint that requires an API key

If the HTTP endpoint requires an API key whenever a request is made (for example, to authenticate API calls, monitor usage, or apply permissions), you must specify an API key, API key location, and API key name by using the apiKeyValue, apiKeyLocation, and apiKeyName parameters.

Tip: You can also optionally configure settings to allow self-signed certificates or to connect to an endpoint by using an override URL.

Field Parameter Values Condition Description

Account name

name

User defined

Required

The name of an HTTP account that is used in the exported flow.

User name

username

User defined

Optional

Use in conjunction with the password parameter.

The name of a user that is authorized to perform HTTP operations on an endpoint that is secured using basic authentication.

Password

password

User defined

Optional

Use in conjunction with the username parameter.

The password for the user connecting with basic authentication. If the authentication requires a user name with an API key as the password, set the password parameter to the API key value.

API key

apiKeyValue

User defined

Optional

Use in conjunction with the apiKeyLocation and apiKeyName parameters.

An API key that the endpoint requires to validate each HTTP request.

API key location

apiKeyLocation

header

body URL encoded

Optional

Use in conjunction with the apiKeyValue and apiKeyName parameters.

The location where the API key should be stored in the HTTP request.

  • To pass the API key in the request header, set this value to header.
  • To pass the API key in a URL-encoded format in the request body, set this value to body URL encoded. The following rules apply for this value:
    • The media type in the header is automatically set to content-type: application/x-www-form-urlencoded, and it will override any Content-Type header that you set in your HTTP node. This setting indicates that the request body should be formatted as a query string of key/value pairs with an ampersand (&) separator, and encoded special characters; for example, field1=value1&field2=value2&field3=value3. Be aware that the Request body field value in the HTTP node will not be inspected to check whether it’s properly formatted into a URL-encoded string.
    • The API key name and API key are appended to the request body using this format: &APIkeyname=APIkeyvalue.

API key name

apiKeyName

User defined

Optional

Use in conjunction with the apiKeyValue and apiKeyLocation parameters.

The header or body parameter that will be used to store the API key. If necessary, check your API documentation for this parameter name.

In your HTTP node, if you add a Request headers field with a name that’s identical to the apiKeyName value that was configured to be passed in a request header, the header in these connection credentials takes priority.

Allow self-signed certificates

acceptSelfSignedCerts

true

false

Optional

If you want to be able to accept self-signed certificates that are trusted and used only in a non-production environment, set this value to true. The default is false.

Override the HTTP endpoint host name and port of the URL used in the flow

endpointUrl

User defined

Optional

A URL that lets you override the protocol, host, and port in the endpoint URL being called by the HTTP node. This setting enables you to use the same flow to call different endpoints by setting up multiple accounts with different override URLs.

Specify this value in the format http://host:port or https://host:port.

Examples

Remember: An accounts.yaml file that defines one or more accounts must always begin with the following line:
accounts:

Example 1 (Connecting to an un-authenticated public endpoint):
  http:
    - name: Account 1
      credentials: {}
      endpoint: {}
Example 2 (Connecting with basic authentication):
  http:
    - name: Account 1
      credentials:
        username: joebloggs
        password: topsecret1234
      endpoint: {}
Example 3 (Connecting with basic authentication and an API key):
  http:
    - name: Account 1
      credentials:
        username: joebloggs
        password: topsecret1234
        apiKeyValue: ABcde-12345
        apiKeyLocation: header
        apiKeyName: Apikey
      endpoint: {}
Example 4 (Connecting with basic authentication and an override URL):
  http:
    - name: Account 1
      credentials:
        username: joebloggs
        password: topsecret1234
      endpoint:
        endpointUrl: 'https://mystagingAPIhost.acme.com:3002'