superwise_api.entities.dashboard
class
DashboardApi(superwise_api.entities.base.BaseApi):
This class provides methods to interact with the Dashboard API.
Arguments:
- api_client (SuperwiseClient): An instance of the ApiClient to make requests.
def
create( self, name: str, **kwargs) -> superwise_api.models.dashboard.dashboard.Dashboard:
Creates a new dashboard.
Arguments:
- name (str): The name of the dashboard.
- **kwargs: Arbitrary keyword arguments.
Returns:
Dashboard: The created dashboard.
def
get( self, name: Optional[str] = None, page: Optional[Annotated[int, Strict(strict=True), Interval(gt=None, ge=1, lt=None, le=None), None]] = None, size: Optional[Annotated[int, Strict(strict=True), Interval(gt=None, ge=1, lt=None, le=500), None]] = None, **kwargs) -> superwise_api.client.models.page.Page:
Gets all dashboards.
Arguments:
- name (str, optional): The name of the dashboard.
- page (int, optional): The page number.
- size (int, optional): The size of the page.
- **kwargs: Arbitrary keyword arguments.
Returns:
Page: A page of sources.
def
update( self, dashboard_id: str, *, name: Optional[str] = None, positions: Optional[Dict[str, superwise_api.models.dashboard.dashboard.WidgetMeta]] = None, **kwargs):
Updates a dashboard.
Arguments:
- dashboard_id (str): The id of the dashboard.
- name (str, optional): The new name of the dashboard.
- positions (dict, optional): The new positions of the widgets.
- **kwargs: Arbitrary keyword arguments.
Returns:
Dashboard: The updated dashboard.
Inherited Members
- superwise_api.entities.base.BaseApi
- BaseApi
- api_client
- wrap_api_calls
- raise_exception
- get_by_id
- delete