2025-07-14

2025-07-14

Locations

  • Examples ->
  • cwms-python
  • In the swagger docs themselves include base examples
  • NWK(question): So why not a line above the try it out that would be a completely working cut and paste that someone could try out and then change to what they wanted?
  • Possibly tied to: - https://github.com/USACE/cwms-data-api/issues/930- https://github.com/USACE/cwms-data-api/issues/911
  • What are location IDs? What are names?
  • https://github.com/HydrologicEngineeringCenter/cwms-python/issues/125
  • Gold stars
  • Wont let you create location without lat/lon/timezone
  • Bug
  • Get a 500 if you don't specify something on /locations (no id) but it also says not required for all parameterscwms.cda.api.LocationController.getAll 1177377251864346337: failed to process requestjava.time.DateTimeException: Invalid ID for region-based ZoneId, invalid format: Unknown or Not ApplicableTimezone not set for any given location that results in the query would cause this? SPL (Paul/Jason) ran into this querying the locations endpoint
  • In the swagger UI it requires office, but the verbiage is the preferred
  • Locations-id patch in swagger defaults to xml request body
  • Confirm all endpoints respond accordingly if nothing is provided when there are no required params
  • PATCH endpoint does not respect units
  • If you POST a location with 1 and set units to ft, it will result in a 1 when ft is request. HOWEVER, if you PATCH with a 1 and set units to ft it will return 3.28~ when requesting ft
  • Location Elev Bug reported by Mitch: https://discourse.hecdev.net/t/cwms-vue-location-table-unit-issue/3444
  • Issue created for this: https://github.com/USACE/cwms-data-api/issues/1191
  • Swagger UI expects a json response but a plaintext string is returned when the location is updated or created (should be JSON)
  • Happens for POST/PATCH/DELETE (check other endpoints)
  • Bypass UI and attempt to query endpoint without office results in null office and not found locationIf this field is not specified, matching location level information from all offices shall be returned.