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

 

 

 

Asked by Ryan Ranly on Thu 11/10/22 5:05 PM
Sign In to leave feedback or contribute an answer

Answers (3)

This answer has been marked as the accepted answer
Mark Sayers Tue 11/15/22 2:14 PM

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.

No feedback

Mark Sayers Fri 11/11/22 9:55 AM

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.

No feedback
I feel like there may be a bug or a TDX limitation. Can I search tickets filtering on a custom person attribute?

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
That does appear to be a bug yes. Can you submit this as a ticket formally so we can escalate to Eng? - Mark Sayers Mon 11/14/22 11:55 AM
Done 21745857 - Ryan Ranly Mon 11/14/22 1:46 PM

Mark Sayers Fri 11/11/22 8:56 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

No feedback
Thank you Mark. This request ignores the "CustomAttributes" portion. I've tried different variations. It does filter "ServiceIDs", "StatusIDs", and honor "MaxResults". I can tell it ignores the "CustomAttributes", for it returns 10 results not even taking into consideration the values in this section.

{
"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