Using the Rational® ClearQuest® OSLC CM REST API

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.

If you are familiar with Rational® ClearQuest® OSLC 1.0, you are able to upgrade to the OSLC 2.0 APIs. There are some important differences:
  • 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. To request RDF/XML content, use this request header.
    Accept: application/rdf+xml 
    You can request more than one content type in the Accept header. For instance,
    Accept: text/html,application/atom+xml
    You can also request content by using the rcm.contentType parameter.
    GET http://quagmire.rtp.raleigh.ibm.com/cqweb/oslc/?rcm.contentType=application/json
    The value of rcm.contentType is always used if supplied, no matter what value is present in the Accept header. However, it is best to use the HTTP Accept header for compatibility with other OSLC-CM providers. If no content type is requested that uses either the Accept header or rcm.contentType, RDF/XML is returned.
    Note: If you want to use RDF/XML, Rational® ClearQuest®strongly recommends using a library for parsing RDF such as Jena, a Java framework for semantic web applications. This is easier and less error-prone than trying to parse responses as XML.
  • You no longer must use a special content type to request standard OSLC field values. Rational® ClearQuest®OSLC 2.0 RDF/XML and JSON responses contain both standard OSLC ChangeRequest properties and Rational® ClearQuest® (CQ) field values.
  • You must include all field values in a PUT request, not just the fields you want to update, if you don't set the
    oslc.properties
    parameter. See Working with Records: PUT.
  • CQ OSLC 2.0 has a different query URL for each record type. The rcm.type parameter is no longer required for queries.
  • Many namespaces and parameter names are changed. See the OSLC-CM 2.0 Specification.
Note: You can use the ClearQuest® OSLC 2.0 CM REST API to programmatically run all ClearQuest® functions except adding an attachment to a record. In Rational® ClearQuest®, you must use the Rational® ClearQuest® OSLC 1.0 CM REST API to add a record attachment.
Note: For more details, see the OSLC 1.0 and OSLC 2.0 wiki.