PeCour
July 12, 2023, 1:24pm
1
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!
Anil_G
(Anil Gorthi)
July 12, 2023, 2:38pm
2
@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
PeCour
July 13, 2023, 5:49am
3
@Anil_G ok thanks, but it does not work when I try it Any idea why?
Anil_G
(Anil Gorthi)
July 13, 2023, 7:54am
4
@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
PeCour
July 14, 2023, 5:30am
5
@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.
Anil_G
(Anil Gorthi)
July 14, 2023, 5:38am
6
@PeCour
Can you tell what error you are getting
because I tried same and I find no issue
cheers
PeCour
July 14, 2023, 6:30am
7
@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.
Anil_G
(Anil Gorthi)
July 14, 2023, 6:49am
8
@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
PeCour
July 14, 2023, 11:40am
10
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”
PeCour
July 14, 2023, 11:41am
11
Unfortunately, this is a different API call. I would like to retrieve RobotLogs and not Jobs.
But thanks
Anil_G
(Anil Gorthi)
July 14, 2023, 12:11pm
12
@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
PeCour
July 14, 2023, 12:46pm
13
@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
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
Anil_G
(Anil Gorthi)
July 14, 2023, 12:48pm
14
@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
PeCour
July 14, 2023, 1:03pm
15
@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
system
(system)
Closed
July 17, 2023, 1:03pm
16
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.