The Edit Collector Instance API

Using the Edit Collector Instance API, you can modify the cloud parameters of a collector instance. The collector instance will be restarted after you make changes.
METHOD PUT
URI
https://<historianservername>/historian-rest-api/v1/collector/editinstance
SAMPLE URI
https://<historianservername>/historian-rest-api/v1/collector/editinstance
Payload
{"interfaceName":"<source server>_<type of the collector>_<destination server>",
"messageCompression":0,
"azureLogLevel":1,
"debugMode":0,
"CollectorDestination":"Predix",
"DestinationHistorian":"abc",
"mode":1,
"CloudDestinationAddress":"wss://def.run.abc.ice.predix.io/v1/stream/messages",
"IdentityIssuer":"https://1234.predix-uaa.run.abc.ice.predix.io/oauth/token",
"ClientID":"xyz",
"ClientSecret":"123",
"ZoneID":"1234",
"Proxy":"http://1.2.3.4:80",
"ProxyUserName":"",
"ProxyPassword":"",
"DatapointAttribute1":"",
"DatapointAttribute2":"",
"DatapointAttribute3":"",
"DatapointAttribute4":""}
Note:
  • The DestinationHistorian parameter will not have a value for offline collector configuration.
  • To connect to MQTT destinations such as AWS IoT and Google Cloud Platform (GCP), you must provide an encrypted password.
SAMPLE RESPONSE
{

    "ErrorCode": 0,

    "ErrorMessage": null

}
SAMPLE cURL COMMAND
curl -i -H "Accept: application/json" -i -H "Content-Type: application/json" 
-H "Authorization: Bearer <TOKEN>” -d “{\"interfaceName\":\"<source server>_<type of the collector>_<destination server>\",
\"InterfaceName\":\"<source server>_<type of the collector>_<destination server>\",\"messageCompression\":0,\"azureLogLevel\":1,
\"debugMode\":0,\"CollectorDestination\":\"Predix\",\"DestinationHistorian\":\"abc\",\"mode\":1,
\"CloudDestinationAddress\":\"wss://wss://def.run.abc.ice.predix.io/v1/stream/messages\",
\"IdentityIssuer\":\"https://1234.predix-uaa.run.abc.ice.predix.io/oauth/token/",
\"ClientID\":\"HistQA\",\"ClientSecret\":\"Gei321itc\",\"ZoneID\":\"1234\",
\"Proxy\":\"http://1.2.3.4:80\",\"ProxyUserName\":\"\",\"ProxyPassword\":\"\",
\"DatapointAttribute1\":\"\",\"DatapointAttribute2\":\"\",\"DatapointAttribute3\":\"\",
\"DatapointAttribute4\":\"\"}” -X PUT 
https://<historianservername>/historian-rest-api/v1/collector/editinstance

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.