Search code examples
clearquest

Is there a way to use ClearQuest REST API with automatic login disabled


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


Solution

  • 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.