Rally Java Rest API 302 Temporarily Moved Error -


i creating integration tool teamcity rally , using java rest api. when try create object of type "build" exception thrown restapi 302 "temporarily moved" error.

how handle this? cannot see settings in rally restapi turns on or off redirects , api not handling redirect.

any suggestions?

here code being issued. create call restapi throws exception. 2 calls def.getworkspace().getref , def.getref() return urls workspace , build definition entries build record associated (the string "_ref" attribute entities).

try {     jsonobject obj = new jsonobject();     obj.addproperty("workspace", def.getworkspace().getref());     obj.addproperty("builddefinition",def.getref());     obj.addproperty("duration",1.05);     obj.addproperty("message", "message build");     obj.addproperty("number","test0000");     obj.addproperty("start", isoformat.format(new date()));     obj.addproperty("status","passed");     obj.addproperty("uri", "http://teamcity.com");      createrequest request = new createrequest("build", obj);     request.setfetch(new fetch("formattedid,name"));     createresponse response = restapi.create(request); } catch (exception e) {     log.error("could not create object of type: " + type, e); } 

have been able create other objects/artifacts? know if have proxy server? it's possible 302 coming intermediate proxy rather rally. if have proxy, can do:

restapi.setproxy("https://myproxy","myproxyuser","myproxypassword");

to setup proxy rest connection. aside that, couple of comments:

  1. valid values "status" [success, failure, incomplete, unknown, no builds]
  2. there's no need setfetch on createrequest - fetch parameter used queries.

i hope helps.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -