What can we help you with?
< All Topics
Print

Introduction to Rest API

What is REST?

  • REST stands for Representational State Transfer.
  • It means when a RESTful API is called, the server will transfer to the client a representation of the state of the request.
  • REST is an architectural style for developing web services. REST is popular due to its simplicity and the fact that it builds upon existing systems and features of the internet’s HTTP resource.

Add a request as a step:

  • Enter name in Request Name text field, URI in request URL text field.
  • Select an option from the Request Type dropdown and the options of this dropdown are GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD as shown in the below screen.

  • Click on the “send” button. (To save a web service request, one should at least send a request).
  • After getting the Response, Click on the “Save as Step” button, then Save API Request as Step popup is prompted.

  • Provide name in the name text field. (Which will be prefilled with the value of the Request Name text field of Rest API page).
  • Select an option from If Failed checkpoints. The options of this dropdown are:
    • Mark this step as Failed and continue script execution.
    • Mark this step as a Warning and continue script execution.
    • Mark this step as Failed and stop script execution.
    • Mark this step as Failed and stop current module execution.
    • Mark this step as Failed and stop current Suite execution.
  • Provide a proper pass message and fail message in the Pass Message text field and Fail Message text field (these text fields by default generate a value based on the Name text field).
  • Then click on the “Save or Save & Continue” button to add the API request in the steps.
  • Once the web service request is added, the user will receive a success banner.

Table of Contents