Allow aliases for the locations endpoints
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 28
- Forks
- 25
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 20
Description
Allow the usage of aliases for the location/location by ID endpoints, not just the primary keys
For example if I know the shefid of a project, (Handbook 5), i should be able to query the location by ID endpoint and get back the same metadata as if I used the primary key:
curl -X 'GET' \
'https://cwms-data.usace.army.mil/cwms-data/locations/CATO?office=SWT' \
-H 'accept: application/json;version=2'
Returns as you would expect but if I try:
curl -X 'GET' \
'https://cwms-data.usace.army.mil/cwms-data/locations/CTOO2?office=SWT' \
-H 'accept: application/json;version=2'
I get a 404
See #1036 for what the response could look like
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the locations-by-ID endpoint and compare its handling of primary keys with the alias example in the issue. Read #1036 for the expected response shape, then verify that both CATO and the alias CTOO2 return the same metadata for office SWT instead of a 404.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100