Issue
If you query the /locations endpoint (GET) with no parameters the request fails with a 500.
Reproduce
curl -X 'GET' \
'https://cwms-data.usace.army.mil/cwms-data/locations' \
-H 'accept: application/json;version=2'
Error:
You get a 500 on the client/api response.
The logs for tomcat show:
cwms.cda.api.LocationController.getAll -1177377251864346337: failed to process request java.time.DateTimeException: Invalid ID for region-based ZoneId, invalid format: Unknown or Not Applicable
Details / Assumptions
The Location endpoint suggests in the swagger page that it is valid to query without a office or any location.
Under office you see:
If this field is not specified, matching location level information from all offices shall be returned.
Solutions
While the /catalog endpoint might be better (add a reference to catalog from locations endpoint?), the locations endpoint still suggests it is useable for querying multiple locations.
In another issue a user also wants to query all locations through the /locations
Reported in [07/14/2025] CDA BiWeekly
Issue
If you query the /locations endpoint (GET) with no parameters the request fails with a 500.
Reproduce
Error:
You get a 500 on the client/api response.
The logs for tomcat show:
Details / Assumptions
The Location endpoint suggests in the swagger page that it is valid to query without a office or any location.
Under office you see:
Solutions
While the /catalog endpoint might be better (add a reference to catalog from locations endpoint?), the locations endpoint still suggests it is useable for querying multiple locations.
In another issue a user also wants to query all locations through the /locations
Reported in [07/14/2025] CDA BiWeekly