Format when passing JSON object to "rest/api/2.0.alpha1/search?jql="

Mikkel Kragelund Nielsen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2012

Hey

I have found this before. But now its completly lost to me.
Im using the RestSharp lib.

I have to search for issues and have seen that its possible to use a json object as the argument to "rest/api/2.0.alpha1/search?jql="

I think it looked something like this:

{'jql' : 
  { project : 'test',
    status : ['started', stopped']
  }
}

This should be similar to: project=test AND status IN (started, stopped)
But I can't get it working.

Does anyone have a idear, of what i have to do?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Radek Kantor
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2012

Hi check this: http://code.google.com/p/rest-assured/wiki/Usage there are some examples, maybe helps.

Mikkel Kragelund Nielsen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2012

Not so much:

In curl the format should be this:

curl -D- -u admin:admin -X POST -H "Content-Type: application/json"
--data '{"jql":"project = QA","startAt":0,"maxResults":2,"fields":["id","key"]}' http://kelpie9:8081/rest/api/2/search
Is the '{"jql":"proj... bit i cant get to wotk i C# (using RestSharp lib)
0 votes
RambanamP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 12, 2012

use java client for refernce check this http://www.mkyong.com/webservices/jax-rs/restfull-java-client-with-java-net-url/

any more help in java let me know

TAGS
AUG Leaders

Atlassian Community Events