Page 1 of 1

[Released] Mobile Status Logs API (DateLogged) (descending order)

Posted: Mon Dec 07, 2020 11:50 pm
by rish
Hi , I am trying to fetch the mobile status logs for a company by passing the following query params as a part of my URL

Code: Select all

?orderby=-DateLogged
The response json for the aforementioned request does not give me the status logs in descending order (Date Logged).

However when I go to the 'mobile status logs' page on my Simpro Dashboard and sort the table using the UI -> I get the correct order.

Could you please fix this so I can fetch the correct response from API as well ? Thanks.

Re: Mobile Status Logs API (DateLogged) (descending order)

Posted: Tue Dec 08, 2020 12:10 am
by Muqeet
Seems to be working fine for both orders. Can you send me the build URL in a private message with parameters you are running to fetch the ordered resource list.

Re: Mobile Status Logs API (DateLogged) (descending order)

Posted: Tue Dec 08, 2020 1:05 am
by rish
Done, Please let me know, Thanks.

Re: Mobile Status Logs API (DateLogged) (descending order)

Posted: Tue Dec 08, 2020 1:48 am
by Muqeet
Hey Rish,

Ran the following endpoint, I can't see any issue with the order.

https://enterprise-sandbox-au.simprosui ... geSize=250

Re: Mobile Status Logs API (DateLogged) (descending order)

Posted: Tue Dec 08, 2020 3:41 am
by rish
Hi

I saved the response data in a json file. The first object in the response is of projectId 46987 (as shown in screenshot) whereas when I use the UI to get the mobile status logs and arrange it in descending order (Date) I get 47116 as the top entry which is the expected result.

Re: Mobile Status Logs API (DateLogged) (descending order)

Posted: Tue Dec 08, 2020 4:43 am
by Muqeet
Mobile Status Log Report and logs api for mobile status, are not identical in terms of displaying logs.

Re: Mobile Status Logs API (DateLogged) (descending order)

Posted: Tue Dec 08, 2020 5:00 am
by rish
Could you please elaborate on that ? I am unable to find the 47116 job as a part of the response , in other words that entry is missing , does it take a while for that entry to reflect , like a day or two ?

Re: Mobile Status Logs API (DateLogged) (descending order)

Posted: Tue Dec 08, 2020 5:27 am
by Muqeet
If an entry is missing, than its a bug. I will investigate the issue and will update this thread accordingly.

Re: Mobile Status Logs API (DateLogged) (descending order)

Posted: Tue Dec 08, 2020 5:36 am
by rish
Alright , Thanks.

Re: [API-927] Mobile Status Logs API (DateLogged) (descending order)

Posted: Mon Dec 14, 2020 1:20 am
by rish
Hey
I am getting the correct response now. Thanks.