It's all about the answers!

Ask a question

OSLC query with CQ


Karthik Krishnan (8825117163) | asked Dec 08 '10, 4:11 a.m.
Hello all,
i am trying to query records using OSLC. I am able to do that in C#.
When i query using the url's the return type is always application/atom+xm

how can change this to JSON or XML?

Cheers,
Karthik

3 answers



permanent link
Patrick Streule (4.9k21) | answered Dec 14 '10, 8:23 a.m.
JAZZ DEVELOPER
Hello all,
i am trying to query records using OSLC. I am able to do that in C#.
When i query using the url's the return type is always
application/atom+xm

In general, you can you the HTTP 'Accept' header to indicate the format
that you are interested in:

Accept: application/json

--
Regards,
Patrick
RTC Work Item Component Lead

permanent link
Karthik Krishnan (8825117163) | answered Dec 15 '10, 9:48 p.m.
Thanks. That seems to work.

Also if i set header OSLC-CORE-Version:2.0 in header, how can find out that the return is 2.0 and not 1.0?

Hello all,
i am trying to query records using OSLC. I am able to do that in C#.
When i query using the url's the return type is always
application/atom+xm

In general, you can you the HTTP 'Accept' header to indicate the format
that you are interested in:

Accept: application/json

--
Regards,
Patrick
RTC Work Item Component Lead

permanent link
Patrick Streule (4.9k21) | answered Dec 16 '10, 4:38 a.m.
JAZZ DEVELOPER
Thanks. That seems to work.

Also if i set header OSLC-CORE-Version:2.0 in header, how can find out
that the return is 2.0 and not 1.0?

If you get a 2.0 response, there should also be an OSLC-Core-Version:
2.0 header in the HTTP response headers. If it is not there, then it is
a 1.0 response.

--
Regards,
Patrick
RTC Work Item Component Lead

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.