Welcome to the Jazz Community Forum
How to query for artifacts with specific attributes that exists

Accepted answer

Comments

Thank you for the response David.

oslc.where
query expression syntax.
OR
conditions, paranethetical clauses, the ability to test for property existence or non-existence, or use constructs like regular expressions for string conditions that might be expected in more extensive query languages like SQL, SPARQL, Cypher, Gremlin etc.

It means that an OSLC query cannot express a condition based on the existence or non-existence of a property, regardless of whether that property is a string, integer, enum, URI etc. If you have a requirement to query for the existence of some property (any value), then that use case is currently not supported by the OSLC Query specification.
See https://docs.oasis-open-projects.org/oslc-op/query/v3.0/os/oslc-query.html#oslc.where for details of the oslc.where
query expression syntax.
The OSLC query expression syntax goes back more than 10 years and was designed to be a lightweight mechanism that would not be too onerous to implement regardless of how an OSLC server persisted data. It was designed to be a persistence-agnostic query syntax. For example, it doesn't support OR
conditions, paranethetical clauses, the ability to test for property existence or non-existence, or use constructs like regular expressions for string conditions that might be expected in more extensive query languages like SQL, SPARQL, Cypher, Gremlin etc.

Thank you very much again for the response. It really helped a lot.

You can achieve this by including the attribute in the oslc.select list and then post-processing the query results. My OSS ELM-Python-Client has an example oslcquery commandline app which does exactly this filtering to, for example, filter out (or in) just core artifacts - core artifacts have a folder URI in rm_nav:parent where module artifacts don't have rm_nav:parent.

I encourage all consumers of OSLC query to participate in the OSLC Open Projects work group, and submit issues for use cases they want to support that are not currently supported. This will help drive the evolution of OSLC specifications, such as OSLC query, to address use cases that are currently not supported.