USACE / USACE/cwms-data-api

[GET] TimeSeries Group does not upper-case Office ID

Open
#1,499 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
28
Forks
25
Avg merge
4d 22h
Merged PRs (30d)
20

Description

Describe the bug
If a user calls the timeseries group endpoint to retrieve a specific timeseries group the office argument will not be uppercased.

If you leave it lowercase it will fail to find any timeseries in the requested group. Suggest we uppercase to avoid the user having to uppercase/client-libraries having to know to do this.

Expected behavior
User can enter SwT, swt, SWT, or any variation of and it result in a timeseries found so long as the letters match the office.

To Reproduce
Steps to reproduce the behavior:

Fails
curl -X 'GET' \
  'https://cwms-data.usace.army.mil/cwms-data/timeseries/group/Test-monthlychartsgroup2?office=swt&category-office-id=SWT&group-office-id=SWT&category-id=Test-monthlycharts2' \
  -H 'accept: application/json'

yields

...start
"assigned-time-series": []
Works
curl -X 'GET' \
  'https://cwms-data.usace.army.mil/cwms-data/timeseries/group/Test-monthlychartsgroup2?office=SWT&category-office-id=SWT&group-office-id=SWT&category-id=Test-monthlycharts2' \
  -H 'accept: application/json'

yields

...start
"assigned-time-series": [
    {
      "office-id": "SWT",
      "timeseries-id": "AARK.%-Regulating Flow.Inst.1Hour.0.Ccp-Rev"
    },
    {
      "office-id": "SWT",
      "timeseries-id": "AARK.Dir-Wind.Inst.1Hour.0.Ccp-Rev"
    }
  ]

CDA Version (please complete the following information):

  • Version 2025.09.02

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the GET /cwms-data/timeseries/group endpoint and how its office query parameter is handled. Reproduce the provided curl request with lowercase and mixed-case office values, then verify that matching requests return the assigned time series for the office.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.