Getters & Setters for Global API Options
Members
(static) get:baseUrl
get current API base URL
Examples
Example Request
const meraki = new Meraki(API_KEY);
var url = meraki.baseUrl;
console.log('API Base URL: ', url);
Example Response
API Base URL: https://api.meraki.com/api/v0
(static) set:apiKey
set API key
Examples
Example Assignment
const NEW_KEY = '2f301bccd61b6c642d250cd3f76e5eb66ebd170f';
meraki.apiKey = NEW_KEY;
meraki.getOrganizations().then(res => {
console.log('Organizations: ', res.data);
});
Example Response
Organizations: [{"id":549236,"name":"Meraki DevNet Sandbox"}]
(static) set:baseUrl
set API base URL
Examples
Example Assignment
const NEW_KEY = '2f301bccd61b6c642d250cd3f76e5eb66ebd170f';
meraki.apiKey = NEW_KEY;
meraki.getOrganizations().then(res => {
console.log('Organizations: ', res.data);
});
Example Response
Organizations: [{"id":549236,"name":"Meraki DevNet Sandbox"}]