Configuring API Access for the Web Component

The UNIFYBroker Web Component operates the UNIFYBroker service through an API. By default, the UNIFYBroker Web Component is configured to use the default UNIFYBroker API. If the UNIFYBroker API is reconfigured, the Web Component must also be reconfigured to use it correctly.

Configuration

The following configuration is located in the Web\Web.config file.

Inside the appSettings element in the configuration element, find the following:

<add key="apiAddress" value="{apiAddress}" />

and update the {apiAddress} to match that of the desired API.

Authentication

If the desired API has authentication configured, the following elements must also be configured:

<add key="api:AuthorizeSetting" value="AADBearer" />
<add key="api:Tenant" value="{Tenant}" />
<add key="api:AADInstance" value="https://login.microsoftonline.com/{0}" />
<add key="api:UIServiceResourceId" value="{UIServiceResourceId}" />
<add key="api:UIClientId" value="{UIClientId}" />
<add key="api:UIAppKey" value="{UIAppKey}" />

The above five settings should be configured as follows:

NameDescription
TenantThe tenant setting of the target API.
UIServiceResourceIdThe audience setting of the target API.
UIClientIdThe ID of the client application representing UNIFYBroker.
UIAppKeyThe secret key from the client application representing UNIFYBroker.

HTTPS

An API endpoint can be configured to use HTTPS by performing the following steps:

  1. Install the certificate to use with HTTPS as a local machine certificate. A user certificate cannot be used.
  2. Run the following command in an administrator command prompt:
    netsh http add sslcert ipport=0.0.0.0:8000 certhash=0000000000003ed9cd0c315bbb6dc1c08da5e6 appid={00112233-4455-6677-8899-AABBCCDDEEFF}
    Set ipport to that which the API endpoint is configured to use, the certhash the thumbprint of the desired certificate, and the appid a random GUID for identification purposes.
  3. Update the configuration for the API. If you're modifying the default API, make sure you have a correctly configured web component ready to confirm the API changes.

Is this article helpful for you?