XPath in Reportable Rest API not works as expected
Hello
I'm starting to work with Reportable REST API and I have problems with some XPath expressions that do not work as I expected.
For example:
https://9.172.194.36:9443/ccm/rpt/repository/workitem?fields=workitem/workItem/(state/*|type/*)
returns "Error 500: CRRED8029E: Invalid Query: type/id='com.san.ibm.wi.OS'"
However, this other works as expected:
https://9.172.194.36:9443/ccm/rpt/repository/workitem?fields=workitem/workItem/(projectArea/*|itemHistory/(modified|state/*))
According with XML schema, both expressions are correct,
<xs:schema elementFormDefault="qualified" targetNamespace="https://9.172.194.36:9443/ccm/rpt/repository/workitem">
....
<xs:complexType name="com.ibm.team.workitem.WorkItem">
<xs:sequence>
...
<xs:element minOccurs="1" type="com.ibm.team.process.ProjectArea" maxOccurs="1" name="projectArea"/>
...
<xs:element minOccurs="0" type="com.ibm.team.workitem.WorkItemType" maxOccurs="1" name="type"/>
...
</xs:sequence>
<xs:attribute type="xs:anyURI" name="href"/>
</xs:complexType>
...
<xs:complexType name="com.ibm.team.process.ProjectArea">
<xs:sequence>
<xs:element type="xs:string" name="uniqueId"/>
<xs:element type="xs:string" name="stateId"/>
<xs:element type="xs:string" name="itemId"/>
<xs:element type="xs:string" name="contextId"/>
<xs:element type="xs:time" name="modified"/>
<xs:element type="xs:boolean" name="archived"/>
<xs:element type="xs:string" name="name"/>
<xs:element minOccurs="1" type="com.ibm.team.repository.Contributor" maxOccurs="1" name="modifiedBy"/>
<xs:element minOccurs="0" type="com.ibm.team.workitem.State" maxOccurs="unbounded" name="states"/>
<xs:element minOccurs="0" type="com.ibm.team.workitem.Resolution" maxOccurs="unbounded" name="resolutions"/>
<xs:element minOccurs="0" type="com.ibm.team.workitem.WorkItemType" maxOccurs="unbounded" name="workItemTypes"/>
<xs:element minOccurs="0" type="com.ibm.team.workitem.Enumeration" maxOccurs="unbounded" name="enumerations"/>
</xs:sequence>
<xs:attribute type="xs:anyURI" name="href"/>
</xs:complexType>
...
<xs:complexType name="com.ibm.team.workitem.WorkItemType">
<xs:sequence>
<xs:element type="xs:string" name="id"/>
<xs:element type="xs:string" name="name"/>
</xs:sequence>
</xs:complexType>
...
</xs:schema>
Can someone help me to understand the reason of these differences, or what I'm doing wrong.
Thank you in advance.
I'm starting to work with Reportable REST API and I have problems with some XPath expressions that do not work as I expected.
For example:
https://9.172.194.36:9443/ccm/rpt/repository/workitem?fields=workitem/workItem/(state/*|type/*)
returns "Error 500: CRRED8029E: Invalid Query: type/id='com.san.ibm.wi.OS'"
However, this other works as expected:
https://9.172.194.36:9443/ccm/rpt/repository/workitem?fields=workitem/workItem/(projectArea/*|itemHistory/(modified|state/*))
According with XML schema, both expressions are correct,
<xs:schema elementFormDefault="qualified" targetNamespace="https://9.172.194.36:9443/ccm/rpt/repository/workitem">
....
<xs:complexType name="com.ibm.team.workitem.WorkItem">
<xs:sequence>
...
<xs:element minOccurs="1" type="com.ibm.team.process.ProjectArea" maxOccurs="1" name="projectArea"/>
...
<xs:element minOccurs="0" type="com.ibm.team.workitem.WorkItemType" maxOccurs="1" name="type"/>
...
</xs:sequence>
<xs:attribute type="xs:anyURI" name="href"/>
</xs:complexType>
...
<xs:complexType name="com.ibm.team.process.ProjectArea">
<xs:sequence>
<xs:element type="xs:string" name="uniqueId"/>
<xs:element type="xs:string" name="stateId"/>
<xs:element type="xs:string" name="itemId"/>
<xs:element type="xs:string" name="contextId"/>
<xs:element type="xs:time" name="modified"/>
<xs:element type="xs:boolean" name="archived"/>
<xs:element type="xs:string" name="name"/>
<xs:element minOccurs="1" type="com.ibm.team.repository.Contributor" maxOccurs="1" name="modifiedBy"/>
<xs:element minOccurs="0" type="com.ibm.team.workitem.State" maxOccurs="unbounded" name="states"/>
<xs:element minOccurs="0" type="com.ibm.team.workitem.Resolution" maxOccurs="unbounded" name="resolutions"/>
<xs:element minOccurs="0" type="com.ibm.team.workitem.WorkItemType" maxOccurs="unbounded" name="workItemTypes"/>
<xs:element minOccurs="0" type="com.ibm.team.workitem.Enumeration" maxOccurs="unbounded" name="enumerations"/>
</xs:sequence>
<xs:attribute type="xs:anyURI" name="href"/>
</xs:complexType>
...
<xs:complexType name="com.ibm.team.workitem.WorkItemType">
<xs:sequence>
<xs:element type="xs:string" name="id"/>
<xs:element type="xs:string" name="name"/>
</xs:sequence>
</xs:complexType>
...
</xs:schema>
Can someone help me to understand the reason of these differences, or what I'm doing wrong.
Thank you in advance.