AnsweredAssumed Answered

Rally Webservices Rest API Query Error - Could not parse: Cannot parse expression

Question asked by carthykeyan on Jan 19, 2018
Latest reply on Feb 2, 2018 by CarolBrumfield1350591

Team, 

 

Trying to make a query to Rally from Salesforce Apex Class. But getting the following error. But this works when I directly hit the URL in the Browser. Please advise.

 

{Errors=(Could not parse: Cannot parse expression "https://rally1.rallydev.com/slm/webservice/v2.0/defect?query=((Owner.Name%20=%20username@email.com)%20and%20(State%20!=%20Completed))&order=RankOwner.Name%20=%20username@email.com)%20and%20(State%20!=%20Completed))&order=Rank" as a query), PageSize=0, Results=(), StartIndex=0, TotalResultCount=0, Warnings=(), _rallyAPIMajor=2, _rallyAPIMinor=0}

 

 

HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
req.setEndpoint('https://rally1.rallydev.com/slm/webservice/v2.0/defect?query=((Owner.Name%20=%20username@email.com)%20and%20(State%20!=%20Completed))&order=RankOwner.Name%20=%20username@email.com)%20and%20(State%20!=%20Completed))&order=Rank')
');
req.setMethod('GET');
req.setHeader('Content-Type', 'application/json');
req.setHeader('ZSESSIONID','*********');
Http http = new Http();
res = http.send(req);
System.debug(res.getBody());

 

Thanks

Outcomes