10-20-2023 01:44 AM
Hi,
We need help in order to update DNS field associate Access Points (AP) on sites.
So in brief, we need to update DNS values by AP.
We are able to obtain DNS field via CURL GET method:
curl -L -H 'X-Cisco-Meraki-API-Key: MY-API-KEY' -H 'Content-Type: application/json' -X GET 'https://api.meraki.com/api/v1/organizations/organizationID/devices/statuses?serials[]=MY-AP-SN'
PUT method used is this one:
curl -L -H 'X-Cisco-Meraki-API-Key: MY-API-KEY' -H 'Content-Type: application/json' -X PUT --data-binary '{"secondaryDns":"8.8.8.8"}' 'https://api.meraki.com/api/v1/organizations/organizationID/devices/statuses?serials[]=MY-AP-SN'
The error message is thois one: "The page you are looking for may have been moved or does not exist."
Have you got a solution for this case please ?
Regards,
10-20-2023 04:56 AM
You are using the wrong endpoints.
I think it would be getDeviceManagementInterface
https://developer.cisco.com/meraki/api-v1/get-device-management-interface/
and
updateDeviceManagementInterface
https://developer.cisco.com/meraki/api-v1/update-device-management-interface/
I couldn't test that one , since static IPs on a AP is just painful and not useful.
10-20-2023 05:05 AM
Thanks for your return.
In our case, we have HP switches, and we do not use Alternate Management Interface (AMI).
Have you got another solution ?
10-20-2023 05:29 AM
If the 2 provided endpoints do not work , then I'm afraid I'm not sure there is an endpoint at all to achieve that.
10-20-2023 05:32 AM
Ok, no problem.
Regards,
10-20-2023 05:38 AM
As noted in my first post, GET method is operational, and allow us to obtain DNS information, but PUT method return an error. If a custom is made on this API in the next weeks, please don't hesitate to contact us cause we still have hundred of sites to update.
Thanks in advance.
10-20-2023 05:40 AM
https://api.meraki.com/api/v1/organizations/organizationID/devices/statuses?serials[]=MY-AP-SN
Has nothing to do with DNS settings and it is not a 'PUT' endpoint. It is to 'GET' the devices statuses ( hence statuses in the URI )
Here is the documentation about this endpoint : https://developer.cisco.com/meraki/api-v1/api-reference-early-access-api-platform-monitor-devices-statuses-get-organization-devices-statuses/
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide