TicketSearch API CustomAttributes
Hello,
Sorry if this is in the documentation someplace, can I execute a TicketSearch on a custom attribute value via the API?
https://udayton.teamdynamix.com/TDWebApi/Home/type/TeamDynamix.Api.Tickets.TicketSearch
It seems to read like it would work, however it doesn't appear to be working for me unless my request body is incorrect. Which it very well could be.
Best,
Ryan
Answers (3)
It turns out this was expected behavior because the API endpoint was not designed to allow for searching by a custom person attribute. This ended up as an enhancement request.
So I think formatting is your issue, you only specify the CustomAttributes array 1 time, then within that you have JSON objects for each attribute you want to filter on:
{
"CustomAttributes":[
{"ID": 139672, "ValueText": "Yes"},
{"ID": 133243, "Value": "{{studentUID}}"}
],
"ServiceIDs":[52122],
"StatusIDs": [149290, 149291],
"MaxResults": 10
}
I think it would go something like the above.
Given the below option #1 searches successfully, with "136074" being a textbox. #2 does not, with "133243" being a person attribute. The only difference is #2 is searching a person attribute, I've tried using the attributes "ValueText" as well and that does not work. I've double, triple, quadrupled checked I have the right value.
Thoughts?
1)
{
"CustomAttributes":[
{"ID": 139672, "Value": 437110},
{"ID": 136074, "Value": "101711110"}
],
"ServiceIDs":[52122],
"StatusIDs": [149290, 149291],
"MaxResults": 10
}
2)
{
"CustomAttributes":[
{"ID": 139672, "Value": 437110},
{"ID": 133243, "Value": "13b2fe43-99d9-eb11-a7ad-0050f2eef4a7"}
],
"ServiceIDs":[52122],
"StatusIDs": [149290, 149291],
"MaxResults": 10
} - Ryan Ranly Mon 11/14/22 9:34 AM
Hello Ryan,
It seems to be possible given there is a property for them, so can you provide your search body's JSON content so we can review what you're sending ?
Sincerely,
Mark Sayers
Sr Support Consultant
{
"CustomAttributes":[{
"CustomAttribute":[{
"ID": 139672,
"ValueText": "Yes"
}],
"CustomAttribute":[{
"ID": 133243,
"Value": "{{studentUID}}"
}]
}],
"ServiceIDs":[52122],
"StatusIDs": [149290, 149291],
"MaxResults": 10
} - Ryan Ranly Fri 11/11/22 9:45 AM