How to create a new value for a custom dropdown field using WSAPI in CA Agile Central?

Document ID : KB000010284
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

 

This example shows how to input a new value for a custom dropdown list that can be either a multi-select or single dropdown, via WSAP

Instructions:

1. Find the TypeDefinition OID for the Object type in question. The below example is for a Defect.

https://rally1.rallydev.com/slm/webservice/v2.0/typedefinition?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/<WorkspaceOID>&query=( Name = "Defect" )&fetch=true&start=1&pagesize=79

2. Get the _ref value for that typedefinition: 

        https://rally1.rallydev.com/slm/webservice/v2.0/typedefinition/<TypeDef OID>/Attributes?&pagesize=76

3. Find the Custom Value field by Element Name and then find the _ref to the allowedValues which gives you the OID of the AttributeDefinition.

https://rally1.rallydev.com/slm/webservice/v2.0/AttributeDefinition/<Attribute OID>/AllowedValues

NOTE: If you were to run the above GET request, it will give you the current allowed values.

4. Use the above information to create a POST request to make a new AllowedAttributeValue, example payload:

https://rally1.rallydev.com/slm/webservice/v2.0/allowedattributevalue/create

{

    "AllowedAttributeValue”: 

    { 

        "AttributeDefinition": "https://rally1.rallydev.com/slm/webservice/v2.0/AttributeDefinition/<Attribute OID>”, 

        "StringValue": "SeanPDavis”, 

        "ValueIndex": "6” 

    }

 }