DOORS OSLC API Query search "type of module"
I'm looking for a way to search for artifacts of type module.
I think I need to make the following properties searchable in order to define it as a module, but it doesn't work.
Is there a good way?
oslc.where=jazz_rm:artifactFormat="http://jazz.net/ns/rm/dng/type/format#Module"
or
oslc.where=rdf:type="http://jazz.net/ns/rm#Module"
Accepted answer
> oslc.where=jazz_rm:artifactFormat="http://jazz.net/ns/rm/dng/type/format#Module"
This doesn't work because
1) the capitalisation of artifactFormat is wrong, should be ArtifactFormat
2) the prefix jazz_rm (http://jazz.net/ns/rm#) isn't right for ArtifactFormat
3) URIs aren't strings - they MUST be surrounded by < >
This works for 7.0.2:
- oslc.where=rdm_types:ArtifactFormat=<http://jazz.net/ns/rm#Module>
Where prefixes are:
- oslc.prefix=rdm_types=<http://www.ibm.com/xmlns/rdm/types/>
This doesn't work because the URI isn't surrounded by < >
This does work:
- oslc.where=rdf:type=<http://jazz.net/ns/rm#Module>
Don't forget the correct URL parameter encoding is needed for the strings on RHS of oslc.where= and oslc.prefix=
An example of a fully encoded query (this includes oslc.select so some additional prefixes are included)::
The GET has to be accompanied by required header:
- OSLC-Core-Version: 2.0
and a configuration header such as:
- vvc.configuration: https://jazz.ibm.com:9443/rm/cm/stream/__KSrEEB6Eeuh3Iiax2L3Ow
One other answer
In OSLC query expressions, URIs should be enclosed in <>. They are not string literals. See OSLC Query 3.0 - oslc.where . Also, remember that parameter values should be URL encoded in the HTTP GET or POST.