From beff613743ad7a0cef0d523063b8472beefd9960 Mon Sep 17 00:00:00 2001 From: "hotdata-automation[bot]" <267177015+hotdata-automation[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 06:42:22 +0000 Subject: [PATCH] feat(databases): add search parameter to list endpoint --- CHANGELOG.md | 1 + docs/DatabasesApi.md | 8 +++++--- hotdata/api/databases_api.py | 23 ++++++++++++++++++++--- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea26abe..15e7c1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- feat(databases): add search parameter to list endpoint - chore(databases): make pagination fields nullable ### Removed diff --git a/docs/DatabasesApi.md b/docs/DatabasesApi.md index a372d15..963d7a9 100644 --- a/docs/DatabasesApi.md +++ b/docs/DatabasesApi.md @@ -720,11 +720,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_databases** -> ListDatabasesResponse list_databases(limit=limit, cursor=cursor) +> ListDatabasesResponse list_databases(limit=limit, cursor=cursor, search=search) List databases -List databases in the workspace, newest first, one page at a time. When no `limit` is given a default page size is applied, so a single call returns at most one page rather than every database. If the response's `has_more` is true, pass its `next_cursor` value back as the `cursor` query parameter to fetch the next page. +List databases in the workspace, newest first, one page at a time. When no `limit` is given a default page size is applied, so a single call returns at most one page rather than every database. If the response's `has_more` is true, pass its `next_cursor` value back as the `cursor` query parameter to fetch the next page. Pass `search` to return only databases whose name contains that text (case-insensitive). ### Example @@ -765,10 +765,11 @@ with hotdata.ApiClient(configuration) as api_client: api_instance = hotdata.DatabasesApi(api_client) limit = 56 # int | Maximum number of databases to return in this page (1–100). Values outside the range are clamped. (optional) cursor = 'cursor_example' # str | Opaque pagination cursor from a previous response's `next_cursor`. (optional) + search = 'search_example' # str | Case-insensitive substring filter on the database name. When set, only databases whose name contains this text are returned; paging and newest-first ordering are unchanged. (optional) try: # List databases - api_response = api_instance.list_databases(limit=limit, cursor=cursor) + api_response = api_instance.list_databases(limit=limit, cursor=cursor, search=search) print("The response of DatabasesApi->list_databases:\n") pprint(api_response) except Exception as e: @@ -784,6 +785,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **int**| Maximum number of databases to return in this page (1–100). Values outside the range are clamped. | [optional] **cursor** | **str**| Opaque pagination cursor from a previous response's `next_cursor`. | [optional] + **search** | **str**| Case-insensitive substring filter on the database name. When set, only databases whose name contains this text are returned; paging and newest-first ordering are unchanged. | [optional] ### Return type diff --git a/hotdata/api/databases_api.py b/hotdata/api/databases_api.py index 4a3e5e2..3b102f5 100644 --- a/hotdata/api/databases_api.py +++ b/hotdata/api/databases_api.py @@ -2354,6 +2354,7 @@ def list_databases( self, limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum number of databases to return in this page (1–100). Values outside the range are clamped.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="Opaque pagination cursor from a previous response's `next_cursor`.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring filter on the database name. When set, only databases whose name contains this text are returned; paging and newest-first ordering are unchanged.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2369,12 +2370,14 @@ def list_databases( ) -> ListDatabasesResponse: """List databases - List databases in the workspace, newest first, one page at a time. When no `limit` is given a default page size is applied, so a single call returns at most one page rather than every database. If the response's `has_more` is true, pass its `next_cursor` value back as the `cursor` query parameter to fetch the next page. + List databases in the workspace, newest first, one page at a time. When no `limit` is given a default page size is applied, so a single call returns at most one page rather than every database. If the response's `has_more` is true, pass its `next_cursor` value back as the `cursor` query parameter to fetch the next page. Pass `search` to return only databases whose name contains that text (case-insensitive). :param limit: Maximum number of databases to return in this page (1–100). Values outside the range are clamped. :type limit: int :param cursor: Opaque pagination cursor from a previous response's `next_cursor`. :type cursor: str + :param search: Case-insensitive substring filter on the database name. When set, only databases whose name contains this text are returned; paging and newest-first ordering are unchanged. + :type search: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2400,6 +2403,7 @@ def list_databases( _param = self._list_databases_serialize( limit=limit, cursor=cursor, + search=search, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2425,6 +2429,7 @@ def list_databases_with_http_info( self, limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum number of databases to return in this page (1–100). Values outside the range are clamped.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="Opaque pagination cursor from a previous response's `next_cursor`.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring filter on the database name. When set, only databases whose name contains this text are returned; paging and newest-first ordering are unchanged.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2440,12 +2445,14 @@ def list_databases_with_http_info( ) -> ApiResponse[ListDatabasesResponse]: """List databases - List databases in the workspace, newest first, one page at a time. When no `limit` is given a default page size is applied, so a single call returns at most one page rather than every database. If the response's `has_more` is true, pass its `next_cursor` value back as the `cursor` query parameter to fetch the next page. + List databases in the workspace, newest first, one page at a time. When no `limit` is given a default page size is applied, so a single call returns at most one page rather than every database. If the response's `has_more` is true, pass its `next_cursor` value back as the `cursor` query parameter to fetch the next page. Pass `search` to return only databases whose name contains that text (case-insensitive). :param limit: Maximum number of databases to return in this page (1–100). Values outside the range are clamped. :type limit: int :param cursor: Opaque pagination cursor from a previous response's `next_cursor`. :type cursor: str + :param search: Case-insensitive substring filter on the database name. When set, only databases whose name contains this text are returned; paging and newest-first ordering are unchanged. + :type search: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2471,6 +2478,7 @@ def list_databases_with_http_info( _param = self._list_databases_serialize( limit=limit, cursor=cursor, + search=search, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2496,6 +2504,7 @@ def list_databases_without_preload_content( self, limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum number of databases to return in this page (1–100). Values outside the range are clamped.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="Opaque pagination cursor from a previous response's `next_cursor`.")] = None, + search: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring filter on the database name. When set, only databases whose name contains this text are returned; paging and newest-first ordering are unchanged.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2511,12 +2520,14 @@ def list_databases_without_preload_content( ) -> RESTResponseType: """List databases - List databases in the workspace, newest first, one page at a time. When no `limit` is given a default page size is applied, so a single call returns at most one page rather than every database. If the response's `has_more` is true, pass its `next_cursor` value back as the `cursor` query parameter to fetch the next page. + List databases in the workspace, newest first, one page at a time. When no `limit` is given a default page size is applied, so a single call returns at most one page rather than every database. If the response's `has_more` is true, pass its `next_cursor` value back as the `cursor` query parameter to fetch the next page. Pass `search` to return only databases whose name contains that text (case-insensitive). :param limit: Maximum number of databases to return in this page (1–100). Values outside the range are clamped. :type limit: int :param cursor: Opaque pagination cursor from a previous response's `next_cursor`. :type cursor: str + :param search: Case-insensitive substring filter on the database name. When set, only databases whose name contains this text are returned; paging and newest-first ordering are unchanged. + :type search: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2542,6 +2553,7 @@ def list_databases_without_preload_content( _param = self._list_databases_serialize( limit=limit, cursor=cursor, + search=search, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2562,6 +2574,7 @@ def _list_databases_serialize( self, limit, cursor, + search, _request_auth, _content_type, _headers, @@ -2592,6 +2605,10 @@ def _list_databases_serialize( _query_params.append(('cursor', cursor)) + if search is not None: + + _query_params.append(('search', search)) + # process the header parameters # process the form parameters # process the body parameter