locations endpoint #784
mdstanfill
started this conversation in
General
Replies: 1 comment 3 replies
-
If you doing any kind of searching on timeseries or location we strongly recommend the catalog endpoint. It has more query options, such as groups and categories. And the bounding office field. That all said, you are going to have a hard time searching by "responsibility" by that name as that's not a concept that the CWMS Database Schema was designed around (though in hindsight clearly makes sense to have done so) but we did expose the bounding office field in the catalogs since it was being used that way. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to get a list of locations by responsibility, and am (currently) resigned to the limitation that the
locations
endpoint can only limit byoffice
andnames
(with parameters forunit
,datum
, andformat
), so that I'll have to query all the locations for the office and sift through the results on the client side.What I'm finding is that unless you specify a
names
parameter, and it's fairly restrictive, the endpoint returns a500
error: "failed to process request". I've tried this with the 3.0 version, the 3.14rc3 version I was testing with, and the 3.14rc4 version I saw when I first went to GitHub to see if there were any notes on this. On the off chance thatunit
anddatum
limit the set of locations returned, I set those as well, but to no avail. E.g.:curl -X 'GET'
'https://wm.nwp.ds.usace.army.mil:8243/nwdp-data-314rc4/locations?office=NWDP&unit=EN&datum=NGVD29'
-H 'accept: application/json;version=2'
returns:
as does the earlier version of the API:
curl -X 'GET'
'https://wm.nwp.ds.usace.army.mil:8243/nwdp-data/locations?office=NWDP&unit=EN&datum=NGVD29'
-H 'accept: application/json'
I do get something back if the
names
parameter results in few results, e.g.,AB
:curl -X 'GET'
'https://wm.nwp.ds.usace.army.mil:8243/nwdp-data-314rc4/locations?names=AB&office=NWDP&unit=EN&datum=NGVD29'
-H 'accept: application/json;version=2'
but not, say,
B
:curl -X 'GET'
'https://wm.nwp.ds.usace.army.mil:8243/nwdp-data-314rc4/locations?names=B&office=NWDP&unit=EN&datum=NGVD29'
-H 'accept: application/json;version=2'
Beta Was this translation helpful? Give feedback.
All reactions