-
Notifications
You must be signed in to change notification settings - Fork 8.2k
docs: Separate monolithic API examples page, and add getting started with the Langflow API #8658
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
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 WalkthroughA comprehensive overhaul and expansion of the API documentation was performed. New documentation files were introduced for all major API endpoints, including flows, files, projects, users, logs, monitoring, and building flows. The sidebar was reorganized for clearer navigation, and numerous cross-references and clarifications were added throughout the documentation. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API Server
Note over Client,API Server: Example: Running a Flow via /run endpoint
Client->>API Server: POST /run/$FLOW_ID (with parameters)
API Server-->>Client: JSON response (or stream of events if ?stream=true)
Note over Client,API Server: Example: Uploading a file via /files endpoint
Client->>API Server: POST /v1/files/$FLOW_ID or /v2/files (with file data)
API Server-->>Client: File upload confirmation
Note over Client,API Server: Example: Monitoring via /monitor endpoints
Client->>API Server: GET /monitor/vertex-builds?flow_id=...
API Server-->>Client: JSON array of vertex builds
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
🧹 Nitpick comments (7)
docs/docs/Develop/session-id.md (1)
39-39: Use relative linking for the API reference
You’re linking externally tohttps://docs.langflow.org/api-monitor; switch to a site-relative path (/api-monitor) for consistency within the docs.docs/docs/Develop/webhook.md (1)
33-33: Ensure placeholder consistency for flow ID
This line uses**FLOW_ID**, whereas other docs employ$FLOW_ID. Align placeholders across docs (e.g., use$FLOW_ID).docs/docs/API-Reference/api-flows-run.md (1)
9-9: Fix typo: "amd" → "and"Correct the conjunction typo.
-Use the `/run` amd `/webhook` endpoints to run flows. +Use the `/run` and `/webhook` endpoints to run flows.docs/docs/API-Reference/api-build.md (1)
13-17: Grammar: singular vs. plural in important noteChange "This
/buildendpoints are" to either "This/buildendpoint is" or "These/buildendpoints are".-:::important -This `/build` endpoints are meant to be used by the frontend, and they aren't optimized for external use. +:::important +These `/build` endpoints are meant to be used by the frontend and aren't optimized for external use. :::docs/docs/API-Reference/api-monitor.md (2)
11-13: Consistent heading capitalization
The heading “Get Vertex builds” mixes title-case and sentence-case. Consider using title-case (“Get Vertex Builds”) or sentence-case (“Get vertex builds”) uniformly across all section headings.
27-35: Trim verbose JSON sample
This example is deeply nested and very long. To improve readability, collapse or remove fields that aren’t critical for understanding the endpoint’s response (e.g., duplicate “properties” fields).docs/docs/API-Reference/api-files.md (1)
203-207: Add language identifier to fenced code block
The code block starting at line 204 is missing a language hint. Changeto
to enable proper syntax highlighting.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
docs/yarn.lockis excluded by!**/yarn.lock,!**/*.lockyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (22)
docs/docs/API-Reference/api-build.md(1 hunks)docs/docs/API-Reference/api-files.md(1 hunks)docs/docs/API-Reference/api-flows-run.md(1 hunks)docs/docs/API-Reference/api-flows.md(1 hunks)docs/docs/API-Reference/api-logs.md(1 hunks)docs/docs/API-Reference/api-monitor.md(1 hunks)docs/docs/API-Reference/api-projects.md(1 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-helpers.md(1 hunks)docs/docs/Components/components-io.md(3 hunks)docs/docs/Components/components-memories.md(3 hunks)docs/docs/Components/components-vector-stores.md(1 hunks)docs/docs/Concepts/concepts-objects.md(1 hunks)docs/docs/Concepts/concepts-playground.md(4 hunks)docs/docs/Concepts/concepts-publish.md(1 hunks)docs/docs/Develop/Clients/typescript-client.md(2 hunks)docs/docs/Develop/develop-application.md(1 hunks)docs/docs/Develop/session-id.md(1 hunks)docs/docs/Develop/webhook.md(2 hunks)docs/docs/Sample-Flows/memory-chatbot.md(1 hunks)docs/sidebars.js(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/docs/Components/components-io.md
268-268: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
docs/docs/API-Reference/api-files.md
87-87: No empty links
null
(MD042, no-empty-links)
204-204: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
🪛 LanguageTool
docs/docs/API-Reference/api-reference-api-examples.md
[style] ~54-~54: Consider using a more concise synonym.
Context: ...d parameters Langflow API requests use a variety of methods, paths, path parameters, query ...
(A_VARIETY_OF)
[style] ~156-~156: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ow API to upload files. - Use the Langflow API to [get flow logs](/ap...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
docs/docs/API-Reference/api-logs.md
[style] ~23-~23: This phrasing could be wordy, so try replacing it with something more concise.
Context: ...at LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE is greater than 0. The default value is 10000. 2. St...
(MORE_THAN_EXCEEDS)
[uncategorized] ~74-~74: Loose punctuation mark.
Context: ...onal query parameters: - lines_before: The number of logs before the timestamp...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~75-~75: Loose punctuation mark.
Context: ...mestamp or the last log. - lines_after: The number of logs after the timestamp....
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~76-~76: Loose punctuation mark.
Context: ... logs after the timestamp. - timestamp: The timestamp to start getting logs fro...
(UNLIKELY_OPENING_PUNCTUATION)
docs/docs/Concepts/concepts-playground.md
[typographical] ~17-~17: Usually, there’s no comma before “if”.
Context: ...ndividual components' def_build method, if it exists. If a component doesn't have ...
(IF_NO_COMMA)
docs/docs/API-Reference/api-build.md
[uncategorized] ~79-~79: Possible missing comma found.
Context: ...oint accepts an optional stream query parameter which defaults to true. To disable st...
(AI_HYDRA_LEO_MISSING_COMMA)
docs/docs/API-Reference/api-files.md
[style] ~271-~271: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...low, send it to the File component. To retrieve the File component's full ...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
🔇 Additional comments (29)
docs/docs/Components/components-vector-stores.md (1)
402-402: Consistent placeholder syntax forpersist_directory
The use of$DIRECTORY/vector_stores/$COLLECTION_NAMEmatches the shell-style notation used throughout the docs.docs/docs/Concepts/concepts-objects.md (1)
207-210: Add cross-reference to Session ID
The new “See also” section linking to the Session ID page improves discoverability of related session concepts.docs/docs/Components/components-helpers.md (1)
302-304: Include Session ID in helpers docs
The added “See also” section linking to Session ID aligns with other components and ensures users can easily locate the session management guide.docs/docs/Sample-Flows/memory-chatbot.md (1)
75-78: Enhance cross-references in sample flow
The new “See also” section with links to Memory components and Session ID improves navigability for related topics.docs/docs/Develop/develop-application.md (1)
158-158: Update streaming endpoint reference
The note now correctly points to/api-flows-run#run-flow, aligning with the relocated API reference.docs/docs/Concepts/concepts-playground.md (4)
17-17: Approve detailed Playground flow build explanation
The new deep-dive into the/build/$FLOW_ID/flowendpoint and component build sequence is accurate and adds valuable context.
32-32: Approve chat memory reference
Linking to Memory components provides a clear navigation path to related docs.
41-41: Approve session ID invocation guidance
The instructions on passing asession_idin the URL are clear and consistent with other examples.
92-94: Approve "See also" section
Adding a cross-link to the Session ID page enhances discoverability.docs/docs/Concepts/concepts-publish.md (1)
67-67: Approve Files endpoint reference
The link to Files endpoint correctly directs users to the new file-management API docs.docs/docs/Develop/webhook.md (2)
56-56: Approve external video guide link
The step-by-step video for Composio webhooks is a useful supplement.
58-60: Approve "See also" section
Linking to Flow trigger endpoints provides a clear pointer to the detailed API reference.docs/docs/Components/components-io.md (3)
37-37: Approve session_id description update
Clarifying that this parameter is the unique chat session identifier improves accuracy.
114-114: Approve session_id description in Chat Output
Consistent clarification here ensures uniform parameter definitions across I/O components.
266-268: Approve "See also" cross-link
Adding the Session ID link at the end of component docs enhances navigation.docs/docs/Develop/Clients/typescript-client.md (3)
131-131: Excellent navigation improvement.Adding the hyperlink to the session ID documentation enhances user experience by providing direct access to detailed session ID information.
137-137: Good update to reference specific API documentation.The link now points to the dedicated
/runendpoint documentation, which is more precise than the generic "Run flow" reference.
259-259: Improved specificity in documentation reference.The change from generic "[API examples]" to specific "[Logs endpoints]" better directs users to the relevant documentation for log retrieval.
docs/docs/Components/components-memories.md (3)
8-8: Good addition of cross-reference linking.Adding the hyperlink to session ID documentation improves user navigation and provides access to detailed session management information.
37-37: Improved terminology precision.Changing "chat session ID" to "unique identifier for the chat session" emphasizes the uniqueness requirement and provides clearer understanding of the parameter's purpose.
120-120: Enhanced terminology consistency.The change to "unique session identifier" maintains consistency with the terminology used elsewhere in the documentation.
docs/docs/API-Reference/api-logs.md (1)
1-109: Excellent comprehensive logs API documentation.This new documentation file provides clear, well-structured guidance for the logs API endpoints including:
- Proper configuration steps for enabling log retrieval
- Clear examples for both streaming and retrieval endpoints
- Practical curl commands with sample responses
- Appropriate parameter documentation
The structure and content quality significantly enhance the API reference documentation.
docs/sidebars.js (1)
208-256: Excellent modular API documentation restructuring.The transformation from a single monolithic API reference to a well-organized, topic-specific structure significantly improves navigation and user experience. The new structure provides:
- Clear categorization of API endpoints by functionality
- Direct access to specific API topics
- Logical organization that matches the newly created documentation files
- Consistent labeling and structure
This restructuring aligns perfectly with the broader documentation improvement goals.
docs/docs/API-Reference/api-reference-api-examples.md (1)
1-152: Excellent transformation to focused getting started guide.The rewrite successfully transforms this from a monolithic, example-heavy reference to a streamlined, conceptual introduction that:
- Provides clear guidance on API request structure
- Explains authentication requirements and best practices
- Covers essential concepts like base URLs and versioning
- Includes practical environment variable setup
- Maintains focus on getting started rather than comprehensive examples
This approach works well with the new modular documentation structure where detailed examples are in dedicated files.
docs/docs/API-Reference/api-projects.md (1)
139-154: Inconsistent parameter names between Create and UpdateThe Create endpoint uses
components_list/flows_list, whereas the Update section showscomponents/flows. Confirm the correct payload keys and align both sections for consistency or call out the difference explicitly.docs/docs/API-Reference/api-flows-run.md (1)
79-79: Ignore false positive for missing commaThe sentence split after
trueis intentional for clarity; no comma is required here.docs/docs/API-Reference/api-monitor.md (2)
1-4: Verify frontmatter slug consistency
Ensure theslug: /api-monitoraligns with your site’s URL structure. If other API reference pages live under/api-reference, consider usingslug: /api-reference/api-monitorfor consistency.
675-677: Verify “See also” link target
The “See also” link points to/session-id. Confirm that the Session ID page exists at that path, or update the link to the correct slug.docs/docs/API-Reference/api-files.md (1)
188-189: Verify “Get started with the Langflow API” link
The link/api-reference-api-examplesmight be a typo. Confirm the correct slug (e.g.,/api-reference/getting-started) and update accordingly.
|
Build successful! ✅ |
KimberlyFields
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some style-related comments, but approving.
|
Build successful! ✅ |
|
Build successful! ✅ |
|
I'm going to merge this so Mendon can make the necessary changes for authentication in 1.5. If there any more comments, please LMK and I'll address them in subsequent PRs. Note that more work is expected on this documentation as development continues on the API. |
|
Build successful! ✅ |
|
Build successful! ✅ |
…with the Langflow API (langflow-ai#8658) * add new pages * cut and paste * break up examples page and do some minor cleanup * notes * get started w api page * revert yarn * mc * coderabbit * minor edit * add quickstart link * peer review * rewrite build endpoints intro
…with the Langflow API (langflow-ai#8658) * add new pages * cut and paste * break up examples page and do some minor cleanup * notes * get started w api page * revert yarn * mc * coderabbit * minor edit * add quickstart link * peer review * rewrite build endpoints intro
…with the Langflow API (langflow-ai#8658) * add new pages * cut and paste * break up examples page and do some minor cleanup * notes * get started w api page * revert yarn * mc * coderabbit * minor edit * add quickstart link * peer review * rewrite build endpoints intro
Closes LFOSS-1441
Summary by CodeRabbit