Ticket Search API - Is it possible to retrieve task info from a ticket api call?
I notice when I search for tickest using the API I see one of the properties returned is "Tasks", but it appears the array is null even if the ticket has sub-tasks.
Is there any way to retrieve any information about the sub-tasks or simply if sub-tasks exist when using the ticket search api?
Ideally if there was sub-tasks present we would see something like "Tasks": [taskid1, taskid2, taskid3] returned.
Right now I'm having to make separate API calls to check if a task exists which can be expensive if most of the results are null.
API call details:
Ticket search endpoint: https://api.teamdynamix.com/SBTDWebApi/api/{{app}}/tickets/search
Body:
{
"TicketID": 10957660
}
Returned:
{
....
"Tasks": [],
....
}
Answer (1)
Hi Craig,
The "Returns" box for the search endpoint ( https://api.teamdynamix.com/TDWebApi/Home/section/Tickets#POSTapi/{appId}/tickets/search ) tells you that this endpoint will return:
A list of tickets matching the specified criteria. Because this is a search, not all properties will be provided for each ticket. For example, ticket descriptions and custom attributes will not be returned. To retrieve such information, you must load a ticket individually. (IEnumerable(Of TeamDynamix.Api.Tickets.Ticket))
This includes Task collections as properties that are not returned with this endpoint.
Individual ticket retrieval calls are needed currently to return that info.