Skip to content

openapi(api-keys): document reset_usage on update and align examples#538

Draft
akhilmmenon wants to merge 303 commits intoopenai:masterfrom
Portkey-AI:openapi-spec/4432-admin-api-upgrade
Draft

openapi(api-keys): document reset_usage on update and align examples#538
akhilmmenon wants to merge 303 commits intoopenai:masterfrom
Portkey-AI:openapi-spec/4432-admin-api-upgrade

Conversation

@akhilmmenon
Copy link
Copy Markdown

Summary

  • Add reset_usage to UpdateApiKeyObject for PUT /api-keys/{id}.
  • Document reset_usage as a boolean with clear behavior: resets current usage and can reactivate exhausted keys.
  • Add request examples for the update operation, including a minimal payload:
    • {"reset_usage": true}
  • Correct update operation curl code samples to use PUT instead of GET.
  • Include the OpenAPI changes for the rotate endpoint in this same PR.

Why

The reset usage flow is already supported, but it was not clearly discoverable in the OpenAPI docs for API key updates. This change makes the behavior explicit and provides a minimal testable example.

Merge Timing

This PR should remain open for now. We are waiting to merge it after the rotate endpoint is Generally Available.

Scope Note

Please ensure this PR includes rotate endpoint OpenAPI updates as well (along with the reset_usage documentation updates).

Test Plan

  • Validate OpenAPI syntax (redocly lint or equivalent project validation).
  • Confirm PUT /api-keys/{id} request schema includes reset_usage.
  • Confirm PUT /api-keys/{id} examples include {"reset_usage": true}.
  • Confirm update curl examples use -X PUT.
  • Confirm rotate endpoint OpenAPI changes are included in this PR.

csgulati09 and others added 30 commits August 9, 2024 18:26
chore: add workspace_ids to users and remove created_by and updated_b…
chore: log exports spec changes - make workspace optional
Change summary for createFile operation
sd and others added 30 commits February 5, 2026 19:40
Add openapi spec for mcp gateway
feat: add default provider options to integration workspace access in…
changes in guardrail api and api key creation api
Update Mintlify workflow to trigger on push to master instead of pull request merge
…o OpenAPI spec for workspace-scoped integrations
…tions-for-ws-integrations

feat: add create_default_provider and default_provider_slug options t…
chore: document behvaiour of prompt patch and updates
…t-workspaces-query

feat: add status query parameter to filter workspaces by active or ar…
chore: realtime endpoint addition
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.