Client for Cisco Meraki Dashboard API
This library is a simplistic PHP client for Cisco Meraki Dashboard API., (*1)
Features:
- Authorization via API Key
- Base URL of API endpoints
- Parsing JSON responses
- Following HTTP redirects
- Rate limiting (default: 5 req/sec), (*2)
Installation
The library is to be installed via Composer as a project dependency in composer.json
:, (*3)
{
"require": {
"upscale/cisco-meraki-client": "*"
}
}
Basic Usage
The library implements a handful of shortcut API methods:, (*4)
$meraki = new \Upscale\Cisco\Meraki\ApiClient(
new \GuzzleHttp\Client(),
'0011223344556677889900aaabbbcccdddeeefff'
);
$organizationId = 123456;
$networks = $meraki->fetchNetworks($organizationId);
$networkId = $networks[0]['id'];
$devices = $meraki->fetchDevices($networkId);
$deviceId = $devices[0]['serial'];
$clients = $meraki->fetchClients($deviceId);
Advanced Usage
Arbitrary REST API endpoints can be called via the generic interface:, (*5)
$organizations = $meraki->callApi('organizations', 'GET');
The arguments are passed through to Guzzle HTTP Client providing full control over API requests., (*6)
Contributing
Pull Requests are welcome to introduce the missing shortcut methods!, (*7)
License
Licensed under the Apache License, Version 2.0., (*8)