Skip to content

feat: support n8n 2.47.3 Public API (rate limits, promotions scopes, package import fields) - #46

Merged
SomeoneWithOptions merged 5 commits into
mainfrom
chore/update-upstream-api
Nov 10, 2026
Merged

SomeoneWithOptions merged 5 commits into
mainfrom
chore/update-upstream-api

Conversation

@SomeoneWithOptions

Copy link
Copy Markdown
Owner

Brings the CLI to the n8n 2.47.3 Public API (API 1.1.1: +3 operations, 172 changed). Older instances (2.45/2.46) keep working.

New commands

  • n8n rate-limit get / n8n rate-limit set — GET/PUT /settings/rate-limits (securitySettings:manage). set is a full replacement from flags and/or --input (get --output json round-trips). Read-only envManagedFields is dropped and reported on stderr. Prompts when interactive, needs --yes otherwise.
  • n8n promotion environment missing-projects <environment-id> — GET /promotions/environments/{id}/missing-projects (promotions:read).

Package import (n8n package import, import-selection)

  • Sends the 2.47 field names conflictPolicy / idPolicy / publishingPolicy. On a 400 that shows the instance predates 2.47, the CLI resends once with the workflow* names. This needs a seekable archive (--file PATH). With --file - the error says to pass a path instead.
  • New flags --conflict-policy, --id-policy, --publishing-policy. The --workflow-* flags remain as deprecated aliases.
  • Result: agents[] (publishing state and channels), counts.agents, bindings.agents. package.exportedAt is now optional. Text output gains an Agents table. Stderr names channels that need setup (with setupUrl) and Agents/workflows whose publishing was blocked or failed.
  • Blocking issues: policy-check-failed, credential-unresolved.reason, new project-conflict kinds, data-table-unresolved.column / column-id-conflict.
  • A 403 now lists workflow:import or agent:import.

Promotions

  • Scopes renamed gitConnection:* → promotions:* on provider, environment, project-sync and discovery routes. A 403 names both scopes and says which instance version checks which. Connection, config and checkout commands keep gitConnection:*.
  • Blocked apply results: the 2.47 check field and the older preflight field decode to the same model. JSON output is unchanged. Text output renders the new conflict kinds: workflow, data-table, tag, project and moved.
  • New preview-changed status (exit code 4, same as source-changed).
  • --expected-preview-revision on promotion project apply and apply-continue.

Rate limiting (all commands)

  • A 429 now reads Retry-After and the X-RateLimit-* headers. The error says how long to wait and points to n8n rate-limit get|set.

Coverage

  • Manifest synced: 25 scope updates. Phase 37 (missing-projects) and phase 38 (rate-limits) are delivered, and deliveredThrough is now 38.
  • make check passes, with the coverage spec tests run against the 2.47.3 upstream spec.

🤖 Generated with Claude Code

SomeoneWithOptions and others added 5 commits November 10, 2026 16:01
n8n 2.47 adds GET/PUT /settings/rate-limits. Add 'n8n rate-limit get' and 'n8n rate-limit set'.

- get: text table (scope, access, limit, window) plus env-managed fields; --output json round-trips into set.
- set: full replacement from --input, flags, or both (flags override). Validated locally: all nine fields present, limits >= 0, windows >= 1, one limit above 0 when enabled. The read-only envManagedFields is dropped and reported on stderr. Prompts when interactive, needs --yes otherwise and with --input -.
- Errors state the fix: 403 names securitySettings:manage, 409 the env-managed fields, 404 that n8n 2.47 or later is needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd missing projects

n8n 2.47 renamed the Promotions scopes, reshaped blocked apply results,
and added a preview check and a missing-projects lookup. Keep 2.45 and
2.46 instances working.

- Scopes: provider, environment, project-sync, and discovery routes now
  report promotions:* on 403, with the gitConnection:* name older
  instances check; connection routes keep gitConnection:*. Help follows.
- Apply results: decode blocked `check` (2.47) and `preflight` (older)
  into the same model; render the new workflow, data-table, tag,
  project, and moved conflicts with their reason and projects.
- New preview-changed status: stderr hint to review again, exit code 4
  like source-changed.
- Project apply and apply-continue: --expected-preview-revision (64 hex)
  sends expectedPreviewRevision, validated locally, omitted when unset;
  also accepted in --input.
- New 'n8n promotion environment missing-projects' for
  GET /promotions/environments/{id}/missing-projects; a bare 404 says the
  instance may predate n8n 2.47.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
n8n 2.47 renamed the import policies to conflictPolicy, idPolicy, and
publishingPolicy (covering Agents and workflows) and rejects the old
workflow-prefixed names; 2.46 rejects the new ones.

- import and import-selection send the 2.47 names. When a pre-2.47
  instance answers 400 for them (its own field missing, or the new names
  unrecognized), the archive is rewound and sent once more under the old
  names. Stdin cannot be rewound; the error says to pass --file PATH.
- Flags: --conflict-policy, --id-policy, --publishing-policy; the
  --workflow-* flags stay as deprecated aliases (disagreeing pairs are
  refused). --id-policy new is pre-2.47 only; a 2.47 rejection says so.
- Result: agents (with publishing and channels), counts.agents, and
  bindings.agents; exportedAt is optional. Text output lists Agents and
  stderr names channels needing setup (setupUrl) and blocked or failed
  publications.
- Blocking issues: describe policy-check-failed and the
  data-table-unresolved column; reason and new kinds render generically.
- 403 for import names workflow:import or agent:import and the Agent
  scopes; help follows the 2.47 semantics.
- APIError keeps the fields a 400 schema issue names, and on 429 parses
  Retry-After and X-RateLimit-*; every command's 429 now says how long to
  wait and points owners at 'n8n rate-limit get|set'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Any 400 naming a workflow-prefixed policy field comes from an instance
that still requires it, since the first request never sends one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Promotions scopes moved from gitConnection:* to promotions:*; package
  import now needs workflow:import or agent:import.
- Phase 37: promotion environment missing-projects (upstream-only).
- Phase 38: rate-limit get/set (upstream-only).
- deliveredThrough raised to 38.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SomeoneWithOptions
SomeoneWithOptions merged commit c9aeb34 into main Nov 10, 2026
5 checks passed
@SomeoneWithOptions
SomeoneWithOptions deleted the chore/update-upstream-api branch November 10, 2026 16:28
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.

1 participant