Skip to content

Item filter is not working #3

Description

@girirajnish

I want to filter the data on the basis of time but not found any way in the documentation provided. While I am trying any of the following way getting "requests.exceptions.HTTPError: 422 Client Error: Unprocessable Entity" as error.

connect

unity = Unity(host,user,passwd)
a= datetime.datetime.now() - datetime.timedelta(hours=1)
b=a.strftime("%Y-%m-%dT%H")
fil ='creationTime LK "{}%"'.format(b)
print(fil)
#code to collect disk data into a file
data= unity.event(item_filter=fil)

Or

connect

unity = Unity(host,user,passwd)
a= datetime.datetime.now() - datetime.timedelta(hours=1)
b=a.strftime("%Y-%m-%dT%H:%M:%SZ")
fil ='creationTime GE"{}"'.format(b)
print(fil)
#code to collect disk data into a file
data= unity.event(item_filter=fil)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions