Set NTP Server IP Address via REST API

Hey All,

I have a need to change the NTP Server IP Address(s) on remote EPICs that are connected over an IP Radio. Is there a way to change the NTP Server IP Address thru REST API or some other means?

I have attempted groov Manage over the radio and it adds way too much traffic on the radio network and kills all comms while I’m attempting it. Note that Shell Access is not enabled on the remote sites.

Our plan right now is to drive to each site and change it locally, but I was hoping there might be a better solution. BTW, a lightweight groov Manage would be awesome for this situation!

Thanks!

It isn’t documented, but you can use curl to post the changes. Do you have an API key for each EPIC?

Here is the curl command:

curl.exe -k -X POST -H “apiKey: YOUR_API_KEY” -H “Content-Type: application/json” “https://EPIC_IP_ADRESS/manage/api/v1/system/time/ntp” -d “@C:\scratch\ntp.json” -w “nSTATUS: %{http_code}n”

The contents of the ntp.json:

{“serviceEnabled”:true,“timeServers”:[{“peerType”:“pool”,“address”:“0.pool.ntp.org”},{“peerType”:“pool”,“address”:“1.pool.ntp.org”},{“peerType”:“pool”,“address”:“2.pool.ntp.org”}]}

2 Likes

Exactly what I needed. I’m going to have to get the API key for each site and we will add that to our documentation going forward. Thanks again.