response format for SetGateway MIM API endpoint
-
Hey guys
I was able to figure out how to update the monitor IP of a gateway usingPUTdirected at the/system/gateways/{id}endpoint. It works!The response I get is shaped like this
{ "msg": "Gateway updated", "alrt": false, "sb": false, "alrtoln": false, "alrtclr": "", "auth": false, "status": "", "result": "" }My question is: how do we interpret these keys/values?
I assume
Gateway updatedindicates success. But a boolean is more typical for an API "success" response.Do any of those bools (
sb,alrt,alrtolnetc) mean the op was successful ? -
I peeked in at
pfsense_result.pyon the pfsense-api GitHub repo, which seems to be where the result class is defined. But, it didn't reveal anything further. -
They're mainly there for some GUI compatibility; it may get updated in the future. E.g. the
alrtattributes are meant to be alert outline and color. Go off of whatmsgsays. -
Thanks. If the API is still being worked on, it would be nicer to have a strict
success: true | falsebool for automation vs parsing a text field.