1

I am trying to use the ClearQuest API to run and get the results of a public query. Automatic login is disabled. Is there a way I can login via a post request or something? If I can't use the REST API will the Perl API work?

Edit: I have recently found OSLC. It looks something like a rest API, but the docs say its not a rest API...
I have found I can use it to access some resources on ClearQuest because it uses http basic authentication.

I am now trying to find out how to use it to run ClearQuest public queries

2 Answers 2

2

I am still very confused about the purpose of the OSLC URL and the regular rest URL

The "Using the Rational ClearQuest OSLC CM REST API" (9.x) does mention:

The Rational® ClearQuest® OSLC 1.0 and OSLC 2.0 REST API is a RESTful (Representational State Transfer) interface that adheres to the Open Services for Lifecycle Collaboration (OSLC) 1.0 and 2.0 Core and Change Management (CM) specifications.

Rational ClearQuest OSLC 2.0 XML responses are now RDF/XML. A library for parsing RDF makes these responses much easier to work with.
Rational ClearQuest supports RDF/XML (application/rdf+xml) and JSON (application/json) content for all resources.
For queries, Rational ClearQuest supports Atom (application/atom+xml), and for records, it supports HTML (text/html).
Content is negotiated by using the HTTP Accept request header as defined in RFC 2616

This differs from the Rational® ClearQuest® REST API which allows developers to interact with Rational ClearQuest by using HTTP based REST APIs, and necessitates to launch the Rational ClearQuest REST API server.

So the latter is a legacy ClearQuest specific API.
While the former (OSLC: Open Services for Lifecycle Collaboration) is a mean to support key product integrations, as explained in CQ OSLC 2.0 wiki page.

That wiki page has an Authentication and Authorization section:

Clients must authenticate with the server using Basic HTTP Authentication as specified by RFC 2617.

1

I was able to use run a saved public query using OSLC. It seems that "OSLC" like rest API that wasn't developed by IBM, but was integrated in with ClearQuest. The URL schemas are vastly different between the OSLC API and the ClearQuest API, so you'll have to poke around a bit.

i.e. the ClearQuest public query had a URL of "/cqweb/restapi/9.0.1/GETS/QUERY/{{query path}}" and the OSLC had a URL of "/cqweb/oslc/repo/9.0.1/db/GETS/query/{{query id}}"

The OSLC API did not follow a hierarchical query/file structure and only went by ids.

1
  • I am still very confused about the purpose of the OSLC URL and the regular rest URL. I am also confused why the IBM docs kept linking to jazz, and where they fit in with OSLC Commented Aug 29, 2022 at 3:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.