DataSourceInstanceSettings interface

Frontend settings model that is passed to Datasource constructor. This differs a bit from the model above as this data model is available to every user who has access to a data source (Viewers+). This is loaded in bootData (on page load), or from: /api/frontend/settings

Signature

  1. export interface DataSourceInstanceSettings<T extends DataSourceJsonData = DataSourceJsonData>

Import

  1. import { DataSourceInstanceSettings } from '@grafana/data';

Properties

PropertyTypeDescription
access‘direct’ | ‘proxy’
basicAuthstringThis is the full Authorization header if basic auth is enabled. Only available here when access is Browser (direct), when access is Server (proxy) The basic auth header, username & password is never exposed to browser/Frontend so this will be empty then.
databasestring
idnumber
isDefaultboolean
jsonDataT
metaDataSourcePluginMeta
namestring
passwordstring
rawRefDataSourceRefWhen the name+uid are based on template variables, maintain access to the real values
typestring
uidstring
urlstring
usernamestring
withCredentialsboolean

access property

Signature

  1. access: 'direct' | 'proxy';

basicAuth property

This is the full Authorization header if basic auth is enabled. Only available here when access is Browser (direct), when access is Server (proxy) The basic auth header, username & password is never exposed to browser/Frontend so this will be empty then.

Signature

  1. basicAuth?: string;

database property

Signature

  1. database?: string;

id property

Signature

  1. id: number;

isDefault property

Signature

  1. isDefault?: boolean;

jsonData property

Signature

  1. jsonData: T;

meta property

Signature

  1. meta: DataSourcePluginMeta;

name property

Signature

  1. name: string;

password property

Signature

  1. password?: string;

rawRef property

When the name+uid are based on template variables, maintain access to the real values

Signature

  1. rawRef?: DataSourceRef;

type property

Signature

  1. type: string;

uid property

Signature

  1. uid: string;

url property

Signature

  1. url?: string;

username property

Signature

  1. username?: string;

withCredentials property

Signature

  1. withCredentials?: boolean;