-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
The GET /api/published_components/ endpoint currently returns all components with no pagination. There are existing TODO comments in the code acknowledging this:
# TODO: Implement paging
# TODO: Implement filtering/search
# TODO: Implement visibility/access controlAs the component library grows and a Components tab is added to the homepage, this needs pagination support.
Implementation
Follow the same pagination pattern used by GET /api/pipeline_runs/:
- Add
page_sizequery param (default 20) - Add
page_tokenquery param for cursor-based pagination (base64-encoded offset) - Add
next_page_tokento response - Add
total_countto response (component count is much smaller than runs, so a full count is fine here)
Response change
@dataclasses.dataclass(kw_only=True)
class ListPublishedComponentsResponse:
published_components: list[PublishedComponentResponse]
next_page_token: str | None = None # NEW
total_count: int | None = None # NEWRelevant file
component_library_api_server.py—list()method
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request