Hi
I'm trying to automate some simple tasks on OPNSense via the API, but for some reason here is my cURL commnad:
The result of this is:
At the same time if I change the request to:
the system returns correct response.
Do I need to change the data format?
I'm trying to automate some simple tasks on OPNSense via the API, but for some reason here is my cURL commnad:
Code Select
curl -H Accept: application/json -k -u XXXXXXXXX:XXXXXXXXX https://192.168.100.3/api/interfaces/vlan_settings/addItem -d '{vlanif:vlan0.777,if: lagg1,tag: 777,pcp:0,proto:,descr:VLAN_777_TEST}'
The result of this is:
Code Select
{"result":"failed"}
At the same time if I change the request to:
Code Select
curl -H Accept: application/json -k -u XXXXXXXXX:XXXXXXXXX https://192.168.100.3/api/interfaces/vlan_settings/get
the system returns correct response.
Do I need to change the data format?