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

AVEVA™ Work Tasks

Invoke Web API: Configure Web API

  • Last UpdatedJul 08, 2025
  • 4 minute read

You can configure the Web APIs in the Web API Activity Configuration window. This window lists all the Web APIs configured for the application or workflow.

Note: The Web Server and the Web API hosted Server communicate through secure TLS channels. To ensure seamless communication, verify that appropriate TLS versions are enabled. It is recommended to configure the highest common TLS version supported by both servers for optimal security.

Http Method

The Invoke Web API activity supports the following HTTP request methods:

  • GET: The GET method retrieves information from the given server using a given URI. Requests using GET should only retrieve data and should have no other effect on the data.

  • POST: A POST request sends data to the server, for example customer information, file upload, using HTML forms.

  • PUT: A PUT request replaces all current representations of the target resource with the uploaded content.

  • DELETE: A DELETE request removes all current representations of the target resource given by the URI.

  • PATCH: A PATCH request updates an existing resource. It specifies only the changes and does not replace the entire resource.

Web API

Web APIs are frameworks to build HTTP services for browsers and mobile devices.

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 the Web API requires User Access Token authentication, provide the current logged in user's access token for authentication.

Note:
- If the repository is configured with AVEVA Identity Manager and Microsoft Entra ID, the User Access Token authentication does not work.
- If User Access Token is configured for the Web API and associated with Scheduler Event Association, the workflow fails.
- In an IDE environment, Web API with User Access Token does not work.

If the Web API requires Service to Service Access Token for authentication, you need to 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

Headers

Headers is used to view, add, and delete Header keys and values while configuring the Web API activity. Select the Yes option for Show Header to view, add, and delete Header keys and values. You can add Header value using Expressing Editor.

The Headers tab is displayed, only if the Header Key and Value is configured in the Web API resource file. You cannot add, edit, or delete the Header Keys and Values.

Note: You cannot set the Headers as optional i.e. the Optional property of the Headers cannot be set to YES. For each Header, the Key and Value are the mandatory properties.

Request URI

Request URI is a Uniform Resource Identifier and identifies the resource upon which to apply the request.

Example:

  • Request URI without parameters: api/product/1 for http://localhost/MySite/api/product/1

  • Request URI with parameters: api/{product}/{ID} for http://localhost/MySite/api

POST Data

Passing data to POST and PUT Methods

You can pass data to POST and PUT methods either through parameters or through the request body. If you pass data through request body, use the adjacent text box for the body content. If web API method uses [FromBody] attribute, select the Yes option for the FromBody Attribute property.

Content Type

You can configure the content type of the Post Data. The available options are JSON, XML, and URL ENCODED.

This field is displayed only when the value of Http Method is set to POST or PUT.

Encoding

You can configure the encoding type while configuring the Web API activity. The supported encoding types are UTF-7, UTF-8, and UTF-16. The Default encoding type is used for backward compatibility.

Output Settings

Save output type

Use the options in this field to save the return value from the Web Method so that you can use it in subsequent activities. You can save the return value as either a Variable or as an XML Variable.

Save output in

To save the output as a Variable, select the variable that you created in the Start activity. To save the output as an XML Variable, select the XML Variable that you created in the Start activity. You can also create the XML Variable using the Create New option. For more information on creating XML Variable, see Create XML Variable.

When you create a new XML Variable for Web API, we suggest you give sample Web API with multiple child nodes. This will add ChildNode node to the XML Variable structure. If the sample Web API contains only one child node, it may not add the ChildNode node to the XML Variable structure, and the nodes may not get mapped properly in the workflow.

You can also overwrite the XML Variable using the Update XML Variable option after modifying the Web API configuration.

Note:
- When creating a Web API XmlVariable with a ChildNode in the XML schema, the selection of the Yes checkbox is not saved to the database. Therefore, you need to reselect it each time you want to include a ChildNode in the XML schema.
- The object data type is not supported for storing XML variables in Web APIs.

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