Cisco Meraki REST API calls with Postman

Since network automation is becoming more and more desirable in today’s networks, it’s worth knowing some of the basic methods which we can use. That’s why in today’s article, I want to show you basic REST API call examples based on Cisco Meraki. Keep in mind that this article doesn’t cover all possible API calls, the goal is to show you how to set up your environment and present basic examples so you can build API calls on your own in the future.

Tools

There are many available tools, that we can use to execute API calls. One of them is a curl, that is pre-installed on many Linux distributions. Curl is especially useful when it comes to the automation topics, it can be easily utilized in Bash scripts.

In this article, however, I want to focus more on the API calls, than automation itself. REST API in conjunction with Python will be covered in other articles. That’s why the Postman was chosen. It’s a free and very intuitive, GUI application that can be installed on various operating systems. Postman can be downloaded from the official website.

Environment

We will use the Cisco Meraki Always on sandbox. It’s a free lab environment that everybody can access to test various Meraki functionalities.

The base URL for API calls will be https://api.meraki.com/api/v0

For authentication we will use a API key, at the time of this article writing, API key is: 6bec40cf957de430a6f1f2baa056b99a4fac9ea0

You can find Cisco Meraki API documentation here.

REST API calls

Before executing the first API call, we need to configure the authorization key. It can be done in the Authorization section. From the drop-down menu, we have to choose API Key type. On the right side, there are two fields. We have to set Key area to X-Cisco-Meraki-API-Key, and Value area to the API key, so 6bec40cf957de430a6f1f2baa056b99a4fac9ea0. The following screen shows the correct configuration.

And now we’re ready to execute our first REST API call!

Organizations

Let’s start with organizations. The following REST API call will gather a list of organizations configured on Cisco Meraki.

https://api.meraki.com/api/v0/organizations

After sending a GET call we should check the HTTP response code. It’s displayed above the response window.

In this case, the response is 200 OK, which means, that our REST API call succeeded. Under the status code, we’ve got a response encoded in JSON format.

If you want to know more about JSON format, visit my article about various data formats.

[
    {
        "id": "681155",
        "name": "DeLab",
        "url": "https://n6.meraki.com/o/49Gm_c/manage/organization/overview"
    },
    {
        "id": "566327653141842188",
        "name": "DevNetAssoc",
        "url": "https://n6.meraki.com/o/dcGsWag/manage/organization/overview"
    },
    {
        "id": "575334852396582607",
        "name": "123456",
        "url": "https://n22.meraki.com/o/LVnipbw/manage/organization/overview"
    },
    {
        "id": "575334852396582606",
        "name": "TriDeptrai",
        "url": "https://n22.meraki.com/o/PaGPScw/manage/organization/overview"
    },
    {
        "id": "575334852396582605",
        "name": "My organization",
        "url": "https://n22.meraki.com/o/Kk5Gjcw/manage/organization/overview"
    },
    {
        "id": "575334852396582604",
        "name": "thanh",
        "url": "https://n22.meraki.com/o/Ek-axdw/manage/organization/overview"
    },
    {
        "id": "575334852396582603",
        "name": "123456",
        "url": "https://n22.meraki.com/o/1nLpQdw/manage/organization/overview"
    },
    {
        "id": "575334852396582602",
        "name": "My organization",
        "url": "https://n22.meraki.com/o/vJWtncw/manage/organization/overview"
    },
    {
        "id": "575334852396582601",
        "name": "123",
        "url": "https://n22.meraki.com/o/jvWTFcw/manage/organization/overview"
    },
    {
        "id": "575334852396582600",
        "name": "\bvnPro",
        "url": "https://n22.meraki.com/o/2AwXbaw/manage/organization/overview"
    },
    {
        "id": "575334852396582591",
        "name": "Ftreqah organization",
        "url": "https://n22.meraki.com/o/Kpj8kdw/manage/organization/overview"
    },
    {
        "id": "575334852396582590",
        "name": "Ftreqah organization",
        "url": "https://n22.meraki.com/o/AQlCnaw/manage/organization/overview"
    },
    {
        "id": "575334852396582587",
        "name": "\bvnPro",
        "url": "https://n22.meraki.com/o/sniubdw/manage/organization/overview"
    },
    {
        "id": "549236",
        "name": "DevNet Sandbox",
        "url": "https://n149.meraki.com/o/-t35Mb/manage/organization/overview"
    },
    {
        "id": "52636",
        "name": "Forest City - Other",
        "url": "https://n42.meraki.com/o/E_utnd/manage/organization/overview"
    },
    {
        "id": "865776",
        "name": "Cisco Live US 2019",
        "url": "https://n22.meraki.com/o/CVQqTb/manage/organization/overview"
    },
    {
        "id": "463308",
        "name": "DevNet San Jose",
        "url": "https://n18.meraki.com/o/vB2D8a/manage/organization/overview"
    }
]

Here we have a list of name/value pairs, each represents a separate organization. Each element consists of the id, name, and URL.

Let’s say that we want to fetch information about just one organization. We can do it by specifying the organization id in the API call. We’re using a GET call, as previously.

https://api.meraki.com/api/v0/organizations/865776

As the response we have one element, which represents specified organization.

{
    "id": "865776",
    "name": "Cisco Live US 2019",
    "url": "https://n22.meraki.com/o/CVQqTb/manage/organization/overview"
}

Networks

To get the list of networks in a specified organization, we have to attach the organization id in the GET API call. In this example, we want to gather all networks, that are assigned to the DeLab organization, which has an id of 681155.

https://api.meraki.com/api/v0/organizations/681155/networks

API call was successful, the response contains list of networks.

[
    {
        "id": "L_566327653141843049",
        "organizationId": "681155",
        "name": "Lyoli",
        "timeZone": "America/New_York",
        "tags": null,
        "productTypes": [
            "appliance",
            "camera",
            "switch",
            "wireless"
        ],
        "type": "combined",
        "disableMyMerakiCom": false,
        "disableRemoteStatusPage": true
    },
    {
        "id": "L_566327653141846927",
        "organizationId": "681155",
        "name": "Vegas Apartment",
        "timeZone": "America/Los_Angeles",
        "tags": null,
        "productTypes": [
            "appliance",
            "camera",
            "switch",
            "wireless"
        ],
        "type": "combined",
        "disableMyMerakiCom": false,
        "disableRemoteStatusPage": true
    },
    {
        "id": "N_566327653141899127",
        "organizationId": "681155",
        "name": "Nolan",
        "timeZone": "America/Los_Angeles",
        "tags": null,
        "productTypes": [
            "wireless"
        ],
        "type": "wireless",
        "disableMyMerakiCom": false,
        "disableRemoteStatusPage": true
    },
    {
        "id": "N_566327653141902646",
        "organizationId": "681155",
        "name": "Lyoli MDM",
        "timeZone": "America/Los_Angeles",
        "tags": null,
        "productTypes": [
            "systems manager"
        ],
        "type": "systems manager",
        "disableRemoteStatusPage": true
    },
    {
        "id": "L_566327653141856846",
        "organizationId": "681155",
        "name": "DevNetLab",
        "timeZone": "US/Pacific",
        "tags": " tag1 tag2 ",
        "productTypes": [
            "appliance",
            "camera",
            "switch",
            "wireless"
        ],
        "type": "combined",
        "disableMyMerakiCom": false,
        "disableRemoteStatusPage": true
    },
    {
        "id": "L_566327653141856854",
        "organizationId": "681155",
        "name": "DNEAlertsNet",
        "timeZone": "America/New_York",
        "tags": null,
        "productTypes": [
            "appliance",
            "camera",
            "switch",
            "wireless"
        ],
        "type": "combined",
        "disableMyMerakiCom": false,
        "disableRemoteStatusPage": true
    }
]

Similarly to the organizations, if we want to get only one network, we have to specify it’s id in the API call.

https://api.meraki.com/api/v0/networks/L_566327653141856854
{
    "id": "L_566327653141856854",
    "organizationId": "681155",
    "productTypes": [
        "camera"
    ],
    "url": "https://n6.meraki.com/DNEAlertsNet-app/n/LwGl8dg/manage/usage/list",
    "name": "DNEAlertsNet",
    "timeZone": "America/New_York",
    "enrollmentString": null,
    "type": "combined",
    "tags": "",
    "disableMyMerakiCom": false,
    "disableRemoteStatusPage": true
}

To get a list of access policies from the network, the /accessPolicies need to be appended.

https://api.meraki.com/api/v0/networks/L_566327653141856854/accessPolicies

The response is following.

[]

In this case, the API call succeeds, because the return code is 200 OK. The response suggests, that there are no access policies within the specified network because we’ve received the empty list.

Devices

To fetch a list of network devices, we have to specify the network first.

https://api.meraki.com/api/v0/networks/L_566327653141843049/devices
[
    {
        "lat": 37.4180951010362,
        "lng": -122.098531723022,
        "address": "",
        "serial": "Q2SW-SWQ2-HZ9L",
        "mac": "ac:17:c8:24:4f:68",
        "wan1Ip": "192.168.1.74",
        "wan2Ip": null,
        "lanIp": "192.168.1.74",
        "tags": " recently-added ",
        "url": "https://n6.meraki.com/Lyoli-appliance/n/6X278ag/manage/nodes/new_list/189218142048104",
        "networkId": "L_566327653141843049",
        "name": "BigCat",
        "model": "MX250",
        "firmware": "wired-14-53",
        "floorPlanId": null
    },
    {
        "lat": 41.4767987071101,
        "lng": -81.5780361515379,
        "address": "",
        "serial": "Q2LD-GYL3-KEHX",
        "mac": "e0:55:3d:c0:76:f4",
        "lanIp": "192.168.128.57",
        "tags": " LTV ",
        "url": "https://n6.meraki.com/Lyoli-wireless/n/WdPtFdg/manage/nodes/new_list/246656712865524",
        "networkId": "L_566327653141843049",
        "beaconIdParams": {
            "uuid": "a543206b-7dc8-44d0-9d72-1d43d92aafd4",
            "major": 2,
            "minor": 1
        },
        "name": "1st Floor AP",
        "model": "MR52",
        "firmware": "wireless-26-6-1",
        "floorPlanId": null
    },
    {
        "lat": 41.4768218172221,
        "lng": -81.5779959184027,
        "address": "",
        "serial": "Q2LD-AN9B-S6AJ",
        "mac": "e0:55:3d:c0:5e:2e",
        "lanIp": "192.168.128.15",
        "tags": " KTV ",
        "url": "https://n6.meraki.com/Lyoli-wireless/n/WdPtFdg/manage/nodes/new_list/246656712859182",
        "networkId": "L_566327653141843049",
        "beaconIdParams": {
            "uuid": "a543206b-7dc8-44d0-9d72-1d43d92aafd4",
            "major": 2,
            "minor": 1
        },
        "name": "2nd Floor AP",
        "model": "MR52",
        "firmware": "wireless-26-6-1",
        "floorPlanId": null
    },
    {
        "lat": 41.30627,
        "lng": -81.61507,
        "address": "",
        "serial": "Q2EK-UKGM-XSD9",
        "mac": "e0:55:3d:10:5e:b2",
        "lanIp": "192.168.128.99",
        "tags": " recently-added ",
        "url": "https://n6.meraki.com/Lyoli-wireless/n/WdPtFdg/manage/nodes/new_list/246656701324978",
        "networkId": "L_566327653141843049",
        "beaconIdParams": {
            "uuid": "a543206b-7dc8-44d0-9d72-1d43d92aafd4",
            "major": 2,
            "minor": 1
        },
        "name": "Sun Room",
        "model": "MR84",
        "firmware": "wireless-26-6-1",
        "floorPlanId": null
    },
    {
        "lat": 41.476801721473,
        "lng": -81.5779744607306,
        "address": "",
        "serial": "Q2LD-ZWCZ-UA77",
        "mac": "e0:55:3d:c0:72:d8",
        "lanIp": "192.168.128.16",
        "url": "https://n6.meraki.com/Lyoli-wireless/n/WdPtFdg/manage/nodes/new_list/246656712864472",
        "networkId": "L_566327653141843049",
        "beaconIdParams": {
            "uuid": "a543206b-7dc8-44d0-9d72-1d43d92aafd4",
            "major": 2,
            "minor": 1
        },
        "name": "Office AP",
        "model": "MR52",
        "firmware": "wireless-26-6-1",
        "floorPlanId": null
    },
    {
        "lat": 41.4768238267966,
        "lng": -81.5780643147326,
        "address": "",
        "serial": "Q2LD-3Y7V-7Y2X",
        "mac": "e0:55:3d:c0:73:56",
        "lanIp": "192.168.128.17",
        "tags": " LTV ",
        "url": "https://n6.meraki.com/Lyoli-wireless/n/WdPtFdg/manage/nodes/new_list/246656712864598",
        "networkId": "L_566327653141843049",
        "beaconIdParams": {
            "uuid": "a543206b-7dc8-44d0-9d72-1d43d92aafd4",
            "major": 2,
            "minor": 1
        },
        "name": "Basement AP",
        "model": "MR52",
        "firmware": "wireless-26-6-1",
        "floorPlanId": null
    },
    {
        "lat": 37.4180951010362,
        "lng": -122.098531723022,
        "address": "",
        "serial": "Q2GV-LDX2-53ZA",
        "mac": "34:56:fe:a3:ef:f4",
        "lanIp": "192.168.128.12",
        "tags": " API_demo ",
        "url": "https://n6.meraki.com/Lyoli-camera/n/kmekocg/manage/nodes/new_list/57548243988468",
        "networkId": "L_566327653141843049",
        "model": "MV12W",
        "firmware": "camera-4-0",
        "floorPlanId": null,
        "wirelessMac": "34:56:fe:a3:ef:f5"
    },
    {
        "lat": 37.4180951010362,
        "lng": -122.098531723022,
        "address": "",
        "serial": "Q2QW-W2W4-MCNR",
        "mac": "34:56:fe:88:c2:f8",
        "lanIp": "192.168.128.8",
        "tags": " recently-added ",
        "url": "https://n6.meraki.com/Lyoli-switch/n/kjwRabg/manage/nodes/new_list/57548242207480",
        "networkId": "L_566327653141843049",
        "name": "Big Office Switch",
        "model": "MS250-48FP",
        "switchProfileId": null,
        "firmware": "switch-12-14",
        "floorPlanId": null
    },
    {
        "lat": 37.4180951010362,
        "lng": -122.098531723022,
        "address": "",
        "serial": "Q2HP-WEUW-2PQD",
        "mac": "e0:55:3d:d2:48:3f",
        "lanIp": "192.168.128.90",
        "url": "https://n6.meraki.com/Lyoli-switch/n/kjwRabg/manage/nodes/new_list/246656714033215",
        "networkId": "L_566327653141843049",
        "name": "Bedroom Switch",
        "model": "MS220-8P",
        "switchProfileId": null,
        "firmware": "switch-12-14",
        "floorPlanId": null
    },
    {
        "lat": 37.4180951010362,
        "lng": -122.098531723022,
        "address": "",
        "serial": "Q2HP-225A-XA5C",
        "mac": "e0:55:3d:d2:4b:4c",
        "lanIp": "192.168.128.120",
        "url": "https://n6.meraki.com/Lyoli-switch/n/kjwRabg/manage/nodes/new_list/246656714033996",
        "networkId": "L_566327653141843049",
        "name": "Basement switch",
        "model": "MS220-8P",
        "switchProfileId": null,
        "firmware": "switch-12-14",
        "floorPlanId": null
    }
]

To gather specific device information, we have to use the device serial number. Let’s say that we want to get details about the first device on the list. It’s serial is Q2SW-SWQ2-HZ9L.

https://api.meraki.com/api/v0/networks/L_566327653141843049/devices/Q2SW-SWQ2-HZ9L

After successful execution, we’ve got following response.

{
    "lat": 37.4180951010362,
    "lng": -122.098531723022,
    "address": "",
    "serial": "Q2SW-SWQ2-HZ9L",
    "mac": "ac:17:c8:24:4f:68",
    "wan1Ip": "192.168.1.74",
    "wan2Ip": null,
    "lanIp": "192.168.1.74",
    "tags": " recently-added ",
    "url": "https://n6.meraki.com/Lyoli-appliance/n/6X278ag/manage/nodes/new_list/189218142048104",
    "networkId": "L_566327653141843049",
    "name": "BigCat",
    "model": "MX250",
    "firmware": "wired-14-53",
    "floorPlanId": null
}

We can dive even deeper into the device details. The next API call aims to get information about device uplinks.

https://api.meraki.com/api/v0/networks/L_566327653141843049/devices/Q2SW-SWQ2-HZ9L/uplink

The response is following.

[
    {
        "interface": "WAN 1",
        "status": "Active",
        "ip": "192.168.1.74",
        "gateway": "192.168.1.254",
        "publicIp": "76.250.206.183",
        "dns": "192.168.1.254",
        "usingStaticIp": false
    },
    {
        "interface": "WAN 2",
        "status": "Not connected"
    }
]

The response contains information about two uplinks, first one is configured and active, the second one is not connected.

Clients

The last examples in this article are related to the clients. To get a list of clients, we have to specify the network first.

https://api.meraki.com/api/v0/networks/L_566327653141843049/clients

The following response contains a list of clients.

[
    {
        "id": "k6b9d04",
        "mac": "00:fc:8b:83:69:98",
        "description": "Office Alexa",
        "ip": "192.168.128.26",
        "ip6": null,
        "ip6Local": "fe80:0:0:0:2fc:8bff:fe83:6998",
        "user": null,
        "firstSeen": "2017-10-05T21:08:36Z",
        "lastSeen": "2020-10-21T12:43:52Z",
        "manufacturer": "Amazon Technologies",
        "os": "Android",
        "recentDeviceSerial": "Q2LD-ZWCZ-UA77",
        "recentDeviceName": "Office AP",
        "recentDeviceMac": "e0:55:3d:c0:72:d8",
        "ssid": "Lyoli",
        "vlan": 1,
        "switchport": null,
        "usage": {
            "sent": 87728,
            "recv": 77165
        },
        "status": "Online",
        "notes": null,
        "smInstalled": false,
        "groupPolicy8021x": null
    },
    {
        "id": "k6c2355",
        "mac": "dc:f5:05:e0:c4:b9",
        "description": "LAPTOP-5EQ2SB4R",
        "ip": "192.168.128.210",
        "ip6": "2605:a000:1127:c107:1188:d926:8030:8045",
        "ip6Local": "fe80:0:0:0:1da0:4220:34ff:b420",
        "user": null,
        "firstSeen": "2019-12-19T16:56:55Z",
        "lastSeen": "2020-10-21T12:43:49Z",
        "manufacturer": "AzureWave Technology",
        "os": "Windows 10",
        "recentDeviceSerial": "Q2LD-3Y7V-7Y2X",
        "recentDeviceName": "Basement AP",
        "recentDeviceMac": "e0:55:3d:c0:73:56",
        "ssid": "Lyoli",
        "vlan": 1,
        "switchport": null,
        "usage": {
            "sent": 532789,
            "recv": 19870732
        },
        "status": "Online",
        "notes": null,
        "smInstalled": false,
        "groupPolicy8021x": null
    },
    {
        "id": "k71e59d",
        "mac": "ac:15:f4:70:3f:37",
        "description": "Matthews-iPad-2",
        "ip": "192.168.128.133",
        "ip6": "2600:1700:6032:3000:914a:2da3:feec:d3ce",
        "ip6Local": "fe80:0:0:0:18c9:f44:b459:5296",
        "user": null,
        "firstSeen": "2020-06-18T00:57:39Z",
        "lastSeen": "2020-10-20T23:11:25Z",
        "manufacturer": "Apple",
        "os": "Apple iPad",
        "recentDeviceSerial": "Q2LD-3Y7V-7Y2X",
        "recentDeviceName": "Basement AP",
        "recentDeviceMac": "e0:55:3d:c0:73:56",
        "ssid": "Lyoli",
        "vlan": 1,
        "switchport": null,
        "usage": {
            "sent": 18268,
            "recv": 782034
        },
        "status": "Offline",
        "notes": null,
        "smInstalled": false,
        "groupPolicy8021x": null
    },
    {
        "id": "k722ce3",
        "mac": "34:ab:37:4c:6a:c2",
        "description": "Red iPad",
        "ip": "192.168.128.249",
        "ip6": "2600:1700:6032:3000:6582:5ec8:8483:a7ee",
        "ip6Local": "fe80:0:0:0:8e2:c8b8:4717:c88c",
        "user": null,
        "firstSeen": "2017-07-05T12:32:00Z",
        "lastSeen": "2020-10-21T12:43:39Z",
        "manufacturer": "Apple",
        "os": "Apple iPad",
        "recentDeviceSerial": "Q2LD-AN9B-S6AJ",
        "recentDeviceName": "2nd Floor AP",
        "recentDeviceMac": "e0:55:3d:c0:5e:2e",
        "ssid": "Lyoli",
        "vlan": 1,
        "switchport": null,
        "usage": {
            "sent": 81289,
            "recv": 7622999
        },
        "status": "Online",
        "notes": null,
        "smInstalled": false,
        "groupPolicy8021x": null
    },
    {
        "id": "k737dce",
        "mac": "00:fc:8b:2a:85:dd",
        "description": "Basement Alexa",
        "ip": "192.168.128.29",
        "ip6": "2600:1700:6032:3000:105d:faf6:c964:e127",
        "ip6Local": "fe80:0:0:0:2fc:8bff:fe2a:85dd",
        "user": null,
        "firstSeen": "2018-12-24T01:57:20Z",
        "lastSeen": "2020-10-21T12:43:49Z",
        "manufacturer": "Amazon Technologies",
        "os": "Android",
        "recentDeviceSerial": "Q2LD-3Y7V-7Y2X",
        "recentDeviceName": "Basement AP",
        "recentDeviceMac": "e0:55:3d:c0:73:56",
        "ssid": "Lyoli",
        "vlan": 1,
        "switchport": null,
        "usage": {
            "sent": 35815,
            "recv": 32727
        },
        "status": "Online",
        "notes": null,
        "smInstalled": false,
        "groupPolicy8021x": null
    },
    {
        "id": "k75e665",
        "mac": "00:17:88:4b:9c:42",
        "description": "Hue-Bridge",
        "ip": "192.168.128.31",
        "ip6": null,
        "ip6Local": "fe80:0:0:0:217:88ff:fe4b:9c42",
        "user": null,
        "firstSeen": "2017-09-16T16:19:05Z",
        "lastSeen": "2020-10-21T12:43:40Z",
        "manufacturer": "Philips Lighting BV",
        "os": null,
        "recentDeviceSerial": "Q2QW-W2W4-MCNR",
        "recentDeviceName": "Big Office Switch",
        "recentDeviceMac": "34:56:fe:88:c2:f8",
        "ssid": null,
        "vlan": 1,
        "switchport": "3",
        "usage": {
            "sent": 12439,
            "recv": 1373
        },
        "status": "Online",
        "notes": null,
        "smInstalled": false,
        "groupPolicy8021x": null
    },
    {
        "id": "k79bace",
        "mac": "18:b4:30:d2:07:e8",
        "description": "2nd Floor Nest",
        "ip": "192.168.128.27",
        "ip6": "2600:1700:6032:3000:b95b:3a14:a70e:dfa4",
        "ip6Local": "fe80:0:0:0:1ab4:30ff:fed2:7e8",
        "user": null,
        "firstSeen": "2017-10-06T02:10:44Z",
        "lastSeen": "2020-10-21T12:43:40Z",
        "manufacturer": "Nest Labs",
        "os": "Raspberry Pi",
        "recentDeviceSerial": "Q2LD-AN9B-S6AJ",
        "recentDeviceName": "2nd Floor AP",
        "recentDeviceMac": "e0:55:3d:c0:5e:2e",
        "ssid": "Lyoli",
        "vlan": 1,
        "switchport": null,
        "usage": {
            "sent": 1688,
            "recv": 1530
        },
        "status": "Online",
        "notes": null,
        "smInstalled": false,
        "groupPolicy8021x": null
    },
    {
        "id": "k84a017",
        "mac": "e0:55:3d:d0:04:c5",
        "description": "devnetlab-switch-e0553dd004c5",
        "ip": "192.168.128.11",
        "ip6": null,
        "ip6Local": null,
        "user": null,
        "firstSeen": "2019-10-21T19:17:20Z",
        "lastSeen": "2020-10-21T12:43:40Z",
        "manufacturer": "Cisco Meraki",
        "os": "Meraki OS",
        "recentDeviceSerial": "Q2QW-W2W4-MCNR",
        "recentDeviceName": "Big Office Switch",
        "recentDeviceMac": "34:56:fe:88:c2:f8",
        "ssid": null,
        "vlan": 1,
        "switchport": "6",
        "usage": {
            "sent": 11249,
            "recv": 9505
        },
        "status": "Online",
        "notes": null,
        "smInstalled": false,
        "groupPolicy8021x": null
    },
    {
        "id": "k887292",
        "mac": "24:4b:03:50:af:d1",
        "description": "Basement TV",
        "ip": "192.168.128.253",
        "ip6": null,
        "ip6Local": "fe80:0:0:0:264b:3ff:fe50:afd1",
        "user": null,
        "firstSeen": "2017-07-16T23:51:48Z",
        "lastSeen": "2020-10-21T12:43:49Z",
        "manufacturer": "Samsung",
        "os": "Routers and APs",
        "recentDeviceSerial": "Q2HP-225A-XA5C",
        "recentDeviceName": "Basement switch",
        "recentDeviceMac": "e0:55:3d:d2:4b:4c",
        "ssid": null,
        "vlan": 1,
        "switchport": "2",
        "usage": {
            "sent": 39756,
            "recv": 43026
        },
        "status": "Online",
        "notes": null,
        "smInstalled": false,
        "groupPolicy8021x": null
    },
    {
        "id": "k8b009b",
        "mac": "dc:68:eb:63:3e:ad",
        "description": null,
        "ip": "192.168.128.49",
        "ip6": null,
        "ip6Local": null,
        "user": null,
        "firstSeen": "2017-12-22T05:08:01Z",
        "lastSeen": "2020-10-21T12:43:39Z",
        "manufacturer": "Nintendo",
        "os": "Nokia",
        "recentDeviceSerial": "Q2LD-AN9B-S6AJ",
        "recentDeviceName": "2nd Floor AP",
        "recentDeviceMac": "e0:55:3d:c0:5e:2e",
        "ssid": "Lyoli",
        "vlan": 1,
        "switchport": null,
        "usage": {
            "sent": 509,
            "recv": 2840
        },
        "status": "Online",
        "notes": null,
        "smInstalled": false,
        "groupPolicy8021x": null
    }
]

As in the device and organization examples, we can also get information about one specific client.

https://api.meraki.com/api/v0/networks/L_566327653141843049/clients/k71e59d
{
    "id": "k71e59d",
    "mac": "ac:15:f4:70:3f:37",
    "ip": "192.168.128.133",
    "ip6": "2600:1700:6032:3000:914a:2da3:feec:d3ce",
    "description": "Matthews-iPad-2",
    "firstSeen": 1592441859,
    "lastSeen": 1603235485,
    "manufacturer": "Apple",
    "os": "Apple iPad",
    "user": null,
    "vlan": "1",
    "ssid": "Lyoli",
    "wirelessCapabilities": "802.11ac - 2.4 and 5 GHz",
    "smInstalled": false,
    "recentDeviceMac": "e0:55:3d:c0:73:56",
    "clientVpnConnections": null,
    "lldp": null,
    "cdp": null,
    "status": "Offline"
}

Summary

As you can see, the presented API calls are straightforward. The retrieved data presented in JSON is easy to read for us, humans but it also can be easily converted into Python native structures. More on that topic in future articles.

Share

One thought on “Cisco Meraki REST API calls with Postman

Leave a Reply

Your email address will not be published.