From Postman to Python: Your First GET Request

preview_player
Показать описание
In this video, we'll walk through a fairly basic intro on how to query an API via Postman, then show how to use Python to make those same queries a little more dynamic & automated. The intent of this video is not to be an all-inclusive intro to Postman or Python - just to give a few examples, and show how easy it can be to make the jump from Postman to Python. The examples used are created in the context of systems/network automation, but the underlying concepts are usable outside of these areas.

Links / Follow me elsewhere:

If this video was helpful to you, please consider subscribing & sharing! Please leave a comment if you would like similar content! Thank you!!!

Thanks for watching!
- Matt

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Chapters:
0:00 - Intro / Background
2:27 - Review Test API / JSON Data
4:26 - Postman: Set up & Execute Simple GET Request
7:40 - Postman: Using Query Parameters
10:15 - Python: Install Requests Module & Basic GET Request
11:43 - Python: Querying with User Input
13:30 - Python: Comparing JSON Response with Python List / Dict
14:52 - Python: Filtering & Formatting Response Data
16:49 - Example: Using Meraki Dashboard API to Find Most Common Device OS

Standard Disclaimer: Any comments / opinions here are my own, and do not represent my current or former employers.
Рекомендации по теме
Комментарии
Автор

Thank you for creating this. It was very helpful to see someone approach this with a networking mindset. Much appreciated.

kingsleysam
Автор

This was so well written, good logical flow and easy to follow. I came here bc I was trying to learn how to pull an API using postman and put it into context of my python code. Thank you for the video and the blog post!! :-)

hingsing
Автор

You're one of, if not the best, teachers I've come across trying to learn Python. Thanks for this gold nugget!

joshuakim
Автор

I really appreciate you making this video. Thank you!!

BradleyHerbst
Автор

You are 100% right, most videos are how to run from Postman however I have a requirement to read data from Oracle REST Data Services and load into PostgreSQL Table through Python program and this is what I was looking for how to do through Python Program, I think this will help me to start with. I have to pass some parameters including subscription key and Role Name and other details required for calling Oracle REST Services. Thank you for posting this video, very nice and simple

kdhairyavan
Автор

Super helpful video. Is it possible for you to make a video on wireshark parsing using python?

inakaushik
Автор

This is great. I think an easier path would be to pull json data and let pandas filter what you need. It's much easier and very little prone to errors and needs very little hit and trail. Try it out..converting the entire json structure to a pandas dataframe is 1 command which is essentially an excel sheet.

preetkochar
Автор

at 22:40, is there any reason or scenario in which we'd expect a TypeError?

joshuakim
Автор

at 16:36 . userdata = json.loads(response.text)[0] . KeyError: 0 error help pls

gamerdarker
Автор

hi, if i want to use my own json file data instead of the data on the json placeholder website, how do I create the request url needed on postman?

hea
Автор

Interesting, thanks I am having a hard time following after the Authentication portion, I am trying to replicate this in my environment but not sure how to authenticate to an API, would you be able to point me in the right direction? Great video.

miguelmontielgil
Автор

How about a video on doing these Python requests on a Cisco CUCM server?

RikardKrvaric
Автор

Can you please help me I have this as an outgoing parameter to API this is how it looks in Postman

{"InputParameters":

{
"I_SEQ_ID": "124",
"I_COMMENTS":" Kamlesh"
}
}

How can I put in call for request response = requests.post(OAUTH_ENDPOINT, headers=headers_get, data=InputParameters)

I am getting error for defining as InputParameters = [{'I_SEQ_NUM':'123', 'I_COMMENTS': 'KAMLESH'}]

ValueError: [TypeError("'property' object is not iterable"), TypeError('vars() argument must have __dict__ attribute')]

kdhairyavan
Автор

What if I have a websocket URL instead of a normal url

adityagupta
join shbcf.ru