Trying again with APIs

Jwiley78
Building a reputation

Trying again with APIs

So, I tried learning APIs in the past with no luck.  After setting in the ECMS1 & 2 classes this week and then coming back to work with a ticket to add new admins to about 30 orgs I think it's time to get this knocked out.  Supportdesk is a revolving door sometimes by nature of the beast and it feels like I'm constantly making admin changes.

 

So, I started with this video but can't get the Networks->getOrganizationNetworks to work.  Continue to get a 404 error.  Anyone have any good ideas to t-shoot this problem?

 

Also, any helpful learning tips or links would be great. 

5 REPLIES 5
Ryan_Miles
Meraki Employee

Post the code you're attempting to use. Make sure to not post your API key!

Jwiley78
Building a reputation

Trying to use postman just to get started.  This is the video I've started.

 

https://www.youtube.com/watch?v=TRhT-zNVlCw

 

Gotcha. With Postman it should be pretty easy. I assume you've imported the current collection using this link?

 

That video is really good at covering all the steps. Some steps aren't required anymore though as the downloaded collection and environment already include some of the variables he was manually creating.

 

This will import the API collection and creates a default "environment". Edit the environment and paste in your API key variable.

 

api variable.png

 

Now make sure you have this environment selected (it's in the drop down in the upper right) when using calls in the collection.

 

Start with using the List the Orgs GET. This returns all ORG IDs your API key has access to. You can highlight the ORG ID field on the results, right click and choose Set:<your environment name>, then choose the variable called "organizationId". That now places your ORG ID into your environment so any call using the :organizationId variable will pull it from your environment.

 

With that set you should be able to run the List Networks in an Org call.

Jwiley78
Building a reputation

Thanks, I'm packing up and heading out of the office now but I plan on trying again later this weekend.  I'll let you know if I get it figured out.  I know this won't get me the admins created for multiple orgs like I'm going to need but figured it would be a good starting point to learn.

Jwiley78
Building a reputation

Made some good progress today in getting things working with a single organization.  Is there a way to get this to work with multiple organizations?  

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.