Tag Rename API

This API allows the administrator to rename tags.

METHOD:PUT
URIhttps://<historianservername>:8443/historian-rest-api/v1/tags/tagrename/oldtagname/newtagname?{truerename}
SAMPLE URIhttps://<historianservername>:8443/historian-rest-api/v1/tags/tagrename/GDW14NV2E.Simulation0000101/GDW14NV2E.Simulation0000101newname?truerename= <true | false>
SAMPLE CURL COMMANDcurl -i -H "Accept: application/json" -i -H "Content-Type: application/json"-H "Authorization: Bearer <TOKEN> -X PUT https://<historianservername>:8443/historian-rest-api/v1/tags/tagrename/<oldtagname>/<newtagname>?truerename=<true | false>

Query Parameters

ParameterDescriptionRequired?Values
oldtagnameTag which is to be renamed.YesString
newtagnameNew name for the selected tag.YesString
truerenameRenames the tag permanently if the value entered is true.

Creates an alias if the value entered is false.

Optional (false is default)Boolean (true or false)

Response Parameters

ParameterData TypeRequired?Description
Error CodeIntegerYesFor example, 0.
Error MessageStringYesFor example, NULL.
DataListYesReturns all the properties of the tag.

Sample Request

https://<historianservername>:8443/historian-rest-api/
        v1/tags/tagrename/<GDW14NV2E.Simulation0000101>/<GDW14NV2E.Simulation0000101newname>?truerename=true

Sample Response

{
    "ErrorCode": 0,
    "ErrorMessage": null,
    "Data": {
        "Name": "GDW14NV2E.Simulation0000101newname",
        "Description": "GDW14NV2E.Simulation00001",
        "ServerId": "",
        "EngineeringUnits": null,
        "Comment": null,
        "CollectorName": "GDW14NV2E_Simulation",
        "SourceAddress": "Simulation00001",
        "CollectionType": 2,
        "DataType": 10,
        "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": "2019-10-23T07:32:25.378Z",
        "LastModifiedUser": "User",
        "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": "4CF3198D-BD57-4D8B-8C3F-279E94E1FD8C",
        "EnumeratedSetName": null,
        "DataStoreName": "User",
        "DefaultQueryModifiers": 0,
        "UserDefinedTypeName": null,
        "NumberOfElements": 0,
        "DataDensity": 4,
        "CalcType": 0,
        "HasAlias": false,
        "IsStale": false,
        "Links": [
            {
                "Rel": "self",
                "Href": "/tag/GDW14NV2E.Simulation0000101newname"
            },
            {
                "Rel": "data-current",
                "Href": "/data/current/GDW14NV2E.Simulation0000101newname"
            },
            {
                "Rel": "data-raw-by-number",
                "Href": "/data/raw/GDW14NV2E.Simulation0000101newname/{start}/{end}/{count}/{direction}"
            },
            {
                "Rel": "data-raw-by-time",
                "Href": "/data/raw/GDW14NV2E.Simulation0000101newname/{start}/{end}/0/0"
            },
            {
                "Rel": "data-interpolated",
                "Href": "/data/interpolated/GDW14NV2E.Simulation0000101newname/{start}/{end}/{intervalMs}"
            }
        ]
    }
}