It's all about the answers!

Ask a question

REST API - Problem with query URL


Bruno Braga (48013621) | asked Mar 18 '10, 5:54 p.m.
I can get a specific workitem usign REST API, but I had problem with queries.

I'm following this article:
https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Querying_Work_Items

The suggested query URL is:
https://localhost:9443/jazz/oslc/contexts/_9BHm0EqVEd6HXO10niqZpg/workitems


I think the "context" _9BHm0EqVEd6HXO10niqZpg is the Project Area ID. Is it true?

I don't know for sure what the correct query URL, so I'm having some errors 406 (Not Acceptable), 400 (Bad Request), 404 in my tests.

In cases without "context" like that bellow I don't having problems:
https://localhost:9443/jazz/oslc/workitems/821.json

2 answers



permanent link
Bruno Braga (48013621) | answered Mar 18 '10, 6:10 p.m.
I'm almost certain the "context" is Project Area ID (the doc don't say nothing about that).

So, using my Project Area ID and workitems.json I get this message:


{
"message": "Undeclared namespace prefix: ",
"status": 400
}


What is that?

permanent link
Bruno Braga (48013621) | answered Mar 19 '10, 12:15 a.m.
Fixed!

How to get the correct URL is explained in session "Discovery" :P

and my problem was that I used some elements of OSLC doc like that:

?oslc_cm.query=state="open"


reference:
http://open-services.net/bin/view/Main/CmQuerySyntaxV1?sortcol=table;table=up#Examples

For RTC, the correct is:
?oslc_cm.query=rtc_cm:state="{open}"

Your answer


Register or 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.