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

REST API - OSLC Query with IN Operator Not Returning Correct Response in Version 6.0.5

I am using an OSLC query with the IN operator to filter artifacts by identifier, but it is not returning the expected results. Below is the query I am using:

oslc.properties
Encoded: dcterms%3Aidentifier%2Cdcterms%3Amodified%2Cdcterms%3Acreated%2CrmTypes%3AArtifactFormat
Decoded: dcterms:identifier,dcterms:modified,dcterms:created,rmTypes:ArtifactFormat


oslc.where
Encoded: dcterms%3Aidentifier+in+%5B%229377%22%5D%5E%5Exsd%3Ainteger
Decoded: dcterms:identifier in ["9377"]^^xsd:integer


Despite the fact that an artifact with ID 9377 exists in the system, the query does not return the expected results.

0 votes



2 answers

Permanent link

I published in https://rsjazz.wordpress.com/2022/02/22/ewm-oslc-query-api/ how the in operator can be used. There is an example screenshot.


My unencoded where term looks like this: 

dcterms:identifier in [ "1", "3", "9", "50" ]

I show another example where I search only for a specific ID. That does not use the in statement. It uses 
dcterms:identifier="12345"

0 votes

Comments
I'm trying to retrieve multiple artifacts using an OSLC query with a filter on dcterms:identifier . The query works correctly in DNG version 7.0.2, but in DNG version 6.0.5, it does not return the expected response. 

oslc.where=dcterms:identifier+in+["9385","9383"]
oslc.select=dcterms:identifier,dcterms:modified,dcterms:created,rmTypes:ArtifactFormat, with all prefixes.

I'm trying this for requirements management tool



 

As Ian already mentioned, DNG version 6.0.5 is no longer supported. Upgrade to a supported version.


Permanent link

If using ^^xsd:integer this has to be attached to a string to specify how to interpret it, e.g. oslc.where=dcterms:identifier in ["9377"^^xsd:integer] or not used at all oslc.where=dcterms:identifier in ["9377"]. I show the unencoded values, they must be encoded in the URL you use.


6.0.5 is long out of support - both the above forms work with 7.0.3

I'm not sure about using oslc.properties, although it seems to work - more likely oslc.select is the better parameter name to use.


0 votes

Comments

This also works with 7.0.3: oslc.where=dcterms:identifier in [9377]

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
× 11,089
× 144
× 15
× 11
× 9

Question asked: Feb 24 '25, 5:09 a.m.

Question was seen: 2,536 times

Last updated: Feb 25 '25, 3:42 a.m.

Confirmation Cancel Confirm