Orchestrator HTTPS: Filter robologs on timestamp gt date and lt date

Hi, I tried the following and it did not work. I got timestamps from june back. How to use the timestamp filter in orchestrator https requests?

I tried:

  • "/odata/RobotLogs?$filter TimeStamp gt 2023-07-11T00:00:00.07Z and TimeStamp lt 2023-07-12T00:00:00.07Z "
  • "/odata/RobotLogs?$filter TimeStamp gt ‘2023-07-11T00:00:00.07Z’ and ‘TimeStamp lt 2023-07-12T00:00:00.07Z’ "
  • "/odata/RobotLogs?$filter TimeStamp gt ‘2023-07-11T00:00:00.07Z’

Actually I would like to have all robologs for all of my folders. Any better option?
My option now would be to get all folders and for each folder get the robologs via orchestrator https request.

Thank you!

@PeCour

Please try this… I tried and it is working

Timestamp lt 2023-07-14T05:38:12.176Z & Timestamp gt 2023-04-14T05:38:12.176Z

You can use the time as you need

Cheers

@Anil_G ok thanks, but it does not work when I try it :see_no_evil: Any idea why?


image

@PeCour

Please try like this

odata/RobotLogs?%24filter=Timestamp%20lt%202023-07-14T05%3A38%3A12.176Z%20%26%20Timestamp%20gt%202023-04-14T05%3A38%3A12.176Z'

After filter you missed the equals symbol

cheers

@Anil_G oh right, I tried it with “=” and I also copy pasted your text into my request but both did not work. Still getting the same result over and over.

@PeCour

Can you tell what error you are getting

because I tried same and I find no issue

cheers

@Anil_G I also get data back and no exception. But the filter does not work. I get data back, which I wanted to exclude by using the filter. I chose a filter gt 2023-06-14 but still receive all the data from the past month.

image

@PeCour

Can you please show the filter dates you used…because for me it is filtering…wanted to check what is the difference

Also try usgin TimeStamp instead of Timestamp

cheers

I tried it with TimeStamp but it did not work. I always get data back for 15.06.2023.

“odata/RobotLogs?%24filter=TimeStamp%20lt%202023-07-14T05%3A38%3A12.176Z%20%26%20TimeStamp%20gt%202023-06-18T05%3A38%3A12.176Z’”

“/odata/RobotLogs?$filter= TimeStamp lt 2023-07-14T05:38:12.176Z & TimeStamp gt 2023-06-18T05:38:12.176Z”

“/odata/RobotLogs?$filter= TimeStamp gt 2023-06-18T05:38:12.176Z”

Unfortunately, this is a different API call. I would like to retrieve RobotLogs and not Jobs.
But thanks

@PeCour

With a lot of trail and error I can see this query worked…can you try this please. It is not throwing error if query is wrong though so make sure you use it properly

TimeStamp gt 2023-06-23T10:19:54.265Z and TimeStamp lt 2023-06-24T11:20:54.265Z

odata/RobotLogs?%24filter=TimeStamp gt 2023-06-23T10:19:54.265Z and TimeStamp lt 2023-06-24T11:20:54.265Z

cheers

@Anil_G I appreciate your effort. I copy pasted the code that you send to me and started the program. Yet, it did not work. I think there is a bug :confused:

If you want I will mark your post as solution since you put so much effort in it. But I think I will give up on this.

FYI: This for example works without problem:
/odata/RobotLogs?$filter=ProcessName eq ‘PROCESS’ &$orderby=TimeStamp desc

@PeCour

Just for test can you include only gt or lt with out and and see if it works

This si not about solution …but if its a bug then it should not work for anyone…it would not be like it would work for one and not for other

cheers

@Anil_G thank you very much! We examined it together and tried it in another xaml where it worked. Probably the xaml was broken (latest version)

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.