Configure WebAPI.config file manually - Intergraph Smart Materials - 2.3 - Installation & Upgrade - Hexagon

Intergraph Smart Materials Web API Installation (2.3)

Language
English
Product
Intergraph Smart Materials
Subproduct
Web API
Search by Category
Installation & Upgrade
Version Smart Materials Web API
2.3

To configure WebAPI.config file manually, you need to follow these three sub process:

  1. Configure Database details

  2. Configure Authorization details

  3. API logs directory in Nlog config file

Configure Database details

  1. Navigate to the folder: <installed path>\Web\API\web.config.

  2. In connectionStrings, Data Source should point to the required database alias (TNS) and provide M_WEBAPI user's password.

    For example: <add name="SmatSiteDataContext" connectionString="DATA SOURCE=IQA10UFDBAPI.world;USER ID=m_webapi;PASSWORD=M_WEBAPI;Connection Timeout=30;" providerName="Oracle.DataAccess.Client" /></connectionStrings>.

Configure Authorization details

  1. Navigate to the folder: <installed path>\Web\API\web.config.

  2. Update the web.config file with the following authorization details:

    If you are a new user then first configure authorization details/server (for more, view Configure authorization servers for SMAT Web API).

    Parameter Name

    Mandatory/Optional

    baseURI

    Mandatory

    issuerUri

    Mandatory

    Resource id

    Mandatory

    Secret

    Optional

    AudienceId

    Optional

    Required scopes

    Optional

    For example:

    <services baseUri="https://in-smatapidb.ingrnet.com:8443/SmartMaterialsWebAPI/API/">

    <service prefix="SMAT/V1" id="7307E1EC-72B3-4523-944D-EFFDFB8E25F1" secret="" instance="" audience="" />

    </services>

    <security>

    <oauth issuer="https://samqa.ingrnet.com/sam/oauth/" requiredScopes="" />

API logs directory in Nlog config file

  1. Navigate to the folder: <installed path>\Web\API\Nlog.config.

  2. In the config file, update the directory path in Nlog.config for API logs.

    For example, <target xsi:type=:"File" name=:TraceFile" filename="E:\oradata\SDBFT\utl/${shortdate}-NLogTrace,log".