Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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"

0 votes


Accepted answer

Permanent link

 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:
Where prefixes are:


oslc.where=rdf:type="http://jazz.net/ns/rm#Module"

This doesn't work because the URI isn't surrounded by < > 

This does work:


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:

HIROAKI JOSAKO selected this answer as the correct answer

1 vote

Comments

Thank you carefully.
It is embarrassing with the input mistake. .
PREFIX is set, so probably the case of upper case lower case letters and <> will be fine.

I'll try! !


One other answer

Permanent link

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.

1 vote

Comments

Using URL, set <> even in the case of parameter values! !
I did not know this rule.
Thank you very much.
I will fix it.

Encoding when executing a request command.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Jul 05 '21, 12:37 a.m.

Question was seen: 1,399 times

Last updated: Jul 06 '21, 4:12 a.m.

Confirmation Cancel Confirm