Configure the Service API Key
A token is required to access the Reporting API. An access token can be obtained by calling the authentication endpoint on the API in conjunction with an API key.
The API key must first be configured by setting the ServiceApiKey
environment variable in IIS for the CGiX Web API as follows:
- Locate the Configuration Editor of the CGiX Web API in IIS.
- Open the Configuration Editor, locate the
system.webServer/aspNetCore
section and set the environment variableServiceApiKey
to the desired value.
API Key
In this tutorial, we have used an online API key generator website to generate a key. As the key is a guid, it is 32 characters in length excluding the hyphens.
We recommend using longer keys which conform to your internal security policy i.e., minimum length, alphanumeric, etc.
Using a Certificate
An alternative method for obtaining an access token is calling the authentication endpoint using a valid certificate. See Configure the API to use a Certificate.
Updated about 1 year ago