Get Tag Properties API

Use the Get Tags API to retrieve existing tag properties.

You can use this API to specify which properties are required for retrieval. If no property names are provided, then all properties are retrieved. When using the Get Tag Properties method, requesting a non-existent tag name returns an error.

METHOD:GET / POST
URI: (GET)https://<historianservername>:8443/historian-rest-api/v1/tags/properties/tagName

This URI returns all tag properties.

URI: (POST)https://<historianservername>:8443/historian-rest-api/v1/tags/properties/tagName
Payload

{
"PropertyName1" : 1,
"PropertyName2" : 1
}
SAMPLE GET URI:https://<historianservername>:8443/historian-rest-api/v1/tags/properties/tagName
SAMPLE POST URI:
https://<historianservername>:8443/historian-rest-api/v1/tags/properties/tagName

Payload:
{
    "Description" : 1
}
SAMPLE cURL GET COMMAND:curl -i -H "Accept: application/json" -i -H "Content-Type: application/json" -H "Authorization: Bearer <TOKEN> -X GET https://<historianservername>:8443/historian-rest-api/v1/tags/properties/tagName
SAMPLE cURL POST COMMAND:curl -i -H "Accept: application/json" -i -H "Content-Type: application/json" -H "Authorization: Bearer <TOKEN> -d ?{ \ ?Description\ ?: 1} -X POST https://<historianservername>:8443/historian-rest-api/v1/tags/properties/tagName

Query Parameters

ParameterDescriptionRequired?Values
tagNameTag name for which properties need to be retrieved.YesString
PayloadJSON array of PropertyName and bool (true/false).At least one property must be provided.Multi data types. See Payload Parameter for a list of tag properties used to update a tag configuration.
Note: The query payload contains all the tag properties you want returned from the server. In the Update Tag Config method, you need to provide the actual tag property value. However, in the Get Tag Properties method, you need to provide the property and a value of 1 (true), to allow it to be read from the server and returned.

Response Parameters

ParameterData TypeRequired?Description
ErrorCodeIntegerYesFor example, 0.
ErrorMessageStringYesFor example, NULL.
NameStringOptionalIf no error, then the tag name of query is returned and all requested parameters.

The response always includes these parameters.

Sample Response

{
   ?ErrorCode : 0,
   ?ErrorMessage : NULL,
    "Name": "AnilGH7-1.Simulation00001",
    "Description": "AnilGH7-1.Simulation00001",
    "EngineeringUnits": null,
    "Comment": null,
    "CollectorName": "ANILGH7-1_Simulation",
    "SourceAddress": "Simulation00001",
    "CollectionType": 2,
    "DataType": 2,
    "FixedStringLength": 8,
    "CollectionInterval": 1000,
    "CollectionOffset": 0,
    "LoadBalancing": false,
    "TimeStampType": 2,
    "HiEngineeringUnits": 200000,
    "LoEngineeringUnits": 0,
    "InputScaling": true,
    "HiScale": 32767,
    "LoScale": 0,
    "CollectorCompression": false,
    "CollectorDeadbandPercentRange": 0,
    "ArchiveCompression": false,
    "ArchiveDeadbandPercentRange": 0,
    "General1": null,
    "General2": null,
    "General3": null,
    "General4": null,
    "General5": null,
    "ReadSecurityGroup": null,
    "WriteSecurityGroup": null,
    "AdministratorSecurityGroup": null,
    "LastModified": "2016-08-31T10:34:37.749Z",
    "LastModifiedUser": "\\admin",
    "CollectorType": 2,
    "UTCBias": 0,
    "CalculationDependencies": [],
    "CollectionDisabled": false,
    "ArchiveCompressionTimeout": 0,
    "CollectorCompressionTimeout": 0,
    "SpikeLogic": true,
    "SpikeLogicOverride": false,
    "CollectorAbsoluteDeadbanding": false,
    "CollectorAbsoluteDeadband": 0,
    "ArchiveAbsoluteDeadbanding": false,
    "ArchiveAbsoluteDeadband": 0,
    "StepValue": false,
    "TimeResolution": 0,
    "ConditionCollectionEnabled": false,
    "ConditionCollectionTriggerTag": null,
    "ConditionCollectionComparison": 1,
    "ConditionCollectionCompareValue": null,
    "ConditionCollectionMarkers": true,
    "Calculation": "Simulation00001",
    "Id": "A4FD6A00-BE45-463F-93C9-F287F3220B31",
    "EnumeratedSetName": null,
    "DataStoreName": "User",
    "DefaultQueryModifiers": 0,
    "UserDefinedTypeName": null,
    "NumberOfElements": 0,
    "DataDensity": 4,
    "CalcType": 0,
    "HasAlias": false,
    "IsStale": false
}

The response always includes the Name field. The Calculation property is returned only when the tags interface type is 9 (S2S Collector type) tag.