by  inflectra.adam Wednesday, June 10, 2015
This article describes the process and provides an example for accessing the Spira v4.2 REST API to get a filtered list of test cases in a release.

In this example we use the Rapise REST testing capability to access the Spira v4.2 REST API.

The first thing to do is open up the Spira v4.2 REST API documentation and then navigate to the POST method for the Release-TestCases resource. The GET method would allow us to let a simple list of all the test cases in the release, but when we want a filtered list, we need the POST version:

Now we can create a new Rapise REST service and enter this URL and associated parameters:


You can see that we've parameterized all of the querystring variables. We have also entered a valid user login and API key as credentials. If you click the SEND button it will display a green success message:

Now we need to specify that we want the data back as JSON (JavaScript Object Notation) rather than HTML or XML and also we'll specify (in JSON format) the filter. We shall filter the sample project's test cases by "Name" contains the phrase "book":


When you execute this test you'll get back the data in JSON format:

The full test in Rapise looks like:


The full Rapise sample web service test project is attached to this article.

Attachments

Selected files will be attached to any email sent on saving ticket.

file selected files selected  () Delete Selected

  • Created:
  • by:

Select files to upload

Or drag and drop files here

Uploading …
Done!
Upload More?
There was an error.
Try again?

Save to upload the selected file(s)

Article Info
  • Last Updated: 6/10/2015
  • Article ID: KB158
  • Views: 2874