brownac brownac - 6 months ago 38
reST (reStructuredText) Question

Java Rally API - how to see all possible values of a custom field

I'm trying to get all possible values for a custom field dropdown using the rally REST api. When I run a GET call, all I get back for the response is the current selected value of the dropdown. Is there I way I can see all the possible values for this custom field? For example, if the field was called

, and the currently selected value was
, all I'm getting back in the JSON response is

"c_FOO" : "bar1"

when in reality the possible values of
could be
, etc. All I'm doing in code right now is

GetRequest getReq = new GetRequest("/porfolioitem/12345");
GetResponse getRes = rest.get(getReq);

Answer Source

I figured it out. I had to pass in the project ID, since the workspace I work in has multiple projects. So, piggybacking off of what Kyle did,

restApi().getClient().doGet("/portfolioitem/1234/c_Foo/allowedvalues?project=project/" + projectId);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download