Skip to content

add query param to list api keys - #1833

Merged
nikhilsinhaparseable merged 1 commit into
parseablehq:mainfrom
nikhilsinhaparseable:list-api-key-priviledge
Oct 23, 2026
Merged

nikhilsinhaparseable merged 1 commit into
parseablehq:mainfrom
nikhilsinhaparseable:list-api-key-priviledge

Conversation

@nikhilsinhaparseable

@nikhilsinhaparseable nikhilsinhaparseable commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

support for ?priviledge=reader|ingestor|admin|writer|editor

eg. GET /api/prism/v1/apikeys?priviledge=reader
returns all api keys with reader priviledge

Summary by CodeRabbit

  • New Features
    • Administrators can filter the API key list by privilege: reader, ingestor, admin, writer, or editor.
    • When a privilege filter is provided, the list includes keys with at least one tenant role matching that privilege. Without a filter, the existing listing behavior remains unchanged.

support for `?priviledge=reader|ingestor|admin|writer|editor`

eg. GET /api/prism/v1/apikeys?priviledge=reader
returns all api keys with reader priviledge
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 7ce45969-ad3c-4b4b-aec2-ca71615fdb2d
📥 Commits

Reviewing files that changed from the base of the PR and between 32979cb and 8ceccd1.

📒 Files selected for processing: 1
  • src/handlers/http/apikeys.rs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

The API key listing endpoint now accepts an optional privilege query parameter. When provided, it returns keys with at least one assigned tenant role that matches the requested privilege. Admin verification and masked key entries remain in place.

Changes

API key privilege filtering

Layer / File(s) Summary
Privilege query and key listing
src/handlers/http/apikeys.rs
The handler accepts the optional priviledge parameter and parses supported privilege values. When provided, it retains keys with a matching assigned tenant role. Admin verification and masked entries remain unchanged.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: parmesant

Merge Risk: ⚪ Minimal · up to 8cecc

The privilege filter appears ready to merge after normal checks.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description states the new query parameter and provides an example, but it omits the template's goal, rationale, key-change details, testing status, comments status, documentation status, and issu… Add a Description section with the PR goal, chosen implementation and rationale, and key changes. State the testing status and whether comments and documentation were added. Include a Fixes #XXXX reference if applicable, or remove that sect…
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title accurately identifies the main change: adding a query parameter to the API key listing endpoint. It is concise, but it could specify that the parameter filters by privilege.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description states the new query parameter and provides an example, but it omits the template's goal, rationale, key-change details, testing status, comments status, documentation status, and issue reference handling.

Resolution

Add a Description section with the PR goal, chosen implementation and rationale, and key changes. State the testing status and whether comments and documentation were added. Include a Fixes #XXXX reference if applicable, or remove that section if no issue applies.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the keys at night,
And sorts by privilege just right.
Reader, writer, admin too,
The filtered list comes hopping through.
Masked keys stay tucked from sight.

Comment @coderabbitai help to get the list of available commands.

@nikhilsinhaparseable
nikhilsinhaparseable merged commit d1f478b into parseablehq:main Oct 23, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants