Skip to main content

EWA API - Installation Guide

Download and extract the artifacts

The file which contains the Ewa Api will be called EwaApi.zip and can be found together with the other release files for EWA.

Once the file has been downloaded, extract the contents of the zip file to a temporary location on the server.

EWA API files

The EwaApi.zip file contains the following files:

  • Bliksund.EWA.API.Parameters.xml - Contains the definition of the parameters that can be set. Includes how the deployment handles the parameters.
  • Bliksund.EWA.API.SetParameters.xml - Contains the values for the parameters that should be set when running deployment.
  • Bliksund.EWA.API.SourceManifest.xml - Contains the definition of the files that should be included in the deployment.
  • Bliksund.EWA.API.deploy-readme.txt - Contains information about the deployment.
  • Bliksund.EWA.API.deploy.cmd - Contains the deployment script.
  • Bliksund.EWA.API.zip - Contains the application files.

Edit the EWA API parameters

Edit the file Bliksund.EWA.API.SetParameters.xml with suitable values in your system or copy the values from the file used in the last build.

ParameterDescriptionExample
ConnectionStrings__EwaApiDatabaseThe connection string to the database that the Api should use.Data Source={Database Server};Initial Catalog={Database Name};User ID={Database Administrator};Password={Database Administrator Password};Pooling=False;MultipleActiveResultSets=True;Application Name=EntityFramework
CorsPolicy__AllowedOriginsString of comma separated origins to allow through CORS policy.""

Deploy the EWA API

We use the Bliksund.EWA.API.deploy.cmd script to deploy the new api. It will use the parameters defined in the Bliksund.EWA.API.SetParameters.xml file to deploy to the IIS website defined in the IIS Web Application Name parameter.

  1. Open the command prompt and run the command Bliksund.EWA.API.deploy.cmd /T to see what changes will be applied to the file system. Please note this command should be ran under administration permission.

  2. Then run the command Bliksund.EWA.API.deploy.cmd /Y to do the actual changes. You will see the change applied under the website on IIS.

Make sure the EWA API is running

Once the Api has been deployed, make sure that it is running by navigating to the URL /healthz endpoint in a web browser.

For example: {yourWebsiteUrl}/ewaapi/healthz

The Api should return a 200 OK response with the body Healthy.

Set the EWA API parameters in Insight

To Insight to be able to use the Ewa Api, the URL must be set in the Insight parameters.

ParameterDescriptionExample
EWA Api UrlThe URL to the Api.https://dev.ewa.bliksund.com/ewaapi