I have a public hosted feature in ArcGIS Online (test data) which has SYNC enabled.
Using the Python API I want to download a file geodatabase, but also include a WHERE clause to download a subset of the data.
I am having a problem with the WHERE clause.
I can perform a standard REST query to get some records from an individual layer.
WHERE type='JAM'
I can also successfully download a file geodatabase using the createReplica endpoint via REST:

However, if I want to apply a WHERE clause, I am having some problems getting the layerQueries parameter to work via REST
<SPAN class="punctuation token">{</SPAN><SPAN class="string token">"0"</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="punctuation token">{</SPAN><SPAN class="string token">"queryOption"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"useFilter"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"where"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"type = JAM"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"useGeometry"</SPAN><SPAN class="punctuation token">:</SPAN> false<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">{</SPAN><SPAN class="string token">"0"</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="punctuation token">{</SPAN><SPAN class="string token">"where"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"type = JAM"</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>Both of the above result in:
Exporting data for layer 0 failed.
Can anyone point out what is wrong with my layerQueries param, I am sure it must be something simple.
I intend on using this via Python as below, but I figure I need to be able to get it work directly against the REST API before troubleshooting in Python.
replica <SPAN class="operator token">=</SPAN> waze_flc<SPAN class="punctuation token">.</SPAN>replicas<SPAN class="punctuation token">.</SPAN>create<SPAN class="punctuation token">(</SPAN>replica_name <SPAN class="operator token">=</SPAN> <SPAN class="string token">'Waze_Download'</SPAN><SPAN class="punctuation token">,</SPAN>
layer_queries <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">{</SPAN><SPAN class="string token">"0"</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="punctuation token">{</SPAN><SPAN class="string token">"queryOption"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"useFilter"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"where"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"type = JAM"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"useGeometry"</SPAN><SPAN class="punctuation token">:</SPAN> false<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN>
layers <SPAN class="operator token">=</SPAN> <SPAN class="string token">'0'</SPAN><SPAN class="punctuation token">,</SPAN>
data_format <SPAN class="operator token">=</SPAN> <SPAN class="string token">'filegdb'</SPAN><SPAN class="punctuation token">,</SPAN>
out_path <SPAN class="operator token">=</SPAN> <SPAN class="string token">'./download'</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
The field I actually need to perform the WHERE clause on is a timestamp, to get the last 24 hours of data.