Plantronics + Polycom. Now together as Poly Logo

REST API - /mgmt/config/set

SOLVED
Occasional Visitor

REST API - /mgmt/config/set

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!

Message 1 of 3
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Polycom Employee & Community Manager

Re: REST API - /mgmt/config/set

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

----------------

Notice: This community forum is not an official Poly support resource, thus responses from Poly employees, partners, and customers alike are best-effort in attempts to share learned knowledge. If you need immediate and/or official assistance please open a service ticket through your proper support channels.
Please also ensure you always check the VoIP , Video Endpoint , Skype for Business , PSTN or RPM FAQ's

View solution in original post

Message 2 of 3
2 REPLIES 2
Highlighted
Polycom Employee & Community Manager

Re: REST API - /mgmt/config/set

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

----------------

Notice: This community forum is not an official Poly support resource, thus responses from Poly employees, partners, and customers alike are best-effort in attempts to share learned knowledge. If you need immediate and/or official assistance please open a service ticket through your proper support channels.
Please also ensure you always check the VoIP , Video Endpoint , Skype for Business , PSTN or RPM FAQ's

View solution in original post

Message 2 of 3
Highlighted
Occasional Visitor

Re: REST API - /mgmt/config/set

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

Message 3 of 3