Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Web APIs

  • Last UpdatedJul 08, 2025
  • 4 minute read

Web APIs are frameworks to build HTTP services for browsers and mobile devices. Use Web APIs to customize your business applications.

To add a Web API

  1. In the Enterprise Console, click the Menu button, click Settings, and then click Web API.

    The Web API List page appears.

  2. Click New

    The Web API List Item wizard appears.

  3. In the Name box, type a name for the API.

  4. In the Description box, type a description for the API.

  5. In the Source box, select the Web API.

    • If you select the Web API, you need to provide the Base Address, Request URI, and Authentication Mode. For more information, see Invoke Web API: Configure Web API

    • If you select the OpenAPI, the Advanced Option is available. Select Yes to provide the Base Address, Request URI, and Authentication Mode.

      The SwaggerUrl is displayed when the Web API is configured from Swagger. The Web API schema is fetched from Swagger file. For more information, see Web API Type files for Swagger/OpenAPI based Web APIs

  6. In the Base Address box, type a URL in the format: http://localhost/MySite/.

    You can also enter an IPv6 URL for the Base Address. The IPv6 address must be enclosed within square brackets.

  7. In the Request URI box, type a URI. This is an optional parameter.

    For example, api/product/1 for http://localhost/MySite/api/product/1 (for Request URI without parameters) or api/{product}/{ID} for http://localhost/MySite/api (for Request URI with parameters).

  8. Select one of the following options for Authentication Mode:

    • No Authentication: If the Web API does not require authentication.

    • Windows: If the Web API is Windows authenticated.

    • User Access Token: If the Web API requires the currently logged-in user's access token.

      Note: If User Access Token is configured for the Web API and associated with Scheduler Event Association, the workflow fails.

    • Basic Authentication: If the Web API requires basic authentication. Provide the user name with domain and the password.

    • Certificate: If the Web API requires certificate authentication. Provide the certificate store location and the thumbprint. For more information on certificate-based authentication, see Web API Certificate-based Authentication.

      Note: The thumbprint should not contain any spaces. In some machines, the characters in thumbprint should be in upper case.

    • Service to Service Access Token: If the Web API requires Service to Service Access Token. To get the Access Token, provide Authority URL, Audience, Client ID, Client Secret, and Scope.

      In the Authority URL, provide the token end-point of the respective repository provider. For example,

      Microsoft Entra ID: {authority url}/oauth2/v2.0/token

      AVEVA Identity Manager: {authority url}/connect/token

  9. Do one of the following:

    • Test the Web API server connection.

      1. Click Test Server. An information message appears.

        Note:
        - The Request URI and Authentication Mode details are not required to test the Web API connection.
        - The Web API connection is successful if the site is pointing to the default IIS port, the Server is running but the Application Pool is stopped.
        - The Web API connection is unsuccessful if the Server, Site, or IIS is stopped.

    • Preview the data fetched using the Web API.

      1. Click Preview. The Preview dialog box appears.

        Preview is available only for .json file format.

        Note: When you click Preview,
        - If the Web API is configured with Headers, the option Show Headers is available, and you can select Yes to view the desired Keys and Values. But, if the Web API does not have Headers configured, the data fetched from the Web API gets listed directly.
        - For both Web API and OpenAPI, you need to provide the Key and Value for the Headers. These are the mandatory properties.
        - The Web API preview displays integers for columns that contain decimal values if the first record in the column has an integer value.

      2. Check the data fetched using the Web API.

      3. Click Close (or click the Close button). The Preview dialog box is closed.

      1. Save the Web API.

        1. Click Save & Close. The API is added, and an information message appears.

        2. Click OK (or click the Close button). The information message is closed.

      Note:
      - You can pass parameters in the Request URI using braces { }.
      - For example, api/{product}/{ID} for http://localhost/MySite/api.
      - If the Web API is Windows authenticated, then the status of the Windows Authentication must be set to Enabled for the EnterpriseConsole site under AVEVAWorkTasksSites site in the IIS Manager.
      - If a Web API method (action) is modified, then you must create the web API List Item, the Web API Lookup, or the Web API activity again.
      - Web APIs can recognize the response received in the ODATA (Open Data Protocol) format.
      - The Preview option is available only for Web APIs, which support JSON format.
      - The Preview button is enabled only when Request URI is provided.
      - The data fetched using Web API would not consider the column names containing characters : / and \.
      - The password should not contain < and > characters.

      Timeout Setting for Web API

      To configure a timeout for the Web API, specify the desired timeout value in seconds for the key WebAPITimeoutinSeconds in the Web.config file. This file is located at the following path:

      C:\Program Files\AVEVA\Work Tasks\Web\BPMUITemplates\Default

      <appSettings>

      <add key="customError" value="On"/>

      <add key="UPLOADLIMIT" value="10485760"/>

      <add key="LogMessageDelayInSeconds" value="5"/>

      <add key="ReportViewerMessages" value="Skelta.Forms.Web.SSRS.SSRSReportViewerMessages, Skelta.Forms.Web" />

      <add key="AllowOrigin" value=""></add>

      <add key="WebAPITimeoutinSeconds" value="100" />

      </appSettings>

      The default value for WebAPITimeoutinSeconds is set to 100, but you can adjust it as needed based on the required timeout duration.

      TitleResults for “How to create a CRG?”Also Available in