Search code examples
rally

How to get actual allowed values instead of reference to it with Attributes api in Rally


https://rally1.rallydev.com/slm/webservice/v2.0/typedefinition/<defect_id>/Attributes

After hitting the specified url we get the fields for the specified defect id but in order to fetch the allowed values for dropdown fields we have to hit another api. Is there any other way through which we can get all the fields with the allowed values instead of the reference to the allowed values in a single api call?


Solution

  • Unfortunately with the introduction of WSAPI version 2.0, the ability to load sub collections of data within the initial request was removed. This was done in order to improve performance as it was previously possible to request too large a set of data and have a significant impact on the performance of the system.

    So the only way to fetch the lists of allowed values for fields is to loop through the list of defect attributes, grab the necessary endpoint url from the _ref value and load it from there.

    It could be worth saving the references to these attribute IDs as they shouldn't change as long as the fields aren't removed from the object model.