The Server Node Change API

Using the Server Node Change API, you can change the server node of a collector to a machine that has Historian 8.1 installed on it.
METHOD PUT
URI
https://<historianservername>/historian-rest-api/v1/collector/historiannodechange
SAMPLE URI
https://<historianservername>/historian-rest-api/v1/collector/historiannodechange

Payload
{
   ?interfaceName":"RSSERVER2012-02_Simulation",
   ?mode ?:2,
  "winUserName":"TestAdministrator",
  "winPassword":"TestPassword",
  "historianNode":"VMHISTWEBAUTO",
  "historianUserName":" TestAdministrator2 ",
  "historianpassword":" TestPassword2"                  
                 
}
SAMPLE RESPONSE
{
    "ErrorCode": 0,
    "ErrorMessage": ""
}
SAMPLE cURL COMMAND
curl -i -H "Accept: application/json" -i -H "Content-Type: application/json" 
-H "Authorization: Bearer <TOKEN> -d  ?{ \ ?interfaceName\ ?:\ ?RSSERVER2012-02_Simulation \ ?,\ ?userName  winUserName\ ?:\ ?tesrt\ ?,\ ?winpPassword \ ?:\ ?password\ ?,\ ?historianNode \ ?:\ ?nodename\ ?,\ historianUserName \ ?:\ ?husername\ ?,\ historianpassword \ ?:\ ?hpassword\ ?} -X PUT https://<historianservername>/historian-rest-api/v1/collector/ historiannodechange

Query Parameters

Query parameters include the Payload parameter, which is a JSON file, which contains the following properties.

Parameter Description Required? Values
interfaceName The interface name of the collector. Yes String
mode The mode to use to manage the collector. Yes
  • 1: service mode
  • 2: command-line mode
winUserName The Windows username. Yes (only if you want to use the command-line mode) String
winPassword The Windows password. Yes (only if you want to use the command-line mode) String
historianNode The host name of the new Historian destination machine. The destination machine must have Historian 8.1. Yes String
historianUserName The Windows username of the new Historian destination machine. Yes (only if you want to use the command-line mode) String
historianPassword The Windows password of the new Historian destination machine. Yes (only if you want to use the command-line mode) String

Response Parameters

Parameter Data Type Required? Description
ErrorCode Integer Yes For example, ErrorCode = 0 implies the operation was successful.
ErrorMessage String Yes For example, NULL.