Hello, I need some help properly writing a query for a time-enabled REST service. I have a public layer on our REST Endpoint that has been time-enabled. When I go to query the data, however, it seems like my time input has no effect on the query. For example, if I input a point location geometry and a time value that is outside the start_date and end_date values (and use timeRelation=esriTimeRelationOverlaps), I still get a result. It seems like no matter what value I input for the Time: parameter, I still get a result. I am aware of this article, but it does not appear that any of the input formats in that article change my result. Is there any other documentation on Time queries that I should be using?
Solved! Go to Solution.
See documentation for example for `time` parameter syntax.
Copied here for your convenience.
The time instant or the time extent to query.
Time instant
Syntax: time=<timeInstant>
Example: time=1199145600000 (1 Jan 2008 00:00:00 GMT)
Time extent
Syntax: time=<startTime>, <endTime>
Example: time=1199145600000, 1230768000000 (1 Jan 2008 00:00:00 GMT to 1 Jan 2009 00:00:00 GMT)
A null value specified for start time or end time will represent infinity for start or end time, respectively. Example: time=null, 1230768000000
Example query outside of the data's time range (expect 0 records as of this post): https://gis.colorado.gov/public/rest/services/OEDIT/Enterprise_Zones/MapServer/2/query?where=1%3D1&t...
Example query inside the data's time range (expect 19 records as of this post): https://gis.colorado.gov/public/rest/services/OEDIT/Enterprise_Zones/MapServer/2/query?where=1%3D1&t...
See documentation for example for `time` parameter syntax.
Copied here for your convenience.
The time instant or the time extent to query.
Time instant
Syntax: time=<timeInstant>
Example: time=1199145600000 (1 Jan 2008 00:00:00 GMT)
Time extent
Syntax: time=<startTime>, <endTime>
Example: time=1199145600000, 1230768000000 (1 Jan 2008 00:00:00 GMT to 1 Jan 2009 00:00:00 GMT)
A null value specified for start time or end time will represent infinity for start or end time, respectively. Example: time=null, 1230768000000
Example query outside of the data's time range (expect 0 records as of this post): https://gis.colorado.gov/public/rest/services/OEDIT/Enterprise_Zones/MapServer/2/query?where=1%3D1&t...
Example query inside the data's time range (expect 19 records as of this post): https://gis.colorado.gov/public/rest/services/OEDIT/Enterprise_Zones/MapServer/2/query?where=1%3D1&t...
Ah, okay so the time must be in epoch time. Appreciate the help!