That's good, because it looks like I didn't read the whole line! I just assumed the project/30774269735 bit was the end of the URL, not the project ref. Doh!
------------------------------
Nik
Ask me a question, I'm All Ears!
Rally Sales Engineer
Rally Software
------------------------------
Original Message:
Sent: 06-25-2020 09:08 AM
From: Stephen Wingert
Subject: Curl command with "query" parameters fails
So I figured it out. The curl command does not like brackets etc. If you "escape" them it works as expected. Command below works.
curl --header "zsessionid:_abc123" -H "Content-Type: application/json" https://rally1.rallydev.com/slm/webservice/v2.0/portfolioitem/bi?project=https://rally1.rallydev.com/slm/webservice/v2.0/project/30774269735&query=\(\(State != "Done"\) and \(State != "Value Delivered"\)\)&fetch=true&order=FormattedID&start=1&pagesize=2000
Original Message:
Sent: 06-25-2020 07:07 AM
From: Nik Antonelli
Subject: Curl command with "query" parameters fails
Shouldn't that statement start "?query=" and not "&query=" ?
------------------------------
Nik
Ask me a question, I'm All Ears!
Rally Sales Engineer
Rally Software
Original Message:
Sent: 06-24-2020 11:21 PM
From: Stephen Wingert
Subject: Curl command with "query" parameters fails
If I try to include the "query" parameter in a curl command to the web services it fails. The same URL without the query parameter works.
This works:
curl --header "zsessionid:_abc123" -H "Content-Type: application/json" https://rally1.rallydev.com/slm/webservice/v2.0/portfolioitem/bi?project=https://rally1.rallydev.com/slm/webservice/v2.0/project/30774269735&fetch=true&order=FormattedID&start=1&pagesize=2000
This does not (difference in the two commands is highlighted):
curl --header "zsessionid:_abc123" -H "Content-Type: application/json" https://rally1.rallydev.com/slm/webservice/v2.0/portfolioitem/bi?project=https://rally1.rallydev.com/slm/webservice/v2.0/project/30774269735&query=((State != "Done") and (State != "Value Delivered"))&fetch=true&order=FormattedID&start=1&pagesize=2000
Any help would be appreciated.
------------------------------
Steve
------------------------------