Skip to content

Add a roll command to the roboflow api-key CLI - #566

Merged
renzon merged 2 commits into
mainfrom
renzo/ent-2118-add-a-roll-command-to-the-roboflow-api-key-cli
Oct 23, 2026
Merged

renzon merged 2 commits into
mainfrom
renzo/ent-2118-add-a-roll-command-to-the-roboflow-api-key-cli

Conversation

@renzon

@renzon renzon commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

The CLI could create, update, protect, disable and revoke API keys, but rotating one meant revoking it and creating a replacement by hand, losing the key's scopes, folders and metadata. roboflow api-key roll KEY_ID calls the existing POST /:workspace/api-keys/:keyId/roll endpoint, which revokes the key and mints its replacement with the same configuration, and prints the new secret once. --rotation-due-at and --owner set the replacement's rotation schedule.

Related Issue(s): ENT-2118

Type of Change

  • New feature (non-breaking change that adds functionality)

Testing

  • I have tested this change locally
  • I have added/updated tests for this change

Test details:

  • tests/cli/test_api_key.py: help, text and JSON output, confirmation without a TTY, schedule forwarding, 409 and 404 exit codes
  • Adapter tests: roll path with URL-encoded key ID, body only when fields are given, status code attached to RoboflowError

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings or errors
  • I have updated the documentation accordingly (if applicable)

Additional Context

The public docs page "API Key Management API" (roboflow/docs#407) will list the command once this ships.

@renzon renzon self-assigned this Oct 22, 2026
@renzon
renzon force-pushed the renzo/ent-2118-add-a-roll-command-to-the-roboflow-api-key-cli branch from a3b2b2a to 1b1a077 Compare October 23, 2026 12:34
@renzon
renzon force-pushed the renzo/ent-2118-add-a-roll-command-to-the-roboflow-api-key-cli branch from 1b1a077 to 6fa9b47 Compare October 23, 2026 12:38
@renzon
renzon marked this pull request as ready for review October 23, 2026 12:47
@renzon
renzon merged commit 9a4e5ad into main Oct 23, 2026
15 checks passed
@renzon renzon mentioned this pull request Oct 23, 2026
4 tasks done
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