influxdata / influxdata/influxdb
Add support for `GET /api/v2/authorizations?token=` to filter auths by token value (as in Cloud)
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Proposal:__
Support the `?token=` query parameter in `GET /api/v2/authorizations` requests.
As in InfluxDB Cloud, the parameter should list only the
authorization with the specified `token` value.
__Current behavior:__
`GET /api/v2/authorizations` responds with the list of authorizations after applying other parameters; ignores `token=`.
__Desired behavior:__
- Parity with IDPE.
- `GET /api/v2/authorizations` should respond with a list that contains only the authorization with the specified `token` property value.
__Alternatives considered:__
None
__Use case:__
- Parity with IDPE (Cloud).
- Support for this parameter appears to be the only difference between the IDPE and OSS contracts for the `GET /api/v2/authorizations` endpoint.
Contributor guide
Research direction
Start by locating the GET /api/v2/authorizations entry point and the existing handling of query parameters. Add support for token filtering consistent with the stated Cloud behavior, then verify that a request with token= returns only the authorization whose token property matches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, authorization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100