dynatrace-oss / api-client-python

Dynatrace API Python client
Apache License 2.0
57 stars 22 forks source link

add from/to in monitored entities query #84

Closed giles-day closed 3 weeks ago

giles-day commented 1 month ago

Is your feature request related to a problem? Please describe. I was trying to pull a list of entities and noticed the numbers didnt match the gui, it appears that this is because it is more than 3days since it was used.

Describe the solution you'd like to be able to do something like this:: for entity in dt.entities.list('type("APPLICATION")', fields="tags",from="-365d",to="now"):

Describe alternatives you've considered manually checking the apps for what tags they have

Additional context Add any other context or screenshots about the feature request here.

Dynatrace-James-Kitson commented 1 month ago

This is already supported, example below:

dt.entities.list(entity_selector="type(APPLICATION)", fields="+tags", time_from="-365d", time_to="now")

Make sure you are on the latest version. Also FYI it defaults to 'now' for the time_to field.