Agile Central - Sending HTTP Post with Custom Fields based on their Names will result in Validation Error

Document ID : KB000124331
Last Modified Date : 10/01/2019
Show Technical Document Details
Issue:
Sending HTTP Post with required Custom Fields based on their Names :

{
    "defect":
    {
    "Name": "Defect created via postman",
    "c_Postman": "1"
    }
}

Will result in Validation Error :

{
    "CreateResult": {
        "_rallyAPIMajor": "2",
        "_rallyAPIMinor": "0",
        "Errors": [
            "Validation error: Defect.Testing Postman should not be null"
        ],
        "Warnings": [
            "Ignored JSON element defect.c_Postman during processing of this request."
        ]
    }
}

In this case Custom Field's Name created in the Defect Type is "Postman" however its Display Name is "Testing Postman" .
Resolution:
Use the Display Names in the following manner when using WSAPI calls with Custom Fields : 

{
    "defect":
    {
    "Name": "Defect created via postman",
    "c_TestingPostman": "1"
    }
}