Call the Controller from Go
You will add the module, open an authenticated client against Controller REST v3, and read Controller status. By the end you have a program that prints the Controller version string.
What you need
- Go 1.26.6 or newer (
go.modsets this minimum). - A running ioFog Controller that speaks REST v3.
- A user access token, or an email, password, and TOTP that the Controller accepts.
The base URL always includes the API prefix:
http://127.0.0.1:51121/api/v3
Default Controller port is 51121 (client.ControllerPort).