Skip to main content

Documentation Portal

How to run index calls?

We are able to run queries directly from the connector API console. To perform an index call you can do the following query:

GET /api/v2/tags/indexvalues?historianName=<datasourceName>&tagName=<tagname>&tagType=<tagtype>&interpolationType=DEFAULT&startDate=2021-11-01T00:00:00Z&endDate=2021-12-01T00:00:00.000Z&numberOfIntervals=43200

Parameters historianName, tagName and tagType need to be filled in to match your setup:

  • historianName: the datasource name as specified in ConfigHub

  • tagName: the name of the tag you want to fetch data for, including the prefix

  • tagType: type of the tag. All supported TrendMiner tag types are documented here: Which tag types are supported by TrendMiner?.

numberOfIntervals = the number of times the index resolution fits into the requested time interval. e.g. requesting 1 month of data for a 1 minute index resolution = 30 days * 24 hours * 60 minutes = 43200 minutes = 43200 intervals.

Time period \ index resolution

1 minute

5 seconds

1 day

1440

17280

1 week

10080

120960

1 month (30 days)

43200

518400

1 month (31 days)

44640

535680

 

Output requirements:

  • Timestamps should be in chronological order, oldest first

  • All timestamps returned should be inside of the requested time interval

  • The complete response should be returned within a reasonable timeframe of 5-30 seconds. A well performing data source returns 1 month of data in around 1 second. The response time can be influenced by tweaking the index granularity setting in ConfigHub. Check the user documentation for more info.

  • Acceptable amount of datapoints within the given timeframe. The number of data points returned can be influenced by tweaking the index granularity setting in ConfigHub. Check the user documentation for more info.