Managing Historian Model
- The Add Object Type API
- Using this API, you can create an object type.
METHOD POST URI https://<historianservername>/historian-model/v2/objectTypesSAMPLE QUERY PARAM POST URL https://localhost:443/historian-model/v2/objectTypesSAMPLE PAYLOAD [ { "name":"Vehicle", "description":"Vehicle description", "dataVariables":[], "containedObjectTypes":[], "objectTypeTemplates":[], "lastModifiedUser":"", "lastmodifiedTime":"", "versionNumber":0 } ]Table 1. Payload Parameters Parameter Description Required? Data Type nameThe object type name (must be unique). Yes String descriptionThe description of the object type. No String containedObjectTypesThe list of contained types with details No Array objectTypeTemplatesThe list of object type templates, along with their details. No Array lastModifiedUserThe username of the user who created the object type. Yes String lastModifiedTimeThe current time. Yes String versionNumberThe version number of the object type. Start with 1 and increment by 1 each time you want to modify the object type. Yes Number Table 2. Response Parameters Parameter Data Type Description detailString Description of the error. error_codeInteger The error code. A value of 0 indicates that the operation was successful. statusString The http request status. titleString The title of the error. typeString The type of the error. - The View Object Type API
- Using this API, you can access an object type.
METHOD POST URI https://<historianservername>/historian-model/v2/objectTypes/infoSAMPLE QUERY PARAM POST URL https://localhost:443/historian-model/v2/objectTypes/infoSAMPLE RESPONSE { "containedObjectTypes":[], "dataVariables":[], "description":"Vehicle description", "lastModifiedUser":"XYZ.admin", "lastmodifiedTime":"2022-01-21 08:58:20", "name":"Vehicle", "objectTypeTemplates":[{"containedObjectTypes":[], "dataVariables":[], "defaultTemplate":true, "description":"Default_Template_Vehicle", "lastModifiedUser":"XYZ.admin", "lastmodifiedTime":"2022-01-21 08:58:20", "name":"Default_Template_Vehicle", "objectType":"Vehicle", "substituteParameters":[], "versionNumber":3}], "versionNumber":3 }SAMPLE PAYLOAD {"databaseName":"XYZ","name":"Vehicle"}Table 3. Payload Parameters Parameter Description Required? Data Type nameThe object type name (must be unique). Yes String databaseNameThe name of the Historian server. Yes String Table 4. Response Parameters Parameter Data Type Description nameString The object type name (must be unique). descriptionString The description of the object type. containedObjectTypesArray The list of contained types with details dataVariablesArray The list of variables (with details) in the object type. objectTypeTemplatesArray The list of object type templates, along with their details. lastModifiedUserString The username of the user who created the object type. lastModifiedTimeString The current time. versionNumberNumber The version number of the object type. Start with 1 and increment by 1 each time you want to modify the object type. Table 5. objectTypeTemplates Array Parameters Parameter Data Type Description nameString The object type name (must be unique). descriptionString The description of the object type. containedObjectTypesArray The list of contained types with details dataVariablesArray The list of variables (with details) in the object type. lastModifiedUserString The username of the user who created the object type. lastModifiedTimeString The current time. versionNumberNumber The version number of the object type. Start with 1 and increment by 1 each time you want to modify the object type. ObjectTypeString The object type name. substituteParametersArray Blank (not applicable) - The Update Object Type API
- Using this API, you can modify an object type.
METHOD PUT URI https://<historianservername>/historian-model/v2/objectTypesSAMPLE QUERY PARAM POST URL https://localhost:443/historian-model/v2/objectTypesSAMPLE RESPONSE Error code and message, specifying whether the object type has been modified (200 for success and other codes for failure). HEADER - Content type: multipart/form-data
- Boundary: ----WebKitFormBoundaryKeyName
SAMPLE PAYLOAD ------WebKitFormBoundaryViBtYYvOfWhTYyhH Content-Disposition: form-data; name="objectTypeInfo"; filename="blob" Content-Type: application/json { "containedObjectTypes":[], "dataVariables": [ { "baseType":"NUMBER", "description":"", "name":"Speed", "variableType":"Direct" }, { "baseType":"STRING", "description":"", "name":"Type", "variableType":"InDirect" } ], "description":"Vehicle description", "lastModifiedUser":"XYZ.admin", "lastmodifiedTime":"2022-01-21 11:37:56", "name":"Vehicle", "objectTypeTemplates": [ { "containedObjectTypes":[], "dataVariables": [ { "baseType":"NUMBER", "description":"", "name":"Speed", "properties": {"blockType":"AI", "propertyDefinition":[] }, "required":true, "templateTagName":"", "variableType":"DIRECT" }, { "baseType":"STRING", "description":"", "name":"Type", "properties": { "blockType":"AI", "propertyDefinition":[] }, "required":true, "templateTagName":"", "variableType":"INDIRECT" } ], "defaultTemplate":true, "description":"Default_Template_Vehicle", "lastModifiedUser":"XYZ.admin", "lastmodifiedTime":"2022-01-21 11:37:56", "name":"Default_Template_Vehicle", "objectType":"Vehicle", "substituteParameters":[], "versionNumber":5 } ], "versionNumber":5, "databaseName":"XYZ", "containedObjectTypesChanges": [ { "newName":"", "oldName":"Engine" } ], "dataVariablesChanges": [ { "newName":"", "oldName":"Color" } ], "objectTypeTemplatesChanges": [ { "newName":"", "oldName":"Car" } ] } ------WebKitFormBoundaryViBtYYvOfWhTYyhH--Table 6. Payload Parameters Parameter Description Required? Data Type nameThe object type name (must be unique). Yes String descriptionThe description of the object type. No String dataVariablesThe list of variables in the object type. No Array containedObjectTypesThe list of contained types with details No Array objectTypeTemplatesThe list of object type templates, along with their details. No Array lastModifiedUserThe username of the user who created the object type. Yes String lastModifiedTimeThe current time. Yes String versionNumberThe version number of the object type. Start with 1 and increment by 1 each time you want to modify the object type. Yes Number Table 7. Response Parameters Parameter Data Type Description nameString The object type name (must be unique). descriptionString The description of the object type. containedObjectTypesArray The list of contained types with details. dataVariablesArray The list of variables (with details) in the object type. objectTypeTemplatesArray The list of object type templates, along with their details. lastModifiedUserString The username of the user who created the object type. lastModifiedTimeString The current time. versionNumberNumber The version number of the object type. Start with 1 and increment by 1 each time you want to modify the object type. databaseNameThe name of the Historian server. Yes containedObjectTypeChangesThe list of changes in the contained type. No dataVariablesChangesThe list of changes in the object type variables. No objectTypeTemplatesChangesThe list of changes in the object type templates. No Table 8. objectTypeTemplates Array Parameters Parameter Description Data Type nameThe object type name (must be unique). String descriptionThe description of the object type. String containedObjectTypesThe list of contained types with details Array dataVariablesThe list of variables (with details) in the object type. Array lastModifiedUserThe username of the user who created the object type. String lastModifiedTimeThe current time. String versionNumberThe version number of the object type. Start with 1 and increment by 1 each time you want to modify the object type. Number ObjectTypeThe object type name. String substituteParametersBlank (not applicable) Array Table 9. dataVariables Array Parameters Parameter Description Required? Data Type nameThe name of the object type name (must be unique). Yes String descriptionThe description of the object type. No String variableTypeThe type of the variable (direct, indirect, or static). No String baseTypeNot applicable No String dbTagNameNot applicable No String Table 10. containedObjectTypes Array Parameters Parameter Description Required? Data Type nameThe name of the object type (must be unique). Yes String descriptionThe description of the object type). No String containedObjectTypeThe name of the object type that you want to use as a contained type. No String baseTypeThe type of the contained type (ThingName indicates a contained type). No String Table 11. Response Parameters Parameter Data Type Description detailString The description of the error. error_codeInteger The error code. A value of 0 indicates that the operation was successful. statusString The http request status. titleString The title of the error. typeString The type of the error. - The Contained Type List API
- Using this API, you can get a list of contained types in each object
type.
METHOD GET URI https://<historianservername> /historian-model/v2/ containedObjectTypesMapSAMPLE QUERY PARAM GET URL https://localhost:443/historian-model/v2/containedObjectTypesMapTable 12. Response Parameters Parameter Description Data Type containedObjectTypesThe list of contained types. Array nameThe object type in which the contained type is used. String - The Create Object Instance API
- Using this API, you can create an object instance.
METHOD POST URI https://<historianservername> /historian-model/v2/objectsSAMPLE QUERY PARAM POST URL https://localhost:443/historian-model/v2/objectsSAMPLE PAYLOAD [ { "containedObjects":[], "containedType":false, "dataVariables":[], "databaseName":"XYZ", "description":"", "fullName":"", "name":"Audi1", "objectDataValueChanges":[], "objectDataValues":[], "objectType":"Vehicle", "objectTypeTemplate":"Car", "override":false, "parentName":"", "substituteParameters":[], "v1Type":false, "versionNumber":0 } ]Table 13. Payload Parameters Parameter Description Required? Data Type containedObjectsThe list of contained object types. No Array containedTypeIndicates whether the object type is used as a contained type (by default, False). Yes Boolean dataVariablesThe list of variables with details. No Array descriptionThe description of the object instance. No String fullNameThe full name of the object instance, which contains the name of the original object type, followed by the contained type name (as applicable). No String nameThe name of the object instance. Yes String objectDataValueChangesThe list of changes in the object instance. No Array ObjectTypeThe object type from which this instance must be created. Yes String objectTypeTemplateThe name of the template you want to use in the object instance. Yes String OverrideTrue or false (required, but not used in Historian). No Boolean parentNameThe name of the object type. No String substituteParametersNot applicable No String v1TypeIndicates whether it is an Operations Hub model or a Historian model (by default, False, indicating a Historian model). Yes Boolean versionNumberThe version number of the object instance. Yes Number databaseNameThe name of the Historian system. Yes String Table 14. Response Parameters Parameter Data Type Description detailString Description of the error. error_codeInteger The error code. A value of 0 indicates that the operation was successful. statusString The http request status. titleString The title of the error. typeString The type of the error. - The Object Instance Info API
- Using this API, you can view an object instance.
METHOD POST URI https://<historianservername>/historian-model/v2/objects/infoSAMPLE QUERY PARAM POST URL https://localhost:443/historian-model/v2/objects/infoSAMPLE RESPONSE { "containedObjects": [ { "alias":"Engine", "baseType":"THINGNAME", "containedObjectType":"Engine", "containedObjectTypeTemplate":"Default_Template_Engine", "description":"Engine", "fullName":"Audi1>Engine", "name":"Engine", "variableType":"ContainedAsset" } ], "containedType":false, "dataVariables": [ { "baseType":"NUMBER", "blockType":"AI", "dbTagName":"Speed", "description":"", "name":"Speed", "properties":[], "required":true, "variableType":"Direct" }, { "baseType":"STRING", "blockType":"AI", "dbTagName":"Type", "description":"", "name":"Type", "properties":[], "required":true, "variableType":"InDirect" }, { "baseType":"NUMBER", "blockType":"AI", "dbTagName":"Color", "description":"", "name":"Color", "properties":[], "required":true, "variableType":"Static" } ], "databaseName":"XYZ", "description":"", "lastModifiedUser":"XYZ.admin", "lastmodifiedTime":"2022-01-21 11:38:59", "name":"Audi1", "objectType":"Vehicle", "objectTypeTemplate":"Car", "override":false,"parentName":">", "substituteParameters":[], "v1Type":false, "versionNumber":3 }SAMPLE PAYLOAD {"name":"Audi1","databaseName":"XYZ"}Table 15. Payload Parameters Parameter Description Required? Data Type nameThe name of the object instance. Yes String databaseNameThe name of the Historian server. No String Table 16. Response Parameters Parameter Description Data Type containedObjectsThe list of contained object types. Array containedTypeIndicates whether the object type is used as a contained type. Boolean dataVariablesThe list of variables with details. Array descriptionThe description of the object instance. String fullNameThe full name of the object instance. String nameThe name of the object instance. String objectDataValueChangesThe list of changes in the object instance. Array ObjectTypeThe name of the object instance from which this instance is created. String objectTypeTemplateThe name of the object type template used in the object instance. String OverrideTrue or false. Boolean parentNameThe name of the parent. String substituteParametersNot applicable String v1TypeIndicates whether it is an Operations Hub model or a Historian model (by default, False, indicating a Historian model). Boolean versionNumberThe version number of the object instance. Number databaseNameThe name of the Historian server. String Table 17. containedObjectTypes Array Parameters Parameter Description Required? Data Type aliasThe name of the variable. No String variableTypeThe type of the variable (direct, indirect, or static). No String nameThe name of the object type (must be unique). Yes String descriptionThe description of the object type). No String containedObjectTypeThe name of the object type that you want to use as a contained type. No String containedObjectTypeTemplateThe template in the contained type that you want to use. No String baseTypeThe type of the contained type (ThingName indicates a contained type). No String Table 18. Data Variables Parameters Parameter Description Required? Data Type baseTypeThe type of the contained type (ThingName indicates a contained type). No String blockTypeNot applicable No String dbTagNameThe tag mapped with the variable (in the case of a direct or indirect variable). No String descriptionThe description of the object instance. No String nameThe name of the variable. No String propertiesNot applicable No Array requiredIndicates whether this variable is included in the object instance. No String variableTypeThe data type of the variable (direct, indirect, or static). No String - The Object Instance with Contained Type Variables API
- Using this API, you can view the contained type variables in an object
instance.
METHOD POST URI https://<historianservername>/historian-model/v2/typesInstancesList/objectsSAMPLE QUERY PARAM POST URL https://localhost:443/historian-model/v2/typesInstancesList/objectsSAMPLE RESPONSE [ { "hasItems":true, "id":"Instances_Audi1_V_", "loaded":false, "parentId":"Instances_Audi1", "text":"Variables", "type":"objectInstanceVariableRootNode" }, { "hasItems":false, "id":"Instances_Audi1_V_0", "loaded":false, "objectFullName":"Audi1", "parentId":"Instances_Audi1_V_", "parentObjectName":"Audi1", "text":"Speed", "type":"objectInstanceVariableNode" }, { "hasItems":false, "id":"Instances_Audi1_V_1", "loaded":false, "objectFullName":"Audi1", "parentId":"Instances_Audi1_V_", "parentObjectName":"Audi1", "text":"Type", "type":"objectInstanceVariableNode" }, { "hasItems":false, "id":"Instances_Audi1_V_2", "loaded":false, "objectFullName":"Audi1", "parentId":"Instances_Audi1_V_", "parentObjectName":"Audi1", "text":"Color", "type":"objectInstanceVariableNode" }, { "hasItems":true, "id":"Instances_Audi10", "loaded":false, "objectFullName":"Audi1>Engine", "objectType":"Engine", "objectTypeTemplate":"Default_Template_Engine", "parentId":"Instances_Audi1", "parentObjectName":"Audi1", "status":"state_new", "text":"Engine", "type":"objectInstanceContainedAssetNode" }, { "hasItems":false, "id":"Instances_Audi10_V_", "loaded":false, "parentId":"Instances_Audi10", "text":"Variables", "type":"objectInstanceVariableRootNode" } ]SAMPLE PAYLOAD {"name":"Audi1","databaseName":"XYZ"}Table 19. Payload Parameters Parameter Description Required? Data Type nameThe name of the object instance. Yes String databaseNameThe name of the Historian system. Yes String Table 20. Response Parameters Parameter Description Data Type hasItemsIndicates whether the variable is a static text or a variable (be default, false, indicating that it is static text). Boolean idThe sequence ID to render the model tree. String loadedNot applicable Boolean parentIdThe ID of the parent. String textContains the static text value or, in the case of variables, contains the text Variables.String typeThe type of the variable:
- objectInstanceVariableRootNode: Indicates static text.
- objectInstanceVariableNode: Indicates direct, indirect, or a static variable.
- objectInstanceContainedAssetNode: Indicates a variable in a contained type.
String - The Object Instance - Variable Information API
- Using this API, you can view the variable details of an object
instance.
METHOD POST URI https://<historianservername> /historian-model/v2/ objects/variables/infoSAMPLE QUERY PARAM POST URL https://localhost:443/historian-model/v2/objects/variables/infoSAMPLE RESPONSE { "blockType":"AI", "variableName":"Speed", "variableTagName":"Audi1>Speed", "variableType":"Direct", "variableValue":"Audi1>Speed" }SAMPLE PAYLOAD {"databaseName":"XYZ","name":"Audi1>Speed"}Table 21. Payload Parameters Parameter Description Required? Data Type nameThe name of the object instance. Yes String databaseNameThe name of the Historian system. Yes String Table 22. Response Parameters Parameter Description Data Type blockTypeNot applicable String variableNameThe name of the variable. String variableTagNameThe name of the tag associated with the variable (not applicable for a static variable). String variableTypeThe type of the variable (static, direct, or indirect). String variableValueThe value of the variable (in case of a static variable) or the associated tag (in case of a direct or indirect variable). String - The Historian Model API
- Using this API, you can view the Historian model of a Historian
system.
METHOD POST URI https://<historianservername>/historian-model/v2/typesObjectsListSAMPLE QUERY PARAM POST URL https://localhost:443/historian-model/v2/typesObjectsListSAMPLE PAYLOAD {"databaseName":"XYZ"}Table 23. Payload Parameters Parameter Description Required? Data Type databaseNameThe name of the Historian system. Yes String Table 24. Response Parameters Parameter Description Data Type assetTemplatesList of all the templates in the Historian model. Array assetTemplatesInfoList of the details of all the templates in the Historian model. Array assetTypesList of all the object types in the Historian model. Array assetTypesInfoList of the details of all the object types in the Historian model. Array assetsList of all the object instances in the Historian model. Array assetsInfoList of the details of all the object types in the Historian model. Array Table 25. assetTemplates Parameters Parameter Description Data Type defaultTemplateIndicates whether it is the default template. Boolean descriptionThe description of the template. String lastModifiedUserThe username of the user who last modified the template. String lastmodifiedTimeThe date and time when the template was last modified. Date and time nameThe name of the template. String objectTypeThe name of the object type associated with the template. String versionNumberThe version number of the template. Integer Table 26. assets Parameters Parameter Description Data Type assetFullNameThe full name of the object instance. Array assetNameThe name of the object instance. String lastModifiedUserThe username of the user who last modified the object instance. String lastmodifiedTimeThe date and time when the object instance was last modified. Date and time assetParentNameThe parent name of the asset. String containedAssetsList of all the contained types in the object type. Array versionNumberThe version number of the object instance. Integer Table 27. assetsInfo Parameters Parameter Description Data Type containedTypeIndicates whether the object type is a contained type. Boolean databaseNameThe name of the Historian system. String lastModifiedUserThe username of the user who last modified the object instance. String lastmodifiedTimeThe date and time when the object instance was last modified. Date and time descriptionThe description of the object instance. String nameThe name of the object instance. String objectTypeThe name of the object type associated with the object instance. String objectTypeTemplateThe name of the template used in the object instance. String OverrideUpdated or not. Boolean ParentNameThe parent name of the asset. String statusNot applicable String v1TypeNot applicable Boolean versionNumberThe version number of the object instance. number - The Export Historian Model API
-
When you create an object type or an object instance, you can use it only in the Historian system in which you have created it. If, however, you want to use the object type/instance in a different Historian system, you can export it and then import it into the other Historian system.
Using this API, you can export a Historian model, along with the object types, object instances, variables, templates, and contained types, into another Historian system.
METHOD GET URI http://<historianservername>/historian-model/v2/export?types=<true/false>&templates=<true/false>&instances=<true/false>&databaseName=<encrypted Historian system name>SAMPLE QUERY PARAM GET URL http://localhost:443/historian-model/v2/export?types=true&templates=true&instances=true&databaseName=KNQWYASAMPLE RESPONSE { "admissionTime": 1642600209, "jobId": 0 }Table 28. Query Parameters Parameter Description Required? Data Type typesIndicates whether you want to include object types while exporting the Historian model. Yes Boolean templatesIndicates whether you want to include templates while exporting the Historian model. No Boolean instancesIndicates whether you want to include object instances while exporting the Historian model. No Boolean databaseNameThe Historian system from which you want to export the Historian model. Yes String (Encrypted) Table 29. Response Parameters Parameter Description Data Type admissionTimeThe timestamp in Epoch time format when the model is exported. Unix Time Stamp jobIdThe job id with which the operation started. Integer - The Export Historian Model to Historian - Job Status API
- Using this API, you can view the status of exporting a Historian model to
another Historian system.
METHOD GET URI http: //<historianservername>/historian-model/import-export/status/?jobId=<jobId>SAMPLE QUERY PARAM GET URL http://localhost:443/historian-model/import-export/status/?jobId=1SAMPLE RESPONSE { "admissionTime": 1642601025, "completionTime": 1642601025, "isRunning": 0, "processing": "Completed", "processingElement": 14, "startTime": 1642601025, "statusPercentage": 100 }Table 30. Query Parameters Parameter Description Required? Data Type jobIdThe job created when the export command is run. Yes Integer Table 31. Response Parameters Parameter Description Data Type admissionTimeThe timestamp in Epoch time format when the model is exported. Unix Time Stamp completionTimeThe completing time of the job. Unix Time Stamp isRunningThe status of the job. String processingIndicates whether the elements are being processed. String processingElementThe element that is being processed. String startTimeThe start time of the job. Unix Time Stamp statusPercentageThe percentage of job completion. Integer - The Historian Model to Historian - Job Log API
- Using this API, you can view the job log of exporting a Historian model to
another Historian system.
METHOD GET URI http: //<historianservername>/historian-model/import-export/log/?jobId=<jobId>SAMPLE QUERY PARAM GET URL http://localhost:443/historian-model/import-export/log/?jobId=1SAMPLE RESPONSE [ { "Elements": ["2022-01-19T08-08-43\t"], "LogStringCode": 12304 }, { "Elements": [ "2022-01-19T08-08-43\t","3"], "LogStringCode": 12309 }, { "Elements": ["2022-01-19T08-08-43\t","2.1"], "LogStringCode": 12310 } ]Table 32. Query Parameters Parameter Description Required? Data Type jobId The job created when you run the export command. Yes Integer Table 33. Response Parameters Parameter Description Data Type Array of Elements List of elements that are processed. Array LogStringCodeThe processing code. Integer - The Export Historian Model to Historian - Job Result API
- Using this API, you can export and retrieve a Historian model in a CSV file. You can then import it into another Historian model.
- The Export Historian Model to Operations Hub API
When you create an object type or an object instance, you can use it only in the Historian system in which you have created it. If, however, you want to use the object type/instance in Operations Hub, you can export it and then import it into Operations Hub.
Using this API, you can export a Historian model to Operations Hub.METHOD GET URI http://<historianservername>/historian-model/v2/export?types=<true/false>&instances=<true/false>&forOpsHub=<true/false>&databaseName=<encrypted Historian system name>SAMPLE QUERY PARAM GET URL http://localhost:443/historian-model/v2/export?types=true&instances=true&forOpsHub=true&databaseName=KNOGEYASAMPLE RESPONSE { "admissionTime": 1642600209, "jobId": 0 }Table 36. Query Parameters Parameter Description Required? Data Type typesIndicates whether you want to include object types while exporting the Historian model. Yes Boolean instancesIndicates whether you want to include object instances while exporting the Historian model. No Boolean databaseNameThe Historian system from which you want to export the Historian model. Yes String (Encrypted) Table 37. Response Parameters Parameter Description Data Type admissionTimeThe timestamp in Epoch time format when the model is exported. Unix Time Stamp jobIdThe job id with which the operation started. Integer - The Export Historian Model to Operations Hub Job Status API
- Using this API, you can get the job status of exporting a Historian model to
Operations Hub.
METHOD GET URI http://<historianservername>/historian-model/import-export/status/?jobId=<jobId>SAMPLE QUERY PARAM GET URL http://localhost:443/historian-model/import-export/status/?jobId=1SAMPLE RESPONSE { "admissionTime": 1642601025, "completionTime": 1642601025, "isRunning": 0, "processing": "Completed", "processingElement": 14, "startTime": 1642601025, "statusPercentage": 100 }Table 38. Query Parameters Parameter Description Required? Data Type jobIdThe job created when you run the export command. Yes Integer Table 39. Response Parameters Parameter Description Data Type admissionTimeThe timestamp in Epoch time format when the model is exported. Unix Time Stamp completionTimeThe completion time of the job. Unix Time Stamp isRunningThe status of the job. String processingIndicates whether the elements are being processed. String processingElementThe element which is being processed. String startTimeThe start time of the job. Unix Time Stamp statusPercentageThe percentage of job completion. Integer - The Export Historian Model to Operations Hub Job Log API
- Using this API, you can get the log of the job when exporting a Historian
model to Operations Hub.
METHOD GET URI http: //<historianservername>/historian-model/import-export/log/?jobId=<jobId>SAMPLE QUERY PARAM GET URL http://localhost:443/historian-model/import-export/log/?jobId=1SAMPLE RESPONSE [ { "Elements": ["2022-01-19T08-08-43\t"], "LogStringCode": 12304 }, { "Elements": [ "2022-01-19T08-08-43\t", "3"], "LogStringCode": 12309 }, { "Elements": ["2022-01-19T08-08-43\t","2.1"], "LogStringCode": 12310 } ]Table 40. Query Parameters Parameter Description Required? Data Type jobIdThe job created when you run the export command. Yes Integer Table 41. Response Parameters Parameter Description Data Type Array of Elements List of elements that are processed. Array LogStringCodeThe processing code. Integer - The Export Historian Model to Operations Hub Job Result API
- Using this API, you can export and retrieve a Historian model in a CSV file. You can then import it into Operations Hub.
- The Import Model to Historian API
- Using this API, you can import a Historian model from one system to
another.Important: If the name of a tag associated with a variable in a model contains a period (.), you cannot import the tag while importing the model into a Historian system.
METHOD POST URI http://<historianservername>/historian-model/v2/import?types=<true/false>&templates=<true/false>&instances=<true/false>&databaseName=<encrypted Historian system name>SAMPLE QUERY PARAM GET URL http://localhost:443/historian-model/v2/import?types=true&templates=true&instances=true&databaseName=KGEYASAMPLE RESPONSE { "admissionTime": 1642600209, "jobId": 0 }Table 44. Payload Parameters Payload Description Required? Data Type bodyCSV file that you want to import Yes file Table 45. Query Parameters Parameter Description Required? Data Type typesIndicates whether you want to import object types. Yes Boolean templatesIndicates whether you want to import templates. No Boolean instancesIndicates whether you want to import object instances. No Boolean databaseNameThe Historian system name in to which you want to import the model. Yes String (Encrypted) Table 46. Response Parameters Parameter Description Data Type admissionTimeThe timestamp in Epoch time format when the model is imported. Unix Time Stamp jobIdThe job id with which the operation started. Integer - The Import Historian Model to Historian - Job Status API
- Using this API, you can view the job status of importing a Historian model to another Historian system.
- The Import Historian Model to Historian - Job Log API
- Using this API, you can view the job log of importing a Historian model into another Historian model.
- The Import Historian Model to Historian - Result API
- Using this API, you can view the result of importing a Historian model into another Historian system.
- The Duplicate Object Instance API
- Using this API, you can copy an object instance.
- The Duplicate Object Type API
- Using this API, you can copy an object type. When you copy an object type, all the templates and variables are copied too.
- The Export Object Instance API
- Using this API, you can export an object instance into another Historian system.
- The Export Object Type API
- Using this API, you can export an object type into another Historian system.
- The Delete Object Instance API
- Using this API, you can delete an object instance. If there are direct variables in the object type, you can also choose to delete the tags associated with these variables (along with their data).
- The Incoming Dependencies API
- Using this API, you can view a list of object instances associated with an object type. This is used to check if an object type contains object instances before you delete the object type.
- The Delete Object Type API
- Using this API, you can delete an object type. You can delete multiple object types together; however, all the object types must belong to the same Historian system. You cannot delete an object type if it is used in an object instance; you must first delete the object instance.