feat(server): add public environment api-keys management endpoints - #7007
Draft
ErickRDev wants to merge 2 commits into
Draft
feat(server): add public environment api-keys management endpoints#7007ErickRDev wants to merge 2 commits into
ErickRDev wants to merge 2 commits into
Conversation
ErickRDev
force-pushed
the
erickr/NAN-6478-add-public-env-api-keys-management-routes
branch
from
August 3, 2026 15:03
87676fc to
4110c01
Compare
Contributor
There was a problem hiding this comment.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
ErickRDev
force-pushed
the
erickr/NAN-6478-add-public-env-api-keys-management-routes
branch
from
August 3, 2026 16:17
4110c01 to
6bbfb9c
Compare
Add POST and DELETE /environment/api-keys to the public API so account-key holders can manage per-environment API keys programmatically. - New PostPublicApiKey / DeletePublicApiKey endpoint types, wired into PublicApiEndpoints. - New controllers under controllers/environment/, both validating target environment belongs to the account (res.locals.account) before touching customerKeyService. - Extract the create-key error mapping from the private createApiKey controller into sendCreateEnvironmentKeyError so both paths share the same error handling principles.
ErickRDev
force-pushed
the
erickr/NAN-6478-add-public-env-api-keys-management-routes
branch
from
August 3, 2026 23:52
6bbfb9c to
50ef9ac
Compare
TBonnin
approved these changes
Aug 4, 2026
| report(error); | ||
| res.status(500).send({ error: { code: 'server_error', message: 'Failed to create API key' } }); | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
do we need a separate function?
Contributor
Author
There was a problem hiding this comment.
Need is a strong word. We don't need it, but IMHO it's a nice way to make the controller logic cleaner and thus easier to understand at a glance.
I used the same pattern in #6973; see shared/environments/postEnvironment.ts in that PR.
ErickRDev
force-pushed
the
erickr/NAN-6478-add-public-env-api-keys-management-routes
branch
from
August 4, 2026 17:44
50ef9ac to
4ba11f7
Compare
This was referenced Aug 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add POST and DELETE /environment/api-keys to the public API so account-key holders can manage per-environment API keys programmatically.