Query for specific tagged workitem by OSLC dcterms:subject
Hello,
dcterms:subject in ["tvt","mustfix"] |
like format, which is one example in example6.
My URL is like
https://rb-alm-20-p.de.bosch.com/ccm/oslc/contexts/_QjsBsp5aEeq2u-M0ATM71Q/workitems/bugv2.0?oslc.where=dc:subject in ["stability"]&oslc.prefix=dcterms=<http://purl.org/dc/terms/>
and I do encode the URL by utf-8.But the response is still all the bugs without tag filter.
Does someone know how to fix this by OSLC or REST API of RTC?
2 answers
I assume you are using an OSLC query capability - see https://docs.oasis-open-projects.org/oslc-op/query/v3.0/os/oslc-query.html.
You should URL encode all the values for parameters including
oslc.where
and
oslc.prefix
. See the specification for details with examples.
Comments
Hi David,
That's not correct - you are encoding more than each parameter value Assuming you're trying to use the following parameters:
Parameter | Value |
---|---|
oslc.where
|
dcterms:subject in ["sop5_bug"]
|
oslc.prefix
|
dcterms=<http://purl.org/dc/terms/>
|
oslc.select
|
*
|
oslc.paging
|
true
|
oslc.pageSize
|
200
|
the correct encoding in a request would be:
oslc.where=dcterms%3Asubject%20in%20%5B%22sop5_bug%22%5D&oslc.prefix=dcterms%3D%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E&oslc.select=*&oslc.paging=true&oslc.pageSize=200
- oslc.prefix=dcterms=<http://purl.org/dc/terms/>
- oslc.where=dcterms:subject in ["asd","mobile"]
- oslc.select=*
- oslc.paging=true
- oslc.pageSize=200
Comments
Hi Ian,
That URL definitely won't work as query because, as it shows in your XML, it's the "Location for creation of Bug change requests", and it's in a oslc_cm:factory tag, i.e. it isn't a OSLC Query base URL.
I would suggest to have a look here: https://rsjazz.wordpress.com/2022/02/22/ewm-oslc-query-api/ this also covers the discovery process. I agree with the statements with respect to the URL as well as the headers.