Kaseya Community

REST API - Agent Log sort ($orderby=column desc) not working

This question has suggested answer(s)


I have been working on Kaseya REST API and facing an issue in ordering results of Agents Log according to TIME. Basically, I need the latest data and I am able to sort that according to time in asc (which is by default) but getting no response if I add desc in url. Below are the urls

This one is working: https://XXXXXXXXXX/api/v1.0/assetmgmt/logs/XXXXXXXXXXX/agent?$orderby=Time

This one giving no-response : https://XXXXXXXXXX/api/v1.0/assetmgmt/logs/XXXXXXXXXXX/agent?$orderby=Time desc

Please suggest if anyone has the solution.

All Replies
  • It seems to work for me. Is your API call substituting "%20" or "+" for the space between "Time" and "desc"? Without that, it's not a valid URL.


  • Got the solution

    So, just replying to my own question for others help (if somebody stuck)

    I used function http_build_query and it worked