Hello I am just getting a bit confused and was wondering if anyone would be able to help; I am looking to get the 5 most recently attempted job status when I try using $filter=top it doesnt give todays jobs, is there a way to either restrict it to just show me todays jobs or the last x attempted jobs
Hello @bcorrea,
I am appearing to get previous jobs from past days but no recently executed jobs they all appear to be jobs that were executed via the online orchestrator and none that were executed via api.
I shall try with the start time to see if I can get that working
Would you be able to give me an example of how to use orderby as the odata documentation isnt the clearest
Hello @bcorrea,
I am able to do the date filter now thanks but I am struggling to get that days jobs (more than 5) to be the most recent 5 even when using orderby=StartTime desc it has the same result as if I where to use orderby=StartTime
the whole request i am using is as follows: https://platform.uipath.com/odata/Jobs?$top=5&$filter=StartTime gt “+str(yearint)+”-“+monthstr+”-"+daystr+"T00:00:00Z&$oderby=StartTime des
The str(yearint), monthstr and daystr are all variables to get current day values
Is this correct? as when using yesterday ill get start times as such: 2020-01-20T15:04:08.46Z
but using today I get Stat times like: 2020-01-21T12:11:51.377Z
Surely that would be 24:00 of 20th not 0:00 of 21st? as as soon as it reaches 0:00 the day value goes forward and the time is then set to 0:00 or am I missing something within the documentation, as my view supports the times I demonstrated above.
Yes I shall continue to test that, the only problem now is I still cant seem to order them using orderby=StartTime desc
it places them in asc order giving me the first 5 today rather than most recent 5
Thanks again for your help
Fixed values in terms of the date values? If so yes and it remains the same, but if you mean in regards to jobs I’m not sure how you would do this?
I am retrieving the response in Python using Requests library not sure if this would have anything to do with it by any chance?
Yes, in a matter of fact if your library is making a collection out of the result, maybe it does mess up the order, but i couldnt tell, im testing directly from swagger and i can ensure it is sorting accordingly…
Even I am seeing issue the swagger we are not able to filter with jobs having start time greater than datetime.now.addhours(-1)… its showing all faulted jobs @bcorrea@Pablito@loginerror