Configuring Support for the MES Web API
- Last UpdatedNov 06, 2025
- 4 minute read
Configuring User Access Token Mode for the MES Web API
Use the following procedure to configure the MES WEB API to use a user access token.
- Open the Work Tasks Central Configuration web application.
- On the Token Service page, configure a token service that uses the AVEVA Identity Manager. The URL includes the host's fully qualified domain name and the entry identitymanager at the end of the URL. For example, https://myservername.mydomain.com/identitymanager.

- On the repository's Manage Repository page, in the Resource Provider section, select the token service in the Use Token Service list.

- In the Display Domain Name with User Name section, make sure that the Display Domain Name option is selected.

- In Enterprise Console, open the Web API List page (click Settings, then click Web API).
- Click New.

- On the Web API List Item page, enter values for the following properties:
Name
The name of the list item (e.g., MESWebAPI).
Description
A description of the list item.
Source
Select Generic.
Base Address
The base URI for the MES Web API, which has the format https://hostname/mesmw/. Make sure that you include the forward slash (/) at the end of the URI.
Request (URI)
Enter api.
Authentication Mode
Select User Access Token.
- Click Save to save your entries.
Now you can add a Web API lookup within a grid in a work flow form or for other functionality for which lookups are supported.
Configuring Service-to-Service Access Token Mode for the MES Web API
Use the following procedure to configure the MES WEB API to use a service-to-service access token.
- In Enterprise Console, open the Web API List page (click Settings, then click Web API).
- 2. Click New.

- On the Web API List Item page, enter values for the following properties:
Name
The name of the list item (e.g., MESWebAPI).
Description
A description of the list item.
Source
Select Generic.
Base Address
The base URI for the MES Web API, which has the format https://hostname/mesmw/. Make sure that you include the forward slash (/) at the end of the URI.
Request (URI)
Enter api.
Authentication Mode
Select Service to Service AccessToken.
Authority
Enter the URL endpoint for the token authority. For how to obtain this endpoint, see "Obtaining the URL Endpoints for the Token Authority and Audience" below.
Audience
Enter the URL endpoint for the token audience. For how to obtain this endpoint, see "Obtaining the URL Endpoints for the Token Authority and Audience" below.
Client ID
Enter an AIM client ID. For how to create client IDs, see Creating Client IDs to Obtain AIM Access Tokens
Client Secret
Enter the AIM client password.
Scope
Enter system.
- Click Save to save your entries.
Now you can add a Web API lookup within a grid in a work flow form or for other functionality for which lookups are supported.
Obtaining the URL Endpoints for the Token Authority and Audience
- In a web browser, open the AVEVA Identity Manager (https://hostfullyqualifieddomainname/IdentityManager).
- On the Welcome page, click the discovery document link.

The contents of the discovery document opens.
- Locate the authorization_endpoint entry (used for the Audience property) and the token_endpoint entry (used for the Authority property), highlighted below.

Adding a Web API Lookup for an MES Web API Endpoint
- In Enterprise Console, open the Web API Lookup page (click Settings, then click Lookup Settings).
- Click New, then click Web API.

- On the New Web API Lookup page, enter values for the following properties:
Name
The lookup name.
Description
(Optional) The lookup description
Web API
Select the MES Web API list item that you created in the previous procedure. The following settings assume that the latest MES Web API was selected. The settings might be different if another API is selected.
Operation Group
Select the operation group for the operation (endpoint) to be used.
Operation
Select the operation to be used.
Selected Columns
The columns that are available to be shown in the lookup.
The remaining steps are similar to adding any lookup.