If you are developing an API, you must know about Postman. Postman is a very useful tool for testing APIs along with your team of developers. The software makes it easier to run all the necessary tests before publishing the APIs.
Postman launchpad
Postman launchpad is the collection of features that you can use right from when you open up the app. You can create individual requests, create API, API collection, and environment.
Create API – Postman
Creating API makes it super easy to develop API. Just click the ‘Create a new API’ from the launchpad and it’ll open the following dialogue box asking for the basic information regarding the API.
Enter the API name, version, Schema type, and Schema format.
Once the API is created, it’ll be listed in the sidebar. Click the API to perform actions on the API.
Create a Postman schema. To easily create APIs endpoints, Postman creates a test Schema by default. Change it to create the URLs as per your project demands.
After the schema is ready, generate collections by clicking the “Generate Collections” button as highlighted above.
This will generate the collections of routes. As you can see in the image below, there is a collection of task manager api.
Clicking each URL will allow you to customize your request, and send it to the server. You can change request’s parameters, send auth credentials, custom headers, body data etc.
Once the request is sent, the output returned back from the server is previewed below.
Download & Install Postman on Linux
Postman is availbale for all major platforms including Linux. Download the tar file from the official website. Uncompress it and run Postman.
Install Postman snap
If your distribution supports snap apps, you can install Postman from snap store. If your Linux distribution does not support snap apps, then install it using the following command –
On debian or Ubuntu based distributions –
sudo apt install snapd
Install snap on Fedora distributions –
sudo dnf install snapd
Install snap on CentOS –
First install EPEL repository.
Install EPEL repository on CentOS 8 –
sudo dnf install epel-release
sudo dnf upgrade
sudo dnf install snapd
Install EPEL repository on CentOS 7 –
sudo yum install epel-release
sudo yum install snapd
Enable snap communication sockets
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
Install Postman from snap store
Or install postman snap from command-line –
sudo snap install postman
The post Postman – Make APIs development faster & easier appeared first on LinuxAndUbuntu.
from LinuxAndUbuntu https://ift.tt/32Pt0T7
0 Comments