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

AVEVA™ Historian

Use a URL-based query to create a chart

  • Last UpdatedMar 10, 2025
  • 3 minute read

You can create a chart from a URL query. This is useful when you want to trigger the creation of a chart from another application.

Note: The syntax and parameters for creating a chart with a URL-based query differ between the modern look and classic look. To create a URL-based query for the Historian Client Web classic look, refer to the Historian Client Web classic look instructions.

Parts of a URL-based query

The query must be in this format:

<base URL><path>?Tags=<tag list><optional parameters, where parameters are joined by "&">

For example:

http://myhistorian:32569/ClientWeb/content?tags=WeatherApp.Auckland.Cloudiness&chartType=LineChart&startTime=2017-29-04T08:45:00.000&endTime=2017-03-30T08:45:00.000

The URL-based query includes these parts:

Part of the query URL

In the example, it looks like this:

The base URL, including a specific identifier for your Historian solution

http://myhistorian:32569/

Path

ClientWeb/content

An indicator showing that parameters are to follow

?

Query parameters

tags=WeatherApp.Auckland.Cloudiness
&chartType=LineChart
&startTime=2017-03-29T08:45:00.000
&endTime=2017-03-30T08:45:00.000

Supported query parameters

These query parameters are supported.While tag names are case-sensitive, parameters are not. (Parameters are case-insensitive.)

Parameter

Description

Tags

(required) Defines the tags to include in the chart. Use the case-sensitive, fully qualified name for each tag (that is, the data source name plus the tag name). Separate tag names with commas.

Note: If a tag name uses special characters, it must be URL encoded.

For example: Tags=MyDataSource.Pump12.Temp,MyDataSource.Pump12.Speed

ChartType

Specifies the type of chart to use. Valid chart types are DataGrid, ColumnChart, LineChart, PieChart, SummaryChart, and StatusBoard.

For example: ChartType=ColumnChart

Default: StatusBoard

StartTime

Specifies the when the reporting time period begins, using this format:

yyyy-MM-dd'T'HH:mm:ss.fff

For example: StartTime=2017-03-27T08:47:40.763

Including milliseconds is optional.

By default, StartTime is in local time (ISO format) for the client computer. Add a Z at the end of the time to use UTC instead. For example: StartTime=2017-03-27T08:47:40.763Z

Default: Today

EndTime

Specifies the when the reporting time period ends. It must be used in conjunction with StartTime or DurationHours, and cannot be a time in the future. Use the following format:

yyyy-MM-dd'T'HH:mm:ss.fff

For example: EndTime=2017-03-28T12:47:40.763

Including milliseconds is optional.

By default, EndTime is in local time (ISO format) for the client computer. Add a Z at the end of the time to use UTC instead. For example: EndTime=2017-03-28T12:47:40.763Z

Default: Today

DurationHours

Specifies the duration to report, in real number of hours. Use decimals to represent times that are less than an hour, for example 0.25 for 15 minutes.

DurationHours is used only if provided.

For example: DurationHours=2

sliceBy

Specifies the event aggregate in a column chart. This parameter accepts the fully qualified name of a string tag.

If sliceBy is provided in the URL along with resolution or timeAggregate, those parameters are ignored and event aggregate is selected for the chart.

If no tag name, or an invalid tag name, is provided for sliceBy, the sliceBy option is ignored.

For example: sliceBy=IntouchAlarm.ConcValve1

resolution

Specifies a time aggregate for a column chart in milliseconds. Standard values are 86400000 (DAY), 3600000 (Hour). Other values are accepted and will show as a custom duration.

For example: resolution=3600000

timeAggregate

Specifies a time aggregate for a column chart in daily or hourly values. Valid values are: Day, Hour, or Event.

If the sliceBy query parameter is used, then timeAggregate is automatically set to Event and any other timeAggregate option is ignored

For example: timeAggregate=Day

If resolution and timeAggregate are both provided, only resolution is considered.

valueAggregate

Specifies a value aggregate for a chart supporting value aggregate options. Valid values are minimum, maximum, integral, average, or last as long as the value is valid for the corresponding chart.

#hidenavigation

Hides the navigation options. This is helpful to provide an uncluttered view of your content, and to remove the option to navigate elsewhere.

About StartTime, EndTime, and DurationHours

You do not need to specify StartTime, EndTime, and DurationHours.

  • When all three are specified, Historian Client Web uses StartTime and EndTime, but ignores DurationHours.

  • When either StartTime or EndTime is specified along with DurationHours, the two specified parameters are used for StartTime/EndTime calculations.

  • When StartTime is specified without DurationHours, CurrentTime and StartTime are used for StartTime/EndTime calculations.

  • When none of these three parameters are specified, the chart shows tag values for today ending with the current time.

Example

For example, after logging into Historian Client Web, this URL is entered in a web browser:

http://myhistorian:32569/ClientWeb/content?DurationHours=4&tags=Seattle.W8.Press_001.Pieces&chartType=LineChart

This chart displays:

Chart displaying data from a URL-based query.

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