API filtering on logs Level not working

Hi!

I’m trying to filter the logs on level but none of my attempts seems to work.

A simple query on TimeStamp like this works perfectly: https://cloud.uipath.com/foo/default/orchestrator_/foo/default/orchestrator_/data/RobotLogs?%24filter=TimeStamp%20eq%202019-12-10T10:10:10.000Z

But when I filter on Level it completely ignores the filter and show all Levels:
https://cloud.uipath.com/foo/default/orchestrator_/foo/default/orchestrator_/data/RobotLogs?%24filter=Level%20eq%20’Error’. Also without quotes it complains that: “Invalid OData query options.”.

In my project I need filtering (i put some spaces to not create link):
https:// cloud.uipath. com/foo/default/orchestrator_/foo/default/orchestrator_/data/RobotLogs?%24filter=JobKey eq 9a312…01eee and Level%20eq%20’Error’.

Any idea why this isn’t working?

Thanks in advance.

Hi,

take a look at the documentation: OData Version 4.01. Part 1: Protocol (oasis-open.org)

For example this should work:
filter: date(2021-01-01T10:10:36.08Z) eq date(TimeStamp)
or
odata/RobotLogs?$filter=date(2019-07-23T10%3A10%3A36.08Z)%20eq%20date(TimeStamp)

Gio

Hi Friend!

Thank you for your answare but my problem is not in Timestamp Filtering, my problema is Level Filtering (Info, Error, etc…), Timestamp Filtering Works Perfectly but Level Filtering don’t work.

Thanks in advance.

Hi,

ok, I tried to copy your query and it doesn’t work in my Orchestrator too. Now maybe the single quote mark seems wrong because I used ’ (ASCII 39) and your ’ is (ASCII 8217).

In my case work something like that:
odata/RobotLogs?$filter=Level%20eq%20’Error’%20or%20Level%20eq%20’Trace’&$top=20

Regards, Gio

Hi Friend!

Thank you for reply. I too use ’ (ASCII 39), maybe the input of forum replace to ’ (ASCII 8217), but I tried with ’ (ASCII 8217) and return “Invalid OData query options.”, with ’ (ASCII 39) the filter ignore $filter=Level%20eq%20’Error’ and return All Levels (info, error, etc…)… I believe that have any bug in Commands of Filter System, for example I discovery that filter ignore TWO filters comannds: odata/RobotLogs?$filter=TimeStamp gt 2021-02-05T00:00:00.000Z and JobKey eq 9a312…01eee, they ignore TimeStamp and return Just Logs with same JobKey in any date time…

Thanks in advance.

Hi @Marco_HVS

Could you share your version of Orchestrator?

Hi!

My Orchestrator is 2019.10.14.