Access Analytics from an external application
- Last UpdatedFeb 20, 2025
- 3 minute read
The same data displayed in AVEVA Contract Risk Management dashboards and widgets can also be used in external applications such as Microsoft Excel or Power BI. The data is accessed using the Analytics API, also referred to as the OData feed.
To improve performance for your Analytics API queries, we recommend:
-
Using the correct data model. See Data models and fields for more information.
-
Filtering data where possible.
-
Only selecting the data model fields you need for the query. Many of the fields across Analytics data models are duplicated to support the AVEVA Contract Risk Management, so selecting all returns large amounts of duplicated data. See Duplicated fields for more information.
Authenticate your user
To authenticate your user when accessing the Analytics API, you need an API key (access token). This can be generated in CONNECT and is unique for your user. The value of the access token is then used in queries from the external application.
Refer to the CONNECT documentation for more information about generating an access token.
Example - Microsoft Excel Power Query
To avoid having to set your access token in every query you create and then update it in every query when it expires, you can create a single query which contains the access token and then reference it in the queries which specify the Analytics data you need.
A similar method can be used for Power BI.
To set up queries in Excel which reference your access token:
-
Sign in to CONNECT and generate and copy your unique access token.
-
Open a blank Excel workbook.
-
On the Data tab of the ribbon, click Get Data and select From Other Sources then Blank Query.
Warning Do not select From OData Feed.
The Power Query editor window is displayed.
-
In the new blank query, paste the text of your access token.
-
Rename the query as APIKey.

-
On the Home tab of the ribbon, click Close and Load.
The query is created and can now be referenced from other queries.
This allows you to easily update your access token in a single query when it expires rather than needing to edit all of them.
-
Create another blank query: on the Data tab of the ribbon, click Get Data and select From Other Sources then Blank Query.
-
Paste the following into the query:
= OData.Feed("URL", null, [Headers = [Authorization = "Bearer " & APIKey ] ])
where URL is the full REST URL of the data you want to return in your query, e.g. https://YourServer/ProConAnalyticsAPI/Contracts. See Specifying URLs for more details.
An OData Feed URL can also be copied from the Detail View of a widget in AVEVA Contract Risk Management - see Configure the Detail View.

-
A message is displayed asking you to specify how to connect. Click Edit Credentials.
-
On the OData window, ensure Anonymous is selected in the left-hand list.
-
Select https://YourServer/ProConAnalyticsAPI as the level to apply the settings to.

-
Click Connect. The credentials are checked.
-
Click Close and Load to save and run the query.