AlanS Posted November 13, 2021 Report Posted November 13, 2021 So, I am trying to auto attach a device during extension creation through the API. There is a "mac" parameter, but there are there vendor and model parameters? Thanks! Quote
Vodia PBX Posted November 13, 2021 Report Posted November 13, 2021 After creating the extension with the MAC, you can set the vendor and model like this. curl -u admin:password -D - http://127.0.0.1/rest/domain/localhost/macs -X POST -d '{"mac":"001565123456","vendor":"Yealink","model":"T26P"}' You can see it "in action" in /dom_macs.htm Quote
AlanS Posted November 13, 2021 Author Report Posted November 13, 2021 Beautiful. Thanks. FYI, this isn't in the rest api documentation! Quote
Vodia PBX Posted November 15, 2021 Report Posted November 15, 2021 Yea keeping the API documentation up to date is a sisyphean task... For the tasks that you can do from the web front end, I would always just take a look at the browser PBX interaction and replicate it with curl or whatever you are using. Quote
AlanS Posted November 15, 2021 Author Report Posted November 15, 2021 That's exactly what I have been doing actually. I just leave console open and examine the network tab for any api calls I want to replicate. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.