Skip to content

Snapshot🔗

A dashboard snapshot shares an interactive dashboard publicly.

It is a read-only version of a dashboard, and is not editable.

It is possible to create a snapshot of a snapshot.

Grafana strips away all sensitive information from the dashboard.

Sensitive information stripped: queries (metric, template,annotation) and panel links.

Definition🔗

class Snapshot:
    """
    A dashboard snapshot shares an interactive dashboard publicly.
    It is a read-only version of a dashboard, and is not editable.
    It is possible to create a snapshot of a snapshot.
    Grafana strips away all sensitive information from the dashboard.
    Sensitive information stripped: queries (metric, template,annotation) and panel links.
    """

    # Time when the snapshot was created
    created: str
    # Time when the snapshot expires, default is never to expire
    expires: str
    # Is the snapshot saved in an external grafana instance
    external: bool
    # external url, if snapshot was shared in external grafana instance
    external_url: str
    # original url, url of the dashboard that was snapshotted
    original_url: str
    # Unique identifier of the snapshot
    id_val: int
    # Optional, defined the unique key of the snapshot, required if external is true
    key: str
    # Optional, name of the snapshot
    name: str
    # org id of the snapshot
    org_id: int
    # last time when the snapshot was updated
    updated: str
    # url of the snapshot, if snapshot was shared internally
    url: typing.Optional[str]
    # user id of the snapshot creator
    user_id: int
    dashboard: typing.Optional[dashboard.Dashboard]

Methods🔗

to_json🔗

Converts this object into a representation that can easily be encoded to JSON.

def to_json() -> dict[str, object]

from_json🔗

Builds this object from a JSON-decoded dict.

@classmethod
def from_json(data: dict[str, typing.Any]) -> typing.Self

See also🔗