Is it possible to search for an RRC artifact via REST API using the artifact ID as a parameter?
that searches a project area for an artifact with ID 35, but it returns an error:https://server.com/rm/views?oslc.query=true&projectURL=https://server.com/jts/process/project-areas/_TIhVZLhvEeKto8qW7nvWBw&oslc.prefix=dcterms=<http://purl.org/dc/terms/>&oslc.select=*&oslc.where=dcterms:identifier=35
<rdf:RDFxmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:err="http://jazz.net/xmlns/prod/jazz/foundation/1.0/"><rdf:Description><err:detailedMessage rdf:datatype="http://www.w3.org/2001/XMLSchema#string">getInternalRequestHandlerService(context) returned null. This error used to report 'The requested service requires a private header'. (More info found at entry [57f572ea2e6010e5] in RRS server log)</err:detailedMessage><err:errorMessage rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Forbidden</err:errorMessage><err:errorStatus rdf:datatype="http://www.w3.org/2001/XMLSchema#long">403</err:errorStatus></rdf:Description></rdf:RDF>
Accepted answer
That query should work, ensure that you are using the proper OSLC Headers. PLS check for smaples at : https://jazz.net/library/article/1197
Comments
java.lang.RuntimeException: com.hp.hpl.jena.shared.JenaException: org.xml.sax.SAXParseException: Premature end of file. (More info found at entry [85eaa7f3adfb094d] in RRS server log)
Andrew
Could you paste the complete URL used for the GET here? Thanks
A sample URL is like this:
https://<host>:9443/rm/views?oslc.query=true&oslc.prefix=dc=<http://purl.org/dc/terms/>&oslc.select=*&oslc.where=dc:identifier=1234
Based on the error, the request had already been processed and the data was being retrieved but got an error when it was parsed into XML format.
Did you check the rm.log file and see what underlying error it was?
Alternatively, use the "resource" URL with the GET method to confirm the said artifact can be retrieved. Or you can try with a different artifact.
Donald, I used your sample URL but I get the same error. I can get that same resource using the resource URL no problem, and unfortunately I don't have access to the the RRC log files. Also, changing artifact ID gives me the same error.
Hi,
Query looks fine, not sure what may be happening without the logs. I suggest to contact IBM support : Here is the link: http://www-01.ibm.com/software/rational/support/contact.html