influxdata / influxdata/influxdb
Ensure consistency of API's where both "ID" and "name" are allowed
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
#22272 exposed a bug in one particular API endpoint for authorizations where if a "name" was provided for either user or organization, it would not use the name to filter and would instead return a list of all results. This was fixed, including the convention that if BOTH the "ID" and "name" are provided simultaneously for org and/or user, the ID will take precedence and the name will not be used. This seems to be the convention across resources handled by the API.
This brought to light a couple of things:
1. We should ensure that our API docs indicate that for resources like this, the ID takes precedence over the name if both are provided
2. We should ensure that this behavior is indeed consistent across endpoints. There may be other API endpoints where the "name" parameters are not being handled correctly, or behave inconsistently with the convention used here.
Contributor guide
Research direction
Start by reviewing the authorizations API behavior described in the issue and the related API documentation. Check other endpoints that accept both resource IDs and names for consistent precedence and filtering. Done means the documented convention matches the behavior across the identified endpoints.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100