
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 76 Articles for REST API

721 Views
The Postman Console can be opened from the Postman application View menu Show Postman Console. Or using the shortcut Ctrl+Alt+C.Postman Console WindowInitially the message – No logs yet gets reflected in the Postman Console. There is an option to search for logs in the Console. We can clear all previous logs with the Clear button. Also, we have the option to filter all the levels of the Logs like Error, Log, Info and Warning from the All Logs dropdown.Every network request sent gets logged in the Postman Console. Once a request is sent, we can get the Response Body, code, ... Read More

1K+ Views
The Pre-Request Script is used to run a JavaScript prior to the execution of a request. By incorporating a Pre-Request Script for a Collection, request or a folder, we can execute precondition steps like defining a variable, Parameters, Headers, Response, or logging console output.We can include a Pre-Request Script to set the order of execution of requests within a Collection. A Pre-Request Script can also handle a scenario in which a value yielded from the request one has to be fed to the next request or the value yielded from the request one has to be processed before moving to ... Read More

281 Views
We can set a Test in Postman with JavaScript method. In Postman, a test executes provided a Request is successful. This is because a test is created to include checkpoint and validate various parameters of the Response.Tests implemented in the JavaScript method are written within the Tests tab.Add the below JavaScript test −tests["Verify Response Time"] = responseTime > 600The tests is a variable of type array which can store data types- integer, string, Boolean and so on. Verify Response Time is the test name. The responseTime captures the time taken to obtain the Response.Select a GET request and enter an ... Read More

781 Views
We can run Collection Runner in Postman with the help of the below steps −Click on the Runner menu in the Postman application.The Collection Runner window gets launched.Click on the Collection name from the section – Choose a collection or folder.Choose an Environment from the Environment list box and enter the number of Iterations. Also, we can set a delay time in milliseconds.We have to select a file type from the Data field if we are utilizing data from a file. Then click on the Run Collection1 button.The Collection Runner result page gets opened. The tests get triggered as per ... Read More

2K+ Views
This Postman Cheat Sheet is based on the official documentation page of Postman (which is available in the below link) and from the overall knowledge on Postman −https://learning.postman.com/docs/getting-started/introduction/a. VariablesAll the variables can be set up manually from the GUI of Postman and they have a defined scope. The values of the variables can also be set with the help of scripts written under the Pre-request Script or Tests tab.The variables can be added in the request URL, Headers and Body in the format as {{}}.Usage in request URL −https://{{domain}}about/{{id}} Usage in request Headers(key-value): X-{{key}}:valueUsage in request Body −{"registration_id": "{{Id}}", "firstname": ... Read More

468 Views
We can integrate Postman with Newman and Jenkins. Newman is used to verify and execute a Collection. To integrate Newman and Jenkins, we have to follow the below steps −Step1 − We have to complete the installation and configuration of Jenkins. The steps to perform this task is discussed in details in the below link −https://www.tutorialspoint.com/jenkins/jenkins_installation.htmStep2 − We have to install npm and Nodejs. For installation of Nodejs can be done from the below link −https://nodejs.org/en/download/current/Step3 − The npm is allocated with Nodejs so once we download the Nodejs, the npm gets downloaded automatically.Step4 − We have to install Newman ... Read More

890 Views
While executing a Collection, the requests are run in the same sequence as they appear in Postman. Let us have a Collection with at least two requests. To trigger them for execution, first click on the arrow appearing to the right of the Collection name in the sidebar. Then click on Run.Collection Runner pop-up comes up. The RUN ORDER section shows the order in which the requests shall get executed from top to the bottom. (GET->POST->DEL->PUT). Click on the Run Collection1 button.Execution Results show the GET request executed first, followed by POST, then DEL finally PUT, as specified in the ... Read More

412 Views
We can set Tests using the Functional method in Postman. A test in Postman gets executed only if a Request is successful. In case a Response does not get generated, the test does not to validate it.Tests implemented in the Functional method are written within the Tests tab.Add the following verification using the Functional method within the Tests tab −pm.test["Status Code is 401"], function(){ pm.response.to.have.status(401) })Here, pm.test is the function. Status Code is 401 is the test name which shall be displayed in the Test Result tab after execution. The pm.response is used for getting the Response ... Read More

778 Views
We can set multiple Tests for a Request in Postman with JavaScript method. A Test in Postman gets executed only if a Request is successful. In case a Response does not get generated, a test does not to validate it.Tests implemented in the JavaScript method are written within the Tests tab.Add the following JavaScript verifications within the Tests tab −tests["Status Code should be 200"] = responseCode.code === 200 tests["Response time lesser than 10ms"] = responseTime

731 Views
There are different parameters available in Newman. Newman's command to list down all options is − newman run –h. Options in Newman is grouped into categories listed below −UtilityBasic setupRequest optionsOther Misc. OptionsUtility-h, --help – displays usage information.-v, --version - displays version number.Basic Setup--folder [name of folder] – points to a folder in Collection for execution.-e, --environment [name of file| URL] - points to an Environment in the form of JSON file.-d, --iteration-data [file] – mentions a data file to utilize either csv or json.-n, --iteration-count [number] – specifies the count of iterations to.Request Options--delay-request [number] – configures delay in ... Read More