cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3195
Views
0
Helpful
6
Replies

How to update individual DNS settings using API

Meraki-User-713
Community Member

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,

6 Replies 6

Raphael_L
Meraki Community All-Star
Meraki Community All-Star

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.

Meraki-User-713
Community Member

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 ?

Raphael_L
Meraki Community All-Star
Meraki Community All-Star

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.

Meraki-User-713
Community Member

Ok, no problem.

Regards,

Meraki-User-713
Community Member

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.

Raphael_L
Meraki Community All-Star
Meraki Community All-Star

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/

Review Cisco Networking for a $25 gift card