"description":"The Grafana backend exposes an HTTP API, the same API is used by the frontend to do\neverything from saving dashboards, creating users and updating data sources.",
"title":"Grafana HTTP API.",
"contact":{
"name":"Grafana Labs",
"url":"https://grafana.com",
"email":"hello@grafana.com"
},
"version":"0.0.1"
},
"basePath":"/api",
"paths":{
"/access-control/assignments/search":{
"post":{
"description":"Returns the result of the search through access-control role assignments.\n\nYou need to have a permission with action `teams.roles:read` on scope `teams:*`\nand a permission with action `users.roles:read` on scope `users:*`.",
"description":"Gets all existing roles. The response contains all global and organization local roles, for the organization which user is signed in.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.\n\nThe `delegatable` flag reduces the set of roles to only those for which the signed-in user has permissions to assign.",
"description":"Creates a new custom role and maps given permissions to that role. Note that roles with the same prefix as Fixed Roles can’t be created.\n\nYou need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.\nFor example, if a user does not have required permissions for creating users, they won’t be able to create a custom role which allows to do that. This is done to prevent escalation of privileges.",
"tags":[
"access_control",
"enterprise"
],
"summary":"Create a new custom role.",
"operationId":"createRole",
"parameters":[
{
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/CreateRoleForm"
}
}
],
"responses":{
"201":{
"$ref":"#/responses/createRoleResponse"
},
"400":{
"$ref":"#/responses/badRequestError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
}
},
"/access-control/roles/{roleUID}":{
"get":{
"description":"Get a role for the given UID.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.",
"tags":[
"access_control",
"enterprise"
],
"summary":"Get a role.",
"operationId":"getRole",
"parameters":[
{
"type":"string",
"name":"roleUID",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"$ref":"#/responses/getRoleResponse"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
},
"put":{
"description":"You need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.",
"tags":[
"access_control",
"enterprise"
],
"summary":"Update a custom role.",
"operationId":"updateRole",
"parameters":[
{
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/UpdateRoleCommand"
}
},
{
"type":"string",
"name":"roleUID",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"$ref":"#/responses/getRoleResponse"
},
"400":{
"$ref":"#/responses/badRequestError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"404":{
"$ref":"#/responses/notFoundError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
},
"delete":{
"description":"Delete a role with the given UID, and it’s permissions. If the role is assigned to a built-in role, the deletion operation will fail, unless force query param is set to true, and in that case all assignments will also be deleted.\n\nYou need to have a permission with action `roles:delete` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only delete a custom role with the same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to delete a custom role which allows to do that.",
"tags":[
"access_control",
"enterprise"
],
"summary":"Delete a custom role.",
"operationId":"deleteRole",
"parameters":[
{
"type":"boolean",
"name":"force",
"in":"query"
},
{
"type":"boolean",
"name":"global",
"in":"query"
},
{
"type":"string",
"name":"roleUID",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"$ref":"#/responses/okResponse"
},
"400":{
"$ref":"#/responses/badRequestError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
}
},
"/access-control/roles/{roleUID}/assignments":{
"get":{
"description":"Get role assignments for the role with the given UID.\n\nYou need to have a permission with action `teams.roles:list` and scope `teams:id:*` and `users.roles:list` and scope `users:id:*`.",
"tags":[
"access_control",
"enterprise"
],
"summary":"Get role assignments.",
"operationId":"getRoleAssignments",
"parameters":[
{
"type":"string",
"name":"roleUID",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"$ref":"#/responses/getRoleAssignmentsResponse"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"404":{
"$ref":"#/responses/notFoundError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
},
"put":{
"description":"Set role assignments for the role with the given UID.\n\nYou need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate`, and `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate`.",
"tags":[
"access_control",
"enterprise"
],
"summary":"Set role assignments.",
"operationId":"setRoleAssignments",
"parameters":[
{
"type":"string",
"name":"roleUID",
"in":"path",
"required":true
},
{
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/SetRoleAssignmentsCommand"
}
}
],
"responses":{
"200":{
"$ref":"#/responses/setRoleAssignmentsResponse"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"404":{
"$ref":"#/responses/notFoundError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
}
},
"/access-control/status":{
"get":{
"description":"Returns an indicator to check if fine-grained access control is enabled or not.\n\nYou need to have a permission with action `status:accesscontrol` and scope `services:accesscontrol`.",
"description":"Lists the roles that have been directly assigned to the given teams.\n\nYou need to have a permission with action `teams.roles:read` and scope `teams:id:*`.",
"tags":[
"access_control",
"enterprise"
],
"summary":"List roles assigned to multiple teams.",
"description":"Lists the roles that have been directly assigned to the given users. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:read` and scope `users:id:*`.",
"tags":[
"access_control",
"enterprise"
],
"summary":"List roles assigned to multiple users.",
"description":"Lists the roles that have been directly assigned to a given user. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:read` and scope `users:id:\u003cuser ID\u003e`.",
"tags":[
"access_control",
"enterprise"
],
"summary":"List roles assigned to a user.",
"operationId":"listUserRoles",
"parameters":[
{
"type":"integer",
"format":"int64",
"name":"userId",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"$ref":"#/responses/getAllRolesResponse"
},
"400":{
"$ref":"#/responses/badRequestError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
},
"put":{
"description":"Update the user’s role assignments to match the provided set of UIDs. This will remove any assigned roles that aren’t in the request and add roles that are in the set but are not already assigned to the user.\nIf you want to add or remove a single role, consider using Add a user role assignment or Remove a user role assignment instead.\n\nYou need to have a permission with action `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate` for each. `permissions:type:delegate` scope ensures that users can only assign or unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign or unassign a role which will allow to do that. This is done to prevent escalation of privileges.",
"tags":[
"access_control",
"enterprise"
],
"summary":"Set user role assignments.",
"operationId":"setUserRoles",
"parameters":[
{
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/SetUserRolesCommand"
}
},
{
"type":"integer",
"format":"int64",
"name":"userId",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"$ref":"#/responses/okResponse"
},
"400":{
"$ref":"#/responses/badRequestError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"404":{
"$ref":"#/responses/notFoundError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
},
"post":{
"description":"Assign a role to a specific user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:add` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only assign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign a role which will allow to do that. This is done to prevent escalation of privileges.",
"description":"Revoke a role from a user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:remove` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to unassign a role which will allow to do that. This is done to prevent escalation of privileges.",
"tags":[
"access_control",
"enterprise"
],
"summary":"Remove a user role assignment.",
"operationId":"removeUserRole",
"parameters":[
{
"type":"boolean",
"description":"A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to remove assignment.",
"description":"You need to have a permission with action `licensing:read`.",
"tags":[
"licensing",
"enterprise"
],
"summary":"Refresh license stats.",
"operationId":"refreshLicenseStats",
"responses":{
"200":{
"$ref":"#/responses/refreshLicenseStatsResponse"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
}
},
"/licensing/token":{
"get":{
"description":"You need to have a permission with action `licensing:read`.",
"tags":[
"licensing",
"enterprise"
],
"summary":"Get license token.",
"operationId":"getLicenseToken",
"responses":{
"200":{
"$ref":"#/responses/getLicenseTokenResponse"
}
}
},
"post":{
"description":"You need to have a permission with action `licensing:update`.",
"tags":[
"licensing",
"enterprise"
],
"summary":"Create license token.",
"operationId":"postLicenseToken",
"parameters":[
{
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/DeleteTokenCommand"
}
}
],
"responses":{
"200":{
"$ref":"#/responses/getLicenseTokenResponse"
},
"400":{
"$ref":"#/responses/badRequestError"
}
}
},
"delete":{
"description":"Removes the license stored in the Grafana database. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:delete`.",
"tags":[
"licensing",
"enterprise"
],
"summary":"Remove license from database.",
"operationId":"deleteLicenseToken",
"parameters":[
{
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/DeleteTokenCommand"
}
}
],
"responses":{
"202":{
"$ref":"#/responses/acceptedResponse"
},
"400":{
"$ref":"#/responses/badRequestError"
},
"401":{
"$ref":"#/responses/unauthorisedError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"422":{
"$ref":"#/responses/unprocessableEntityError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
}
},
"/licensing/token/renew":{
"post":{
"description":"Manually ask license issuer for a new token. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:update`.",
"summary":"Delete removes the rule from the registry and stops it.",
"operationId":"deleteRecordingRule",
"parameters":[
{
"type":"integer",
"format":"int64",
"name":"recordingRuleID",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"$ref":"#/responses/okResponse"
},
"401":{
"$ref":"#/responses/unauthorisedError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"404":{
"$ref":"#/responses/notFoundError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
}
},
"/reports":{
"get":{
"description":"Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports:read` with scope `reports:*`.",
"tags":[
"reports",
"enterprise"
],
"summary":"List reports.",
"operationId":"getReports",
"responses":{
"200":{
"$ref":"#/responses/getReportsResponse"
},
"401":{
"$ref":"#/responses/unauthorisedError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
},
"post":{
"description":"Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports.admin:create`.",
"description":"Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client’s timeout to at least 60 seconds. Available to org admins only and with a valid license.\n\nOnly available in Grafana Enterprise v7.0+.\nThis API endpoint is experimental and may be deprecated in a future release. On deprecation, a migration strategy will be provided and the endpoint will remain functional until the next major release of Grafana.\n\nYou need to have a permission with action `reports:send`.",
"description":"Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:read`x.",
"tags":[
"reports",
"enterprise"
],
"summary":"Get settings.",
"operationId":"getReportSettings",
"responses":{
"200":{
"$ref":"#/responses/getReportSettingsResponse"
},
"401":{
"$ref":"#/responses/unauthorisedError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
},
"post":{
"description":"Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:write`xx.",
"description":"Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports:read` with scope `reports:id:\u003creport ID\u003e`.",
"tags":[
"reports",
"enterprise"
],
"summary":"Get a report.",
"operationId":"getReport",
"parameters":[
{
"type":"integer",
"format":"int64",
"name":"id",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"$ref":"#/responses/getReportResponse"
},
"400":{
"$ref":"#/responses/badRequestError"
},
"401":{
"$ref":"#/responses/unauthorisedError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"404":{
"$ref":"#/responses/notFoundError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
},
"put":{
"description":"Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.admin:write` with scope `reports:id:\u003creport ID\u003e`.",
"description":"Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.delete` with scope `reports:id:\u003creport ID\u003e`.",
"tags":[
"reports",
"enterprise"
],
"summary":"Delete a report.",
"operationId":"deleteReport",
"parameters":[
{
"type":"integer",
"format":"int64",
"name":"id",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"$ref":"#/responses/okResponse"
},
"400":{
"$ref":"#/responses/badRequestError"
},
"401":{
"$ref":"#/responses/unauthorisedError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"404":{
"$ref":"#/responses/notFoundError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
}
},
"/saml/acs":{
"post":{
"tags":[
"saml",
"enterprise"
],
"summary":"It performs Assertion Consumer Service (ACS).",
"operationId":"postACS",
"parameters":[
{
"type":"string",
"name":"RelayState",
"in":"query"
}
],
"responses":{
"302":{
"description":""
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
}
},
"/saml/metadata":{
"get":{
"produces":[
"application/xml;application/samlmetadata+xml"
],
"tags":[
"saml",
"enterprise"
],
"summary":"It exposes the SP (Grafana's) metadata for the IdP's consumption.",
"operationId":"getMetadata",
"responses":{
"200":{
"$ref":"#/responses/contentResponse"
}
}
}
},
"/saml/slo":{
"get":{
"description":"There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.",
"tags":[
"saml",
"enterprise"
],
"summary":"It performs Single Logout (SLO) callback.",
"operationId":"getSLO",
"responses":{
"302":{
"description":""
},
"400":{
"$ref":"#/responses/badRequestError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
},
"post":{
"description":"There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.",
"tags":[
"saml",
"enterprise"
],
"summary":"It performs Single Logout (SLO) callback.",
"operationId":"postSLO",
"parameters":[
{
"type":"string",
"name":"SAMLRequest",
"in":"query"
},
{
"type":"string",
"name":"SAMLResponse",
"in":"query"
}
],
"responses":{
"302":{
"description":""
},
"400":{
"$ref":"#/responses/badRequestError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
}
},
"/teams/{teamId}/groups":{
"get":{
"tags":[
"sync_team_groups",
"enterprise"
],
"summary":"Get External Groups.",
"operationId":"getTeamGroupsApi",
"parameters":[
{
"type":"integer",
"format":"int64",
"name":"teamId",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"$ref":"#/responses/getTeamGroupsApiResponse"
},
"400":{
"$ref":"#/responses/badRequestError"
},
"401":{
"$ref":"#/responses/unauthorisedError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"404":{
"$ref":"#/responses/notFoundError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
},
"post":{
"tags":[
"sync_team_groups",
"enterprise"
],
"summary":"Add External Group.",
"operationId":"addTeamGroupApi",
"parameters":[
{
"name":"body",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/TeamGroupMapping"
}
},
{
"type":"integer",
"format":"int64",
"name":"teamId",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"$ref":"#/responses/okResponse"
},
"400":{
"$ref":"#/responses/badRequestError"
},
"401":{
"$ref":"#/responses/unauthorisedError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"404":{
"$ref":"#/responses/notFoundError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
},
"delete":{
"tags":[
"sync_team_groups",
"enterprise"
],
"summary":"Remove External Group.",
"operationId":"removeTeamGroupApiQuery",
"parameters":[
{
"type":"string",
"name":"groupId",
"in":"query"
},
{
"type":"integer",
"format":"int64",
"name":"teamId",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"$ref":"#/responses/okResponse"
},
"400":{
"$ref":"#/responses/badRequestError"
},
"401":{
"$ref":"#/responses/unauthorisedError"
},
"403":{
"$ref":"#/responses/forbiddenError"
},
"404":{
"$ref":"#/responses/notFoundError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
}
}
},
"definitions":{
"ActiveSyncStatusDTO":{
"description":"ActiveSyncStatusDTO holds the information for LDAP background Sync",
"description":"TODO docs\nFROM: AnnotationQuery in grafana-data/src/types/annotations.ts",
"type":"object",
"properties":{
"builtIn":{
"description":"Set to 1 for the standard annotation query all dashboards have by default.",
"type":"number",
"format":"float"
},
"datasource":{
"$ref":"#/definitions/DataSourceRef"
},
"enable":{
"description":"When enabled the annotation query is issued with every dashboard refresh",
"type":"boolean"
},
"filter":{
"$ref":"#/definitions/AnnotationPanelFilter"
},
"hide":{
"description":"Annotation queries can be toggled on or off at the top of the dashboard.\nWhen hide is true, the toggle is not shown in the dashboard.",
"type":"boolean"
},
"iconColor":{
"description":"Color to use for the annotation event markers",
"type":"string"
},
"name":{
"description":"Name of annotation.",
"type":"string"
},
"target":{
"$ref":"#/definitions/AnnotationTarget"
},
"type":{
"description":"TODO -- this should not exist here, it is based on the --grafana-- datasource",
"type":"string"
}
}
},
"AnnotationTarget":{
"description":"TODO: this should be a regular DataQuery that depends on the selected dashboard\nthese match the properties of the \"grafana\" datasouce that is default in most dashboards",
"type":"object",
"properties":{
"limit":{
"description":"Only required/valid for the grafana datasource...\nbut code+tests is already depending on it so hard to change",
"type":"integer",
"format":"int64"
},
"matchAny":{
"description":"Only required/valid for the grafana datasource...\nbut code+tests is already depending on it so hard to change",
"type":"boolean"
},
"tags":{
"description":"Only required/valid for the grafana datasource...\nbut code+tests is already depending on it so hard to change",
"type":"array",
"items":{
"type":"string"
}
},
"type":{
"description":"Only required/valid for the grafana datasource...\nbut code+tests is already depending on it so hard to change",
"description":"Config defines the internal representation of a cache configuration, including fields not set by the API caller",
"type":"object",
"properties":{
"created":{
"type":"string",
"format":"date-time"
},
"dataSourceID":{
"description":"Fields that can be set by the API caller - read/write",
"type":"integer",
"format":"int64"
},
"dataSourceUID":{
"type":"string"
},
"defaultTTLMs":{
"description":"These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually",
"type":"integer",
"format":"int64"
},
"enabled":{
"type":"boolean"
},
"ttlQueriesMs":{
"description":"TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)",
"type":"integer",
"format":"int64"
},
"ttlResourcesMs":{
"type":"integer",
"format":"int64"
},
"updated":{
"type":"string",
"format":"date-time"
},
"useDefaultTTL":{
"description":"If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini",
"type":"boolean"
}
}
},
"CacheConfigResponse":{
"type":"object",
"properties":{
"created":{
"type":"string",
"format":"date-time"
},
"dataSourceID":{
"description":"Fields that can be set by the API caller - read/write",
"type":"integer",
"format":"int64"
},
"dataSourceUID":{
"type":"string"
},
"defaultTTLMs":{
"description":"These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually",
"type":"integer",
"format":"int64"
},
"enabled":{
"type":"boolean"
},
"message":{
"type":"string"
},
"ttlQueriesMs":{
"description":"TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)",
"type":"integer",
"format":"int64"
},
"ttlResourcesMs":{
"type":"integer",
"format":"int64"
},
"updated":{
"type":"string",
"format":"date-time"
},
"useDefaultTTL":{
"description":"If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini",
"type":"boolean"
}
}
},
"CacheConfigSetter":{
"description":"ConfigSetter defines the cache parameters that users can configure per datasource\nThis is only intended to be consumed by the SetCache HTTP Handler",
"type":"object",
"properties":{
"dataSourceID":{
"type":"integer",
"format":"int64"
},
"dataSourceUID":{
"type":"string"
},
"enabled":{
"type":"boolean"
},
"ttlQueriesMs":{
"description":"TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)",
"type":"integer",
"format":"int64"
},
"ttlResourcesMs":{
"type":"integer",
"format":"int64"
},
"useDefaultTTL":{
"description":"If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini",
"title":"A Certificate represents an X.509 certificate.",
"properties":{
"AuthorityKeyId":{
"type":"array",
"items":{
"type":"integer",
"format":"uint8"
}
},
"BasicConstraintsValid":{
"description":"BasicConstraintsValid indicates whether IsCA, MaxPathLen,\nand MaxPathLenZero are valid.",
"type":"boolean"
},
"CRLDistributionPoints":{
"description":"CRL Distribution Points",
"type":"array",
"items":{
"type":"string"
}
},
"DNSNames":{
"description":"Subject Alternate Name values. (Note that these values may not be valid\nif invalid values were contained within a parsed certificate. For\nexample, an element of DNSNames may not be a valid DNS domain name.)",
"type":"array",
"items":{
"type":"string"
}
},
"EmailAddresses":{
"type":"array",
"items":{
"type":"string"
}
},
"ExcludedDNSDomains":{
"type":"array",
"items":{
"type":"string"
}
},
"ExcludedEmailAddresses":{
"type":"array",
"items":{
"type":"string"
}
},
"ExcludedIPRanges":{
"type":"array",
"items":{
"$ref":"#/definitions/IPNet"
}
},
"ExcludedURIDomains":{
"type":"array",
"items":{
"type":"string"
}
},
"ExtKeyUsage":{
"type":"array",
"items":{
"$ref":"#/definitions/ExtKeyUsage"
}
},
"Extensions":{
"description":"Extensions contains raw X.509 extensions. When parsing certificates,\nthis can be used to extract non-critical extensions that are not\nparsed by this package. When marshaling certificates, the Extensions\nfield is ignored, see ExtraExtensions.",
"type":"array",
"items":{
"$ref":"#/definitions/Extension"
}
},
"ExtraExtensions":{
"description":"ExtraExtensions contains extensions to be copied, raw, into any\nmarshaled certificates. Values override any extensions that would\notherwise be produced based on the other fields. The ExtraExtensions\nfield is not populated when parsing certificates, see Extensions.",
"type":"array",
"items":{
"$ref":"#/definitions/Extension"
}
},
"IPAddresses":{
"type":"array",
"items":{
"type":"string"
}
},
"IsCA":{
"type":"boolean"
},
"Issuer":{
"$ref":"#/definitions/Name"
},
"IssuingCertificateURL":{
"type":"array",
"items":{
"type":"string"
}
},
"KeyUsage":{
"$ref":"#/definitions/KeyUsage"
},
"MaxPathLen":{
"description":"MaxPathLen and MaxPathLenZero indicate the presence and\nvalue of the BasicConstraints' \"pathLenConstraint\".\n\nWhen parsing a certificate, a positive non-zero MaxPathLen\nmeans that the field was specified, -1 means it was unset,\nand MaxPathLenZero being true mean that the field was\nexplicitly set to zero. The case of MaxPathLen==0 with MaxPathLenZero==false\nshould be treated equivalent to -1 (unset).\n\nWhen generating a certificate, an unset pathLenConstraint\ncan be requested with either MaxPathLen == -1 or using the\nzero value for both MaxPathLen and MaxPathLenZero.",
"type":"integer",
"format":"int64"
},
"MaxPathLenZero":{
"description":"MaxPathLenZero indicates that BasicConstraintsValid==true\nand MaxPathLen==0 should be interpreted as an actual\nmaximum path length of zero. Otherwise, that combination is\ninterpreted as MaxPathLen not being set.",
"type":"boolean"
},
"NotBefore":{
"type":"string",
"format":"date-time"
},
"OCSPServer":{
"description":"RFC 5280, 4.2.2.1 (Authority Information Access)",
"description":"PolicyIdentifiers contains asn1.ObjectIdentifiers, the components\nof which are limited to int32. If a certificate contains a policy which\ncannot be represented by asn1.ObjectIdentifier, it will not be included in\nPolicyIdentifiers, but will be present in Policies, which contains all parsed\npolicy OIDs.",
"description":"UnhandledCriticalExtensions contains a list of extension IDs that\nwere not (fully) processed when parsing. Verify will fail if this\nslice is non-empty, unless verification is delegated to an OS\nlibrary which understands all the critical extensions.\n\nUsers can access these extensions using Extensions and can remove\nelements from this slice if they believe that they have been\nhandled.",
"description":"APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional",
"description":"Unique key used to delete the snapshot. It is different from the `key` so that only the creator can delete the snapshot. Required if `external` is `true`.",
"type":"string"
},
"expires":{
"description":"When the snapshot should expire in seconds in seconds. Default is never to expire.",
"type":"integer",
"format":"int64",
"default":0
},
"external":{
"description":"these are passed when storing an external snapshot ref\nSave the snapshot on an external server rather than locally.",
"type":"boolean",
"default":false
},
"key":{
"description":"Define the unique key. Required if `external` is `true`.",
"description":"Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional",
"description":"These are the values expected to be sent from an end user\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object",
"type":"object",
"required":[
"dashboard"
],
"properties":{
"apiVersion":{
"description":"APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional",
"type":"string"
},
"dashboard":{
"$ref":"#/definitions/Unstructured"
},
"expires":{
"description":"When the snapshot should expire in seconds in seconds. Default is never to expire.",
"type":"integer",
"format":"int64",
"default":0
},
"external":{
"description":"these are passed when storing an external snapshot ref\nSave the snapshot on an external server rather than locally.",
"type":"boolean",
"default":false
},
"kind":{
"description":"Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional",
"description":"DashboardSnapshotDTO without dashboard map",
"type":"object",
"properties":{
"created":{
"type":"string",
"format":"date-time"
},
"expires":{
"type":"string",
"format":"date-time"
},
"external":{
"type":"boolean"
},
"externalUrl":{
"type":"string"
},
"key":{
"type":"string"
},
"name":{
"type":"string"
},
"updated":{
"type":"string",
"format":"date-time"
}
}
},
"DashboardTagCloudItem":{
"type":"object",
"properties":{
"count":{
"type":"integer",
"format":"int64"
},
"term":{
"type":"string"
}
}
},
"DashboardVersionMeta":{
"description":"DashboardVersionMeta extends the DashboardVersionDTO with the names\nassociated with the UserIds, overriding the field with the same name from\nthe DashboardVersionDTO model.",
"type":"object",
"properties":{
"created":{
"type":"string",
"format":"date-time"
},
"createdBy":{
"type":"string"
},
"dashboardId":{
"type":"integer",
"format":"int64"
},
"data":{
"$ref":"#/definitions/Json"
},
"id":{
"type":"integer",
"format":"int64"
},
"message":{
"type":"string"
},
"parentVersion":{
"type":"integer",
"format":"int64"
},
"restoredFrom":{
"type":"integer",
"format":"int64"
},
"uid":{
"type":"string"
},
"version":{
"type":"integer",
"format":"int64"
}
}
},
"DataLink":{
"description":"DataLink define what",
"type":"object",
"properties":{
"internal":{
"$ref":"#/definitions/InternalDataLink"
},
"targetBlank":{
"type":"boolean"
},
"title":{
"type":"string"
},
"url":{
"type":"string"
}
}
},
"DataResponse":{
"description":"A map of RefIDs (unique query identifiers) to this type makes up the Responses property of a QueryDataResponse.\nThe Error property is used to allow for partial success responses from the containing QueryDataResponse.",
"type":"object",
"title":"DataResponse contains the results from a DataQuery.",
"properties":{
"Error":{
"description":"Error is a property to be set if the corresponding DataQuery has an error.",
"description":"Datasource permission\nDescription:\n`0` - No Access\n`1` - Query\n`2` - Edit\nEnum: 0,1,2",
"type":"integer",
"format":"int64"
},
"Duration":{
"description":"A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.",
"description":"Enum field config\nVector values are used as lookup keys into the enum fields",
"type":"object",
"properties":{
"color":{
"description":"Color is the color value for a given index (empty is undefined)",
"type":"array",
"items":{
"type":"string"
}
},
"description":{
"description":"Description of the enum state",
"type":"array",
"items":{
"type":"string"
}
},
"icon":{
"description":"Icon supports setting an icon for a given index value",
"type":"array",
"items":{
"type":"string"
}
},
"text":{
"description":"Value is the string display value for a given index",
"type":"array",
"items":{
"type":"string"
}
}
}
},
"ErrorResponseBody":{
"type":"object",
"required":[
"message"
],
"properties":{
"error":{
"description":"Error An optional detailed description of the actual error. Only included if running in developer mode.",
"type":"string"
},
"message":{
"description":"a human readable version of the error",
"type":"string"
},
"status":{
"description":"Status An optional status to denote the cause of the error.\n\nFor example, a 412 Precondition Failed error may include additional information of why that error happened.",
"description":"FailedUser holds the information of an user that failed",
"type":"object",
"properties":{
"Error":{
"type":"string"
},
"Login":{
"type":"string"
}
}
},
"Field":{
"description":"A Field is essentially a slice of various types with extra properties and methods.\nSee NewField() for supported types.\n\nThe slice data in the Field is a not exported, so methods on the Field are used to to manipulate its data.",
"type":"object",
"title":"Field represents a typed column of data within a Frame.",
"properties":{
"config":{
"$ref":"#/definitions/FieldConfig"
},
"labels":{
"$ref":"#/definitions/FrameLabels"
},
"name":{
"description":"Name is default identifier of the field. The name does not have to be unique, but the combination\nof name and Labels should be unique for proper behavior in all situations.",
"type":"string"
}
}
},
"FieldConfig":{
"type":"object",
"title":"FieldConfig represents the display properties for a Field.",
"properties":{
"color":{
"description":"Map values to a display color\nNOTE: this interface is under development in the frontend... so simple map for now",
"type":"object",
"additionalProperties":{}
},
"custom":{
"description":"Panel Specific Values",
"type":"object",
"additionalProperties":{}
},
"decimals":{
"type":"integer",
"format":"uint16"
},
"description":{
"description":"Description is human readable field metadata",
"type":"string"
},
"displayName":{
"description":"DisplayName overrides Grafana default naming, should not be used from a data source",
"description":"Filterable indicates if the Field's data can be filtered by additional calls.",
"type":"boolean"
},
"interval":{
"description":"Interval indicates the expected regular step between values in the series.\nWhen an interval exists, consumers can identify \"missing\" values when the expected value is not present.\nThe grafana timeseries visualization will render disconnected values when missing values are found it the time field.\nThe interval uses the same units as the values. For time.Time, this is defined in milliseconds.",
"type":"number",
"format":"double"
},
"links":{
"description":"The behavior when clicking on a result",
"type":"array",
"items":{
"$ref":"#/definitions/DataLink"
}
},
"mappings":{
"$ref":"#/definitions/ValueMappings"
},
"max":{
"$ref":"#/definitions/ConfFloat64"
},
"min":{
"$ref":"#/definitions/ConfFloat64"
},
"noValue":{
"description":"Alternative to empty string",
"type":"string"
},
"path":{
"description":"Path is an explicit path to the field in the datasource. When the frame meta includes a path,\nthis will default to `${frame.meta.path}/${field.name}\n\nWhen defined, this value can be used as an identifier within the datasource scope, and\nmay be used as an identifier to update values in a subsequent request",
"type":"string"
},
"thresholds":{
"$ref":"#/definitions/ThresholdsConfig"
},
"type":{
"$ref":"#/definitions/FieldTypeConfig"
},
"unit":{
"description":"Numeric Options",
"type":"string"
},
"writeable":{
"description":"Writeable indicates that the datasource knows how to update this value",
"type":"boolean"
}
}
},
"FieldTypeConfig":{
"description":"FieldTypeConfig has type specific configs, only one should be active at a time",
"type":"object",
"properties":{
"enum":{
"$ref":"#/definitions/EnumFieldConfig"
}
}
},
"FindTagsResult":{
"type":"object",
"title":"FindTagsResult is the result of a tags search.",
"description":"only used if nested folders are enabled",
"type":"string"
},
"parents":{
"description":"the parent folders starting from the root going down",
"type":"array",
"items":{
"$ref":"#/definitions/Folder"
}
},
"title":{
"type":"string"
},
"uid":{
"type":"string"
},
"updated":{
"type":"string",
"format":"date-time"
},
"updatedBy":{
"type":"string"
},
"url":{
"type":"string"
},
"version":{
"type":"integer",
"format":"int64"
}
}
},
"FolderSearchHit":{
"type":"object",
"properties":{
"id":{
"type":"integer",
"format":"int64"
},
"parentUid":{
"type":"string"
},
"title":{
"type":"string"
},
"uid":{
"type":"string"
}
}
},
"Frame":{
"description":"Each Field is well typed by its FieldType and supports optional Labels.\n\nA Frame is a general data container for Grafana. A Frame can be table data\nor time series data depending on its content and field types.",
"type":"object",
"title":"Frame is a columnar data structure where each column is a Field.",
"properties":{
"Fields":{
"description":"Fields are the columns of a frame.\nAll Fields must be of the same the length when marshalling the Frame for transmission.\nThere should be no `nil` entries in the Fields slice (making them pointers was a mistake).",
"type":"array",
"items":{
"$ref":"#/definitions/Field"
}
},
"Meta":{
"$ref":"#/definitions/FrameMeta"
},
"Name":{
"description":"Name is used in some Grafana visualizations.",
"type":"string"
},
"RefID":{
"description":"RefID is a property that can be set to match a Frame to its originating query.",
"type":"string"
}
}
},
"FrameLabels":{
"description":"Labels are used to add metadata to an object. The JSON will always be sorted keys",
"type":"object",
"additionalProperties":{
"type":"string"
}
},
"FrameMeta":{
"description":"https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/types/data.ts#L11\nNOTE -- in javascript this can accept any `[key: string]: any;` however\nthis interface only exposes the values we want to be exposed",
"type":"object",
"title":"FrameMeta matches:",
"properties":{
"channel":{
"description":"Channel is the path to a stream in grafana live that has real-time updates for this data.",
"type":"string"
},
"custom":{
"description":"Custom datasource specific values."
},
"dataTopic":{
"$ref":"#/definitions/DataTopic"
},
"executedQueryString":{
"description":"ExecutedQueryString is the raw query sent to the underlying system. All macros and templating\nhave been applied. When metadata contains this value, it will be shown in the query inspector.",
"type":"string"
},
"notices":{
"description":"Notices provide additional information about the data in the Frame that\nGrafana can display to the user in the user interface.",
"type":"array",
"items":{
"$ref":"#/definitions/Notice"
}
},
"path":{
"description":"Path is a browsable path on the datasource.",
"type":"string"
},
"pathSeparator":{
"description":"PathSeparator defines the separator pattern to decode a hierarchy. The default separator is '/'.",
"type":"string"
},
"preferredVisualisationPluginId":{
"description":"PreferredVisualizationPluginId sets the panel plugin id to use to render the data when using Explore. If\nthe plugin cannot be found will fall back to PreferredVisualization.",
"type":"string"
},
"preferredVisualisationType":{
"$ref":"#/definitions/VisType"
},
"stats":{
"description":"Stats is an array of query result statistics.",
"description":"Array of field indices which values create a unique id for each row. Ideally this should be globally unique ID\nbut that isn't guarantied. Should help with keeping track and deduplicating rows in visualizations, especially\nwith streaming data with frequent updates.",
"type":"array",
"items":{
"type":"integer",
"format":"int64"
},
"example":"TraceID in Tempo, table name + primary key in SQL"
"description":"A FrameType string, when present in a frame's metadata, asserts that the\nframe's structure conforms to the FrameType's specification.\nThis property is currently optional, so FrameType may be FrameTypeUnknown even if the properties of\nthe Frame correspond to a defined FrameType.\n+enum",
"title":"FrameType is a 2 number version (Major / Minor).",
"items":{
"type":"integer",
"format":"uint64"
}
},
"Frames":{
"description":"It is the main data container within a backend.DataResponse.\nThere should be no `nil` entries in the Frames slice (making them pointers was a mistake).",
"description":"Key is the Go in-memory representation of this key. It must have one\nof these types:\ned25519.PublicKey\ned25519.PrivateKey\necdsa.PublicKey\necdsa.PrivateKey\nrsa.PublicKey\nrsa.PrivateKey\n[]byte (a symmetric key)\n\nWhen marshaling this JSONWebKey into JSON, the \"kty\" header parameter\nwill be automatically set based on the type of this field."
"description":"Metadata contains user accesses for a given resource\nEx: map[string]bool{\"create\":true, \"delete\": true}",
"type":"object",
"additionalProperties":{
"type":"boolean"
}
},
"MetricRequest":{
"type":"object",
"required":[
"from",
"to",
"queries"
],
"properties":{
"debug":{
"type":"boolean"
},
"from":{
"description":"From Start time in epoch timestamps in milliseconds or relative using Grafana time units.",
"type":"string",
"example":"now-1h"
},
"queries":{
"description":"queries.refId – Specifies an identifier of the query. Is optional and default to “A”.\nqueries.datasourceId – Specifies the data source to be queried. Each query in the request must have an unique datasourceId.\nqueries.maxDataPoints - Species maximum amount of data points that dashboard panel can render. Is optional and default to 100.\nqueries.intervalMs - Specifies the time interval in milliseconds of time series. Is optional and defaults to 1000.",
"type":"array",
"items":{
"$ref":"#/definitions/Json"
},
"example":[
{
"datasource":{
"uid":"PD8C576611E62080A"
},
"format":"table",
"intervalMs":86400000,
"maxDataPoints":1092,
"rawSql":"SELECT 1 as valueOne, 2 as valueTwo",
"refId":"A"
}
]
},
"to":{
"description":"To End time in epoch timestamps in milliseconds or relative using Grafana time units.",
"description":"Name represents an X.509 distinguished name. This only includes the common\nelements of a DN. Note that Name is only an approximation of the X.509\nstructure. If an accurate representation is needed, asn1.Unmarshal the raw\nsubject or issuer as an [RDNSequence].",
"description":"ExtraNames contains attributes to be copied, raw, into any marshaled\ndistinguished names. Values override any attributes with the same OID.\nThe ExtraNames field is not populated when parsing, see Names.",
"type":"array",
"items":{
"$ref":"#/definitions/AttributeTypeAndValue"
}
},
"Locality":{
"type":"array",
"items":{
"type":"string"
}
},
"Names":{
"description":"Names contains all parsed attributes. When parsing distinguished names,\nthis can be used to extract non-standard attributes that are not parsed\nby this package. When marshaling to RDNSequences, the Names field is\nignored, see ExtraNames.",
"description":"Title is an unused property -- it will be removed in the future",
"type":"string"
},
"type":{
"description":"Type of the item.",
"type":"string"
},
"value":{
"description":"Value depends on type and describes the playlist item.\n\ndashboard_by_id: The value is an internal numerical identifier set by Grafana. This\nis not portable as the numerical identifier is non-deterministic between different instances.\nWill be replaced by dashboard_by_uid in the future. (deprecated)\ndashboard_by_tag: The value is a tag which is set on any number of dashboards. All\ndashboards behind the tag will be added to the playlist.\ndashboard_by_uid: The value is the dashboard UID",
"description":"QueryHistoryResponse is a response struct for QueryHistoryDTO",
"type":"object",
"properties":{
"result":{
"$ref":"#/definitions/QueryHistoryDTO"
}
}
},
"QueryHistorySearchResponse":{
"type":"object",
"properties":{
"result":{
"$ref":"#/definitions/QueryHistorySearchResult"
}
}
},
"QueryHistorySearchResult":{
"type":"object",
"properties":{
"page":{
"type":"integer",
"format":"int64"
},
"perPage":{
"type":"integer",
"format":"int64"
},
"queryHistory":{
"type":"array",
"items":{
"$ref":"#/definitions/QueryHistoryDTO"
}
},
"totalCount":{
"type":"integer",
"format":"int64"
}
}
},
"QueryStat":{
"description":"The embedded FieldConfig's display name must be set.\nIt corresponds to the QueryResultMetaStat on the frontend (https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/types/data.ts#L53).",
"type":"object",
"title":"QueryStat is used for storing arbitrary statistics metadata related to a query and its result, e.g. total request time, data processing time.",
"properties":{
"color":{
"description":"Map values to a display color\nNOTE: this interface is under development in the frontend... so simple map for now",
"type":"object",
"additionalProperties":{}
},
"custom":{
"description":"Panel Specific Values",
"type":"object",
"additionalProperties":{}
},
"decimals":{
"type":"integer",
"format":"uint16"
},
"description":{
"description":"Description is human readable field metadata",
"type":"string"
},
"displayName":{
"description":"DisplayName overrides Grafana default naming, should not be used from a data source",
"description":"Filterable indicates if the Field's data can be filtered by additional calls.",
"type":"boolean"
},
"interval":{
"description":"Interval indicates the expected regular step between values in the series.\nWhen an interval exists, consumers can identify \"missing\" values when the expected value is not present.\nThe grafana timeseries visualization will render disconnected values when missing values are found it the time field.\nThe interval uses the same units as the values. For time.Time, this is defined in milliseconds.",
"type":"number",
"format":"double"
},
"links":{
"description":"The behavior when clicking on a result",
"type":"array",
"items":{
"$ref":"#/definitions/DataLink"
}
},
"mappings":{
"$ref":"#/definitions/ValueMappings"
},
"max":{
"$ref":"#/definitions/ConfFloat64"
},
"min":{
"$ref":"#/definitions/ConfFloat64"
},
"noValue":{
"description":"Alternative to empty string",
"type":"string"
},
"path":{
"description":"Path is an explicit path to the field in the datasource. When the frame meta includes a path,\nthis will default to `${frame.meta.path}/${field.name}\n\nWhen defined, this value can be used as an identifier within the datasource scope, and\nmay be used as an identifier to update values in a subsequent request",
"type":"string"
},
"thresholds":{
"$ref":"#/definitions/ThresholdsConfig"
},
"type":{
"$ref":"#/definitions/FieldTypeConfig"
},
"unit":{
"description":"Numeric Options",
"type":"string"
},
"value":{
"type":"number",
"format":"double"
},
"writeable":{
"description":"Writeable indicates that the datasource knows how to update this value",
"type":"boolean"
}
}
},
"QuotaDTO":{
"type":"object",
"properties":{
"limit":{
"type":"integer",
"format":"int64"
},
"org_id":{
"type":"integer",
"format":"int64"
},
"target":{
"type":"string"
},
"used":{
"type":"integer",
"format":"int64"
},
"user_id":{
"type":"integer",
"format":"int64"
}
}
},
"RecordingRuleJSON":{
"description":"RecordingRuleJSON is the external representation of a recording rule",
"description":"It can be used for pagination of the user list\nE.g. if totalCount is equal to 100 users and\nthe perpage parameter is set to 10 then there are 10 pages of users.",
"title":"TypeMeta describes an individual object in an API response or request\nwith strings representing the type of the object and its API schema version.\nStructures that are versioned or persisted should inline TypeMeta.",
"properties":{
"apiVersion":{
"description":"APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional",
"type":"string"
},
"kind":{
"description":"Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional",
"description":"The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nThe Host field contains the host and port subcomponents of the URL.\nWhen the port is present, it is separated from the host with a colon.\nWhen the host is an IPv6 address, it must be enclosed in square brackets:\n\"[fe80::1]:80\". The [net.JoinHostPort] function combines a host and port\ninto a string suitable for the Host field, adding square brackets to\nthe host when necessary.\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use the [URL.EscapedPath] method, which preserves\nthe original encoding of Path.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.",
"description":"UpdateCorrelationCommand is the command for updating a correlation",
"type":"object",
"properties":{
"config":{
"$ref":"#/definitions/CorrelationConfigUpdateDTO"
},
"description":{
"description":"Optional description of the correlation",
"type":"string",
"example":"Logs to Traces"
},
"label":{
"description":"Optional label identifying the correlation",
"type":"string",
"example":"My label"
}
}
},
"UpdateCorrelationResponseBody":{
"type":"object",
"properties":{
"message":{
"type":"string",
"example":"Correlation updated"
},
"result":{
"$ref":"#/definitions/Correlation"
}
}
},
"UpdateDashboardACLCommand":{
"type":"object",
"properties":{
"items":{
"type":"array",
"items":{
"$ref":"#/definitions/DashboardACLUpdateItem"
}
}
}
},
"UpdateDataSourceCommand":{
"description":"Also acts as api DTO",
"type":"object",
"properties":{
"access":{
"$ref":"#/definitions/DsAccess"
},
"basicAuth":{
"type":"boolean"
},
"basicAuthUser":{
"type":"string"
},
"database":{
"type":"string"
},
"isDefault":{
"type":"boolean"
},
"jsonData":{
"$ref":"#/definitions/Json"
},
"name":{
"type":"string"
},
"secureJsonData":{
"type":"object",
"additionalProperties":{
"type":"string"
}
},
"type":{
"type":"string"
},
"uid":{
"type":"string"
},
"url":{
"type":"string"
},
"user":{
"type":"string"
},
"version":{
"type":"integer",
"format":"int64"
},
"withCredentials":{
"type":"boolean"
}
}
},
"UpdateFolderCommand":{
"description":"UpdateFolderCommand captures the information required by the folder service\nto update a folder. Use Move to update a folder's parent folder.",
"type":"object",
"properties":{
"description":{
"description":"NewDescription it's an optional parameter used for overriding the existing folder description",
"type":"string"
},
"overwrite":{
"description":"Overwrite only used by the legacy folder implementation",
"type":"boolean"
},
"title":{
"description":"NewTitle it's an optional parameter used for overriding the existing folder title",
"type":"string"
},
"version":{
"description":"Version only used by the legacy folder implementation",
"type":"integer",
"format":"int64"
}
}
},
"UpdateOrgAddressForm":{
"type":"object",
"properties":{
"address1":{
"type":"string"
},
"address2":{
"type":"string"
},
"city":{
"type":"string"
},
"country":{
"type":"string"
},
"state":{
"type":"string"
},
"zipcode":{
"type":"string"
}
}
},
"UpdateOrgForm":{
"type":"object",
"properties":{
"name":{
"type":"string"
}
}
},
"UpdateOrgUserCommand":{
"type":"object",
"properties":{
"role":{
"type":"string",
"enum":[
"None",
"Viewer",
"Editor",
"Admin"
]
}
}
},
"UpdatePlaylistCommand":{
"type":"object",
"properties":{
"interval":{
"type":"string"
},
"items":{
"type":"array",
"items":{
"$ref":"#/definitions/PlaylistItem"
}
},
"name":{
"type":"string"
},
"uid":{
"type":"string"
}
}
},
"UpdatePrefsCmd":{
"type":"object",
"properties":{
"cookies":{
"type":"array",
"items":{
"$ref":"#/definitions/CookieType"
}
},
"homeDashboardId":{
"description":"The numerical :id of a favorited dashboard",
"description":"The Userinfo type is an immutable encapsulation of username and\npassword details for a [URL]. An existing Userinfo value is guaranteed\nto have a username set (potentially empty, as allowed by RFC 2396),\nand optionally a password.",
"description":"If you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.",
"name":"datasources"
},
{
"description":"Folders are identified by the identifier (id) and the unique identifier (uid).\nThe identifier (id) of a folder is an auto-incrementing numeric value and is only unique per Grafana install.\nThe unique identifier (uid) of a folder can be used for uniquely identify folders between multiple Grafana installs. It’s automatically generated if not provided when creating a folder. The uid allows having consistent URLs for accessing folders and when syncing folders between multiple Grafana installs. This means that changing the title of a folder will not break any bookmarked links to that folder.\nThe uid can have a maximum length of 40 characters.",
"name":"folders"
},
{
"description":"Permissions with `folderId=-1` are the default permissions for users with the Viewer and Editor roles. Permissions can be set for a user, a team or a role (Viewer or Editor). Permissions cannot be set for Admins - they always have access to everything.",
"name":"folder_permissions"
},
{
"description":"The Admin HTTP API does not currently work with an API Token. API Tokens are currently only linked to an organization and an organization role. They cannot be given the permission of server admin, only users can be given that permission. So in order to use these API calls you will have to use Basic Auth and the Grafana user must have the Grafana Admin permission. (The default admin user is called admin and has permission to use this API.)",
"name":"admin"
},
{
"description":"You can use the Alerting API to get information about legacy dashboard alerts and their states but this API cannot be used to modify the alert. To create new alerts or modify them you need to update the dashboard JSON that contains the alerts.\nThis topic is relevant for the legacy dashboard alerts only.\nYou can find Grafana 8 alerts API specification details [here](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/pkg/services/ngalert/api/tooling/post.json).",
"name":"legacy_alerts"
},
{
"description":"The identifier (id) of a notification channel is an auto-incrementing numeric value and is only unique per Grafana install.\nThe unique identifier (uid) of a notification channel can be used for uniquely identify a notification channel between multiple Grafana installs. It’s automatically generated if not provided when creating a notification channel. The uid allows having consistent URLs for accessing notification channels and when syncing notification channels between multiple Grafana installations, refer to alert notification channel provisioning.\nThe uid can have a maximum length of 40 characters.",
"name":"legacy_alerts_notification_channels"
},
{
"description":"Grafana Annotations feature released in Grafana 4.6. Annotations are saved in the Grafana database (sqlite, mysql or postgres). Annotations can be organization annotations that can be shown on any dashboard by configuring an annotation data source - they are filtered by tags. Or they can be tied to a panel on a dashboard and are then only shown on that panel.",
"name":"annotations"
},
{
"description":"The identifier (ID) of a library element is an auto-incrementing numeric value that is unique per Grafana install.\nThe unique identifier (UID) of a library element uniquely identifies library elements between multiple Grafana installs. It’s automatically generated unless you specify it during library element creation. The UID provides consistent URLs for accessing library elements and when syncing library elements between multiple Grafana installs.\nThe maximum length of a UID is 40 characters.",
"name":"library_elements"
},
{
"description":"The identifier (ID) of a query in query history is an auto-incrementing numeric value that is unique per Grafana install.\nThe unique identifier (UID) of a query history uniquely identifies queries in query history between multiple Grafana installs. It’s automatically generated. The UID provides consistent URLs for accessing queries in query history.",
"name":"query_history"
},
{
"description":"The Admin Organizations HTTP API does not currently work with an API Token. API Tokens are currently only linked to an organization and an organization role. They cannot be given the permission of server admin, only users can be given that permission. So in order to use these API calls you will have to use Basic Auth and the Grafana user must have the Grafana Admin permission (The default admin user is called `admin` and has permission to use this API).",
"name":"orgs"
},
{
"description":"If you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.",
"name":"org"
},
{
"description":"This API can be used to create/update/delete Teams and to add/remove users to Teams. All actions require that the user has the Admin role for the organization.",
"name":"teams"
},
{
"description":"This API can be used to enable, disable, list, add and remove permissions for a data source.\nPermissions can be set for a user or a team. Permissions cannot be set for Admins - they always have access to everything.\nThis is only available in Grafana Enterprise\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.",
"name":"datasource_permissions"
},
{
"description":"These are only available in Grafana Enterprise",
"name":"enterprise"
},
{
"description":"The API can be used to create, update, get and list roles, and create or remove built-in role assignments. To use the API, you would need to enable fine-grained access control.\nThis only available in Grafana Enterprise.\nThe API does not currently work with an API Token. So in order to use these API endpoints you will have to use Basic auth.",
"name":"access_control"
},
{
"description":"Licensing is only available in Grafana Enterprise. Read more about Grafana Enterprise.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.",
"name":"licensing"
},
{
"description":"This API allows you to interact programmatically with the Reporting feature.\nReporting is only available in Grafana Enterprise. Read more about Grafana Enterprise.\nIf you have Fine-grained access Control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.",
"description":"If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.",