REST or OSLC Query for TeamArea/something
Greetings,
After hitting a wall with using the REST API to query for work items for a given team (I tried teamArea/itemId=, teamArea/name=, and teamArea/uniqueId=, but those are all non-queryable), I am beginning to think there is not a simple way to query for work items by Team Area using the REST API.
Is there a way to simply query for work items by name using either OSLC or REST? I am fine with either. Although, the OSLC API is complex enough that I typically use REST for my little tools and custom reports.
Thanks,
Dave
2 answers
Hey Dave,
If you want to search a workitem using its id, the simple query is:
You can get the uuid from the project catalogue.
The above query will give you list of project areas with its services.xml
Something like this: https://server.com/ccm/oslc/contexts/_dhfhfjjfhjdjsd/workitems/services.xml
For complex queries, you could use an RTC stored query or JRS report.
To programmatically execute an RTC stored query and get XML, see Using Stored Queries.
To programmatically execute a JRS report, you dan use the data service URL available from the Export report to Microsoft Excel page (e.g., https://jazz.net/rs/query/22769/dataservice?report=22556&limit=-1&basicAuthenticationEnabled=true) or you can capture the query from the Format Results tab in Report Builder and execute it against the LQE SPARQL endpoint.
The problem with OSLC queries is that many of the fields you are looking for (e.g., team area) are URLs, not string names.