In this blog, we will learn how we can create API's through Postman
With Postman's version 7.1, they have introduced the most exciting feature in the API development and testing industry, i.e, the ability to create an API in Postman itself. This feature is very handy for testing and development purposes. In this tutorial, we will learn how to create an API in Postman.
If you are completely new to Postman then I have a complete
Postman tutorial. It's a series of 6 videos and hope that will be
helpful
Postman has this feature where in you can create APIs.While creating API's you can also create the API schema.A schema in general is a computer science term which means an outline,blueprint or a layout of something.
I have a separate blog on what is API and
what is API Schema.Links below
1) What are API's
2) What is API schema afterall
In Postman terms, schema, like I said above, means creating the
structure of the API. i.e to say, what parameters and different
values it will take and contain. With the schema support in
Postman, user can
create their APIs, edit the APIs, or import the schema from outside Postman. (say you created a schema using Swagger and
then you have the schema on your local machine).
The most
important purpose for using the schema support is that the user
can escape the usage of different tools to perform these
operations. Postman can be used as a single software for all of
the tasks like a one-stop shop for all. There is support for RAML,
WADL, and OpenAPI types.
All in all, above tabs are quite handy for developing a
complete API and can be customized according to your need.
Now, let's take our userdetails api we created above forward.
In this section, we will see how to create a API in Postman. So if
you scroll above, in Point 2, I created a
userdetails api. For this tutorial, I have created an API
specification for your use using Swagger.I have put the schema for
your use in my github link.
user details schema.You can download userdetailsapischema file and copy the
contents and paste it in define tab .
Above schema is based on OpenAPI scpecifications. OpenAPI
scpecification is a separate topic all together and I may cover it
in a separate blog in future.For this tutorial, I will just
describe what the userdetailsapischema depicts. Basically,
through this schema we are telling that we have a:
I have a separte blog on Postman Mockserver.The blog actually
covers differences between Postman Mock server and JSON
server.Link below
Postman Mock Server
To conclude,we can say that using this approach we can create a new API within minutes. We also created a mock server. Through mock server one can also achieve Dummy responses (Develop Section). Postman in a way is gaining momentum because it has become kind of one stop shop and is kind of a complete package from where users can design,create an API and deploy it in mock server.