ioBroker / ioBroker.simple-api

HTTP-API Interface to read and write objets and states
MIT License
41 stars 19 forks source link

Using relative dates in query #192

Open jnko opened 3 months ago

jnko commented 3 months ago

How can I query with relative dates instead of fixed ones?

Examples:

http://ipaddress:8087/query/stateID1,stateID2/?dateFrom=-2d
http://ipaddress:8087/query/stateID1,stateID2/?dateFrom=-1m
http://ipaddress:8087/query/stateID1,stateID2/?dateFrom=-4h
http://ipaddress:8087/query/stateID1,stateID2/?dateFrom=today

Perhaps this is already working but I wasn't able to find any information about it in this repo or in ioBroker forum.