Do you think IIT Guwahati certified course can help you in your career?
No
Introduction
This blog will learn about the rest requests in Ready API. We will see the rest request configuration and how these requests are made in ReadyAPI. We will learn about the different parameters passed in the request body to access the rest requests.
Ready API is a REST and SOAP API automation tool. It is an integrated suite of applications for API testing. It helps in functional testing, virtualization, and integration. It is an easy-to-use tool for the development team. It makes the process easy and reliable.
What are REST Requests?
Rest requests are used for testing the restful services. To configure the rest services, you send the request to a service, and the rest API shows you a response in the response panel.
This is the first window that appears when you open the REST API.
To open the request editor first, import your previous project or create the new one. Then select the required request in the navigator panel.
Click API request when you want to edit REST Request.
What URL Consists?
The above image is the URL of the request parameter in the Ready API.
It has several variables like endpoint, resource, and parameters.
Endpoint: It generally has the HTTP or HTTPS request with the port number.
Below is the syntax in which an endpoint is given in the request.
<protocol>://<host>:<port>
Resource
The path to a RESTful service to which the request will be made. Template parameters are used in the resource bar.
Parameters
A parameter editor is used to specify the query.
A query string that has query parameters with specific values.
Configure Parameters
In the parameter editor, you have the option to modify and configure the request parameters.
There are different ways in which you can configure the parameters.
You can add or remove some parameters.
The parameter type can be changed.
Parameter values can be modified.
Advance options can be selected. You will learn about this later in the blog.
Rest Parameters
You can organize the parameters in the following ways.
Add Parameters
For adding the rest API, click the ➕ symbol. This will add a new line in the parameters table. Don’t forget to mention the parameter name and its value.
When you have the rest URL, you can add the parameters using that URL. Enter the URL in the dialog box, and ReadyAPI will automatically analyze the URL and add the parameters to the table.
Reset Parameters
To reset parameters to their default value, click this symbol. This will reset the values to default.
The parameters that are manually added do not have any default value.
Reorganize Parameters
For changing the parameter order click or . If the parameters are on the same level and same type, Ready API uses them in the same order.
Remove Parameters
To remove the parameter, use the symbol ❌.
Confirm that you want to delete the file.
Configure Advance Options
To configure advance options, click on the advance options bar to navigate more to advance options.
To check the proper configuration of WADL files, use these options to check if the parameters are properly passed.
Option
Explanation
Level
There are two levels in the parameters. Resource level and method level. At the resource level, methods are applied to all the child classes, whereas the method level is specific to the method.
Required
If the required tag is selected, ReadyAPI adds the parameter to the string even if the parameter does not have any value. The default value is pass.
Types
It sets the parameter to XMLSchema.
Options
The extra data added to the parameter can be seen in the options list.
Disable Encoding
The parameter is not encoded when disabled encoding is selected.
Description
A description of a parameter is given. It does not affect the response.
REST Request Properties in Ready API
These properties define ready API behavior towards different request properties.
There are various rest request properties, and some of them are described below:
⚡Max Size
The maximum responses that can be saved.
If you receive 0, then all the responses are saved.
⚡Name
The name of the request is given in the parameter.
⚡Encoding
In the charset header, the encoding type is added.
⚡Endpoint
The URL contains a port number in the resource path. It does not have any underscore.
⚡Follow Redirects
The server message is returned if it is true. Otherwise, the redirect message gets popped up.
⚡Follow 302 Redirect with GET
If the response has the 302 found http request, the Ready API redirected to the get method for every request.
⚡Description
The brief introduction of the request.
⚡Username
The username that is provided for the service. Built-in profiles are used so that there is always a new username for a new service.
⚡Remove Empty Content
It is applicable for a file that is in XML format.
Ready API uses this property when it is true to remove empty elements from the response.
⚡Password
The password that is provided for the service. Built-in profiles are used so that there is always a new password for a new service.
⚡Timeout
The time in milliseconds is required to get the response. If the time gets exceeded, it is said that the request fails, but when the value that is received is 0 or not specified, then the wait time is infinite.
⚡Dump File
The path for the files where responses are saved.
⚡Bind Address
The IP address by which Ready API sends the request.
⚡SSL Keystore
HTTPS requests use the SSL Keystore.
⚡Strip Whitespaces
It is applicable for a file that is in XML format.
As the name suggests, it is true. It removes the whitespace from the elements and attributes.
⚡Entitize Properties
It is used by the Ready API when it is true to add special characters.
For example. & get changes to &
⚡Multi-Value Delimiter
When the same parameters are passed in the request, the multi-value delimiter is used at that time.
⚡Pretty Print
When true, Ready API displays the indentation of XML data of responses.
⚡Authentication Type
For the configuration of SOAP, REST, gRPC, GraphQL, or XML-RPC requests, authorization profiles are used. Different methods are there for authorization.
Configuration of REST Request Parameters
A parameter is an argument you can pass to the request. Ready API supports several parameters like
Query Parameters
It passes the data to the server in the form of key-value pair.
It is passed at the end of the URL.
Get separated by ? and from each other by &(ampersands).
After giving the request to the server, the server responds to you according to the query it receives.
Template Parameters
These are often called path parameters.
They accept the parameter with a specified value from the specified option.
It works only on the resource level.
It can work on the method level, but it is not recommended because then you have to manage it manually.
Header Parameters
They add as a part of the HTTP header.
They pass data through request headers.
Matrix Parameters
Matrix parameters get to add at the end of the resource path.
Matrix parameters are not commonly used.
Their addition will not affect the response you get to this request.
Plain Type Parameters
These are used in API parameters to omit some parameters when not in use.
When you send the request, the plain parameter gets omitted.
In Ready API, the plain type parameters are used for omitting parameters without deleting them.
You can retrieve them back when needed.
Frequently Asked Questions
What is Ready API?
Ready API is a REST and SOAP API automation tool. It is an integrated suite of applications for API testing.
Is Ready API open source?
No Ready API is not available in SOAP UI open source.
What is an API, and why is it used?
API stands for an application programming interface. It is used so that there can be an interaction between the two applications.
What are the four types of API?
Web-based applications commonly used these four types of API. These are named public, partner, composite and private.
What does REST stand for?
REST stands for Representational State Transfer. REST is better than soap for CRUD operations.
In this blog, we have learned about the REST request in Ready API. We look at how these REST request in Ready API works. We further look at the different types of REST requests that are made in Ready API.
To learn more about Ready API please refer to our blogs