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

AVEVA™ Insight

Retrieval endpoint and authentication (basic authentication and token-based)

Retrieval endpoint and authentication (basic authentication and token-based)

  • Last UpdatedSep 11, 2023
  • 2 minute read

Historian Data REST API allows data retrieval with either basic or token authentication. How the solution-specific identifier is provided varies by authentication type:

When you use basic authentication, the solution-specific identifier is part of the endpoint URL.

Note: You can only use a non-federated email account with basic authentication, such as an account provided by Gmail. Federated accounts using multi-factor authentication are not supported.

When you use token authentication, the solution-specific identifier is part of the token.

To acquire a retrieval endpoint

For basic authentication, you must use an endpoint containing a unique identifier for your solution in this format:

https://online.wonderware.[DOMAINSUFFIX]/s/<solution_ID>/apis/Historian/v2/

Learn how to find the basic-authentication retrieval endpoint for your solution.

For token authentication, you can use the same endpoint as basic, or you can omit the solution ID since it is contained in the token. Without a solution ID, the endpoint is in this format:

https://online.wonderware.[DOMAINSUFFIX]/apis/Historian/v2/

Two token options: API key and user token

For token authentication, you must place either of these types of "bearer token" in the Authorization header of your retrieval request:

  • API key - This type of token does not expire and provides global read access. Acquire an API key for data retrieval.

  • User token - This type of token is location-specific and has an expiration date. With it, you can retrieve data for a specific location until the token expires.

See below for steps to acquire a user token. For related information, read about setting security by location.

To acquire a user token to use with your solution

  1. Log into AVEVA Insight and select the solution you want to query.

  2. To request a user token with a certain expiration, go to:

    https://online.wonderware.[DOMAINSUFFIX]/api/token/v2?duration=<number_of_days>

    where <number_of_day> can be as many as 21. For example, this is a request for a user token that expires in 3 days:

    https://online.wonderware.[DOMAINSUFFIX]/api/token/v2?duration=3

    If you request a user token for a longer amount of time, you'll receive one that expires in 21 days.

If you are not already signed in, you can combine a signin request with the user token request like this:

https://online.wonderware.[DOMAINSUFFIX]/Authentication/Signin?returnUrl=https://online.wonderware.[DOMAINSUFFIX]/api/token/v2?duration=<number_of_days>

This prompts for signin credentials, and then redirects to the user token.

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