Dashboard
- class perses_api.dashboard.Dashboard[source]
Bases:
objectThe class includes all necessary methods to access the Perses dashboards API
- Parameters:
perses_api_model (APIModel) – Inject a Perses API model object that includes all necessary values and information
- create_dashboard(project_name: str, dashboard: Dashboard) dict[source]
The method includes a functionality to create a new dashboard within a project
- Parameters:
- Raises:
ValueError – Missed specifying a necessary value
Exception – Unspecified error by executing the API call
- Returns:
The created dashboard dict
- Return type:
- delete_dashboard(project_name: str, name: str) None[source]
The method includes a functionality to delete a dashboard by name
- Parameters:
- Raises:
ValueError – Missed specifying a necessary value
- get_dashboard(project_name: str, name: str) dict[source]
The method includes a functionality to retrieve a single dashboard by name
- Parameters:
- Raises:
ValueError – Missed specifying a necessary value
Exception – Unspecified error by executing the API call
- Returns:
The dashboard dict
- Return type:
- get_dashboards(project_name: str, name: str = None) list[source]
The method includes a functionality to retrieve all dashboards within a project
- Parameters:
- Raises:
ValueError – Missed specifying a necessary value
Exception – Unspecified error by executing the API call
- Returns:
A list of dashboard dicts
- Return type:
- update_dashboard(project_name: str, name: str, dashboard: Dashboard) dict[source]
The method includes a functionality to update an existing dashboard by name
- Parameters:
- Raises:
ValueError – Missed specifying a necessary value
Exception – Unspecified error by executing the API call
- Returns:
The updated dashboard dict
- Return type: