2020-05-14 04:21:31 -05:00
{
2020-05-14 07:05:08 -05:00
"$id" : "https://grafana.com/plugin-metadata" ,
2020-05-14 04:21:31 -05:00
"$schema" : "http://json-schema.org/draft-07/schema" ,
"type" : "object" ,
"title" : "plugin.json" ,
"description" : "The plugin.json file is required for all plugins. When Grafana starts, it scans the plugin folders and mounts every folder that contains a plugin.json file unless the folder contains a subfolder named dist. In that case, Grafana mounts the dist folder instead." ,
"required" : [ "type" , "name" , "id" , "info" , "dependencies" ] ,
"additionalProperties" : false ,
"properties" : {
"id" : {
"type" : "string" ,
2023-03-07 02:14:51 -06:00
"description" : "Unique name of the plugin. If the plugin is published on grafana.com, then the plugin `id` has to follow the naming conventions." ,
2022-07-18 10:02:37 -05:00
"pattern" : "^[0-9a-z]+\\-([0-9a-z]+\\-)?(app|panel|datasource|secretsmanager)$"
2020-05-14 04:21:31 -05:00
} ,
"type" : {
"type" : "string" ,
2020-12-08 03:41:33 -06:00
"description" : "Plugin type." ,
2023-03-07 02:14:51 -06:00
"enum" : [ "app" , "datasource" , "panel" , "renderer" , "secretsmanager" ]
2020-05-14 04:21:31 -05:00
} ,
"info" : {
"type" : "object" ,
"description" : "Metadata for the plugin. Some fields are used on the plugins page in Grafana and others on grafana.com if the plugin is published." ,
2020-08-19 14:27:44 -05:00
"required" : [ "logos" , "version" , "updated" , "keywords" ] ,
2020-05-14 04:21:31 -05:00
"additionalProperties" : false ,
"properties" : {
"author" : {
"type" : "object" ,
"description" : "Information about the plugin author." ,
"additionalProperties" : false ,
"properties" : {
"name" : {
"type" : "string" ,
"description" : "Author's name."
} ,
"email" : {
"type" : "string" ,
"description" : "Author's name." ,
"format" : "email"
} ,
"url" : {
"type" : "string" ,
"description" : "Link to author's website." ,
"format" : "uri"
}
}
} ,
2020-12-08 03:41:33 -06:00
"build" : {
"type" : "object" ,
"description" : "Build information" ,
"additionalProperties" : false ,
"properties" : {
"time" : {
"type" : "number" ,
"description" : "Time when the plugin was built, as a Unix timestamp."
} ,
"repo" : {
"type" : "string" ,
"description" : ""
} ,
"branch" : {
"type" : "string" ,
"description" : "Git branch the plugin was built from."
} ,
"hash" : {
"type" : "string" ,
"description" : "Git hash of the commit the plugin was built from"
} ,
"number" : {
"type" : "number" ,
"description" : ""
} ,
"pr" : {
"type" : "number" ,
"description" : "GitHub pull request the plugin was built from"
}
}
} ,
2020-05-14 04:21:31 -05:00
"description" : {
"type" : "string" ,
"description" : "Description of plugin. Used on the plugins page in Grafana and for search on grafana.com."
} ,
"keywords" : {
"type" : "array" ,
"description" : "Array of plugin keywords. Used for search on grafana.com." ,
2020-08-19 14:27:44 -05:00
"minItems" : 1 ,
2020-05-14 04:21:31 -05:00
"items" : {
2020-05-14 07:05:08 -05:00
"type" : "string"
2020-05-14 04:21:31 -05:00
}
} ,
"links" : {
"type" : "array" ,
"description" : "An array of link objects to be displayed on this plugin's project page in the form `{name: 'foo', url: 'http://example.com'}`" ,
"items" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"name" : {
"type" : "string"
} ,
"url" : {
"type" : "string" ,
"format" : "uri"
}
}
}
} ,
"logos" : {
"type" : "object" ,
"description" : "SVG images that are used as plugin icons." ,
"required" : [ "small" , "large" ] ,
"additionalProperties" : false ,
"properties" : {
"small" : {
"type" : "string" ,
2020-05-14 07:05:08 -05:00
"description" : "Link to the \"small\" version of the plugin logo, which must be an SVG image. \"Large\" and \"small\" logos can be the same image."
2020-05-14 04:21:31 -05:00
} ,
"large" : {
"type" : "string" ,
2020-05-14 07:05:08 -05:00
"description" : "Link to the \"large\" version of the plugin logo, which must be an SVG image. \"Large\" and \"small\" logos can be the same image."
2020-05-14 04:21:31 -05:00
}
}
} ,
"screenshots" : {
"type" : "array" ,
"description" : "An array of screenshot objects in the form `{name: 'bar', path: 'img/screenshot.png'}`" ,
"items" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"name" : {
"type" : "string"
} ,
"path" : {
"type" : "string"
}
}
}
} ,
"updated" : {
"type" : "string" ,
"description" : "Date when this plugin was built." ,
"pattern" : "^(\\d{4}-\\d{2}-\\d{2}|\\%TODAY\\%)$"
} ,
"version" : {
"type" : "string" ,
"description" : "Project version of this commit, e.g. `6.7.x`." ,
2022-09-01 08:53:38 -05:00
"pattern" : "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)|(\\%VERSION\\%)$"
2020-05-14 04:21:31 -05:00
}
}
} ,
2023-03-10 08:07:35 -06:00
"name" : {
"type" : "string" ,
"description" : "Human-readable name of the plugin that is shown to the user in the UI."
} ,
"dependencies" : {
"type" : "object" ,
"description" : "Dependency information related to Grafana and other plugins." ,
"required" : [ "grafanaDependency" ] ,
"additionalProperties" : false ,
"properties" : {
"grafanaVersion" : {
"type" : "string" ,
"description" : "(Deprecated) Required Grafana version for this plugin, e.g. `6.x.x 7.x.x` to denote plugin requires Grafana v6.x.x or v7.x.x." ,
"pattern" : "^([0-9]+)(\\.[0-9x]+)?(\\.[0-9x])?$"
} ,
"grafanaDependency" : {
"type" : "string" ,
"description" : "Required Grafana version for this plugin. Validated using https://github.com/npm/node-semver." ,
2023-11-09 03:03:00 -06:00
"pattern" : "^(<=|>=|<|>|=|~|\\^)?([0-9]+)(\\.[0-9x\\*]+)(\\.[0-9x\\*]+)?(\\s(<=|>=|<|=>)?([0-9]+)(\\.[0-9x]+)(\\.[0-9x]+))?(\\-[0-9]+)?$"
2023-03-10 08:07:35 -06:00
} ,
"plugins" : {
"type" : "array" ,
"description" : "An array of required plugins on which this plugin depends." ,
"additionalItems" : false ,
"items" : {
"type" : "object" ,
"description" : "Plugin dependency. Used to display information about plugin dependencies in the Grafana UI." ,
"required" : [ "id" , "name" , "type" , "version" ] ,
"properties" : {
"id" : {
"type" : "string" ,
"pattern" : "^[0-9a-z]+\\-([0-9a-z]+\\-)?(app|panel|datasource|secretsmanager)$"
} ,
"type" : {
"type" : "string" ,
"enum" : [ "app" , "datasource" , "panel" , "secretsmanager" ]
} ,
"name" : {
"type" : "string"
} ,
"version" : {
"type" : "string"
}
}
}
}
}
} ,
"$schema" : {
"type" : "string" ,
"description" : "Schema definition for the plugin.json file. Used primarily for schema validation."
} ,
"alerting" : {
"type" : "boolean" ,
"description" : "For data source plugins, if the plugin supports alerting. Requires `backend` to be set to `true`."
} ,
"annotations" : {
"type" : "boolean" ,
"description" : "For data source plugins, if the plugin supports annotation queries."
} ,
"autoEnabled" : {
"type" : "boolean" ,
"description" : "Set to true for app plugins that should be enabled and pinned to the navigation bar in all orgs."
} ,
"backend" : {
"type" : "boolean" ,
"description" : "If the plugin has a backend component."
} ,
"builtIn" : {
"type" : "boolean" ,
"description" : "[internal only] Indicates whether the plugin is developed and shipped as part of Grafana. Also known as a 'core plugin'."
} ,
"category" : {
"type" : "string" ,
"description" : "Plugin category used on the Add data source page." ,
"enum" : [ "tsdb" , "logging" , "cloud" , "tracing" , "profiling" , "sql" , "enterprise" , "iot" , "other" ]
} ,
"enterpriseFeatures" : {
"type" : "object" ,
"description" : "Grafana Enterprise specific features" ,
"additionalProperties" : true ,
"properties" : {
"healthDiagnosticsErrors" : {
"type" : "boolean" ,
"description" : "Enable/Disable health diagnostics errors. Requires Grafana >=7.5.5." ,
"default" : false
}
}
} ,
"executable" : {
"type" : "string" ,
"description" : "The first part of the file name of the backend component executable. There can be multiple executables built for different operating system and architecture. Grafana will check for executables named `<executable>_<$GOOS>_<lower case $GOARCH><.exe for Windows>`, e.g. `plugin_linux_amd64`. Combination of $GOOS and $GOARCH can be found here: https://golang.org/doc/install/source#environment."
} ,
"hideFromList" : {
"type" : "boolean" ,
"description" : "[internal only] Excludes the plugin from listings in Grafana's UI. Only allowed for `builtIn` plugins."
} ,
"includes" : {
"type" : "array" ,
"description" : "Resources to include in plugin." ,
"items" : {
"type" : "object" ,
"additionalItems" : false ,
"properties" : {
"uid" : {
"type" : "string" ,
"description" : "Unique identifier of the included resource"
} ,
"type" : {
"type" : "string" ,
"enum" : [ "dashboard" , "page" , "panel" , "datasource" , "secretsmanager" ]
} ,
"name" : {
"type" : "string"
} ,
"component" : {
"type" : "string" ,
"description" : "(Legacy) The Angular component to use for a page."
} ,
"role" : {
"type" : "string" ,
"description" : "The minimum role a user must have to see this page in the navigation menu." ,
"enum" : [ "Admin" , "Editor" , "Viewer" ]
} ,
"path" : {
"type" : "string" ,
"description" : "Used for app plugins."
} ,
"addToNav" : {
"type" : "boolean" ,
"description" : "Add the include to the navigation menu."
} ,
"defaultNav" : {
"type" : "boolean" ,
"description" : "Page or dashboard when user clicks the icon in the side menu."
} ,
"icon" : {
"type" : "string" ,
"description" : "Icon to use in the side menu. For information on available icon, refer to [Icons Overview](https://developers.grafana.com/ui/latest/index.html?path=/story/docs-overview-icon--icons-overview)."
}
}
}
} ,
"logs" : {
"type" : "boolean" ,
"description" : "For data source plugins, if the plugin supports logs. It may be used to filter logs only features."
} ,
"metrics" : {
"type" : "boolean" ,
"description" : "For data source plugins, if the plugin supports metric queries. Used to enable the plugin in the panel editor."
} ,
"pascalName" : {
"type" : "string" ,
"description" : "[internal only] The PascalCase name for the plugin. Used for creating machine-friendly identifiers, typically in code generation. If not provided, defaults to name, but title-cased and sanitized (only alphabetical characters allowed)." ,
"pattern" : "^([A-Z][a-zA-Z]{1,62})$"
} ,
"preload" : {
"type" : "boolean" ,
"description" : "Initialize plugin on startup. By default, the plugin initializes on first use. Useful for app plugins that should load without user interaction."
} ,
2020-05-14 04:21:31 -05:00
"queryOptions" : {
"type" : "object" ,
"description" : "For data source plugins. There is a query options section in the plugin's query editor and these options can be turned on if needed." ,
"additionalProperties" : false ,
"properties" : {
"maxDataPoints" : {
"type" : "boolean" ,
"description" : "For data source plugins. If the `max data points` option should be shown in the query options section in the query editor."
} ,
"minInterval" : {
"type" : "boolean" ,
"description" : "For data source plugins. If the `min interval` option should be shown in the query options section in the query editor."
} ,
"cacheTimeout" : {
"type" : "boolean" ,
"description" : "For data source plugins. If the `cache timeout` option should be shown in the query options section in the query editor."
}
}
} ,
"routes" : {
"type" : "array" ,
2023-09-29 01:43:48 -05:00
"description" : "For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](/developers/plugin-tools/create-a-plugin/extend-a-plugin/add-authentication-for-data-source-plugins)." ,
2020-05-14 04:21:31 -05:00
"items" : {
"type" : "object" ,
2023-09-29 01:43:48 -05:00
"description" : "For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](/developers/plugin-tools/create-a-plugin/extend-a-plugin/add-authentication-for-data-source-plugins)." ,
2020-05-14 04:21:31 -05:00
"additionalProperties" : false ,
"properties" : {
"path" : {
"type" : "string" ,
"description" : "For data source plugins. The route path that is replaced by the route URL field when proxying the call."
} ,
"method" : {
"type" : "string" ,
2021-09-13 06:32:11 -05:00
"description" : "For data source plugins. Route method matches the HTTP verb like GET or POST. Multiple methods can be provided as a comma-separated list."
2020-05-14 04:21:31 -05:00
} ,
"url" : {
"type" : "string" ,
2020-08-05 10:37:51 -05:00
"description" : "For data source plugins. Route URL is where the request is proxied to."
2020-05-14 04:21:31 -05:00
} ,
"reqSignedIn" : {
"type" : "boolean"
} ,
"reqRole" : {
"type" : "string"
} ,
"headers" : {
"type" : "array" ,
"description" : "For data source plugins. Route headers adds HTTP headers to the proxied request."
} ,
2021-03-31 09:38:35 -05:00
"body" : {
"type" : "object" ,
"description" : "For data source plugins. Route headers set the body content and length to the proxied request."
} ,
2020-05-14 04:21:31 -05:00
"tokenAuth" : {
"type" : "object" ,
"description" : "For data source plugins. Token authentication section used with an OAuth API." ,
"additionalProperties" : false ,
"properties" : {
"url" : {
"type" : "string" ,
2021-04-08 11:13:18 -05:00
"description" : "URL to fetch the authentication token."
} ,
"scopes" : {
2021-09-17 07:04:56 -05:00
"type" : "array" ,
"description" : "The list of scopes that your application should be granted access to." ,
"items" : {
"type" : "string"
}
2020-05-14 04:21:31 -05:00
} ,
"params" : {
"type" : "object" ,
2021-04-08 11:13:18 -05:00
"description" : "Parameters for the token authentication request." ,
2022-08-19 07:58:32 -05:00
"additionalProperties" : true ,
2021-01-19 09:01:35 -06:00
"properties" : {
"grant_type" : {
"type" : "string" ,
2021-04-08 11:13:18 -05:00
"description" : "OAuth grant type"
2021-01-19 09:01:35 -06:00
} ,
"client_id" : {
"type" : "string" ,
2021-04-08 11:13:18 -05:00
"description" : "OAuth client ID"
2021-01-19 09:01:35 -06:00
} ,
"client_secret" : {
"type" : "string" ,
2021-04-08 11:13:18 -05:00
"description" : "OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob."
2021-01-19 09:01:35 -06:00
} ,
"resource" : {
"type" : "string" ,
2021-04-08 11:13:18 -05:00
"description" : "OAuth resource"
2021-01-19 09:01:35 -06:00
}
}
}
}
} ,
"jwtTokenAuth" : {
"type" : "object" ,
"description" : "For data source plugins. Token authentication section used with an JWT OAuth API." ,
2022-08-19 07:58:32 -05:00
"additionalProperties" : true ,
2021-01-19 09:01:35 -06:00
"properties" : {
"url" : {
"type" : "string" ,
2021-04-08 11:13:18 -05:00
"description" : "URL to fetch the JWT token." ,
2021-01-19 09:01:35 -06:00
"format" : "uri"
} ,
2021-04-08 11:13:18 -05:00
"scopes" : {
2021-09-17 07:04:56 -05:00
"type" : "array" ,
"description" : "The list of scopes that your application should be granted access to." ,
"items" : {
"type" : "string"
}
2021-04-08 11:13:18 -05:00
} ,
2021-01-19 09:01:35 -06:00
"params" : {
"type" : "object" ,
2021-04-08 11:13:18 -05:00
"description" : "Parameters for the JWT token authentication request." ,
2020-05-14 04:21:31 -05:00
"additionalProperties" : false ,
"properties" : {
2021-04-08 11:13:18 -05:00
"token_uri" : {
2020-05-14 04:21:31 -05:00
"type" : "string" ,
2021-04-08 11:13:18 -05:00
"description" : ""
2020-05-14 04:21:31 -05:00
} ,
2021-04-08 11:13:18 -05:00
"client_email" : {
2020-05-14 04:21:31 -05:00
"type" : "string" ,
2021-04-08 11:13:18 -05:00
"description" : ""
2020-05-14 04:21:31 -05:00
} ,
2021-04-08 11:13:18 -05:00
"private_key" : {
2020-05-14 04:21:31 -05:00
"type" : "string" ,
2021-04-08 11:13:18 -05:00
"description" : ""
2020-05-14 04:21:31 -05:00
}
}
}
}
2022-08-15 08:39:50 -05:00
} ,
"urlParams" : {
"type" : "array" ,
"description" : "Add URL parameters to a proxy route" ,
"items" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"name" : {
"type" : "string" ,
"description" : "Name of the URL parameter"
} ,
"content" : {
"type" : "string" ,
"description" : "Value of the URL parameter"
}
}
}
2020-05-14 04:21:31 -05:00
}
}
}
2021-08-23 14:39:26 -05:00
} ,
2023-03-10 08:07:35 -06:00
"skipDataQuery" : {
"type" : "boolean" ,
"description" : "For panel plugins. Hides the query editor."
} ,
"state" : {
"type" : "string" ,
"description" : "Marks a plugin as a pre-release." ,
"enum" : [ "alpha" , "beta" ]
} ,
"streaming" : {
"type" : "boolean" ,
"description" : "For data source plugins, if the plugin supports streaming. Used in Explore to start live streaming."
} ,
"tracing" : {
"type" : "boolean" ,
"description" : "For data source plugins, if the plugin supports tracing. Used for example to link logs (e.g. Loki logs) with tracing plugins."
2023-06-27 01:47:25 -05:00
} ,
2023-12-04 06:14:21 -06:00
"iam" : {
2023-06-27 01:47:25 -05:00
"type" : "object" ,
2023-12-04 06:14:21 -06:00
"description" : "Identity and Access Management." ,
2023-06-27 01:47:25 -05:00
"properties" : {
2023-12-04 06:14:21 -06:00
"permissions" : {
"type" : "array" ,
"description" : "Permissions are the permissions that the plugin needs its associated service account to have" ,
"items" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"action" : {
"type" : "string"
} ,
"scope" : {
"type" : "string"
2023-06-27 01:47:25 -05:00
}
}
}
} ,
2023-12-04 06:14:21 -06:00
"impersonation" : {
2023-06-27 01:47:25 -05:00
"type" : "object" ,
2023-12-04 06:14:21 -06:00
"description" : "Impersonation describes the permissions that the plugin will be restricted to when acting on behalf of the user." ,
2023-06-27 01:47:25 -05:00
"properties" : {
2023-12-04 06:14:21 -06:00
"groups" : {
2023-06-27 01:47:25 -05:00
"type" : "boolean" ,
2023-12-04 06:14:21 -06:00
"description" : "Groups allows the service to list the impersonated user's teams."
2023-06-27 01:47:25 -05:00
} ,
"permissions" : {
"type" : "array" ,
2023-12-04 06:14:21 -06:00
"description" : "Permissions are the permissions that the plugin needs when impersonating a user. The intersection of this set with the impersonated user's permission guarantees that the client will not gain more privileges than the impersonated user has." ,
2023-06-27 01:47:25 -05:00
"items" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"action" : {
"type" : "string"
} ,
"scope" : {
"type" : "string"
}
}
}
}
}
}
}
2020-05-14 04:21:31 -05:00
}
}
}