Exploring the zoom API with Joyce and her boss: Postman live stream on Twitch

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello hello hello welcome to the postman live stream my name is Joyce I'm a developer advocate based here in San Francisco and we have a special guest today Nick hey there this is Nick Tran also based in the San Francisco Bay Area happy to be honest on this tweet stream your Bay Area but your East Bay right I am yes so that's basically a different different city different country it's a different continent it's across the bay so today we have actually a lot to cover we're going to be exploring the zoom API Nick have you ever worked with the zoom API I have not looking forward to working with it though I know we've been chatting a lot about how can we use more api's to gain visibility to how our systems operating all our programs fair so looking forward to it yeah and zoom has a user interface or like a web version so you can actually do some stuff you know in zoom in the website but what what are the differences between what the API can help you do versus the GUI so we'll find out and before we get started I'd like to talk about some new things that came out so let's switch over to in case you missed it so you might or might not be seeing my screen actually so we have Nick as a special guest today but arla me once again is still in the backgrounds he's actually broadcasting this stream from London so thank you very much ARLA me and please share my screen so hopefully you see my screen I'm up on the community forum it's community that placement comm and are lemme did this one we're talking about early me even though he's here but not here in person so if you go to postman news we had what's new in postman 7.25 and look look at all the stuff that is out so one of the new things in seven version 7.25 is role based access control for environments and Nick you and I we're actually going to be working in the same workspace and we'll be sharing the collection so if you run into issues I can pop in and like update your collection and now we have that for environments where in the past if you shared an environment with your team member they would be able to collaborate but now you are able to kind of put the kibosh on it if you want to lock down your environment so that I can't update it then you can do that now so that's exciting new parameters for notifications in our lemme I've told you this so many times but like I love how you put these little gifts in because I don't have to switch over in fact can you see that this is exactly what was released it's being able to retry a monitor and I don't think we've talked about monitors at all yet in the live stream we should schedule that for another topic but being able to retry a monitor if it fails in setting the parameters around that let's see what else we got and it started to interject often do monitors fails what and why would they fail so it's similar to I a monitor is just a scheduled collection run and post in so if I schedule a bunch of requests to run in waterfall order or like to create a whole test suite around it if I don't get back the response that I'm expecting then postman will now retry that whole monitor run yeah so that's a failed monitor run not the monitor returns failures on your endpoints because your expected behavior was different so a lot of stuff here I won't go over it all because we have a lot to get through but this last one infinite zoom if I just scroll down it's hilarious what we have you're able to zoom in like so close this is gonna be like I'm just gonna navigate postman like this let me switch over to postman I'll show you what that looks like so here I am in postman following you and going going going the prep for this like ctrl + yeah cool yeah but now you can go in a lot further it's like enhance enhance because you go back out - yeah let's see how great that looks you guys see that this is how we're doing the rest of the stream welcome welcome people in the chat who's the new guy I don't know Michael Bettendorf I don't know just some Yahoo that has a restore hat decided to come on of history this is my head chicken - Hawaii Oh chicken hat ok so let's see that's on in case you missed it I will drop a link to this beautiful article that our lemme wrote again lots of new stuff coming out of postman and arla me I love working with our alum a he's spoon feeding me what's what's new in these releases even talking about the why you'd care about it and that kind of stuff so we'll drop that link in the chat but that's in case you missed it so what are we doing today there question about this like how is this different from our release notes today how is what our let me wrote yeah yeah so if you go to there's a couple different ways and we've talked about this before but let me go to post man if you go to the settings this french icon and go to release notes these are you know a bulleted list and in fact if there's like bugs it'll actually linked to those bugs in those feature requests so it's a very bulleted digestible link but not everyone has the context for like what is it and what is it good for and so our le'me is actually being a little bit more user friendly and explaining it in like lay terms almost yeah all right let me you deserve a raise okay so let's go ahead and okay so our Louie has kindly posted a link to that what's new in postman so that's just in case you missed it but today today Nick you you'd wanted to work a little bit with the zoom API can you tell me what you were hoping to get out of it yeah I was hoping to see if we could so today like I would ask are one of our marketing managers like what's what's the current registration the webinar market and so I would ping her on slack and she respond you know as quickly as you can and I would do that like every couple days and it starts saying I think I'm starting to annoy her because it's like she should come my API so rather than having me ping a human being wouldn't be great I can just pin the API to get the number of registrants back yeah so your alternatives Nick sounds like your pain point an API evangelist is saying that he did that to me for Eventbrite he asks a lot of questions so you could like the shot-caller right you're the shot caller and you're like I need registrations stat I need Eventbrite like whatever stat and your alternatives are to ask somebody right so for webinars you asked Nikita and you're like Nikita how many registrations do we have for this Levela webinar your alternatives are to login a zoom like log into a website yeah and for a lot of reasons she won't give me the the credentials login oh so like she needs to grant you special permissions to see this information mm-hmm or we can an API and see what if that's the case if you're not able to see stuff information on the dashboard I suspect you should not be able to access it by API because that's only good security practices and zoom is known for good I can't think what it is she doesn't want me to start up a zoom webinar to like my hair or garden in the background here I would attend we could do a time lapse webinar or just peacefully watch your arrow I swear rack up the follows we're good to you on twitch okay well let's let's experiment with that that's called a be testing and marketing we can see what performs better so let's let's go ahead and switch over to Nick are you ready for this you ready - I'm rolling up my sleeves actually I don't have sleeves on buy wood ok let's go ahead and share your screen then ok alright and you know you're a busy person we have not had a chance to you know make sure that you have the right permissions and scopes for some of this stuff so we'll just see we'll just see how far we get and in fact I really like this type of this type of stream and we'll see how this goes I think I'd like to make a special segment where like on Twitch a lot of times people that are brand-new to like a piece of technology or brand new to api's or something are exploring and you get a sense of nostalgia being like I remember when I first opened postman or aha look Nick doesn't know where to find blank right so like it's just kind of a cool thing to watch we're not making fun of you Nick it's just any time so I think we actually have a lot of people that work at postman and people that I come across in the community that are just getting started with api's so many so many people in all sorts of different functions so yes you will be our guinea pig I think I just learned best by doing and I encourage everyone else's on but you know there's you can only learn so much by reading and watching videos but I just for me like this doing is the best way of like just kind of absorbing all this stuff information myself and I've worked with you before Nick and that's why we're going to work off of your computer so that you stay engaged in this discussion so are you sharing your screen or am I just not sorry sure my screen you need to do it in Skype okay how come I can't see it Oh Skype Skype problems we're using Skype to stream about zoom I got says Skype is great technology but the UI can still I could use some improvements I love Skype I love lamp all right let's do it what are we gonna do what do you what do you expect us to do how do we get started with the zoom API Nick so I would expect by going to the zoom documentation so I think this is the reason why you have me open up my browser it previously yeah socked in so I guess this is my account you can see I have a bunch of zoom calls coming up yep see we had a table open for documentation yeah first I actually asked you to Google postman and zoom so there's a couple ways you can get started one is to look inside our API network to see if the zoom has documentation in the API network we've done that several several times before the other way you can do stuff is to Google I actually wasn't able to navigate to zooms API documentation from there login portal but yeah Google go ahead and navigate there okay so this appears to be a guide that tells you how to get started with the Zoom API if you're working with zoom chatbots it looks like they have a run in postman button that's that orange button there yeah we're not doing that today we're not doing chatbots today I don't even know what a zoom chat pod is is that just like replying I have my own name today I am NOT Kevin the chat box I haven't seen those in the zoom either but maybe that's why some people can put emojis our friends at zoom to come in may be dumb enough for us sometime yeah I think we know some of the people over at zoom shout out to Benjamin Dean what if Benjamin team if anybody from zoom is watching this please help us cuz I had trouble with their API no this is gonna be a breeze this is very unrehearsed organic nothing bad is gonna happen okay let's get going so under my apps in the header mmm it looks like you have activated one up Jason web token app go ahead and click on that well yeah go ahead and click on that we need to put up that blah shields or no I'm not sure when we talked about the blast shield is it's us shielding your eyes from our API keys and credentials shielding your eyes from these ugly ugly credentials yeah go ahead and click that okay blah shields up oh I'm sure we're fine okay let's see here that this is pinned to your name your email address yeah I created this the other day so this is why you see it because it's an account level you can see the label up at the top it's an account level app oh okay and so sorry so everybody shares it's gonna be API everybody within that same zoom account yeah so what this is this is an app that uses the API it's unfortunately called API but it's actually an app Oh God can you are you able to edit that you can take that little API off if able to edit in the app name down below yeah yeah alright alright so it's saved if the secret shield is up then we can go see the credentials okay are you ready for this click continue yeah so today we are exploring the zoom API Nick as my boss he wanted me to do a livestream with him and I was like okay so what do you want to do and so Nick is the VP of Marketing he doesn't work in postman every day it's a really good opportunity to show somebody who doesn't work with api's every day how you can go about exploring an API what is an API good for so we are just now looking at a zoom demo app and secret shields are probably up and we're about to reveal these app credentials so go ahead and click on that Nick here we go let me just narrate to the people since it's behind a blast shield you see an API C key secret and there's also a JSON web token so this is the stuff that we'll need so go ahead and navigate away from this so go to information okay okay and now secret shields down or what you call it Nick blast blast shields down okay so let's go over to postman postman it's live this to the right top of the morning Nick okay so Nick you and I are both inside this twitch workspace at the top left you can see that you're in this teamwork space so the twitch if you click that drop down yep we're both in twitch and in fact I just clicked into this workspace on my machine so now my avatar which is a picture of Lucy has light lightened up right there yep I'm here so don't worry we could do this together the first thing that we're gonna need to do is to pull in some collection we already saw one collection that zoom had we need to be able to pull in their API documentation of their API so that we can work with it in postman and then we have secrets and what is the best way to handle our secrets Nick or chat should we hard code those secrets into the collection hi not a good idea probably not a good idea if you can maybe abstract them into variables yes yeah we can use variables and there's a ton of different yes mr. plow variables yes Nick variables yeah cliff yes hard code and put them in plain text no that's not a best practice so we are going to use variables and in fact I think we'll use an environment variable today because it just makes it easy in the UI to kind of see and share and as we talked about in case you missed it we have new role based access permissions for environments now so let's go ahead and go back to your browser and let's look for a postman collection in zoom so probably Google I found one through googling but I can't remember how I got there what my keyboard was focused on this and I accidentally opened Oh going back to the browser yeah so looking for the postman yeah yep so choice tell me what a collection is should I ask you what a collection is you know I've heard like many different definitions of collections and I can make an attempt if I love to hear from you choice yeah you work with this all the time you're absolutely right so a collection means different things to different people so what we're looking for here is a folder of the zoom Apia of the zoom api so we're looking for a folder of requests it's just some documentation that zoom has created that allows us to pull it in and easily work with it so you reference you say you mentioned documentation is it's more than just the documentation done it's in the collection yeah it's everything that you need to interact with the API everything except for the keys yeah so it's another definition of a collection is that it's an executable format or I feel like we're getting a little philosophical here we have a couple questions in the chat our back for environments is such a boring sounded feature correct what does it mean for me that I'm excited about it Kevin Swiper it means that if I'm collaborating with Nick and I don't trust Nick not to override my keys and some information then I can say Nick you only have view permissions for my environment not edit so it allows me to have finer grade and control over who else can mess with my stuff a silly question any reason you'd put them in the environment variables instead of at the collection level couple pros and cons you know Nixa add variable that's a perfectly acceptable answer because in postman and in fact Nick if you navigate over to postman again let's take a look at the different variable types go to the eyeball yeah so you see you have environment variables you have global variables eleven volar I don't read leap but uh you asked about collection variables so collection variables typically an environment you pair a collection with an environment and together they go along and live together but a collection variable you can embed a variable in the collection it's not as easy to see because you can you can use the eyeball to see environment Global's but collection you have to actually go over to API learner in the left and find the three dots to the right side of the name oh you don't have see this is role based access control we don't trust Nick to work on API learners so he can't move it find one without a lock yeah any of those without a lock oh this one go to edit and tab over to variables yeah so these are in collection level variables a little bit harder to navigate to a little bit harder to see in the UI but it functions exactly the same so many pros and cons for different types hi Turk okay I don't know what this means all right are you ready to find an open API specification file that contains all of the let me Google on my screen because I found it before but I'm not googling properly so pardon what are you looking for an open API specification file do you want to google that or you want it's taking me to the same spot okay what do you want me to search for yeah okay so so Google zoom postmen and then all one word open API and then go to that second set yup okay so zoom has another guide here that shows you how to use postman to test zoom api's and if you go ahead and copy that link to your clipboard okay let's go back over to postman and this is a really good tutorial they use those screenshots very helpfully so go ahead and click at the top left click import so what we're doing here is we're importing a link mm-hmm boom is using a specification format called open API it looks like version 2 I'm looking I like the side-by-side Nick go ahead and continue and pull that in we're pulling it in from a URL go ahead and you can kind of see we'll import it as an API as well as a collection and yes it's swagger to ATO why it's known as open API version 2 so some import settings but go ahead and click import yeah why do we continue to refer to as swagger it was called swagger back in 100 days and then in 200 days and in fact sometimes people call it swagger to dotto but it went through a rebranding it's a marketing thing well I wouldn't know anything about that no no no actually if API evangelist is on it I think he's on the board or like the committee that like does open API stuff go ahead and pull it in I'm just checking through all the different toggles here okay importing import okay so this one is actually kind of a big file but it looks like the schema successfully imported its API and the collection imported so this is the file that you just pulled in so go ahead and make your postman a little bit lighter please why does it say delete deleted go ahead and make it lighter and then click on in the collections tab go ahead and find you can actually close that tab if you want delete it out yeah you know what I think your sync your icon was spinning so we might have some connectivity issues let me close that and then find something yeah there it is go ahead and put a star on it and bring it to the top I didn't know about the star yeah I loved the star because like look at how junky this sidebar is okay so there's 300 requests in here has imported the open API version to spec and transformed it into a collection as well as the API spec that you saw on the earlier tab that you just closed yeah you're such an API to that we were talking about earlier yeah you want to build something which at Mount I know what that's okay I stay focused on the first use case yeah so there's like a ton of stuff that you can just do here by exploring these folders by exploring the Zoom API documentation what do you think we want to check out webinars are we going to actually pull a live data you can pull live data yeah we are so I know that our lemme did a postman one along webinar yesterday so I would assume that would be under past webinars yeah so we can either pull real webinars and put up secret shield to protect the privacy of the people that registered or we can use a dummy webinar that we have a couple dummy webinars why don't we just do you account to start yeah so I would love if a soom API returned account but there's no API here there's no endpoint here called Nick special request to return count of webinars for his single most so we're actually gonna have to use multiple api's to accomplish what we want okay but let's go ahead and expand some of those webinars I don't actually know what we need expand some of those folders and then if you click on the request it'll load it up so maybe is there one that says like get webinar or get all webinars oh you mean yes so there's one expand it again the one that you just had open webinars slash webinar ID yeah it's kind of confusing here just the way the folders and requests are but if you get click on get a webinar okay so now we've loaded up this request that's a get request to that base URL do you want to hover over that base URL in orange yeah yeah so somebody had a question about collection look this one is a collection level variable which is the base URL for this API looks like we're looking under the params [Music] so I'm getting distracted okay you go away hey I'll chat with you in 30 minutes okay Nick you should get your kid up here he's probably gonna be like a whiz at api's how much kids are actually starting to use postman well at least all this one hey chica rose so what were we what were we looking for so the base URL and then they Parral something I love about watching people play a Minecraft for the first time is watching their reactions so Nick show it tell us your reactions what is that what are you looking at Here I am lucky I believe the end point for the Zoom API looks like is v2 I believe this interface is gonna allow me to make a request to this year I guess a URL and looking for some personally liked webinar ID I don't know what that current ID is oh there's a description of each of these I think they're called per query perimeter keys unique identifier that isn't well I'm surprised that all this information is here yeah so what will we need to get this request to work and we had a question it's mostly for the beginners is there anything advanced some time so today we're actually just exploring an API getting a feel for how api's work specifically the Zoom API so what would you do here Nick what would you do if you came here and you're like yes [Music] my kids got enough I bet your kid can like get through this API documentation alright so what are we doing how would you get this to work give me a hint I think I need to get some tokens yeah so let's go under off so there's a green dot under that tab and it's actually talking about OAuth 2.0 I think the website that we actually have open on the right we're actually going to be using JSON web tokens so go ahead and under the OAuth 2.0 drop-down where it says type you'll go ahead and say inherit okay actually let's go to the collection level see if they set some parent level off so the authorization helper is something that postman does to encapsulate the authentication process so go ahead to the three dots and hit edit and then under the authorization tab it looks like there's no ha oh dear this is very different than the okay no problem no problem so what we want to do is before you okay go back so there's a few different ways to authenticate a doom API it looks like we could do oh oh oh it looks like there's JSON web token go ahead and select bearer token this one yes so we need a token and we do have a JSON web token that we saw in the secret under the secret shield go ahead and do double curly braces here in the token this is where we can hard code our token once we or we could just write in like JWT so in Dutch it would be yay wait a but in English you would type in JWT and then close the double curly braces yeah so hover over that now with your cursor okay so you created a variable called JSON web token but you haven't actually poked in any value yet so let's go ahead and create an environment I need to click update yeah go ahead and click update to save your changes oh my go and do that here first or do you go to the environment section and create the verbal first or is this is it's it's however you want to do it you can initialize the variable that is or and then actually pocono value but since we already had this window open I'm gonna go ahead and say we're gonna set a collection level off the type is bearer token and we're gonna poke in a token called undefined JWT right now all right okay okay so now we need to create an environment to store that token go back to the die yeah right so we don't have an environment yet we're gonna have to add one and you can call this like zoom and then the variable name if you'll recall was JWT yep so we need that token do you remember where we saw that token account yes so we're going to need a secret shield as soon as you navigate to that general page yeah secret shield please follow me you got it okay so go ahead and copy your JSON web token to your clipboard and then keep the secret shield up we're gonna switch over to postman and you're gonna paste it in put it in current value what's the difference between in this joker so initial value since we're in a team workspace I'll be able to see current value I will not be able to see so you're welcome to share your JSON web token typically your team decides whether not you want to share credentials or not John so go ahead and hit add and outside up here so seek well actually we need to we need to navigate away from your token on the zoom design yeah so maybe just click over to infer oh I think we're gonna need a lot more information actually I don't know anyone know Jason web token hi will tha ah choice is the best choice deserves a raise totally so we need to click on information on the left just to hide our tokens that's the only reason why we're doing it so just click the one above it information now we could take down our secret shield unrehearsed oh so we had a random question go ahead and close this modal we had a random question here I need environment though right no yep okay so you you created the environment now you need to select the environment from that drop-down so the where it says at the very top right no environment yeah so now select your new environment don't okay be careful now otherwise you're gonna expose your secrets which we do at least once every live stream so don't worry if you do okay so now we're on get a webinar and we have oh uh two selected under authorization yo we already set that type at the parent level which is the folder which is the collection so go ahead and select inherit auth from parent okay I was gonna select pair token but this seems a lot this makes a lot more sense if it's already Department and in fact you could totally select bearer token but then you'd have to do it three hundred times for all three hundred requests god Chuck yeah very nifty oh but chad is hilarious okay um what are we doing so we just set the authorization up at the collection level we have it at the request level what do you suppose we should do now do you want to see if this works I want to test it okay what webinar yeah yeah you do so click over to params okay so the : webinar ID : syntax means that it's a path variable right now it just has a placeholder that's like angle bracket but we need to get some value there so go ahead and expand the postman a little bit so that we can see the sidebar okay so how do you think we would get the webinar ID I mean I would love to see an API that would just give me back all the webinars and the webinar IDs yeah so let's look for one that says get all webinars or lists webinars okay so I don't see one right there under webinar slash webinar ID if you click under metrics and then click under webinars go ahead and see if that one works there's two list webinars and they do different things how would I know to do that so what what you're doing is it's up to zoom to organize these folders how they want but how I found it when I was putzing around this morning is I use the little magnifying glass in the bottom left if you click on that really quick yeah yeah that's a find and what I did was like I searched for fines or like sorry yeah so this is gonna return like a few different things and I kind of like whittled it down but it's almost like googling you're only as good as like what you can search by right yeah but there's ten results under just open tabs alone there's 872 results for webinar under collections so I mean you need to whittle it down so what I did was I Whittle it whittled it down to this particular collection and then I did list webinars or all webinars or something I've never actually use this phone function I think it's pretty cool yeah this search is pretty um I mean it's hidden down there on the bottom left but especially if you use collections if you use postmen hardcore it can really come in handy this is a really cool thanks yeah that's a little bit better Laura do you want I know how you can find it the research if you want to play around in the find huh so right now you're searching everything under where I choose yeah choose entities and select collections and then we try this specific collection oh yeah what's it called zoom API yeah yep see if that works okay so just 200 what is the what is the the end point that you wanted you wanted um just lists lists yeah so put list webinars well I put a space there okay so now if you just kind of look there's two results one you can see the breadcrumb is under zoom API metrics webinars get lists webinars and then there's another one under zoom API users user ID webinars so one of these works in one of them doesn't so let's just try one how did you know so they both probably work one works with my permissions and one does not I have a quick question how Giller you with regex I'm as good as any other developer I can use a regex simulator I can google it actually some people are really good I'm not I cats off to those people that are really good right backs I can get complicated pops do you want to try that this this is your stream Nick maybe not today I think that's a couple separate stream comment in the in the chat if you want to see an entire stream on reg X okay so let's go ahead and try to list all of our webinars okay alright know that request here same base URL bunch of query parameters obviously I could specify the from the two terms of date [Music] okay so I guess off this post pub is didn't can I just tuck in him um we probably don't need to filter it down let's just make sure we can get a response first okay so one thing I know well check out under the authorization tab let's just make sure we have that selected as inherit from auth author impaired have we actually gotten a single request to work yet it's 11:45 let's let's step up the pace yeah okay alright so um you down no no no I want you to be able to take something with you when you leave today yeah go ahead and hit Send let's see if we have what we ready for this probably not but let's try I need more confidence okay so that looks like that's the wrong one let's go find the other list of webinars do you remember where it was I thought it was oh I remember I think it's under users users yeah so other report does anybody remember I think it's under users cuz we're actually gonna need your user ID or somebody's user ID - oh yeah that one I know I was looking for users down here so it's not default alphabetical order it's default however zoom wants it to be and in fact were postman transformed it from an open API specification so there's a little bit more transformation that occurs there - so go under user ID go under web doors yes let's try this one do you remember what we did authorization first inherit Othman parent could you can we make this a default for everything or do you have to do that every single time because it was manually selected as ooofff you have to change it but if it was from scratch it would just inherit it would the default would be inherit just maybe I could could we actually use a postman API to update the whole collection yeah we could we could edit Jason cuz that would be easier hey click over on params I want to see what programs oh ok so go ahead and ok so we're getting a 404 not found user does not exist because it's looking for angle bracket string okay so now we know we need to create we need a user ID so we're already under the user's folder is there a request that says list all users or something like that no I saw that list users yes yes ooh and the tabs are looking busy at the top we're doing some real heavy lifting here ok so let's I don't mean the browser in tomorrow me we haven't gotten a single request to work yet so what was the first thing we needed to do it only took me four hours me and API van just four hours to get the eventbrite it got working I mean I think you're learning a lot of different ok go ahead and hit Send okay oh I forgot to do this yep I'm learning from the bus no a lot of this is just muscle memory like I always want to hit the blue button okay so now go under params tab so tile records zero oh you're literally getting no user is back I wonder if we gave you the right first of all I have two questions I wonder if we're using the correct request cuz we saw earlier that there's multiple secondly I wonder if you have the correct permissions to even like access users you should have the same permissions that I do but not sure so what it says now is on row 6 users is returning an empty array right we don't have any users I was looking at this number five yeah so we actually do have users I'm wondering why we're getting 0 let me just double check I I tried this out the other day yeah list users under users under webinar is there another list users request that you see should we do a search sure list users ok so look at the breadcrumb is that the one you are at I think so ok so what I'm gonna do is someone said in chat the role ID looks like a placeholder should we deselect the role ID heck yeah try it thank you chat tribe is down Arkansas closes yes okay yay Ryan Monteux piano I think we should send each of them a t-shirt yeah do we have t-shirts let's do it let's do it that's we're gonna get you some both of you t-shirts how do you do that over we need to get their contact information yeah send Joyce or me your email I'll get you t-shirts yeah we should have our Twitter things up here so go ahead and tweet us so okay we can scroll through all the postman employees exposing all of their private information or we can just focus on the bottom that body response do you see a find in magnifying glass in the right side right one yeah okay go ahead and find let's look for Nikita actually so Nikita administrates most of our webinars and so one of two so go ahead and copy she's in Asia Calcutta timezone that's right that's her ID go ahead and copy that to your clipboard okay and so I asked you to copy it to your clipboard instead of programmatically setting it as a variable but I don't want you to share your secrets and have to invoke secret shield so I'm going to ask you to go under tests tab in the request so that's people get that confused all the time yep so the response is on the bottom the request is on top so now we are going to write some code Nick and I know JavaScript isn't your jam what language did you use to write up back in the day Oh Java Java okay so javascript is a separate programming language we will use JavaScript now to initialize so remember when we went to eyeball and we updated a value there yeah we're gonna actually programmatically set it using javascript so go ahead and type in PM environment dot set open parentheses user underscore ID in a in quotes surround that in quotes okay I think single quotes will work comma and then we're going to hard-code in go ahead and put quotes again put surround that in quotes yeah so all we're doing is hard coding it in just so we don't have to show you the secrets in eyeball so go ahead and hit Send okay so we didn't get any errors it works go ahead and comment that out so under yeah right here yep yep perfect okay so all we did was fingers crossed we've we've hard-coded a value but I don't want to show you eyeball because we have secrets in there now we have a user ID now let's go to lists webinars the right one not the wrong one okay I think this is I don't remember so now under user right this is the right one the message exists so I'm gonna ask you to type really fast cuz I'm pretty sure this oh a clean oh go ahead yeah type slowly type at your leisure double curly braces user underscore user yep there you go okay so that's Nikita's user ID go ahead and hit send and that's safe to user ID it is currently safe to use your ID but don't scrolls maddeningly there we go okay scroll slowly go slowly I don't actually know what is terrible but you can see there's something called test webinar or you don't want me to scroll down you can so move your cursor to right next to the up slightly nope nope to the left just on the white part yes yeah just highlight put your focus on the white part and then scroll oh okay or you can navigate a cursor too okay so we have an ID for this test webinar go ahead and do the same thing that we did so that we don't have to expose our secrets copy that to your clipboard under tests we're gonna go p.m. environment upset and we're only doing it this way remember cuz I don't want to show you the secrets under eyeball yes yes you're running it to set it all right somebody's typing Cyrillic I think in the chat I don't I don't know what that means or I don't want it I can't read it someone do Google Translate wait is that our let me so somebody's asking what we're doing so what we're doing is we're using a couple different api's zoom api's so zoom has an endpoint that allows us to list users we got that user ID now we're listing the webinars to get a webinar ID now we're gonna get a single webinar using that webinar ID so let's go ahead and get a webinar dressy will be will be on the line here that will da I think we need to get having on the stream at some point I assume I assume that's well number one trash talker okay so what do we need to do to get this one to work okay so it looks like I need to find the webinar ID and find the one that I had specified in the environment well there we go although this other completion yeah but it will show your secrets if you're not careful okay okay and is authorization correct nope yeah okay go ahead double-check right then with this identify that identifies an occurrence of a recurrent webinar yeah so last time we deselected something that we didn't need but sometimes I think you can just submit junk and we won't get an error so you can either unselect that or you can just hit Send and see what happens or should we ask the people in the chat what do you think I should do chat what do we do with the current ID oh no I'm gonna have to pay soon all right I was just gonna go spend it send it mr. plow so send it okay this is I guess we'll have to roll the dice given that Vegas is shut down okay okay so go ahead and scroll down promising yeah so here's all of our settings we have a panelist video set to OFF false I think one time JP had his video on and he we had a webinar he was just watching okay yeah so these are all the settings for the webinar this test webinar that we had and now we want to get what was your original question Nick account of all the people that run you straight okay so let's look for an endpoint in the sidebar for something about registrants well I I think I have to go back to that webinars might be under webinars yeah [Music] this one okay let's try that [Music] okay give me one second okay sounds like somebody's doing heavy exercise over there in the Tran household okay I'm back sorry get this this webinar registrants what do I need their current ID I think we proved that we didn't really need that I assume we need to specify the webinar ID which is going back to here recalling the variable that I that we had set and let's see what else do I need yeah I think I think that's it pride need to set the authorization right how can I remember to always do this like I almost forgot well I think you'll find out when units end yeah I like to be proactive about like yeah make my API a plus so the issue unless you're working extensively with the Zoom API there's so many parameters here you know page size RB paginating we might actually need to for this registration actually no it's a test webinar but go ahead and hit Send zero zero registrants so if you go to the zoom dashboard you can actually see that some dummy like registrations but for some reason the API is not returning it and I'm not sure if that has to do with the yeah if you want to go is there a dashboard somewhere in the zoom where you can like take a look at your webinars I don't think I have permission for that a current ID should probably okay let's try a current ID disabling that oh my gosh if that's it no see mr. Pyle more help or should we quickly go and look at another webinar that's not yeah let's let's try that go to les webinars yes it's cruel to here's the enterprise to e-commerce one that took place on April the first okay so that's the ID yep go get the I'm sorry I have to what have to do yeah just let this environment yep verbal click sound I'll make this back out and then I think I just need to go back here be careful careful so don't scroll too fast that first one is internal so you can scroll past Andy's you can see that we got 20,000 people registered for this webinar called something about api's and the first one is an internal person but Nick this the first thirty yes because page 30 so don't do this but we could change page number to two and then see the next 30 you don't want me to do that no because those will be real people's information here do you want to turn secret shield on and then you and I can like take a look at people's personal data but not share it with everyone else I think we don't need to go okay I didn't mean to say that it's fine that we show people's personal yeah we could stop here so this is really interesting in fact it's slightly frustrating to read because you're only going like a few rows can you move your cursor to that white space again between just like slightly above to the right it's hard to tell somebody where to scroll stop stop your cursor right there yeah roll slowly Oly okay yeah stop stop stop okay you're okay I'm worried that you're gonna reveal some of these information but you can see that the the response here we are listing registrants for this particular webinar with this webinar ID you can see the total records and you don't care about the registrants we don't actually have to paginate you care about the total records for your questions this number yeah so for each webinar let's just pseudocode in our minds how would we build what you want to answer your question of I always want to know how many registrations I have for a particular webinar what is the process that you would walk through sorry you're asking me so let's just talk through so we're at the top of our hour we can either proceed for the next few minutes and try to build something or let's just pseudocode what we would go about building so that we can answer your question of how many registrations do you have so it looks like the API request I need to make and it's this right and so I would assume that I would write some code hitting this API I get this JSON back and then I retrieve the number sorry the value for the key total records yes so we could create a separate collection that's called Nick special collection to get registrations or whatever and we would duplicate these requests so that it can execute that code for us so for total records what I would ask you to do is to go under that tests tab again let's go ahead and parse this response so previously we did pm that environment set to set in environment yeah let's go ahead and capture the response by using PM dot response that jason open and close yep so this is going to represent the response here as Jason which we can see with our eyeballs in the bottom half of the page it's tasty what does PM stands for it's the PM dot star API not a REST API but like a software API so it's the postman function it's a special object that gives you all this cool stuff so PM dot environment PM that response camped out requests if we want to a lot of cool things and in fact does does this chat bot work yes oh my first checkbox in the Twitter or in the twitch there's the documentation we can actually go to the sandbox documentation to take a look at it if you like no I think I want we can do that in Ozone I'll be your documentation for now so go ahead and at the beginning of that row yeah initialize a variable so let res total equals so total records is actually going to be that entire response so if after the parentheses should are you Mike are we getting the whole response and then parsing or we're getting one we could do either let's do that one okay so after the parentheses yep you'll go dot and then the total records yeah autocomplete it so pretty how do I select it just press Enter okay so that's total records theoretically we don't know if it works yet but now we can go ahead and print to the console so on the next row we had a question isn't it better to use global variables for temporary variables that could vary from request to request so global variables live at the workspace level so you can set them but then you'll be polluting your global workspace so you'll need to essentially tear it down or clear it at the end you can use low variables which is like PM dot variables outset that lives throughout the request or throughout a collection run but in this case we're not using we're just using like a super local variable like in the script so all I want to do here is like log something to the console to see if we can get the parse that information so on Row 2 let's go ahead and do console dot log are we doing it wrong log shouldn't it's interesting that the like the key values or the key yeah these variables autocomplete put the function for auto complete yeah weird we're doing something wrong pretend so I think yeah so let's go ahead and type console dot log open parentheses uh total records just as the value not a string yep perfect okay so go ahead and run this request I don't need some of their colons oh don't get us started actually yeah go ahead and put some settings on there I like some use okay hit send and now if you go to the bottom left corner and click on that console icon in the very very bottom left corner to the right there yep open that doo-doo-doo scroll down I did it you did it so you did it you set um a local variable in this case but if you wanted to save it as an environment variable because we're already using an environment you can and then you could pipe it through to slack so the issue here is that you're coming into postman to push a button to use an API right so what we were talking about earlier is we could build a collection to do this kind of thing and then you can either schedule it to run on a monitor to kind of notify you of this information or we can set up we use web hooks like two weeks in a row I think yeah for sure we're not doing that today but you got so far you for hours I mean there's so many there's so many in the other thing is that JSON web token is going to expire in ninety minutes so they have a whole nother way of authorizing they have many different ways of authorizing auth oh uh 2.0 and so there's a lot more that we can explore here but in the remaining time that we have for this project is there anything that we didn't get to that you wanted to get to this is the main thing this is awesome it didn't take four hours to do well I think you were working with Salesforce API is instead of zoom API so no I think it was because I was working with either the Eventbrite API or API evangelist I can't talk you know like a lot of people have opinions about what api's aren't easy to work with and what's not and so the documentation I mean postman we know this documentation is so important in helping people get unstuck and even discovering like look at these 300 requests on this left sidebar here like how do we find lists webinars you know it's there's two identical requests called lists webinars one works and one doesn't so it's just like really interesting how different api's choose to document in gain other people's adoption yeah I think the thing that also really helped with this working with this API was a defined like I never used it and it was so fun knowing that I can easily go search for things that cause I potentially could could could could leverage for what I needed to do I thought that wasn't gonna work yeah very very yeah in postman team we use postman very heavily so there's so many collections and being able to find something a little bit more efficiently as helpful so we have some questions here it did it he did it I don't know what the I mean it took a village you saw people like helping us with a current ID or bol ID I think it was no solace webinar users has a parameter the status defaulted to accepted or confirmed can postman run multiple requests one for each status for example and aggregate the results in a single view okay so the quest that's a really good question oh my gosh there's too much happening in chat but let's just navigate really quickly over to list webinar the single one this way yeah and go to params tab so I think the one we're talking about status I don't see status on here am i hi yeah go to per am list oh no lists webinars these that one yeah go to params tab yep am i hi okay so let's just talk through just put in the word go to the one okay so is this the one okay so we can just talk about this so this API happens to take except a parameter called status that can either be approved pending or some other stuff right and so the question is can we retrieve the approved data and then also a proof and also retrieve the pending data and then put it together as one so do you know how we would do that you're asking me yeah I think I think you have all the tools that you need well talk through it so we update the parameter and we get something back in the bottom yeah and we can save that as an environment or whatever kind of variable right right we can then call that same request again either by duplicating that request and changing that parameter and then you would create some sort of secret right some sort of script to combine the response yeah so you can either have two requests and then change the up change that parameter maybe or save that environment variable information or you can actually mutate oops you can mutate the current environment that's being started the current request that's being sent and you can use a different postman sandbox function called postman dot set next request to call itself so if there was five different statuses you could mutate the same request and and call itself and then mutate call itself and then you just update the object or whatever view that you want to output at the very end so that's one way to do it another way to do it is if you had five statuses just create five requests that all say a different parameter and then just aggregate it the same way would you create another collection to aggregate them sorry yeah so the way that we're using this collection right now this is zooms API reference it's 300 requests we're only like pedaling around with five of them right here but for Nick's special registration dashboard create that as a collection so this is API reference but you actually want a different kind of workflow right so you can either create a folder that runs in this big gigantic 300 requests collection or you can yeah so there's a bunch of ways to skin this cat you know from how you run these requests to how you structure your collections and the world's really your oyster all right Nick is there anything else you wanted to talk about or get done with this particular project before we move on to community shoutouts I think this is exactly what I was looking for and before we go to community shout out can we give Joyce a round of applause here for walking me through a bazoom API I mean again for hours versus one hour like that was super helpful thank you that's a function of the documentation and the API you know like we could have gotten stuck early on and then it's like any developer knows anybody working with API knows you can get stuck at any different there's all these pitfalls so it's really by chance yes okay so I have one more final question for you Nick now that you know how the zoom API works and knowing that you're a very very busy person are you gonna ask Nikita to build you this collection or are you gonna build this collection and it was pretty easy to do I think I could do it probably within 15 minutes that's all like you said like you I think the more that you do it like the more like muscle memory you build you just gotta be in it like day in day out to be like really good thinking of it agreed agreed um the send button is muscle memory checking the authorization checking every tab that hasn't been green which means like hey look under me I have something under params I have something under headers it's getting familiar with the layout and knowing where to go even the console a lot of people don't know about the console gives you a lot of visibility so kudos kudos Nick you did it I wasn't sure you would make it I thought you were getting cold hey there's a question from API evangelist here what was the hardest part I didn't think any of it was like particularly difficult I wish I had I wish I knew like the PM calls a little bit better so thank you yeah like that part I think I could probably use maybe a separate tutorial on yeah PM docks are actually pretty good and I personally use like 5 p.m. functions all day and then there's all these other ones that if I know that it exists then I can go looking for how how to get it done all right okay so the very last thing I do want to talk about is next week I think we have a special guest our Lemmy has a special guest and he's going to be talking about gaming specifically working with api's in gaming along with I won't announce who our special guest is but we do have a special external guest next week so that's gonna be very very exciting and the other thing is we've been streaming about like every week on Thursdays we're going to start doing at least once a month Tuesday office hours so if you have homework questions or you had you're working on like say your zoom and you're like I don't know how to do this in postman or is there a better way to do this kind of thing you can bring your questions to our lemme and I or our lemme and me I don't know what what's grammar but um we're gonna have open office hours so you can just ask us your questions if you're like hey you guys have never showed us monitors please show us how that works and I'm stuck on a monitor or like debugging will be here for that so that is the community shout out and the community shout out is actually for our Lumi cuz he gave a huge huge webinar our let me still here lurking somewhere in the background but he gave a huge postman 101 webinar where he introduced some people that were new and just kind of showed them the tips and tricks so I think they're gonna be forming a community or something our lemme if they have some website or some like splat group or something like that go ahead and post it in the chat but otherwise part of why I like doing twitch is because you guys get to talk to each other and meet each other so that's all I had that's say goodbye see you guys bye [Music] [Music] you
Info
Channel: Postman
Views: 2,844
Rating: 5 out of 5
Keywords: software development, API
Id: aMG8cFp3sq8
Channel Id: undefined
Length: 78min 35sec (4715 seconds)
Published: Fri May 29 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.