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

AVEVA™ Work Tasks

Add a New Web API Lookup

  • Last UpdatedJun 25, 2024
  • 3 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 Lookup

  1. In the Enterprise Console, click the Menu button, click Settings, and then click Lookup Settings. The Lookup Settings page appears.

  2. Click New, and then click Web API. The New Web API Lookup page 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 Web API list, select a Web API connection.

    Based on the Web API connection selected, enter the URI in the Request URI box.

    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).

    • For the Web API not configured with open API specifications, the Load Columns option is available to get the columns data. When you click Load Columns button, the Web API will be executed in the Web API server. Based on the Web API functionality, there is a possibility of data update or delete.

    • For the Web API configured with open API specifications, specify the Operation Group and Operation for the selected Web API to get the columns data. For more information on configuring open Web API connection, see Configure OpenAPI.

  6. Select column names for the Selected Columns. The selected columns are displayed in the lookup. Ensure that the value column contains unique data.

  7. Select the data type for the selected column name for the Selected Columns, if required.

    Note: The data type mentioned for the selected columns is used while fetching the data. Make sure that the data type specified for the selected column matches with the source data.

  8. In the Display Column drop-down list, select the column name.

  9. In the Value Column drop-down list, select the column name.

  10. Select Yes for Advanced Settings, if you want to add the Header value or display the value of request URI.

    The Header value is displayed if the Web API has the Header value. You can also add a new Header value.

    Note:
    - In the case of Web API, you cannot set the Headers as optional i.e. the Optional property of the Header cannot be set to YES. For each Header, the Key and Value are mandatory properties.
    - In the case of OpenAPI, you cannot set the Optional property of the Header. You cannot provide the Key, but you need to provide the Value. If the Optional property is YES and the Value is empty, the value will not be sent to the Web API and will be considered null. If the Optional property is NO, you need to provide the Value.

  11. In the JSON Path for Child Item box, provide the JSON path to retrieve child nodes in a JSON having multiple nodes.

  12. Select Yes for Display Value Column in Grid, if you want to display the value column.

  13. In the Display Value Request URI box, type a URI. For example, api/DataTable/{Id} for http://localhost/MySite/api/DataTable/.

  14. Click Save

    The Web API lookup is saved and the Web API dialog box is closed.

    Note:
    - The Title of Web API lookups cannot have special characters and blank space. The only allowed special character is _ (underscore). Also, the Title starting with _SYS_ is not allowed.

    - The Web API for the Display Value Request URI helps in resolving the display value directly from the specific row of data. This helps to maintain consistency in the data displayed, save the network bandwidth, and improve the speed of execution.

    - The value of the Owner for the Web API Lookup in lists is not resolved by default as it involves connecting to a Web API and thereby consuming network bandwidth and reducing the speed of execution. A workaround is to add an additional field in the list and a corresponding hidden field in the form to map the value with the display value, and show only the display value field in the list grid.

    - Web API Lookup settings can be deleted even if they are being used.

    - The column specified in the Value field should identify a unique row in the table.

    - The Web API response should be in the JSON format.

    - The columns containing JSON objects should be mapped only to string data types. Further, these columns should not be configured for Display Column or Value.

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