Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow multi API creation via the UI #12845

Merged
merged 38 commits into from
Jan 29, 2025
Merged

Conversation

RicardoE105
Copy link
Contributor

@RicardoE105 RicardoE105 commented Jan 25, 2025

Summary

Phase 2 of the initiative to have scoped and expirable API keys.

  • Update settingsApiView to support multiple APIs.
  • Get max number of API keys from license. Will be 1 by default until the license start returning this number based on the plan. Will add the new quota to the license in a follow up PR.

Demo

CleanShot 2025-01-24 at 22 49 47

Related Linear tickets, Github issues, and Community forum posts

https://www.notion.so/n8n/Public-API-scopes-and-expiration-51f6bad3305f4397869dc71b95ac2ceb?pvs=4

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@RicardoE105 RicardoE105 changed the title update ui to multiple apis feat: Allow multi API creation via the UI Jan 25, 2025
@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Jan 25, 2025
@RicardoE105 RicardoE105 requested a review from tomi January 27, 2025 15:52
Copy link
Contributor

@mutdmour mutdmour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job. A few small comments

packages/cli/src/controllers/api-keys.controller.ts Outdated Show resolved Hide resolved
packages/editor-ui/src/views/SettingsApiView.vue Outdated Show resolved Hide resolved
packages/editor-ui/src/components/ApiKeyEditModal.vue Outdated Show resolved Hide resolved
Copy link
Collaborator

@tomi tomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff, couple comments

packages/cli/src/constants.ts Outdated Show resolved Hide resolved
packages/cli/src/controllers/api-keys.controller.ts Outdated Show resolved Hide resolved
packages/editor-ui/src/stores/apiKeys.store.ts Outdated Show resolved Hide resolved
packages/editor-ui/src/stores/settings.store.ts Outdated Show resolved Hide resolved
@@ -1844,6 +1848,14 @@
"settings.api.view.more-details": "You can find more details in",
"settings.api.view.external-docs": "the API documentation",
"settings.api.view.error": "Could not check if an api key already exists.",
"settings.api.view.modal.form.label": "Label",
"settings.api.view.modal.form.label.placeholder": "e.g Internal Project",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rather something about credentials?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

credentials? 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooops sorry meant API keys :D Instead of projects

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was copy pasted from some project creation modal translation

packages/editor-ui/src/components/ApiKeyEditModal.vue Outdated Show resolved Hide resolved
@RicardoE105 RicardoE105 requested a review from tomi January 28, 2025 22:12
Copy link
Collaborator

@tomi tomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for addressing 🙇 🚀

Copy link

cypress bot commented Jan 29, 2025

n8n    Run #9021

Run Properties:  status check passed Passed #9021  •  git commit 65d0978db7: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 RicardoE105 🗃️ e2e/*
Project n8n
Branch Review update-ui-to-multiple-apis
Run status status check passed Passed #9021
Run duration 04m 24s
Commit git commit 65d0978db7: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 RicardoE105 🗃️ e2e/*
Committer Ricardo Espinoza
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 2
Tests that did not run due to a developer annotating a test with .skip  Pending 5
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 430
View all changes introduced in this branch ↗︎

Copy link
Contributor

✅ All Cypress E2E specs passed

@RicardoE105 RicardoE105 merged commit ad3250c into master Jan 29, 2025
63 checks passed
@RicardoE105 RicardoE105 deleted the update-ui-to-multiple-apis branch January 29, 2025 12:42
This was referenced Feb 5, 2025
@janober
Copy link
Member

janober commented Feb 6, 2025

Got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants