Skip to content

Preferences🔗

Spec defines user, team or org Grafana preferences

swagger:model Preferences

Definition🔗

class Preferences:
    """
    Spec defines user, team or org Grafana preferences
    swagger:model Preferences
    """

    # UID for the home dashboard
    home_dashboard_uid: typing.Optional[str]
    # The timezone selection
    # TODO: this should use the timezone defined in common
    timezone: typing.Optional[str]
    # day of the week (sunday, monday, etc)
    week_start: typing.Optional[str]
    # light, dark, empty is default
    theme: typing.Optional[str]
    # Selected language (beta)
    language: typing.Optional[str]
    # Explore query history preferences
    query_history: typing.Optional[preferences.QueryHistoryPreference]
    # Cookie preferences
    cookie_preferences: typing.Optional[preferences.CookiePreferences]
    # Navigation preferences
    navbar: typing.Optional[preferences.NavbarPreference]

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🔗