[Feature]:Allow Posting multiple stream locations in single request
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 28
- Forks
- 25
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 20
Description
Describe the bug
Is it the intent of the post stream-locations endpoint to allow multiple stream locations? I can only get one stream-location at a time to work.
Expected behavior
I thought that when I posted three stream-locations, that it would post all three. However, I can only do them individually. Not sure if I've got the formatting incorrect or if it just doesn't accept multiples.
To Reproduce
- Go to CDA test swagger, post streamLocations
- Select fail-if-exists=false
- Put more than one gage in the request body. This is what I used:
[
{
"stream-location-node": {
"id": {
"office-id": "SWT",
"name": "DIEB"
},
"stream-node": {
"stream-id": {
"office-id": "SWT",
"name": "Saline_R"
},
"station": 53,
"station-units": "mi"
}
},
"area-units": "mile2",
"stage-units": "ft"
},
{
"stream-location-node": {
"id": {
"office-id": "SWT",
"name": "DIES"
},
"stream-node": {
"stream-id": {
"office-id": "SWT",
"name": "Saline_R"
},
"station": 48,
"station-units": "mi"
}
},
"area-units": "mile2",
"stage-units": "ft"
},
{
"stream-location-node": {
"id": {
"office-id": "SWT",
"name": "LOCK"
},
"stream-node": {
"stream-id": {
"office-id": "SWT",
"name": "Saline_R"
},
"station": 31,
"station-units": "mi"
}
},
"area-units": "mile2",
"stage-units": "ft"
}
]
Priority
Medium
Logs/Incident Identifier
I got the 500 error "Formatting error:Could not deserialize"
Incident identifier is:
3002d44a-4f01-4adf-a9d8-0068d0146086
CURL Commands
curl -X 'POST' \
'https://cwms-data-test.cwbi.us/cwms-data/stream-locations?fail-if-exists=false' \
-H 'accept: */*' \
-H 'Authorization: REDACTED \
-H 'Content-Type: application/json;version=1' \
-H 'Cache-Control: no-cache, no-store, max-age=0' \
-H 'Pragma: no-cache' \
-d '[
{
"stream-location-node": {
"id": {
"office-id": "SWT",
"name": "DIEB"
},
"stream-node": {
"stream-id": {
"office-id": "SWT",
"name": "Saline_R"
},
"station": 53,
"station-units": "mi"
}
},
"area-units": "mile2",
"stage-units": "ft"
},
{
"stream-location-node": {
"id": {
"office-id": "SWT",
"name": "DIES"
},
"stream-node": {
"stream-id": {
"office-id": "SWT",
"name": "Saline_R"
},
"station": 48,
"station-units": "mi"
}
},
"area-units": "mile2",
"stage-units": "ft"
},
{
"stream-location-node": {
"id": {
"office-id": "SWT",
"name": "LOCK"
},
"stream-node": {
"stream-id": {
"office-id": "SWT",
"name": "Saline_R"
},
"station": 31,
"station-units": "mi"
}
},
"area-units": "mile2",
"stage-units": "ft"
}
]'
CDA Version
2026.05.12-testf OAS 3.0
Additional context
No response
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 with the CDA Swagger definition and the POST /stream-locations endpoint, then reproduce the request using the provided curl payload. Determine whether the endpoint accepts an array of stream locations and verify that a request containing all three locations succeeds and creates each one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100