Meraki MR42 Jquery API return 404

MerakiUser
Just browsing

Meraki MR42 Jquery API return 404

By using the following link I have got the network id. Thanks to the community. 

https://community.cisco.com/t5/mobility-discussions/meraki-dashboard-api-confusion/m-p/3458242?start...

 

I have been trying to implement the Meraki API using the following code in Jquery and display the data on the console. As soon as I try to see the console it gives me 404 error. I have double checked the API Key as well as the network id and the header request. Still getting error. Request to get help ASAP. 

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.meraki.com/api/v0/networks/'networkid'/bluetoothClients?perPage=20",
  "method": "GET",
  "headers": {
    "X-Cisco-Meraki-API-Key": ""
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

 

5 REPLIES 5
PhilipDAth
Kind of a big deal
Kind of a big deal

There is no bluetoothClients API, and if there was, it would not have "?perPage=20" in the URL.

 

http://dashboard.meraki.com/api_docs

Thanks for the reply Philip

 

I found the following link to get this api information

link

I used this API docs to get the link used in the code

I stand corrected.  Well done @MerakiUser.  I wonder why I can't see it in the main dashboard API list.

HodyCrouch
Building a reputation

Are you perhaps getting the same response shown in https://community.meraki.com/t5/Solutions-APIs/Access-Control-Allow-Origin-error/td-p/9583 ?

 

Last time I checked, Meraki did not support CORS on API calls.  As a result, your cross-domain requests will fail at the browser level (see the post above for alternative approaches).

Yes, I am getting the same response with error 404. I think so I have to find an alternative method for calling the APIs using node or any other platform. 

Until then if someone finds any code using the mentioned API that can be written in JS to work on browser would be a great help.

Thanks HodyCrouch and Philip for the help.

Get notified when there are additional replies to this discussion.