Basins Endpoint Broken
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 28
- Forks
- 25
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 20
Description
Automation Testing for CWMSjs - /Basins
Attempting the /cwms-data/basins endpoint from various means gives no results.
Presuming at least LRH has basins in there database I would expect to get something back.
Using Swagger / CURL default value for LRH returns
(Mimetype is set to pg+json?)
curl -X 'GET' \
'https://cwms-data.usace.army.mil/cwms-data/basins?office=LRH' \
-H 'accept: application/vnd.named+pg+json'
Using a normal mimetype (application/json) gives
curl -X 'GET' \
'https://cwms-data.usace.army.mil/cwms-data/basins?office=LRH' \
-H 'accept: application/json'
An empty string.
I would not expect there to be a version 2, but I tried it. But it also returns the empty string.
It is the same for other districts.
If the basins endpoint is not complete should we consider moving it out of PROD?
EDIT:
If this is an issue with districts not having data in the tables the endpoint looks at, can we consider adding the POST method to start getting data in without needing to use the SQL directly?
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 reproducing the /cwms-data/basins?office=LRH requests with both application/vnd.named+pg+json and application/json, then trace the basins endpoint to the data it queries. No implementation files or tests are named; done means determining why valid districts return empty results and adding coverage or documenting the production decision, including whether POST support is in scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100