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

AVEVA™ Historian

Tags

  • Last UpdatedMar 19, 2025
  • 3 minute read

Description

Using the GET verb, retrieves tag metadata. For version 2, this also includes tag extended properties.

Using the POSTverb, manages multiple tags at once.

Using the DELETE verb, deletes a specified tag.

URL

/Tags

Methods

GET 

POST

DELETE

Required Parameters

  • FQN=[string ]
    The fully qualified name for the tag. A fully qualified name uses the format: datasource.tagname.

Optional Parameters

  • Source=[string ]
    The data source.

  • Description=[string ]
    The description of the tag.

  • EngUnit=[string]
    The engineering units used for the tag's recorded values.
    EngUnitMax=[Double]
    The maximum value of the tag, measured in engineering units.

  • EngUnitMin=[Double]
    The minimum value of the tag, measured in engineering units.
    The minimum value of the tag, measured in engineering units.

  • InterpolationType=[string]
    The interpolation type for retrieval. 0 = Stair-stepped interpolation; 1 = Linear interpolation (if applicable, based on the tag type); 254 = System default interpolation mode. The system default interpolation type is to use the system default for the analog type, either integer or real. The system default interpolation type for an analog type is determined by the setting of the InterpolationTypeInteger and InterpolationTypeReal system parameters. This setting impacts Interpolated, Average, and Integral retrieval modes.

  • IntegralDivisor=[Double]
    The factor to be applied when integrating a rate with the units [EngUnits/TimeUnit] to a quantity with units [EngUnits]. This factor is called the integral divisor.

    The default value of 1 assumes a time unit of seconds and ensures that a rate of [Unit/second] is correctly integrated to [Unit].

    For a time unit of minutes, set the integral divisor value to 60; for a unit of hours, set the integral divisor value to 3600. The integral divisor is applied similarly to rates or quantities that are not expressed in terms of a time unit. For example, to convert watts to watt-hours, the integral divisor is 1/3600. To convert watts to kilowatt-hours, the integral divisor is 1/3600000. Internal use only.

Optional Parameters

  • RolloverValue=[Double]
    The rollover value for the tag.

  • MessageOff=[string ]
    The message associated with the FALSE state of the discrete tag. The maximum number of characters is 64. A discrete tag set to 0 is in the FALSE state.

  • MessageOn=[string ]
    The message associated with the TRUE state of the discrete tag. The maximum number of characters is 64. A discrete tag set to 1 is in the TRUE state.

  • TagName=[string ]
    The unique name of the tag within the AVEVA Historian system.

  • TagType=[string ]
    The type of tag. 1 = Analog; 2 = Discrete; 3 = String; 5 = Event, 7 = Summary tag (analog or state). TagType is a foreign key from the AVEVA Historian TagRef table.

  • Raw
    Identifies related the raw acquired value.

  • Minutely
    Identifies related minutely summary.

  • Hourly
    Identifies related hourly summary.

  • Daily
    Identifies related daily summary.

Get tags

Sample Query

Scenario 1

This query lists tag metadata for all tags in all data sources for your Insight solution.

https://online.wonderware.[DOMAINSUFFIX]/s/ik97r5/apis/historian/v2/Tags

Scenario 2

This query lists metadata for tags in a particular data source. The data source in this example is named Baytown.

https://online.wonderware.[DOMAINSUFFIX]/s/ik97r5/apis/historian/v2/Tags?$filter=Source+eq+'Baytown'

Sample Output

{

@odata.context: "https://online.wonderware.[DOMAINSUFFIX]/s/ik97r5/apis/Historian/v2/$metadata#Tags",

value: [

{

FQN: "14th aug app.Auto",

Source: "14th aug app",

Description: "Automatic mode",

EngUnit: "",

EngUnitMax: 0,

EngUnitMin: 0,

InterpolationType: "None",

MessageOff: "Manu",

MessageOn: "Auto",

TagName: "Auto",

TagType: "Discrete",

Alias: "nareshtag-discrete",

Location: "/Application Tag 2",

Raw@odata.navigationLink:
"https://online.wonderware.[DOMAINSUFFIX]/s/ik97r5/apis/Historian/v2
/Tags('14th%252baug%252bapp.Auto')/Raw",

Minutely@odata.navigationLink:
"https://online.wonderware.[DOMAINSUFFIX]/s/ik97r5/apis/Historian/v2
/Tags('14th%252baug%252bapp.Auto')/Minutely",

Hourly@odata.navigationLink: "https://online.wonderware.[DOMAINSUFFIX]/s/ik97r5/apis/Historian/v2
/Tags('14th%252baug%252bapp.Auto')/Hourly",

Daily@odata.navigationLink:
"https://online.wonderware.[DOMAINSUFFIX]/s/ik97r5/apis/Historian/v2
/Tags('14th%252baug%252bapp.Auto')/Daily"

}

],

@odata.nextLink: "https://online.wonderware.[DOMAINSUFFIX]/s/ik97r5/apis/Historian/v2/Tags
?$skiptoken=koen66nr4nGCReC02FqdxO4Y62C7zBVsv3uf7mO8XMQqxZveqw8+v2/bVCsFdevT"

}

Delete a tag

Sample Query

This query deletes a tag named Weather.Brisbane.Cloudiness.

DELETE /Historian/v2/Tags('Weather.Brisbane.Cloudiness') HTTP/1.1

Host: nchdevruntime.cloudapp.net:8080

Content-Type: application/json

{

"delete":

{

"FQN":["datasourcename.tagname"]

}

}

Manage multiple tags

Sample Query

Scenario 1: Bulk query

This query retrieves multiple tags.

POST /Historian/v2/Tags HTTP/1.1

Host: nchqaruntime.cloudapp.net:8080

Authorization: Basic …….

Content-Type: application/json

Cache-Control: no-cache

{

"query":

{

"FQN":['Weather.Brisbane.Cloudiness','Weather.Auckland.Cloudiness'],

"select":"FQN,TagName"

}

}

Scenario 2: Bulk edit

This makes updates to multiple tags. You can edit up to 100 tags at a time, with maximum of 50 properties per tag.

Note: Historian Data REST API extended properties map to the AVEVA Historian SDK tag extended properties API.

This makes updates to a tag's standard and extended properties.

POST /Historian/v2/Tags HTTP/1.1

Host: nchdevruntime.cloudapp.net:8080

Authorization: Basic …

Content-Type: application/json

Cache-Control: no-cache

{

"properties":

[

{

"FQN": "18Jul_kc.test1",

"PropertyName": "Alias",

"Text": "SysTimeSec",

"Type": "String",

"Searchable":false

}

}

Sample Query

Scenario 3: Bulk delete

This deletes multiple tags.

POST /Historian/v2/Tags HTTP/1.1

Host: nchdevruntime.cloudapp.net:8080

Content-Type: application/json

Cache-Control: no-cache

{

"delete":

{

"FQN":["datasourcename.tagname1", "datasourcename.tagname2"]

}

}

Sample Output

The output from a bulk edit includes results per tag. If any of a tag's properties is invalid, the tag fails and results in an error message.

{

"value":

[

{

"FQN": "System.Tag1",

"$StatusCode": 200

},

{

"FQN": "System.Tag2",

"$StatusCode":500,

"$ErrorMessage":"Alias property contains illegal characters"

}

]

}

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