Skip to content

feat: expose GET /v1/files on public API surface with SDK support and… - #2231

Open
jason-dong03 wants to merge 9 commits into
release-saas-ga-0.6.5from
cherry-pick/expose-v1-files-into-0.6.5
Open

feat: expose GET /v1/files on public API surface with SDK support and…#2231
jason-dong03 wants to merge 9 commits into
release-saas-ga-0.6.5from
cherry-pick/expose-v1-files-into-0.6.5

Conversation

@jason-dong03

Copy link
Copy Markdown
Collaborator
  • feat: public ingested files endpoint
    -Added public file listing endpoints (GET /v1/files and /v1/files/search).
    -Exposed file listing for API key, SDK, and MCP clients.
    -Added public v1 file routes and delegated to the v2 file service.
    -Registered new MCP file listing and search endpoints.
    -Fixed case-insensitive filename search.
    -Added file listing models to the Python SDK.
    -Added list_files() to the Python SDK.
    -Exported new file listing models in the Python SDK. -Added file listing examples to the Python SDK docs.
    -Added file listing types to the TypeScript SDK.
    -Added listFiles() to the TypeScript SDK.
    -Exported new file listing types in the TypeScript SDK. -Added file listing examples to the TypeScript SDK docs.
    -Added unit tests for the new v1 file endpoints.
    -Added Python SDK integration tests for file listing. -Added TypeScript SDK integration tests for file listing. -Updated API documentation with file listing examples and pagination.
    -case-insensitive filename search fix

… case-insensitive filename search fix (#2215)

* feat: public ingested files endpoint

-Added public file listing endpoints (`GET /v1/files` and `/v1/files/search`).
-Exposed file listing for API key, SDK, and MCP clients.
-Added public v1 file routes and delegated to the v2 file service.
-Registered new MCP file listing and search endpoints.
-Fixed case-insensitive filename search.
-Added file listing models to the Python SDK.
-Added `list_files()` to the Python SDK.
-Exported new file listing models in the Python SDK.
-Added file listing examples to the Python SDK docs.
-Added file listing types to the TypeScript SDK.
-Added `listFiles()` to the TypeScript SDK.
-Exported new file listing types in the TypeScript SDK.
-Added file listing examples to the TypeScript SDK docs.
-Added unit tests for the new v1 file endpoints.
-Added Python SDK integration tests for file listing.
-Added TypeScript SDK integration tests for file listing.
-Updated API documentation with file listing examples and pagination.

* style: ruff autofix (auto)

* updated unit tests

quick fix: file service docstring mismatch with implementation
-refactoring var names
-removed unused import
-more coverage via tests

* quick fix

* style: ruff autofix (auto)

* Update test_v1_files.py

* style: ruff autofix (auto)

* PR fixes

---------
@github-actions github-actions Bot added backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) tests labels Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: cb86c157-00c5-412c-9f79-f41db3f1ee22

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the enhancement 🔵 New feature or request label Aug 12, 2026
@github-actions github-actions Bot added the lgtm label Aug 12, 2026
-implemented file ingestion endpoint based on a v2 endpoint for consistency / future roadmaps
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Aug 14, 2026
@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

React Doctor skipped this pull request — it changed no React files.

Reviewed by React Doctor for commit d64a299.

@github-actions github-actions Bot added frontend 🟨 Issues related to the UI/UX enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Aug 14, 2026
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Aug 14, 2026
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Aug 14, 2026
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Aug 14, 2026
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Aug 14, 2026
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Aug 14, 2026
@@ -0,0 +1,22 @@
"""Public /v2/* route registrations (API-key auth)."""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is dropping the _list_files / _search_files API-key wrappers intentional here?
Latest main still uses them with require_api_key_permission("knowledge:read:own"), while this registers the cookie-auth handlers directly.

import pytest
from fastapi import params as fastapi_params

from api.v1.files import list_files, search_files

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This still imports list_files and search_files from api.v1.files, but that module only defines get_all_files now. Should these tests be rewritten for getAll, or will collection fail with ImportError?

)
app.add_api_route(
"/v2/files",
v2_files.list_files,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

internal.py already registers GET /v2/files with cookie auth, and register_all_routes registers the internal routes before the public ones. Since Starlette uses first-match-wins routing, wouldn’t an SDK request to GET /api/v2/files hit the internal cookie-auth route even if we restore the API-key wrappers here?

main doesn’t appear to have this collision because the SDK uses /v1/files, whereas this PR switches it to /v2/files.

I think the same issue applies to /v2/files/search here vs. internal.py:136.

@Wallgau Wallgau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

just need few clarifications @edwinjosechittilappilly can you take a look to my comments please

@Wallgau
Wallgau self-requested a review August 15, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) enhancement 🔵 New feature or request frontend 🟨 Issues related to the UI/UX lgtm tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants