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.
2 answers
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.
dcterms:identifier in [ "1", "3", "9", "50" ]
dcterms:identifier="12345"
Comments
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.
As Ian already mentioned, DNG version 6.0.5 is no longer supported. Upgrade to a supported version.
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.