docs: add required API key headers for 1.5#8721
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe documentation for Langflow's API and component usage was updated to consistently include the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant API_Server
User->>API_Server: HTTP request with x-api-key: LANGFLOW_API_KEY
API_Server-->>User: Authenticated response (success or error)
Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
Build successful! ✅ |
|
Build successful! ✅ |
There was a problem hiding this comment.
Actionable comments posted: 6
♻️ Duplicate comments (1)
docs/docs/Get-Started/get-started-quickstart.md (1)
383-386: Repeat of invalid header syntax in the later Python snippet.Please mirror the earlier fix.
🧹 Nitpick comments (8)
docs/docs/Configuration/configuration-api-keys.md (1)
14-17: Re-phrase to avoid repetition and reduce wordiness“
AUTO_LOGINis enabled,AUTO_LOGINrequires …” repeats the variable name and reads awkwardly.
Suggested wording:-Prior to Langflow v1.5, when `AUTO_LOGIN` was enabled (`AUTO_LOGIN=true`), Langflow automatically logged users in as a superuser without requiring authentication. -As of Langflow v1.5, when `AUTO_LOGIN` is enabled, `AUTO_LOGIN` requires a valid API key. +Before Langflow v1.5, setting `AUTO_LOGIN=true` logged users in as a super-user automatically. +From Langflow v1.5 onward, `AUTO_LOGIN=true` still works, but the request must include a valid API key.docs/docs/Develop/session-id.md (1)
20-26: Missing$in environment-variable placeholder- --header 'x-api-key: LANGFLOW_API_KEY' \ + --header "x-api-key: $LANGFLOW_API_KEY" \Ensures the example works when copied into a shell.
docs/docs/Develop/webhook.md (1)
35-38: Placeholder formattingSame consistency issue: add
$beforeLANGFLOW_API_KEY.- -H 'x-api-key: LANGFLOW_API_KEY' \ + -H "x-api-key: $LANGFLOW_API_KEY" \docs/docs/API-Reference/api-reference-api-examples.md (1)
87-88: Variable rename acknowledged – check earlier referenceThe new examples properly switch to
LANGFLOW_API_KEY.
However, line 99 still shows-H 'x-api-key: $API_KEY'(unchanged). Consider updating that older reference for consistency.Also applies to: 154-157
docs/docs/Components/components-processing.md (1)
117-117: Use the same$LANGFLOW_API_KEYplaceholder used elsewhereOther docs use the environment-variable form
$LANGFLOW_API_KEY, but these snippets omit the leading$. Aligning the placeholder prevents copy-paste surprises for users who have already exported the variable.- -H 'x-api-key: LANGFLOW_API_KEY' \ + -H 'x-api-key: $LANGFLOW_API_KEY' \Also applies to: 211-211, 234-234, 420-420
docs/docs/API-Reference/api-flows-run.md (2)
9-9: Typo: “amd” → “and”.Minor spelling mistake in the first sentence.
-Use the `/run` amd `/webhook` endpoints to run flows. +Use the `/run` and `/webhook` endpoints to run flows.
130-135: Header-table example is now inconsistent with the surrounding docs.All examples above were updated to use the
$LANGFLOW_API_KEYplaceholder, but the “Example” column still shows the hard-coded"sk-...". This can confuse readers.-| x-api-key | Optional. Required only if authentication is enabled. | "sk-..." | +| x-api-key | Optional. Required only if authentication is enabled. | "$LANGFLOW_API_KEY" |docs/docs/Get-Started/get-started-quickstart.md (1)
28-38: Missing fenced-code language spec triggers MD040.Add a language identifier (e.g.,
bash) after the opening back-ticks to silence markdown-lint and enable syntax highlighting.- ``` + ```bash
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (17)
docs/docs/API-Reference/api-build.md(4 hunks)docs/docs/API-Reference/api-files.md(8 hunks)docs/docs/API-Reference/api-flows-run.md(4 hunks)docs/docs/API-Reference/api-flows.md(9 hunks)docs/docs/API-Reference/api-logs.md(2 hunks)docs/docs/API-Reference/api-monitor.md(9 hunks)docs/docs/API-Reference/api-projects.md(8 hunks)docs/docs/API-Reference/api-reference-api-examples.md(2 hunks)docs/docs/API-Reference/api-users.md(1 hunks)docs/docs/Components/components-data.md(1 hunks)docs/docs/Components/components-io.md(3 hunks)docs/docs/Components/components-processing.md(4 hunks)docs/docs/Concepts/concepts-playground.md(2 hunks)docs/docs/Configuration/configuration-api-keys.md(4 hunks)docs/docs/Develop/session-id.md(1 hunks)docs/docs/Develop/webhook.md(1 hunks)docs/docs/Get-Started/get-started-quickstart.md(6 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`docs/**/*.{md,mdx}`: All documentation content must follow the markdown convent...
docs/**/*.{md,mdx}: All documentation content must follow the markdown conventions outlined, including frontmatter with title, description, and sidebar_position, use of proper headers, admonitions (tip, warning, danger), and code block formatting.
Images should be stored in the 'static/img/' directory and referenced with descriptive alt text in markdown.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/docs_development.mdc)
List of files the instruction was applied to:
docs/docs/Concepts/concepts-playground.mddocs/docs/Components/components-data.mddocs/docs/API-Reference/api-logs.mddocs/docs/API-Reference/api-build.mddocs/docs/Develop/session-id.mddocs/docs/Components/components-io.mddocs/docs/Develop/webhook.mddocs/docs/API-Reference/api-flows.mddocs/docs/Components/components-processing.mddocs/docs/API-Reference/api-users.mddocs/docs/API-Reference/api-flows-run.mddocs/docs/API-Reference/api-monitor.mddocs/docs/API-Reference/api-files.mddocs/docs/API-Reference/api-reference-api-examples.mddocs/docs/API-Reference/api-projects.mddocs/docs/Get-Started/get-started-quickstart.mddocs/docs/Configuration/configuration-api-keys.md
🪛 Gitleaks (8.26.0)
docs/docs/Get-Started/get-started-quickstart.md
29-32: Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource.
(curl-auth-header)
docs/docs/Configuration/configuration-api-keys.md
86-89: Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource.
(curl-auth-header)
🪛 markdownlint-cli2 (0.17.2)
docs/docs/Get-Started/get-started-quickstart.md
28-28: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
🪛 LanguageTool
docs/docs/Configuration/configuration-api-keys.md
[style] ~13-~13: ‘Prior to’ might be wordy. Consider a shorter alternative.
Context: ... Auto-login and API key authentication Prior to Langflow v1.5, when AUTO_LOGIN was en...
(EN_WORDINESS_PREMIUM_PRIOR_TO)
🔇 Additional comments (8)
docs/docs/API-Reference/api-users.md (1)
24-32: Looks good – header added correctlyThe
x-api-keyheader is present and uses the$LANGFLOW_API_KEYplaceholder consistently.docs/docs/Components/components-data.md (1)
265-274: Contradiction: header added for a component that “does not require an API key”Line 265 explicitly states the Webhook component does not require an API key, yet the new example adds the
x-api-keyheader (and without the$prefix).Either
a) remove the header from this specific example, or
b) update the text to clarify that the header is optional for webhooks.If you keep the header, prefix the placeholder with
$for consistency:- -H 'x-api-key: LANGFLOW_API_KEY' \ + # Remove this line *or* make it consistent: + #-H "x-api-key: $LANGFLOW_API_KEY" \docs/docs/API-Reference/api-logs.md (1)
41-43: LGTM – headers added correctlyThe new
x-api-keyheader uses$LANGFLOW_API_KEY, matching the convention elsewhere. No further action needed.Also applies to: 88-90
docs/docs/API-Reference/api-monitor.md (1)
21-23: Consistent authentication examples – looks goodAll added snippets correctly include the
x-api-keyheader with$LANGFLOW_API_KEYand keep existingacceptheaders intact. Good consistency across the document.Also applies to: 401-403, 422-424, 438-440, 495-496, 575-577, 628-630, 652-654
docs/docs/API-Reference/api-build.md (1)
35-35: Authentication header added correctlyThe new
x-api-keyexamples use the$LANGFLOW_API_KEYenvironment variable and preserve existing header ordering—looks good.Also applies to: 63-65, 90-91, 142-142
docs/docs/API-Reference/api-files.md (1)
46-47: Consistent header inclusionAll modified snippets now carry
-H "x-api-key: $LANGFLOW_API_KEY"in line with the documentation convention. No further action needed.Also applies to: 76-77, 98-99, 126-128, 153-154, 177-179, 210-212, 265-266, 290-291, 357-358, 381-383, 411-412, 437-438
docs/docs/API-Reference/api-projects.md (1)
23-25: LGTM – projects endpoints now show the required API-key headerThe added lines follow the established pattern and are technically correct.
Also applies to: 55-56, 88-89, 113-115, 149-150, 188-190, 212-213, 225-226
docs/docs/API-Reference/api-flows.md (1)
25-26: Header alignment is correct
x-api-keyheader is now present across all flow-management samples with the$LANGFLOW_API_KEYplaceholder. Looks consistent with other docs.Also applies to: 78-79, 131-133, 166-168, 175-177, 187-188, 204-205, 251-253, 282-283, 319-320
|
Build successful! ✅ |
|
Build successful! ✅ |
|
Build successful! ✅ |
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
|
Build successful! ✅ |
|
Build successful! ✅ |
|
Build successful! ✅ |
|
Build successful! ✅ |
|
Build successful! ✅ |
|
Build successful! ✅ |
This pull request updates the API documentation to include the
x-api-keyheader in all relevant examples, ensuring that API requests are authenticated.The most important part for review are these pages:
Explain the changes for AUTO_LOGIN in 1.5. Preview
Clarify the creation of Langflow API keys with the CLI. Preview
Summary by CodeRabbit