Meraki.Api

Nuget
Nuget
License: MIT
Codacy Badge

This project implements access to the v1 Meraki API

See the contribution guide for more information regarding contributing to this project

To use the Meraki API nuget package:

Visual Studio

  1. Open your project in Visual Studio
  2. Right-click on the project and click "Manage Nuget packages"
  3. Find the package "Meraki.Api" - install the latest version

Example code (C# 11)

using Meraki.Api;
using System;
using System.Threading.Tasks;

namespace My.Project
{
	public static class Program
	{
		public static async Task Main()
		{
			using var merakiClient = new MerakiClient(new MerakiClientOptions
			{
				ApiKey = "0123456789abcdef0123456789abcdef01234567",
				// UserAgent = "YourProductName/YourProductVersion YourCompanyName"
				// UserAgent = "YourProductName YourCompanyName"
				UserAgent = "DeviceLister/1.0 MyCompanyInc"
			});

			var organizations = await merakiClient
				.Organizations
				.GetOrganizationsAsync()
				.ConfigureAwait(false);

			var firstOrganization = organizations[0];

			var devices = await merakiClient
				.Organizations
				.Devices
				.GetOrganizationDevicesAsync(firstOrganization.Id)
				.ConfigureAwait(false);

			Console.WriteLine("Devices:");
			foreach (var device in devices)
			{
				Console.WriteLine($"    - {device.Serial}: {device.Name}");
			}
		}
	}
}

API Documentation

The Meraki API documentation can be found here:

Testing

You can test this using a Meraki Sandbox here:

After signing in, look in the lower left hand side of the page for your API key.

View code on GitHub
  • Owner

  • Contributors

    +12Github contributors
  • Categories

  • Products

    Meraki
  • Programming Languages

    C#C++
  • License

    MIT License

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.