query_annotations

swxsoc.util.grafana.query_annotations(start_time: datetime, end_time: datetime | None = None, tags: List[str] | None = None, limit: int | None = 100, dashboard_id: int | None = None, panel_id: int | None = None, dashboard_name: str | None = None, panel_name: str | None = None, mission_dashboard: str | None = None) List[Dict[str, str | int]][source]

Queries annotations within a specific timeframe with optional filters for tags, dashboard, and panel names.

Args:

start_time (datetime): Start time of the query in UTC. end_time (Optional[datetime]): End time of the query; defaults to start_time if None. tags (Optional[List[str]]): List of tags to filter the annotations. limit (Optional[int]): Maximum number of annotations to retrieve. dashboard_id (Optional[int]): UID of the dashboard to filter annotations. panel_id (Optional[int]): ID of the panel to filter annotations. dashboard_name (Optional[str]): Name of the dashboard to look up UID if dashboard_id is not provided. panel_name (Optional[str]): Name of the panel to look up ID if panel_id is not provided.

Returns:

List[Dict[str, Union[str, int]]]: List of annotations matching the query criteria.