Until last week, I was regularly querying this MapServer with a URL that specified minimum date. Sometime last week, I started getting error code 400.
My now-failing URL looks like this: https://dhsgis.wi.gov/server/rest/services/DHS_COVID19/COVID19_WI_V2/MapServer/11/query?where=RptDt>='2022-05-01'&outFields=*&returnGeometry=false&outSR=4326&f=json
The key bit is where=RptDt>='2022-05-01'.
This URL, without the date argument, works just fine, so this isn't an issue with the server itself.
https://dhsgis.wi.gov/server/rest/services/DHS_COVID19/COVID19_WI_V2/MapServer/11/query?where=1=1&outFields=*&returnGeometry=false&outSR=4326&f=json
Did ArcGIS change the formatting for date values? Does anyone know how I can update my URL to work properly?
Try using something like timestamp '2022-05-01'. We encountered this with a server upgrade in the past, where the word "timestamp" was previously not required, which broke some of our queries.
Bingo. This works:
https://dhsgis.wi.gov/server/rest/services/DHS_COVID19/COVID19_WI_V2/MapServer/11/query?where=RptDt>=timestamp'2022-05-01'&outFields=*&returnGeometry=false&outSR=4326&f=json
Thanks, Josh!
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.