Skip to content

Commit 19e54da

Browse files
committed
feat: migrate dashboard methods to use request helpers and add as_list support.
1 parent 551dce2 commit 19e54da

4 files changed

Lines changed: 775 additions & 899 deletions

File tree

src/secops/chronicle/client.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4158,20 +4158,28 @@ def list_dashboards(
41584158
self,
41594159
page_size: int | None = None,
41604160
page_token: str | None = None,
4161-
) -> dict[str, Any]:
4161+
as_list: bool = False,
4162+
) -> dict[str, Any] | list[dict[str, Any]]:
41624163
"""List all available dashboards.
41634164
41644165
Args:
41654166
page_size: Maximum number of results to return
41664167
page_token: Token for pagination
4168+
as_list: If True, return a list of dashboards instead of a dict
4169+
with dashboards list and nextPageToken.
41674170
41684171
Returns:
4169-
Dictionary containing dashboard list and pagination info
4172+
If as_list is True: List of dashboards.
4173+
If as_list is False: Dict with dashboards list and nextPageToken.
4174+
4175+
Raises:
4176+
APIError: If the API request fails
41704177
"""
41714178
return _list_dashboards(
41724179
self,
41734180
page_size=page_size,
41744181
page_token=page_token,
4182+
as_list=as_list,
41754183
)
41764184

41774185
def get_dashboard(

0 commit comments

Comments
 (0)