Create a Ticket with API and populate custom attribute fields.
I can create a ticket but the custom attribute filed are not populating. What is the proper way to include the array in the POST to create a ticket?
I tried:
{
... all the stuff that works above
TeamDynamix.Api.CustomAttributes.CustomAttribute[
"attribute1_name": "attribute1_value",
"attribute2_name": "attribute1_value"]
}
https://support.csuchico.edu/TDWebApi/Home/type/TeamDynamix.Api.CustomAttributes.CustomAttribut
Answers (2)
Thanks Mark! I actually found the solution here: https://solutions.teamdynamix.com/TDClient/1965/Portal/KB/ArticleDet?ID=18608
There is a comma at the end of the array in the example that kept giving me a json error.
Hi Scott,
In the custom attributes array, which in a JSON ticket body is referred to like so:
{properties here
"Attributes": [{"ID":12345, "Value":"value here"},]
}
Note that you really only need to specify the ID of each attribute, and then its value to allow the call to succeed in specifying that attribute needs adding to the created ticket.
Sincerely,
Mark Sayers
Sr Support Consultant, CS