Fisheye rest API 'queryasrows' not working with curl Edited

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 Apr 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
Community showcase
Published Monday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

487 views 0 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you