Creating New API Request

You can create and send an API request using the following options:

Sending a Direct API Request

To send a direct API request, perform the following actions:

  1. On the Home page, under Projects, select the required Project.

  2. Select Design Studio. In the Element Repository page, locate the Create Folder (+) icon.

  3. Select Create Folder (+) icon and select Create new folder to create a new folder for element repository. A new folder is created.

  4. In the New Folder text box, enter the element repository folder name.

  5. In the newly created folder, select Ellipsis (...) icon > Create Repository > Webservice to create the repository.

  1. 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.

  2. In the Enter URL text box, enter the API endpoint URL.

  3. 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 required and you can ignore it.

  1. Select the Append checkbox if you want to overwrite new configuration details onto the existing configuration during a resend or update process.

Note: If existing request details are not overwritten during a resend or update, the previous configuration remains unchanged.

  1. Select the send button to execute the API request.

After executing the API request, you can go to Response tab to view the result. To learn more, click here.

  1. Select the save button to store the configuration as a Webservice element.

The saved element can be used while creating API Test Cases.

Sending an Advanced API Request

To send an advanced API request, perform the following actions:

  1. The initial setup for an Advanced API Request follows the same process as Direct API Request (Steps 1–9). After completing those steps, you can configure the additional components such as headers, body, parameters, authorization, and certificate as described below.

  2. Select the Header tab and then enter the API Header details.

  3. Select the Body tab and then enter the API Body details.

Note: The Body tab is only applicable for POST and PUT HTTP requests.

  1. Select the Params tab and enter the Query Parameters or Path Parameters as required.

  2. 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:

  1. 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:

  1. In the TYPE dropdown, select the Basic Auth option. 

  2. In the Username text box, enter the Username. 

  3. In the Password text box, enter the Password. 

OAuth2.0

To configure OAuth2.0 authorization, perform the following actions:

  1. In the TYPE dropdown, select the OAuth2.0 option. 

  2. In the URL text box, enter the URL. 

  3. In the Client ID text box, enter the client id. 

  4. In the Client Secret text box, enter the client secret. 

  5. In the Scope text box, enter the scope. 

  6. In the Grant Type text box, enter the grant type. 

  7. Select the Generate Token button to generate the token. 

Bearer Auth

To configure Bearer Auth authorization, perform the following actions:

  1. In the TYPE dropdown, select the Bearer Auth option. 

  2. In the Bearer text box, enter the bearer token. 

Api Key

To configure Api Key authorization, perform the following actions:

  1. In the TYPE dropdown, select the Api Key option. 

  2. In the Key text box, enter the key. 

  3. In the Value text box, enter the value. 

  4. From the Add to dropdown, select the required option such as Header or Params. 

  1. 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. 

    • In the Auth Username text box, enter the username. 

    • In the AuthPassword text box, enter the 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. 

  1. After completing all required configurations, select the send button to execute the API request.

After executing the API request, you can go to Response tab to view the result. To learn more, click here.

  1. Select the save button to store the configuration as a Webservice element.

The saved element can be used while creating API Test Cases.

Last updated

Was this helpful?