From the course: Advanced Python: Practical Database Examples

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Call a new API using Postman

Call a new API using Postman

- [Instructor] Let's test our API. While we were able to make requests to the get endpoint using the browser, most of the time, we'll be using a special software to make API requests. In this case, we'll be using Postman, which is an API platform designed for developers to build and test their APIs. We can install it from the Postman website. Once it's installed, we can set up a collection that contains templates for each of our endpoints. Let's create one. We'll click new, collection. We'll call it Book APIs. Then we'll create a request to our POST API. You can left click on the collection or click the three dots. Add request. We'll call this one Add Book and save it to our collection. Notice it defaults to a get request, so we'll change it to post. For the request URL, we'll use the same host we used in the browser. The main difference is the route. So that's 127.0.0.1 at port 8,000. Then…

Contents