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

REST API: Is it possible to use contains() XPath function to filter work items?

Is it possible to use contains() XPath function to filter work items? Is this supported?
I would like to filter something like:

https://host:port/jazz/rpt/repository/workitem?fields=workitem/workItem[contains(summary, '..')]

0 votes


Accepted answer

Permanent link
The Reportable REST API only uses a subset of the XPath 2.0, and I can't see any mention of the "contains" function in the whitepaper (in fact, it says "3.5.1 Value Comparisons" is not suppported), so I believe the contains() function is not supported. I will get a "CRRED0121E: Invalid filter condition" error if I attempt to use "contains" as a filter.

Field selection and filtering

Section 4.3 of the whitepaper document describes the field selection capability which lets you define which fields are returned in the data set. It uses a subset of XPath 2.0. This mechanism also enabled filtering capability (i.e. selecting certain fields where the value matches certain criteria). Please refer to section 4.3 for more detailed information about field selection and filtering.


Matei Florescu selected this answer as the correct answer

0 votes

Comments

yes, I actually reached the same conclusion, but wanted to make sure I am correct. Thank for the answer,

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,944
× 480

Question asked: May 31 '15, 7:33 a.m.

Question was seen: 3,863 times

Last updated: Jun 01 '15, 4:23 a.m.

Confirmation Cancel Confirm