Single Value Drop Down Updates via WSAPI
search cancel

Single Value Drop Down Updates via WSAPI

book

Article ID: 254378

calendar_today

Updated On:

Products

Rally SaaS

Issue/Introduction

How can you update a single value dropdown via Web Services API (WS API)

Resolution

the first step would be to get the object ID of the attribute that you're wanting to update.  This is probably the most complicated part because it requires delving into the schema.  We have a KB here that you can follow to find fields in the schema: https://ca-broadcomcsm.wolkenservicedesk.com/wolken/esd/knowledgebase_search?articleId=223719

So, for example, here we have a custom field called "DropDownList". In order to work with the values for this dropdown list, we'll need to first grab the _ref:

To get the AllowedValues, you would append /AllowedValues to the object ID I have circled above: https://rally1.rallydev.com/slm/webservice/v2.0/AttributeDefinition/<OBJECT_ID>/AllowedValues

In this list, you can see the individual values in the dropdown and their associated object IDs:

Using these object IDs you can perform standard update and delete operations.

For example, to delete "Beta" in the above list, make a DELETE method call to:

https://rally1.rallydev.com/slm/webservice/v2.0/AllowedAttributeValue/<OBJECT_ID>

 

To update the "Alpha" value in the above list make a POST method call to :

https://rally1.rallydev.com/slm/webservice/v2.0/AllowedAttributeValue/<OBJECT_ID>

Using a payload like

{
  "AllowedAttributeValue": 
    {
        "StringValue": "Delta"
    }
}