You can create REST URIs to run queries.
About this task
To create a REST URI to run a query:
Procedure
- On the Rational® ClearQuest® Web
toolbar, click the arrow next to New Change Request and
select New REST URI. The New REST URI wizard
opens.
- Select Run a query from the REST
URI Type list.
- Select a query from the workspace display in the Select
a query field.
- Optional: To add Rational ClearQuest Web
logon parameters to the REST URI, select the Automatically
log in check box.
- Optional: To include the banner, workspace tree, and main
toolbar in the window that opens when the REST URI runs, select the Include
the banner, workspace tree, and main toolbar check box.
- Click Create. The
REST URI template appears in the REST URI Template field.
- Copy the template into a text editor and replace the placeholders,
enclosed by double curly brackets {{ }}, with appropriate values.
Optional: Change the default format for the resource request
from HTML to XML or ATOM.
- Copy the modified template into your web application or
another Web browser window.
- Click Reset to create a new REST
URI template or Close to exit.
Example
Example
The following REST URI template to
run a query was created by using the New REST URI wizard. In this
example, the check box Automatically log in was
selected to create the REST URI.
http://CQWebServerHost/cqweb/restapi/YourConnection/YourUserDB/QUERY/QuerySpecification?format=HTML&loginId={{loginid}}&password={{password}}&noframes=true
The
variables and template placeholders have the following meanings:
- CQWebServerHost
- Web address of your ClearQuest Web server host. This value is
defined when the REST URI template is created.
- YourConnection
- Your ClearQuest connection. This value is defined when the REST
URI template is created.
- YourUserDB
- Your ClearQuest user database. This value is defined when the
REST URI template is created.
- QuerySpecification
- The query specification that you selected in the Select
a query field.
- format
- The default format for the resource request is HTML.
You can change the format to XML or ATOM,
if desired.
- {{loginid}}
- Replace this placeholder with your logon ID.
- {{password}}
- Replace this placeholder with your password.
- noframes
- If this value is true, the ClearQuest Web banner,
workspace tree, and main toolbar do not appear when you run the REST
URI to view the resource. The noframes filter is
relevant only if format=HTML.