Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions docs/DatabasesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand All @@ -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

Expand Down
23 changes: 20 additions & 3 deletions hotdata/api/databases_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)],
Expand All @@ -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
Expand All @@ -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,
Expand All @@ -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)],
Expand All @@ -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
Expand All @@ -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,
Expand All @@ -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)],
Expand All @@ -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
Expand All @@ -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,
Expand All @@ -2562,6 +2574,7 @@ def _list_databases_serialize(
self,
limit,
cursor,
search,
_request_auth,
_content_type,
_headers,
Expand Down Expand Up @@ -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
Expand Down