// This module is included in the following assemblies:
// as_connecting-to-rest-apis.adoc

[id='create-rest-api-connection_{context}']
= 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
{prodname} environment as a client application that can access that
REST API. 

.Procedure

. In {prodname}, in the left panel, click *Connections* to
display any available connections.
. Click *Create Connection* to display
available connectors.
. Click the connector for the API that you want to create a connection for.
. On the configuration page, provide the requested information. The
definition of the API determines what {prodname} prompts for.
+
Typically, an API service has security requirements and {prodname} 
prompts for security input according to the particular security 
type that the OpenAPI document defines. The security type can be 
one of the following:
+
[cols="1,2"]
|===
|*Security type*
|*{prodname} displays*

|HTTP Basic Authentication
|Input fields for user name and password.

|OAuth 2.0
|A button for you to click so that {prodname} 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. 

|===

. Click *Validate*. {prodname} validates connection parameters. For example, it checks for valid host/address URLs. 
. Click *Next*.
. On the *Name connection* page:
.. In the *Name* field, enter your choice of a name that
helps you distinguish this connection from any other connections.
.. In the *Description* field, optionally enter any information that
is helpful to know about this connection.
.. Click *Save*. You can now choose the connection that you
created and add it to an integration.
