Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Fisheye rest API 'queryasrows' not working with curl

a594141 April 5, 2017

Hi Team,

I was trying to run the API using command line, but it is giving error

HTTP/1.1 400 Bad Request

 

curl  -g --insecure -D- -u xxx:xxx -X GET --data @get.txt  -H "Content-Type: application/xml"  "https://<host-url>/rest-service-fe/search-v1/queryAsRows/<repo>?query=select revisions where (not in any review and date in [2017-03-16,2017-03-22]) group by changeset return path, revision, csid, author, comment, reviews"

Though, the link is working on browser

https://<host-url>/rest-service-fe/search-v1/queryAsRows/<repo>?query=select revisions where (not in any review and date in [2017-03-16,2017-03-22]) group by changeset return path, revision, csid, author, comment, reviews


This is bit urgent. Please help me with the resolution or where am I doing it wrong ?


Thanks,
Gunjan Roy

1 answer

0 votes
Jeff Thomas
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 20, 2017

Hi Gunjan,

Can you try the following?

curl -g --insecure -D -u xxx:xxx -X GET -H "Content-Type: application/xml" "https://<host-url>/rest-service-fe/search-v1/queryAsRows/<repo>?query=select%20revisions%20where%20(not%20in%20any%20review%20and%20date%20in%20%5B2017-03-16%2C2017-03-22%5D)%20group%20by%20changeset%20return%20path%2C%20revision%2C%20csid%2C%20author%2C%20comment%2C%20reviews"

I made a few changes such as URL encoding the query string and removing the get.txt that was being sent. What is contained in get.txt? You shouldn't need to send any data via a file in this scenario.

Cheers,
Jeff

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events