Search code examples
apisql-order-byattask

AtTask API order by date?


I've gone around in circles on the web trying to find any relevant information, including the API Docs, for ordering results by ASC/DESC order...

/task/search?name=NAME HERE&percentComplete=0&fields=plannedCompletionDate,project:status,project:name,project:plannedCompletionDate

I want to be able to have my results ordered by plannedCompletionDate instead of having to do it in code.


Solution

  • you can do this by adding plannedCompletionDate_Sort=asc so your call would be

    /task/search?name=NAME HERE&percentComplete=0&fields=plannedCompletionDate,project:status,project:name,project:plannedCompletionDate&plannedCompletionDate_Sort=asc