New to the API and Postman am I missing something?

Caleb_Murphy
Comes here often

New to the API and Postman am I missing something?

Hey everyone,

 

Apologies in advance if this is a trivial or dumb question. I am very new to API's and postman. I have followed the Meraki docs and I still get a request timed out when I try to send and API call to get my orginization ID. I have imported the collection, and created the environment. I have my api key as a variable and the baseUrl and a variable https://api.meraki.com/api/v1 when I then go to the collection I don't see the get request that that the docs say to send (Get List the organizations) there is only Get List organizations that user has privileges on or Get Return an organization. Both requests time out. I have scrapped and reset this up a few times now and I am fairly confident I am doing this correctly thus far. I have full admin rights to my Org so thats not an issue. I have double checked the key is copying into the vairable values correctly. I do wonder if I should be using that URL (from the docs) as the base URL or would their be a specific URL to use for my org since I am not doing this with a sandbox? Any help would be appreciated I can certainly elaborate on my steps if someone thinks I may have missed something.

 

Thanks everyone

 

Caleb

20 Replies 20
alemabrahao
Kind of a big deal
Kind of a big deal

You can also test It on Meraki Developer Hub:

 

 

https://developer.cisco.com/meraki/api-latest/#!get-organizations

 

Just set your API key

 

alemabrahao_2-1666985420072.png

 

 

 

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
Caleb_Murphy
Comes here often

Thanks That worked in the Dev hub. I have the ID. I do wish I knew what was going on in Postman, but oh well I can tentatively try and move forward. 

alemabrahao
Kind of a big deal
Kind of a big deal

Well,

 

I performed a test and It worked as expected:

 

alemabrahao_0-1666987156427.png

 

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
Caleb_Murphy
Comes here often

Odd though while it worked in the Dev hub I still get time outs in Postman which is making me thing I still have something wrong.

Caleb_Murphy
Comes here often

Small update. When I change the BaseUrl to my orgs Url I now get a different out put but is just basic html and there is no org code.

alemabrahao
Kind of a big deal
Kind of a big deal

Can you share the headres that you configured on postman? It looks like a machine issue.

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
Caleb_Murphy
Comes here often

All of the headers or is there one specifically? When I looked I noticed the API key wasn't there even though it was in my environments variable, and got an error.

alemabrahao
Kind of a big deal
Kind of a big deal

Content type, API key, and GET URL.

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
Caleb_Murphy
Comes here often

When I look at the headers after sending the call, I see the API key isn't there even though I have it in the variables of the environment. I am not sure why its not there. There is no header for GET URL, although the base URL is defined in the environment. the content type is "text/html; charset=utf-8"

alemabrahao
Kind of a big deal
Kind of a big deal

Can you share a print screen?

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
Caleb_Murphy
Comes here often

Caleb_Murphy_0-1668019348673.png

 

alemabrahao
Kind of a big deal
Kind of a big deal

And, how about Content-type???

 

alemabrahao_0-1668019797918.png

 

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
Caleb_Murphy
Comes here often

That doesn't seem to be in my headers.

 

Caleb_Murphy_0-1668020445858.png

 

alemabrahao
Kind of a big deal
Kind of a big deal

You need to add a new key value. It won't show up on its own. 😅

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
Caleb_Murphy
Comes here often

Do I just add the same API key I added to the environment variable? I did try that but didn't seem to work.

alemabrahao
Kind of a big deal
Kind of a big deal

@Caleb_Murphy,

 

 

Refer to this guide. Probably  you are doing something wrong:

 

https://developer.cisco.com/meraki/build/meraki-postman-collection-getting-started/#!getting-started

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
alemabrahao
Kind of a big deal
Kind of a big deal

By the way, did you try to configure it the same way I did without using variables?

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
Caleb_Murphy
Comes here often

I am not sure what you mean without using variables. Do I just not configure them for the environment?

Caleb_Murphy
Comes here often

That is the guide I followed

alemabrahao
Kind of a big deal
Kind of a big deal

Well, I recommend you to Google Postman. There are a lot of articles and videos: Good luck.

 

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

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
Get notified when there are additional replies to this discussion.