Found 75 Articles for REST API

How to Build a REST API with Fastify?

Mukul Latiyan
Updated on 22-Jun-2023 13:21:46

1K+ Views

Fastify is a framework that is mainly designed to do backend development in JavaScript. It is one of the lightest backend framework that one can work with, and it is one of the main reasons why it is preferred if you want to avoid the heavier node frameworks like Express and Hapi. Since its inception, multiple versions of Fastify have been released. In the latest version, we get the capability to even verify the incoming and outgoing requests as well as the request parameters. It might not come as a surprise that the people who developed Fastify claim that it ... Read More

How to Implement Validation for RESTful Services with Spring

Satish Kumar
Updated on 28-Apr-2023 10:40:29

99 Views

As more and more applications move towards a RESTful architecture, it becomes increasingly important to ensure that the data being exchanged between the client and the server is valid. In this article, we will look at how to implement validation for RESTful services with Spring. What is Validation? Validation is the process of checking that the data being inputted or returned is valid and conforms to a set of predefined rules. These rules can be simple, such as checking that a field is not empty, or more complex, such as ensuring that a credit card number is valid. Why is ... Read More

What is Rest Assured?

Debomita Bhattacharjee
Updated on 08-Feb-2022 10:07:35

8K+ Views

Rest Assured is used to verify the REST APIs with the help of the Java library. Java library acts like a headless client to act upon the Rest web services. The libraries based on the Rest Assured library are also capable of validating the HTTP responses from the server.Response status code, body, message, headers, and so on can be tested with the Rest Assured library. It can be integrated with build tools like Maven, unit test frameworks like JUnit and TestNG. It has an efficient matching mechanism with which we can verify the expected results.Application Programming Interface or API acts ... Read More

How to create a PUT request in Postman?

Debomita Bhattacharjee
Updated on 14-Sep-2023 01:41:28

28K+ Views

A Postman PUT request is used to pass data to the server for the creation or modification of a resource. The difference between POST and PUT is that POST request is not idempotent.This means invoking the same PUT request numerous times will always yield the same output. But invoking the same POST request numerous times will create a similar resource more than one time.Before creating a PUT request, we shall first send a GET request to the server on an endpoint:http://dummy.restapiexample.com/api/v1/employees.On applying the GET method, the Response body obtained is −Now, let us update the employee_salary and employee_age for id ... Read More

How to parameterize requests in Postman?

Debomita Bhattacharjee
Updated on 18-Nov-2021 12:46:04

7K+ Views

We can parameterize Postman requests to execute the same request with various sets of data. This is done with the help of variables along with parameters. A parameter is a part of the URL used to pass more information to the server.The data can be used in the form of a data file or an Environment variable. Parameterization is an important feature of Postman and helps to eliminate redundant tests. Parameters are enclosed in double curly braces {{parameter}}.Let us take an example of an URL:https://www.tutorialspoint.com/index.htm. We shall create a variable as URL then use it for parameterization of the request. ... Read More

How to create sessions in Postman?

Debomita Bhattacharjee
Updated on 18-Nov-2021 12:41:59

409 Views

A session is a temporary fold that stores values of variables. They are used for the present instance and have a local scope. In Postman, we can modify the session variable value to share workspace among teams.Postman gives the feature of local session share. Even if a Collection can be shared among teams, the sessions are never shared. Different tokens have to be generated while a task is to be carried out in a team structure.A session has a local scope for a user within his Workspace and any modifications he makes shall not be reflected in the server. In ... Read More

Test and Collection Runner in Postman

Debomita Bhattacharjee
Updated on 03-Aug-2021 14:38:03

379 Views

We can have checkpoints to verify the Response from a request. This is done by adding scripts in the Tests tab. These scripts get executed if the request has executed successfully.The scripts added under the Tests tab are developed in JavaScript. After a request has been sent and a Response is received, the outcome of these test scripts are reflected in the Test Results tab in the Response. The passed tests are marked ingreen and the failed tests are in red.Input the below tests in the Tests tab −tests["Status Code should be 200"] = responseCode.code === 200 tests["Response time lesser ... Read More

Disadvantages of Monitors in Postman

Debomita Bhattacharjee
Updated on 03-Aug-2021 14:34:35

452 Views

Though Monitors in Postman have many features, it has some disadvantages as well. However, it is up to the end user if he should consider these features as drawbacks for Monitors.Disadvantages of monitors are listed below −Postman Monitors are non-functional provided the Postman server resides in the same server where we are. Thus it makes it difficult to determine the performance of a Collection in a different network.To solve this problem, we need to buy the Postman pro-version. On doing so, the Postman shall then give us another IP address with which we would be able to execute Monitors.Postman Monitors ... Read More

Analyzing Monitor Results in Postman

Debomita Bhattacharjee
Updated on 03-Aug-2021 14:32:11

123 Views

Once a scheduled Collection Monitor gets triggered, we have to analyze the results. Click on the Monitor name available under the Monitors tab.A new window opens in the browser that shall redirect to the Postman account that we are signed in.If we analyze the performance graph of the API in the above image, we see the red bars which depict tests have failed for the request. A green bar points to the fact that tests have passed. On hovering on a particular bar, we shall get date, time, Response time and the percentage of test result for a particular run.Also, ... Read More

What are Postman Monitors?

Debomita Bhattacharjee
Updated on 03-Aug-2021 14:29:38

662 Views

Postman Monitors are used to ensure that the performance and the Response obtained from an API are being maintained properly. Monitors are scheduled on a regular interval of minutes, hours or weeks for the entire day.The steps to create a Postman Monitor are listed below −Step 1 − Click on the arrow symbol to the right of the Collection name. Then click on the Monitors tab.Step 2 − Click on the Create a Monitor button.Please Note −  we have to Sign in to a Postman account in order to create a Monitor.Step 3 − Provide an input to the Monitor ... Read More

1 2 3 4 5 ... 8 Next
Advertisements