This page is maintained for older versions of Rapise only. The latest documentation can be found at: https://rapisedoc.inflectra.com
REST Definition Editor

REST Definition Editor

Top  Previous  Next

Screenshot

report definition editor

 

Purpose

The REST Definition Editor allows you to edit REST web service definition files (.rest).

 

How to Open

Use the Add Web Service Dialog to create a new REST definition (.rest) file.  The definition file will be opened in a REST Editor in the Content View.  The REST Tab of the Ribbon will also open.

 

Or, you can double-click on an existing .rest file in the Test Files View explorer window.  The definition file will be opened in a REST Editor in the Content View.  The REST Tab of the Ribbon will also open.

 

Request

report definition, request

The request form has several sections that you need to populate:

  • Method - the type of HTTP request being made (GET, POST, PUT, DELETE, etc.)
  • URL - the URL of the web service request with any parameter tokens included (e.g. {session_id} in our example above)
  • Credentials - Any HTTP Basic Authentication Headers
  • Headers - Any other HTTP headers (both standard and custom)
  • Parameters - Any parameters that have been defined in the URL that will be called from the Rapise test script.
  • Body - The body of the request (for POST and PUT requests). This can be in any text-serialized format such as XML or JSON.

Response

Response Headers
Response Formatted XML
Response Formatted JSON

This displays the output from the last web service request. It has several tabs:

  • Response Header - Displays a list of the HTTP response headers (name and value). If the request received a 200 OK code back, it's displayed in green, if it receives an error code back, it's displayed in red.
  • Response Body - Displays the raw text of the HTTP response body received from the server.
  • Formatted XML - If the received body content is identified as XML, this tab displays nicely formatted XML that is easier to read than the raw response body.
  • Formatted JSON - If the received body content is identified as JSON, this tab displays nicely formatted, indented JSON that is easier to read than the raw response body.

Operation Explorer

report definition, explorer

This section lets you add, open, delete and clone REST requests in the definition file.

  • Add request - Adds a new REST operation to the current .REST definition file
  • Open request - Opens the currently selected REST operation in the current .REST definition file. This is the same as double-clicking on the item name.
  • Clone request - Makes a copy of the currently selected REST operation and allows you to give the copy a new name.
  • Delete request - Deletes the currently selected REST operation from the current REST definition file.

See Also

· For more info on REST Web Services, see REST Web Services.
· For a tutorial on creating a REST web service test, see the Web Services REST Tutorial.