I've read the FAQs on the API, and what I have tried to execute from there has generally worked. I am now struggling with the ../api/v1/mgmt/config/set call. Info below, all help/comments welcome.
Model: VVX 300
FirmwareRelease: 5.8.2.4732
(above comes from a successful API call via ../api/v1/mgmt/device/info)
Problem I am having is setting configuration parameters via CuRL:
curl -k -X POST -H "Content-Type: application/json" -d '{"data": ["device.net.vlanId":"49","device.net.vlanId.set":"1","device.set":"1"],}' https://<redactedusername:redactedpassword@redactedipaddress/api/v1/mgmt/config/set
Result is:
{"Status": "4000"}
I figured out that the single and double quotes make a difference and that the entire data payload (-d option) needs to be enclosed in single quotes, whereas the keys and values contained in the JSON need to be contained in double-quotes. I've also tried with and without the trailing comma after the square bracket, receiving the same result. Beyond that, I can't seem to set/change an configuration parameters, though I can retrieve them.
Thanks in advance!
Solved! Go to Solution.
Hello @jcs001 ,
Welcome to the Poly Community.
We had a very similar request >here< using Power Shell instead.
I have now added two examples => here <= on how to do this using either Power Shell or CURL.
Please ensure to provide some feedback if this reply has helped you so other users can profit from your experience.
Best Regards
Steffen Baier
If official support is required please check how to phone or open a case here
----------------Hello @jcs001 ,
Welcome to the Poly Community.
We had a very similar request >here< using Power Shell instead.
I have now added two examples => here <= on how to do this using either Power Shell or CURL.
Please ensure to provide some feedback if this reply has helped you so other users can profit from your experience.
Best Regards
Steffen Baier
If official support is required please check how to phone or open a case here
----------------For everyone's benefit - the basic problem was that I needed to use an escape sequence in my JSON data payload, and use curly-braces versus square brackets in my JSON data payload. Thanks Steffen for your help. I marked the solution as accepted and gave a kudos.
-jcs