Give your Network a REST with Postman

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey everybody and welcome back to net DevOps live my name is Hank Preston and joining me today is Kevin schweiber he is a solution architect with postman and he's here to help us all understand how we can use this wonderful tool to experiment and leverage the REST API in our network automation platforms as always during today's session if you have any questions please use the question panel built into the webinar tool I'll be gathering them up during Kevin's presentation and then at the end we'll have a bit of time for a tech chat so we can go through those questions and answers as they go in if you're looking for the content from today's session you'll be able to download the slides and access helpful links for learning materials as well as code samples in other places where you can learn more and get hands-on with postman without further ado I'm gonna hand it over to Kevin to get us started hi thanks everyone as Hank said I'm Kevin's fiber with postman I've been in the API space for about 10 years and using API is for I guess almost twice as long so super happy to share some of that experience with you today so as our CEO and co-founder Abhinav says every piece of software built today either uses an API or is an API if we take a look back at some of the history over the last 20 years even we can see this this emergence of API into the state they are today going back into the 90s there's there's early work happening around RPC over the network that starts to morph a little bit as we hit the the dot-com bubble and we see companies like eBay for the first time realizing that their website goes down and transactions stop happening and so really this this new generation of Internet companies starts to push some concepts forward that eventually get adopted by the enterprise and we see propagate all over the place today so you know in in 2002 Amazon has this mandate that says every piece of data or behavior that a team creates within the organization needs to be exposed via some kind of service interface in 2006 we see Twitter as a public service company release its API so you know these are sort of like early milestones that have led to today and today I mean I've worked in in organizations where there are there are API is running on the manufacturing floor their API is running in oil rigs their API is of course running in the data center so really it's it's a fairly exciting time and and certainly that's the where postman comes in at post man we've seen so these are these are numbers that we have internally based on on usage of of the posting product so in 2019 we had 4.7 billion requests come through the product which is pretty large and that that's more than 10 million users on the platform more than 500,000 organizations are on post minutes a day everything from from early-stage startups to large enterprises and it happens to be one of the largest communities of developers today one way to look at the growth of AP is and the the significance of API is over the years is to look at the consumer side of things and that's really where postman sit says an API consumer and a tool for API consumers at least initially we've seen some some movement towards the producer side as well just good but if we take a look at the number of collections that are created in postman not only is this sort of a sign of product adoption but it's also an indicator of the popularity of API right so fortunately postman was introduced at a time when the the API craze was a pivot point and and we've seen it escalate so today the the numbers here don't really matter as much as sort of the curve that I'm showing but today we're we're looking at almost 35 million collections in postman today and as I mentioned earlier we've seen this across all sorts of industries in use cases these are all folks who used postman that we know about who have signed up for accounts but you know it it really crosses every section of business you know it worked in in the mortgage industry which was you know a fairly mid stage a doctor of api's in various forms I've worked in in health care you know and and certainly being in a a product based business around api's have seen api's everywhere of course you know retail IOT as I mentioned and of course in sort of like lower level infrastructure stuff as well so as we see you know a shift or an expansion of resources moving to the cloud there's tons of tooling in there that is now API centric sort of two sides of API lifecycle here there's the API consumer side there's the API produce your side you know most of what we'll be looking at today is going to be on the consumer side on the left but the producer side is is still fairly significant as well the the interesting about this is that they obviously tell you in to each other you know as API is are designed and tested and published the consumer side needs to sort of be working in tandem right so we can take a look at how to do some of that stuff today actually as the producer side is is building and testing how do we as consumers go in and begin testing our code against that okay I'm going to run through a few demos here and I'll just give you sort of a high-level overview right now so we're gonna take a look at the postman product look at running requests importing collections and so the different features around that and then we'll come back and talk about managing workflows through that writing tests and then some of our collaboration of version control features let me move over to postman so if you use postman before you've seen the screen similar to this this is sort of the launch pad that you get when when you start up and over the years lots of you know lots of icons have been added to the screen lots of options have been added as the products has expanded but the core focus has always really been about how to easily make an HTTP request over through the postman product so to really get started with postman it's helpful to understand a few things about HTTP HTTP if we take a look typically someone will come in here and just type in a URL we're gonna use the postman echo service which is just sort of a simple test service it's cent and we get a response a couple of things worth noting here again I said I've been in the HTTP space for a while so you know that there's a lot of nuance behind some of these every HTTP request has a method that comes along with it get in this case just retrieves a resource these different methods have different properties around them so usually we talk in terms of safety and idempotent so safety being if this call makes a change on the server mutates some kind of state will say that that's an unsafe call and if this particular call is repeatable without changing the state we'll say that's an idempotent call so if you do sort of a little a little research into HTTP methods some of this becomes a bit clearer but you know again is a retrieval action it's it's safe it's idempotent you can do it a bunch of times a post is is not safe we expect some change to happen on the server and and it's not idempotent so you can do multiple post requests and potentially expect different results a put request we expect some kind of change on the server but you can do it repeatedly right so in most people leaves this for sort of a replace call so I want to replace this particular resource with this request body we won't go through all of these but obviously delete is is unsafe as well because we're we're aiming to delete a resource so some of those HTTP basics are very helpful to understand when using this when using any kind of HTTP client for us today we'll mostly just be using it with a little bit of post every HTTP request obviously has a URL as well I usually talk about sort of three pillars of web api's and and you are eyes here unifor s-- uniform resource indicators or in this case a URL Uniform Resource locator is is one of those pillars so we have an identity for something out there that we're talking to that's representative but it's represented by the CRI HTTP is another pillar so we talked about request methods and there's a bunch of more that we'll talk about around HTTP today and the third one is sort of media types and for our purposes we're going to be looking at sort of just plain jason that we have here so walking through this a bit we have a request we're making a request every request can have optional query parameters so in their authorization obviously very important when it comes to api is making API calls there are several different options we can we can do here we won't go through all of them basic auth can be common though many things are moving over 200 off to here in the in the request portion that we're looking at right now we can set request headers or a request body as well which we won't have a get request but we'll look at some of that a little bit later and well we won't dive too deep into this right now it's it's worth it to mention and touch on postman has a concept of scripting that's built into it for for various automation tasks there's an opportunity to do some initial setup before a request goes out and that would happen in a pre request script tests allows you to actually make assertions against the response that you're getting it also adds an opportunity to add some some post response functionality as well that we'll look at and of course settings are sort of per request here and that there's a few things in here but mostly we'll just leave the default settings so other things sort of in this request screen worth looking at there's cookies if you're using cookies a lot of times in REST API eyes we don't but there are definitely a lot out there that that will so it's good to have that option one really interesting part one really handy part of postman I think is our cogeneration opportunities so if we click this code link over here you can see there's a number of different libraries and formats that we can we can pull snippets from everything from raw HTTP to using curl on the command line you know JavaScript PHP Python this allows us to very easily just come in here and do a copy paste it into our IDE and start making requests if we scroll down and look at our response pane a couple of different options for for looking at the the response we're using sort of a purified version of our JSON response again various response headers that we can take a look at and then there's test results which we'll get to as well actually a fairly cool feature is this save response option so you can either save this to a file or save it as an example we'll look at how that could be beneficial in a bit so that's sort of an overview of some basic request functionality when fairly early on in postman we realized that the requests are great it's great to have all this functionality at the request level what happens when we have a bunch of these what happens when we have an API that we want to to model to share and and the solution to that was to to create a container for for a bunch of requests in something called collections and we'll see that collections is now sort of the the primary unit of work within postman in general so if we take a look at the sidebar over here there's a collections tab and go to a new collection we'll just take a look at some of these descriptions are possible for each collection and we'll see this in a number of different places in postman each of these will just will support markdown this feeds into documentation actually which we'll take a look at authorization can be set at the collection level as well and then inherited by those requests that are a part of it again we have pre request and test scripts that can sit at the collection level and variables which we'll also get into I think this new orange button over here we can see a few of the different entities that are possible to be created within postman again we talked about requests and collections environments are a handy use of storing variables and sharing those between collections there's API documentation mock servers monitoring a fairly new concept that we have called api's which bundles a bunch of these resources together we have the idea of an API network you can see that cisco definite is a featured partner here on our api network these are going to be bundles of sort of like curated api's curated by the api producer and offered over our network we're now we're going to pull them a template called postman we'll hit this runnin postman button and then we'll import it over here you see that it has 37 requests collections have the opportunity to add folders as well for for further organization if I mentioned so what we can come in here and take a look at some of this I mentioned that documentation was was an option so it was see that this collection has a description associated with it this request has the description associated with it so if we hit this arrow over here and view and web we can actually see the documentation that's generated by all of us and this is something that can be shared within your team as well well once here there's also editing features commenting features there's this goes quite a bit deeper but again our home basis is always collections so we talked a little bit about why you might want to use a collection organization documentation test Suites and conditional workflows well it will actually run through what test Suites and conditional workflows might look like as well and they think that's actually our second demo so we'll we'll take a look now that we have a collection what do we do with this collection how do we how do we execute conditional logic how do we put things into a collection run to run multiple requests at a time and then how do we make assertions against what we're getting back great so first let's start talking about tests why might you want to test some tests are very basic like I want to make sure that the schema I'm getting back from this API called matches what I expect especially if I'm writing from a consumer perspective if I'm writing an HTTP client that's gonna speak to this server I want to make sure that the response of getting back is something I can actually work with and so they I'm expecting to work with so we'll see in this request there's already a few tests that are happening if you look at the response pane down here we can see that test results are running with with each request execution we'll see here that there are certain things like making sure that the status is a 200 making sure that the the response has some expectations there so we're actually gonna go through this and write a small script just to give an idea of what that might look like so earlier we had a request where we had foo equals 5 here as part of this echo service we take a look at the response body you can see that these query parameters JSON response and that's buried under args and in this case foo is 5 so we can make an assertion that says you know I once to ensure that food equals 5 from the response body this place what we're writing the scripts is called the postman sandbox it's executed in sort of an isolated environment here and it's fed certain functionality so p.m. is is a way to access certain functionality in that postman sandbox p.m. tests you know States this is a test that we want to execute and look at our results in our test results so we you start by writing a test we can have a variable here called body that pulls in the response and converts that to Jason's as we know it's Jason and then we can have certain expectations the expect syntax is coming from a library called chai je s that has a number of different features associated with it we do have some documentation in the postman Learning Center but the documentation is a lot more complete on chives official website so we can say p.m. dot expect Rani Park Zoo to equal five and so this is some of the the choice syntax again setting the second saying we want from our body our zoo to equal five we can run that I only actually see we have a test failure here assertion error expected five as a string to equal the number five so using some some JavaScript here can use the parse int function on this to turn it from a string to a number and then we see that pass other than sort of schema validation like this there's conditional validation that can happen as well and you know well some of this in complex scenarios can be fairly easy to automate by sort of feeding a schema and saying make sure this schema matches this body the conditional stuff still often requires a bit of programming so we can say let's do when will say when foo equals five we expect another property called bar to equal hello world so we'll say so my bar is present and who is five so again we'll grab the body and we'll get so again a fluid this and food equals five funny that arcs that far if we run this now we should see it failed since we don't have bar obviously bars is not in the body and we didn't pass it in the query string to echo out we do it again we'll see that that test is past scripting can can get um you know a bit more complicated than this for example what if you want to take a value coming back from this response and feed it into a new request we can actually go through and we make a new folder here under the collection but now I will save this into definite great and then I'll just duplicate a post request and pass that into here great so what if we want to take the value of bar and from this get request and post it in a subsequent request this is actually where variables come in handy we have variables at various layers here there's variables you can set on the collection there are global variables that you can set within your your postman instance and then there are environment variables when it comes to sharing out collections a lot of times there are variables that will live at the end level you can think of in terms of like API keys and security but it's more than just security a lot of things might depend on that specific execution environment and and so that's where the environment comes into play we saw when we looked at the details of a collection there's a variable section if we look at the top right over here we see that there's also a constant of environments we hit this little cog we can manage environments add a new end safe net and we'll have a variable here called bar and we're gonna actually set this programmatically as we've come back to our request and we can do p.m. dots p.m. Docs variables set parts [Music] oh okay obviously let's see grab this we want to set our body [Music] so let's set our environments always important remember to set your environment here and let's write one handy thing over here is the sort of the snippets that we can do to get you started so you can see I was actually using the wrong the wrong variables collection here so if I go to p.m. that environment that set I can set that to bar and then set this now let's try that again if that looks like it passes if you look at our definite environment we should have a variable here bar with the value hello world so again this is a way to hold values hold data as we work through various flows we move this post request over as well to our definite folder so we can do things like go to the request body we'll set this as Jason and now what this request will be we'll take the body and it will echo it back from the request to the response our there's a variable interpolation syntax here that can work through various parts of our request in this case where we're saying we want to insert the bar variable and this will actually look at the different scopes that we talked about and find like what is the the topmost bar and put that in there if we send that request along we should be able to see in the response we have data bar hello world so that went through successfully we very quickly jump over to the postman Learning Center and look at the docs to learn more about this we can go into variables and environments and using variables and again in here there should be something about variable scoping that we mentioned and it will kind of show you like you know takes precedence environment collection global here we go there's a kinds of local there's a concept of iteration data that will will briefly touch on environment collection global so many different places to set variables yeah now that we have sort of a small work flow going here we can actually come through and hit this collection details button and click run and this will open up our collection runner and so through the collection runner you can actually run the entire collection execute all of the tests and give you a report back or you can go through and select a folder select individual request we're gonna select our definite folder that we created a few different options here an environment that you want to pick we don't this definite environment that we set up that has that that bar variable you can actually have it run multiple indoor iterations with a delay in between and I mentioned that that data scope for variables that data scope for variables can come from iteration data and so say you have a CSV file you know with a bunch of sample data that you want to run through this is where you would feed it in we want to keep our variable values and we'll run this okay we'll see that the tests associated with each of these requests has run we have a run summary we can actually export these results and beyond that you know it's it's one thing to be able to do this within postman but there's some automation opportunity here as well and for that we have a CLI tool called Neuman and we won't go we won't go deep on Newman but you can take a look at it and you know see how people are using it as a CLI they're using it in CI CD pipelines it at its core it's basically just a way to run collections so you can set an environment to it you can set global variables to it you point it to a collection and say ok execute that and give me the results and there's number a number of different reporters that come back or that are available you can get a response in HTML you can get a response you know in in JSON format and the reporters a little bit actually extensible and so there's there's some extra ones out there's one that that creates something for confluence perhaps so something we're looking into if you're doing some automation around collection runs I think that concludes our second demo they actually wanted to talk about was collaboration and version control so you know say you're you're starting to do some of this you're starting to play around with some collections you've got some perhaps some documentation that you want to share how do we how do we collaborate around this how do we communicate around these different assets so let me close the collection runner here I guess one of the first things worth mentioning is that collections are shareable so every collection if you hit the ellipsis here for for more actions you can go to share collection you can share it in a workspace which is a container of work that houses collections and environments and other assets as well you can actually embed it we click that run and postman button earlier you can actually put that on the website and say hey click this and it'll actually open the collection in postman or you can get a public link and share that out as well workspaces can be either team or personal so every account on postman comes with a personal workspace we start expanding into a team that team itself can start owning workspaces that you can share them on different team members so who were to create new had a name we can select team or personal and once you're actually in a team you can invite specific people to this particular workspace by default everyone on the team can view and join us a collaborator you can change that to an administrator so they can actually make Changez just about everywhere or you can say I don't want this to be shown to the rest of my team I want this to be a private workspace share only with the people who I've explicitly invited so Leon that there's also this this cool activity fee that you can go in through and see who on your team has made updates recently we can see kindliness done something Trey has done something there's there's a concept of roles as well we won't get into you but you can set you know various roles for editing for access administration and actually a cool feature that I like is if you're on a team you're sharing things you want to make changes you can come through here and actually create a fork of collections and fork that into a particular workspace you can actually fork into your own personal workspace if you want and what the spork will do will allow you again to make those changes independent of what's upstream here so you're not impacting everyone else so say we wanted to add another request well I have another request here well we'll save it we can come through and then there's a couple of things we can do we can just say we want to merge these changes or we can create a pull request and what this pull request will allow is for other folks on the team to actually go through and review what the changes are request that we can select a reviewer and then take a look at the changes so what's so every collection actually has a JSON representation to it which allows us to do things like sharing you can export a collection to adjacent file and share that and so you can actually put collection files into your your source control repository so you can do dips on collections that can actually be a little bit cumbersome because as we've seen there's a lot that can go into a collection one benefit of using this model here of going through postman and doing Forks and merges and pull requests is that we get semantic dipping so we can take a look and see that Oh a new request was added in this case right and see that oh yeah tests have changed and the body has changed and the description has changed instead of looking at different changes so this actually ends up being very handy you can create pull requests again we and that that's for view you can also just come in and say ok now that I'm done here I want to merge these changes so this is actually a very powerful piece of doing teamwork clothes come through we can see that that request is propagated over to the original collection so I guess one last thing to mention is that there are there's the ability to to add comments as well this is again another collaboration feature so comments can happen on the request level you can do tagging of folks to give them notifications if we looked at documentation earlier if we go to do this on the web again we can see that comments can be made on various sections here and in the documentation as well so as you go through the product if you'll you'll see these little comment boxes and again this this is to add this the sort of team collaboration around every aspect of your API or an API that you're working with and so we've we've seen let me hit play here we've seen a couple of different aspects that we've gone through today of postman in the API platform that's provided we've touched on a few of these things there's there's a lot more one very deceptive thing I think is is that you you start postman perhaps not deceptive but surprising is that you could start postman working with just a plain request and as your needs grow there are actually features there to support those needs so you know oftentimes we have folks who are using the product we're using requests in collections getting all of their needs met doing that and then you know suddenly realizing that even though they're there they feel like they're a power user there's actually a lot more involved we we didn't touch on things like like mocking saving examples monitoring there's there's a lot more here and so to further that education and get some support postman has a learning journey that we looked at the docks a little bit there there's a lot there there's also our community forum at community dock postman comm which is fairly active we monitor that ourselves from postman and we also have lots of community participation there so you'll see folks from the community actually answering questions in addition to asking questions we have a YouTube channel with a bunch of different videos on there for teaching how to use the product here we see in this particular screenshot it's showcasing the postman visualizer so in that case you can make a request to get a response and turn that response into something more visual we can work it with like graphs or charts and that's particularly handy so you can find more information there we've just started a Twitter stream with Joyce and our Lemmy from our team it's going really well it's interesting to watch people go through and interact with api's and hit problems and solve them in real time any questions after this you can always feel free to reach out to me personally on twitter at kevin Swiper or postman directly at get postman so thank you very much I'm gonna hand this back over dank excellence great job Kevin that was really helpful um I think I liked the most about the presentation was seeing an expert in postman highlight the things that you see is valuable one of the things we've done in dev net for a good long time is every time we teach a REST API for one of our network platforms I'm postman has always been our go-to so I've been using postman for a long time back in the days when it was still like a Chrome Web App was kind of when we first started using it and in going through but there's all of these these new pits and one of the ones I wanted to talk a bit about was the sharing of collections and so I write labs we do video lessons on how to use things and my go-to model for sharing a collection out has always been to kind of like export the JSON and then included in a git repository and that cot that that piece you showed of like providing a URL and all those other ones how does that work like I I picture the collection like exists on my my laptop and like in my client that some that's there but but when I share it off through the system like where's it all coming from is it just included with the postman account like where are these all being stored yeah so when you have a postman account everything that you're working on gets synced with our cloud so you know which is great so you can switch computers and then still get all of your collections right but it also allows for things like the running postman button that we saw so essentially that's a way to embed that sharing experience and again as you mentioned that public link is gonna point to that collection representation in the cloud awesome so that's that's nice and so if we if we give the links out and then we as we update our collections people that are using those links or they kept in sync so if someone were to import a collection from me using my link and I make changes does it is it like a at that point a shared collaborated collection or would they have to go really important know kind of by design that link is going to point to that collection at that moment in time to just sort of prevent drift right for like a real collaborative experience like that it's helpful to you have folks on the same team within postman being able to use the the fork and merge and pull request features that I showed before so and again you can certainly do this through git and JSON files again that semantic difference or then going through and saying oh like these two Jason fields changed like what happened here and that was one of the ones that I did like so on that I think a lot of a lot of folks probably use the personal or the free account from postman as it goes in and one of the things I was trying to figure out is over your demo particularly around some of that collaboration and the fork in the merging are those features that come in when you move to like a team account in postman so yeah I'm not I'm not sure how deep that goes you can't have a free team I don't know what the the different governance or limits are on there but you should be able to do everything I showed with a free team today okay you can take a look at the postman plans and pricing page to get a sense of what the various paid tiers would offer on top of that yeah I definitely want to look at that because it was one of the as you were going through the the sharing and updating it was like well why wouldn't I just store this off and in our gitlab instance that we host internally for our systems or some of our public repos are in github and then that semantic diff where I was like that's that's the reason like being able to have the context around what changed just was huge for those one of the things that that I was trying to go through and maybe you can help I've often used environment variables and so I often will set up in an environment and then fill that within with all the variables and pieces that are there and I don't use collection variables very much when you when you work with folks how do you recommend to somebody what to make an environment variable versus a collection variable and then somewhat related I'm still getting confused on the whole initial value versus current value with variables and and trying to track what do you switch should I set if I'm trying to set the value of something yeah so to answer your first question between collection variables and environment variables again we usually say things like like API keys and security related stuff should go into an in the environment and not on the collection particularly because collections get shared a lot more than environments and those things will change depending on who the actual user is right so that actually that last bit depending on who the user is if you have a value that changes depending on the consumer then that probably belongs in an environment not on the collection level there are certain workflow things that you can do that makes sense to have on the collection level for instance we have sort of an advanced ability to pull in any node module and use a node module in scripting and we sort of store a representation of that node module in collection variables that's something that might make sense to live on the collection side because it's not going to change between every single user and there's actually a little bit of overhead in acquiring that so if we can save that on the collection level share that collection out it saves time for other folks you're actually going to use so on collection and environment variables you mentioned there's this this option of current versus initial value and if you go through the the Preferences in postman you'll see an option there that says something like persist variables by default a lot of times folks when I will wanted to shut that off especially when we're talking about the environment side because what that means when that's on and is on by default is that the last value that you set for that particular variable gets synced with the server right so the updating the current value will actually update that initial value and so if you were working with API keys or something like that you definitely don't want to be persisting that to the cloud right so the initial is gonna be like what do you start with and if it's something that is a secret it'll typically be like a placeholder that Sileo this is a secret and the current again is what you're actively using so we saw that in my demo I set an environment variable in a script that would update the current value if that sync option was on it would also then go ahead and update the initial value so that that that section and preferences is important to look at so so so when I'm using tests to update values and environment variables like a cookie or a token or something that came back or UUID the value that the test is updating is always the current value it's never gonna go through an update and the only way to update the initial value is it that persist function yes so either you can you can have the option on the state persist by default which is it is on by default more you can manually go through and hit a persist link that's in there so typically I turn that option off in in the general settings and for those variables that are those values that I do want to persist back I'll go through and I'll hit persist um yeah just just from a I guess I'm a little bit more paranoid on the security side so that that makes me feel better nothing wrong with some some security barrier we had a couple of questions coming in through from the audience and this was an interesting one that Newman CLI tool was a new one for me as well someone commented that it's the coolest name ever I got to get with that one that's definitely a nice pop up someone asked is it possible to run just one request in a collection using the CLI and I can't remember if you cover that in the demo piece or not but if I want to use Newman can i target in on just a single request or is it going to run an entire collection hmm I'm the CLI I'd have to double-check but I I recall it only working on a folder level not necessarily the request level so you can say I want to run the entire collection you can say I want to run these folders in the collection and I think that's as deep as it goes on the CLI side I believe in the UI you can select single request and say hey I want to run this single request but you know again the the idea behind the collection runner behind Newman is that typically I want to run a set of requests right there's some kind of workflow that I'm executing here so often that that ends up being more than one request there might there might be a way to do it with Newman and I just don't know about it but going to you know github.com slash postman lab slash Newman I would file an issue there and it's pretty heavily managed so if somebody will get back okay awesome now I think we have to spend a little bit of time talking about the whole I'm scripting inside a postman there was a question that came through prayer requests scripts and testing is it a separate ecosystem of libraries can you import some some no and testing framework we do a lot of conversations around things like robot and then there's um PI tests and PI 80s which are Python testing frameworks for the network I know postman is JavaScript basis and so that's that that's an area where network engineers like myself have to kind of get ourselves - any suggestions on for somebody that may be fairly new to development and scripting and coding at all but most of the time has been spent kind of in the Python world we've got some of the links that have shared in there but is there is there a can you help us dispel the fear a little bit of a JavaScript's now in addition to Python and then maybe PowerShell or something else that they're trying to figure out yeah so the good news about JavaScript and in my opinion anyway said it feels very much like a scripting language right it feels very much it has kind of a similar feel to it as like writing bash script like writing Python you know things are kind of dynamic you can make little tiny scripts but also like it can also explode into this really large complex application that you can build right so if you think of the scripts in postman as being more towards that that scripting side that you know sort of less heavily managed like less you know less application architecture around it right it's it's more just a script I think it's a little easier to to get started there's plenty of resources out there and learning JavaScript note school is a fairly good one and of course many more courses out there the with nodejs being so popular and really postman uses nodejs just sort of kind of a sandbox version of it to run your scripts it's easier now than ever to just go and run and start like pull down node make a couple scripts run them and see how that goes so I would recommend just just playing around it's how I learned best anyway is just getting my hands dirty and playing around those things looking at some examples that are out there and starting from that is also probably very helpful for postman we have a bunch of examples we saw that there are when you hit that new button there are templates out there for various collections a lot of those collections are actually teaching how to use scripts within postman so you'll you'll see things like how do we have variables on you know multiple iterations of a collection run things like that so that there are resources within postman to go do that as well if you go through the postman Doc's you can see some built in libraries that are there so we'll have things for like scraping HTML you know doing schema validation for Jason this is stuff that that's sort of built in I mentioned a way to sort of go out and fetch our JavaScript libraries from NPM that's that's kind of more on the advanced side but that there's a lot that can be done just with what's out of the box so I would take a look there first always and then if you know the if there's a barrier and you do need to pull in another testing framework or something that that you would typically use I would take a look at there's a template out there called browserify CDN so BR o WS e RI FY and that template shows how to pull in modules from NPM so you can pull in testing frameworks you can pull in utility libraries anything sure and I think that it definitely gives me an idea that that's an area where we in Devon it can probably help with our specific audience of network engineers that are out there maybe write a couple of our learning labs to kind of show good use cases and build some tests around some of our network automation API is there there so for those listening here look for that I'll see if we can I can wrangle one of our engineers up to go write us some pieces because we do have a handful of folks that are pretty good in the JavaScript land because it's much more heavy in the collaboration world than in the infrastructure network engineering spot mhm alright one last question and then we're gonna kind of close down because the time is flown by there was a question about future plans for a postman to have a Mac OS app now I know that it already does have a Mac OS F because I run it on my my laptop that's there but there was a question about using postman from a web browser and other pieces which and so the the way I'm going to phrase it to you is which platforms can I run postman on like where is postman available and there it used to be the first place I used postman was when it was an app for Chrome and then with Google changing the capabilities that were there it kind of went away is there a web web enabled version of postman that may be out there that I haven't seen or is that something that the team is looking at to kind of make it so it's available without having to install a full application yeah so postman started as a Chrome extension as you mentioned so back in 2012 and and today due to some changes we are starting to deprecated that so right now though the way to get postman is running as a native on Windows Mac Linux we are right now experimenting with something we're calling Project Artemis to run this in the web as well so I mentioned that all of this stuff actually gets synced with our cloud assuming you have an account you know so in our in our hopefully near future we'll be able to log into the postman dashboard and be able to go through our collections and execute that stuff right right in the web without having to have any downloaded app experience fantastic all right so we'll have to all look for that as it comes through yeah all right we are at the top of the hour here any final thoughts for our audience today Kevin no just thank you so much for having me I love working with api's so that that's why I work at postman you know happy to answer any questions about doing that going forward thank you so much for having me excellent wonderful all right well thank you again on behalf of our entire community I'm gonna go ahead and get myself set up so that we can close ourselves down all right everybody we have come to the end of another episode here of net DevOps live but we are certainly not done with our discussions on postman as mentioned we've got the slides that Kevin went through as well as links to learning labs code samples a few videos and pieces that are there some of the ones from post man's resources as well as links back to some of the resources we have up on dev net as well so please check out the webinar resources for today's episode to find access to all of those details now you you knew it was coming our code exchange challenge and net that ups live is not just about listening to other people code but also getting out there and using these skills yourself so let's everybody pick your favorite Cisco REST API and then go build and share a postman collection make sure to include some gifts and posts and deletes we've got so many REST API s and then the definite family maybe you're an enterprise networking guy go tackle e the programmability capabilities of DNA Center or maybe you're a data center focused a CI has long had a REST API that's there and a new tool and platform that I've recently started playing with and I'm really enjoying is the whole sd1 ecosystem and the V managed api's so pick one of those right up build a collection and share it with the community I'm have helped everybody out goes in now if you are looking for more information about net DevOps in general we have a ton of great resources we've got the home page for net DevOps developer dot cisco.com slash net DevOps or then add a slash live to view all of the net DevOps live episodes that are there we are in our third season so we have tons of material that you can binge to catch up on all of the great topics and programmability now be sure to join us next week we're coming to the end but we're not quite there yet so we've got episode six next week when Jeremy stretch from network to code is going to join me to talk about net box and source of truth and and who would have thought I'd have been this excited to just talk about IP address management and a data center infrastructure management but they really are core to enterprise-grade kind of automation strategies this is definitely when you don't want to miss and if you do have more questions be sure to stay in touch with all of us you can find me at H a presto at Cisco calm both WebEx teams and email and I'm H F Preston up on Twitter and then be sure to follow Cisco definite on all the social medias at Cisco dev net we'll find you on Twitter and Facebook and Instagram and all of the places that are there with that thank you so much again for joining us for today's episode and we will see you next time talk soon [Music] you [Music]
Info
Channel: Cisco DevNet
Views: 1,406
Rating: 5 out of 5
Keywords: Cisco, DevNet, netdevops, network automation, rest api, api, postman
Id: VkA4WdluS4Q
Channel Id: undefined
Length: 57min 45sec (3465 seconds)
Published: Wed May 06 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.