The Start Collector API

Using the Start Collector API, you can start a collector.
METHOD PUT
URI
https://<historianservername>/historian-rest-api/v1/collector/start
SAMPLE URI Sample URI for the service mode:
https://<historianservername>/historian-rest-api/v1/collector/start

Payload

{
  "interfaceName":"RSSERVER2012-02_Simulation",
  "mode":1                            
}
Sample URI for the command line mode:
https://<historianservername>/historian-rest-api/v1/collector/start

Payload

{
  "interfaceName":"RSSERVER2012-02_Simulation",
  "mode":2,
   ?winUserName ?:   ,
   ?winPassword ?: ?                             
}
SAMPLE RESPONSE
{
    "ErrorCode": 0,
    "ErrorMessage": ""
    "Data": "Collector Start Initiated"
}
SAMPLE cURL COMMAND
curl -i -H "Accept: application/json" -i -H "Content-Type: application/json" 
-H "Authorization: Bearer <TOKEN> -d  ?{ \ ?interfaceName\ ?:\ ?RSSERVER2012-02_Simulation \ ?,\"mode\": 1} -X PUT https://<historianservername>/historian-rest-api/v1/collector/start

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

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.
Data String No Indicates if the task has been initiated.