Creating New WebService Request
You can create and send WebService request using the following options:
Sending Direct WebService Request
Use Direct API Request when the API does not require complex configurations. It allows you to quickly send a request using only the basic details such as the endpoint URL and HTTP method. This option is useful for simple API calls where no additional authentication, parameters, or certificates are required.
To send a direct WebService request, perform the following actions:
On the Home page, under Projects, select the required Project.
Select Design Studio. In the Element Repository page, locate the Create Folder (+) icon.
Select Create Folder (+) icon and select Create new folder to create a new folder for element repository. A new folder is created.
In the New Folder text box, enter the element repository folder name.
In the newly created folder, select Ellipsis (...) icon > Create Repository > Webservice to create the repository.

From the Select dropdown, choose the required HTTP method:
GET: Used to retrieve information or data from the specified resource.
POST: Used to submit data to the server to create a new resource.
HEAD: Used to request response headers only without the response body.
PUT: Used to update or replace an existing resource with new data.
DELETE: Used to remove the specified resource from the server.
PATCH: Used to apply partial updates or modifications to an existing resource.
In the Enter URL text box, enter the API endpoint URL.
In the Operation text box, enter the mathematical operation.
Note:
The Operation text box is used only when performing API testing for SOAP based services.
As per the requirements, you can specify the value as Add, Subtract, Multiply, or Divide in the Operation text box.
When you are performing API testing for REST based services, then the Operation text box is not applicable.

Select the Header tab and then enter the API Header details.
Note: When you select a specific body format (such as JSON, XML, or form-data), Avo Assure automatically adds the corresponding Content-Type in the Header tab. You do not need to enter this header manually.
Select the Body tab and then enter the API Body details. Here are the different types of body format:
none
The none is used when the API request does not require any data in the request body.
To use the none body format, perform the following actions:
In the Body tab, select the none option.
Note: Use this body format when the request does not require a payload.

form-data
The form-data is used to send data to the server as key–value pairs. It works like a digital form where each field has a name (Key) and the corresponding information (Value). This method allows you to send both text data and files (such as images or documents) in the same request, making it useful for APIs that require file uploads along with other data.
You can send the data in two ways:
Key-Value Edit
Bulk Edit
Note:
You can customize your table using the following table options:
Manage Columns: Select the vertical ellipsis (⋮) icon to show or hide specific columns, such as Value, and Description.
Delete Rows:
To delete a row, hover over it and select the Delete row icon that appears.
Select the checkbox, and the Delete button appears. Select Delete to remove the row.
You can also select multiple checkboxes to delete multiple rows at the same time.
Sending Key-Values
Key-Value Edit allows you to define individual parameters for text and files. Following are the two ways to send the key values:
Text
File
Sending Key-Values Using Text
To send text data using the form-data body format, perform the following actions:
On the Request tab, select Body.
Select form-data.
In the Key column, enter the key name.
Select the parameter type as Text from dropdown.
Note: You can only select the parameter type (Text or File) after you add the Key name.
In the Value column, enter the required key value.
Enter the description in Description column. (Optional)
Note: You can add multiple rows to include more than one text parameter in the same request.

Sending Key-Values Using File
To upload a file using the form-data body format, perform the following actions:
In the Request page, select the Body tab.
Select form-data.

In the Key column, enter the key name.
Select the parameter type as File from dropdown.
Enter the file path or upload the file in the Value column.
Note: To know more about uploading files in Segregated Avo Storage location, click here.
Enter the description in Description column. (Optional)

Sending in Bulk
To enter values in Bulk Edit mode, perform the following actions:
In the Request tab, select Body.
Select form-data.
Select Bulk Edit next to the Description column.

Enter the key name and its value in the request body.
Note: If you enter the request data in Bulk Edit mode and then switch to Key-Value Edit mode, the system automatically displays the same data in the selected format. You do not need to enter the data again. The same applies when switching from Key-Value Edit mode to Bulk Edit mode.

x-www-form-urlencoded
The x-www-form-urlencoded is used to send data to the server as key–value pairs. It works like submitting a simple web form where each field has a name (Key) and the corresponding data (Value). This format is typically used when the API needs to receive structured text data but does not require file uploads.
To use the x-www-form-urlencoded body format, perform the following actions:
On the Request tab, select Body.
Select x-www-form-urlencoded.
In the Key column, enter the key name.
In the Value column, enter the key value.
Note:
You can use this format to send simple text data only. Avo Assure automatically encodes the key-value pairs into a single string before sending the request.
You can customize your workspace using the following table options:
Manage Columns: Select the vertical ellipsis (⋮) icon to show or hide specific columns, such as Value, and Description.
Delete Rows:
To delete a row, hover over it and select the Delete row icon that appears.
Select the checkbox, and the Delete button appears. Select Delete to remove the row.
You can also select multiple checkboxes to delete multiple rows at the same time
To change the display format, refer the steps given in form-data.

raw - JSON or XML
The raw (JSON or XML) is used to send structured data in a specific format such as JSON or XML. In this method, you provide the entire request body in the selected format. It is commonly used when an API expects well-structured data to create, update, or process information on the server.
Sending JSON Body Request
To use the raw - JSON body format, perform the following actions:
On the Request tab, select Body.
Select the raw option.
Select JSON from the dropdown next to raw.
In the text editor area, enter or paste your JSON payload.

Sending XML Body Request
To use the raw - XML body format, perform the following actions:
On the Request tab, select Body.
Select the raw option.
Select XML from the dropdown next to raw.
In the text editor area, enter or paste your XML payload.
Select the Save button to store the configuration.
The saved element can be used while creating API Test cases.

Select the Send button to execute the API request.
Note:
After you save the request, the Send button becomes enabled.
After executing the API request, you can go to the Response tab to view the result. To learn more, click here.
Select the Append checkbox to overwrite the existing configuration with the new configuration details during a resend or update.
Note: If existing request details are not overwritten during a resend or update, the previous configuration remains unchanged.

Sending Advanced WebService Request
Use Advanced API Request when an API requires additional configurations before sending the request. These configurations may include parameters, authentication details, headers, or security certificates. This option allows you to define and manage these settings to ensure the request meets the API’s security and validation requirements.
To send an advanced API request, perform the following actions:
Follow Steps 1 through 10 from the Sending a Direct API Request section to set up the basic request.
Select the Params tab and enter the parameter and its value as required.
Select the Authorization tab and select the required authorization from the TYPE dropdown. Here are the different types of Authorization:
No Auth
To configure No Auth authorization, perform the following action:
In the TYPE dropdown, select the No Auth option.
Note: When the API does not require authentication, then you can use the No Auth option.

Basic Auth
To configure Basic Auth authorization, perform the following actions:
In the TYPE dropdown, select the Basic Auth option.
In the Username text box, enter the Username.
In the Password text box, enter the Password.

OAuth2.0
To configure OAuth2.0 authorization, perform the following actions:
In the TYPE dropdown, select the OAuth2.0 option.
In the URL text box, enter the URL.
In the Client ID text box, enter the client id.
In the Client Secret text box, enter the client secret.
In the Scope text box, enter the scope.
In the Grant Type text box, enter the grant type.
Select the Generate Token button to generate the token.

Bearer Auth
To configure Bearer Auth authorization, perform the following actions:
In the TYPE dropdown, select the Bearer Auth option.
In the Bearer text box, enter the bearer token.

Api Key
To configure Api Key authorization, perform the following actions:
In the TYPE dropdown, select the Api Key option.
In the Key text box, enter the key.
In the Value text box, enter the value.
Note: When you provide the token, add the prefix JWT before the token and include a space between JWT and the token.
From the Add To option, select Header or Params from the dropdown.

Select the Certificate tab and do the following:
In the Path text box, enter the certificate path and certificate key (optional).
In the Password text box, enter the certificate password.
Select Submit button to finalize the API request setup.
Note: If you want to change or update the configured data, you can select the Reset button.

Select the Save button to store the configuration.
Select the Send button to execute the API request.
Select the Append checkbox to overwrite the existing configuration with the new configuration details during a resend or update.
Last updated