When Querying RISE for a larger geometry (bbox of Colorado) is appears to be very easy to overwhelm the API and temporarily receive rate limiting in the form of:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><HTML
xmlns="http://www.w3.org/1999/xhtml"><HEAD>
<META name="GENERATOR" content="MSHTML 9.00.8112.16502"></HEAD>
<BODY>
<TABLE border="0" width="1024">
<TBODY>
<TD height="518" rowSpan="2" width="135"> </TD>
<TD height="386" width="718">
<DIV align="center">
<H3 class="StandardText"> </H3>
<H1 class="StandardText">This application is under maintenance and will be temporarily unavailable. </H1>
<H2 class="StandardText">Please refer back to this page for updates and status. </H2>
<P> </P>
<H3><SPAN class="StandardText"><SPAN class="StandardText">We are sorry for any inconvenience</SPAN></SPAN></H3>
<P> </P></DIV></TD>
<TD rowSpan="2" width="149"> </TD></TR>
<TR>
<TD height="21"> </TD></TR>
<TR>
<TD height="21" colSpan="3"> </TD></TR></TBODY></TABLE>
<P> </P>
<P> </P>
<P> </P>
<P> </P></BODY></HTML>
, URL: https://data.usbr.gov/rise/api/result?itemId=4775&page=2&itemsPerPage=10000
[2025-04-22T09:41:40Z] {/Users/benwebb/Documents/GitHub/internetofwater/Western-Water-Datahub/packages/com/src/com/cache.py:30} ERROR - 200, message='Attempt to decode JSON with unexpected mimetype: text/html', url='https://data.usbr.gov/rise/api/result?itemId=4283&page=1&itemsPerPage=10000': Text: <U+FEFF><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
It would be great if there was a retry mechanism and backoff strategy to still populate these requests without resulting in 500 Code response from the server.
When Querying RISE for a larger geometry (bbox of Colorado) is appears to be very easy to overwhelm the API and temporarily receive rate limiting in the form of:
It would be great if there was a retry mechanism and backoff strategy to still populate these requests without resulting in 500 Code response from the server.