Configuring an HTTP web service in RingCX
=========================================

When configuring an HTTP web service, you will specify all the necessary information about the inputs and content of the web service. The information you provide will include the endpoint URL that specifies the resource that your operation creates, updates, or deletes. You will also specify the authentication data to access the service, the HTTP headers, any URL parameters needed, and the data format and content for the HTTP body. You can use tags from our system to insert real-time system data into the HTTP headers, URL parameters, or HTTP body.

Let's review how you can create and configure an HTTP web service.

Configuring an HTTP web service

To configure an HTTP web service, follow the steps below.

* Navigate to **Dev Tools \> Web services**via the left-hand navigation bar.
* Click **New group** to create a web services group if you don't have one already.
* Enter a name for your web services group and click **Save.**
* Click **Add new Web Service**under your web services group.
* Check the **Active** box to enable the web service.
* Check the **Mapping Replacement Enabled** option if you want to replace mapped values.
* Click on the **Service Type** field and select *HTTP* from the dropdown menu.
* In the **URL** field, specify an HTTP operation type, and the URL for the HTTP operation request.
* In the **Authentication** tab, provide the **HTTP Username** and **HTTP Password.**
* In the **Headers** tab, click **Add Variable** and enter a **Name** and **Value** to define any headers.
* On the **URL Params** tab, click on **Add Variable** and enter a **Name** and **Value** to define any parameters in the URL.
* If your operation specifies a body, select the data type to use on the **Body** tab and enter body content.
* Click **Save** to save your changes.

Understanding the HTTP configuration settings

Now that we've gone over how to configure an HTTP web service, let's take a closer look at the settings discussed in the steps above.

* **Active**: Enables the web service
* **Debug?**: Runs the web service in a debug-only mode to analyze SOAP/HTTP messages
* **Mapping Replacements Enabled**: Enables mapping replacements
* **Send All Script Data**: Includes script data from a web service embedded in a script
* **Service Type**: Specifies the type of web service as HTTP (or SOAP)
* **Description**: A description that you will see when selecting a service to invoke elsewhere
* **URL text field**: The URL to the HTTP resource
* **URL dropbox**: The HTTP operation type
* **Authentication** : Defines credentials to authenticate with the web service
  * **HTTP Username**: The username to authenticate with the web service
  * **HTTP Password**: The password to authenticate with the web service

* **Headers** : Specifies headers for web service requests
  * **Name**: The name of the HTTP header
  * **Value**: The value of the HTTP header. You can insert a tag with system data

* **URL Params** : Specifies parameters in the URL for web service requests
  * **Name**: The name of the URL parameter
  * **Value**: The value of the URL parameter. You can insert a tag with system data

* **Body** : Specifies the data type and content for the HTTP body. You specify this parameter only for the PUT, POST, and PATCH operations
  * **Data type** : The data type for the HTTP body
    * *Form*: Specifies an HTML form. You can add name/value pairs to the form
    * *XML*: Specifies an Extensible Markup Language (XML) body
    * *JSON*: Specifies a JavaScript Object Notation (JSON) body
    * *Text*: Specifies a text body

