Revision a05247ba4593b88a23d50d6e25533a1f1fe4a0c9 authored by Andrej Ocenas on 22 June 2022, 21:45:57 UTC, committed by Andrej Ocenas on 22 June 2022, 21:45:57 UTC
1 parent 55f87b7
api-spec.json
{
"consumes": ["application/json"],
"produces": ["application/json"],
"schemes": ["http", "https"],
"swagger": "2.0",
"info": {
"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"
},
"license": {
"name": "GNU Affero General Public License v3.0",
"url": "https://www.gnu.org/licenses/agpl-3.0.en.html"
},
"version": "0.0.1"
},
"basePath": "/api",
"paths": {
"/access-control/builtin-roles": {
"get": {
"description": "You need to have a permission with action `roles.builtin:list` with scope `roles:*`.",
"tags": ["access_control", "enterprise"],
"summary": "Get all built-in role assignments.",
"operationId": "listBuiltinRoles",
"responses": {
"200": {
"$ref": "#/responses/listBuiltinRolesResponse"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "You need to have a permission with action `roles.builtin:add` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create built-in role assignments with the 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 create a built-in role assignment which will allow to do that. This is done to prevent escalation of privileges.",
"tags": ["access_control", "enterprise"],
"summary": "Create a built-in role assignment.",
"operationId": "addBuiltinRole",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddBuiltInRoleCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/access-control/builtin-roles/{builtinRole}/roles/{roleUID}": {
"delete": {
"description": "Deletes a built-in role assignment (for one of Viewer, Editor, Admin, or Grafana Admin) to the role with the provided UID.\n\nYou need to have a permission with action `roles.builtin:remove` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only remove built-in role assignments with the 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 remove a built-in role assignment which allows to do that.",
"tags": ["access_control", "enterprise"],
"summary": "Remove a built-in role assignment.",
"operationId": "removeBuiltinRole",
"parameters": [
{
"type": "string",
"name": "builtinRole",
"in": "path",
"required": true
},
{
"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.",
"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"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/access-control/roles": {
"get": {
"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:list` and scope `roles:*`.",
"tags": ["access_control", "enterprise"],
"summary": "Get all roles.",
"operationId": "getAllRoles",
"responses": {
"200": {
"$ref": "#/responses/getAllRolesResponse"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"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": "createRoleWithPermissions",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateRoleWithPermissionsCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/getRoleResponse"
},
"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": "updateRoleWithPermissions",
"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": "deleteCustomRole",
"parameters": [
{
"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/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`.",
"tags": ["access_control", "enterprise"],
"summary": "Get status.",
"operationId": "getAccessControlStatus",
"responses": {
"200": {
"$ref": "#/responses/getAccessControlStatusResponse"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/access-control/teams/{teamId}/roles": {
"get": {
"description": "You need to have a permission with action `teams.roles:list` and scope `teams:id:\u003cteam ID\u003e`.",
"tags": ["access_control", "enterprise"],
"summary": "Get team roles.",
"operationId": "listTeamRoles",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "teamId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"description": "You need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate` for each.",
"tags": ["access_control", "enterprise"],
"summary": "Update team role.",
"operationId": "setTeamRoles",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "teamId",
"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": "You need to have a permission with action `teams.roles:add` and scope `permissions:type:delegate`.",
"tags": ["access_control", "enterprise"],
"summary": "Add team role.",
"operationId": "addTeamRole",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddTeamRoleCommand"
}
},
{
"type": "integer",
"format": "int64",
"name": "teamId",
"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"
}
}
}
},
"/access-control/teams/{teamId}/roles/{roleUID}": {
"delete": {
"description": "You need to have a permission with action `teams.roles:remove` and scope `permissions:type:delegate`.",
"tags": ["access_control", "enterprise"],
"summary": "Remove team role.",
"operationId": "removeTeamRole",
"parameters": [
{
"type": "string",
"name": "roleUID",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"name": "teamId",
"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"
}
}
}
},
"/access-control/users/{userId}/roles": {
"get": {
"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:list` 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.",
"tags": ["access_control", "enterprise"],
"summary": "Add a user role assignment.",
"operationId": "addUserRole",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddUserRoleCommand"
}
},
{
"type": "integer",
"format": "int64",
"name": "userId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/access-control/users/{userId}/roles/{roleUID}": {
"delete": {
"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.",
"name": "global",
"in": "query"
},
{
"type": "string",
"name": "roleUID",
"in": "path",
"required": true
},
{
"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"
}
}
}
},
"/admin/ldap-sync-status": {
"get": {
"description": "You need to have a permission with action `ldap.status:read`.",
"tags": ["ldap_debug"],
"summary": "Available to grafana admins.",
"operationId": "getLDAPSyncStatus",
"responses": {
"200": {
"$ref": "#/responses/getLDAPSyncStatusResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/ldap/reload": {
"post": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.config:reload`.",
"tags": ["admin_ldap"],
"summary": "Reloads the LDAP configuration.",
"operationId": "reloadLDAP",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/ldap/status": {
"get": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.status:read`.",
"tags": ["admin_ldap"],
"summary": "Attempts to connect to all the configured LDAP servers and returns information on whenever they're available or not.",
"operationId": "getLDAPStatus",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/ldap/sync/{user_id}": {
"post": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.user:sync`.",
"tags": ["admin_ldap"],
"summary": "Enables a single Grafana user to be synchronized against LDAP.",
"operationId": "syncLDAPUser",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/ldap/{user_name}": {
"get": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.user:read`.",
"tags": ["admin_ldap"],
"summary": "Finds an user based on a username in LDAP. This helps illustrate how would the particular user be mapped in Grafana when synced.",
"operationId": "getLDAPUser",
"parameters": [
{
"type": "string",
"name": "user_name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/pause-all-alerts": {
"post": {
"security": [
{
"basic": []
}
],
"tags": ["admin"],
"summary": "Pause/unpause all (legacy) alerts.",
"operationId": "pauseAllAlerts",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PauseAllAlertsCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/pauseAlertsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/provisioning/access-control/reload": {
"post": {
"tags": ["access_control_provisioning", "enterprise"],
"summary": "You need to have a permission with action `provisioning:reload` with scope `provisioners:accesscontrol`.",
"operationId": "adminProvisioningReloadAccessControl",
"responses": {
"202": {
"$ref": "#/responses/acceptedResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
}
}
}
},
"/admin/provisioning/accesscontrol/reload": {
"post": {
"security": [
{
"basic": []
}
],
"description": "Reloads the provisioning config files for access control again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:accesscontrol`.",
"tags": ["admin_provisioning"],
"summary": "Reload access control provisioning configurations.",
"operationId": "reloadProvisionedAccessControl",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/provisioning/dashboards/reload": {
"post": {
"security": [
{
"basic": []
}
],
"description": "Reloads the provisioning config files for dashboards again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:dashboards`.",
"tags": ["admin_provisioning"],
"summary": "Reload dashboard provisioning configurations.",
"operationId": "reloadProvisionedDashboards",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/provisioning/datasources/reload": {
"post": {
"security": [
{
"basic": []
}
],
"description": "Reloads the provisioning config files for datasources again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:datasources`.",
"tags": ["admin_provisioning"],
"summary": "Reload datasource provisioning configurations.",
"operationId": "reloadProvisionedDatasources",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/provisioning/notifications/reload": {
"post": {
"security": [
{
"basic": []
}
],
"description": "Reloads the provisioning config files for legacy alert notifiers again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:notifications`.",
"tags": ["admin_provisioning"],
"summary": "Reload legacy alert notifier provisioning configurations.",
"operationId": "reloadProvisionedAlertNotifiers",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/provisioning/plugins/reload": {
"post": {
"security": [
{
"basic": []
}
],
"description": "Reloads the provisioning config files for plugins again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:plugin`.",
"tags": ["admin_provisioning"],
"summary": "Reload plugin provisioning configurations.",
"operationId": "reloadProvisionedPlugins",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/settings": {
"get": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `settings:read` and scopes: `settings:*`, `settings:auth.saml:` and `settings:auth.saml:enabled` (property level).",
"tags": ["admin"],
"summary": "Fetch settings.",
"operationId": "getSettings",
"responses": {
"200": {
"$ref": "#/responses/getSettingsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
}
}
}
},
"/admin/stats": {
"get": {
"description": "Only works with Basic Authentication (username and password). See introduction for an explanation.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `server:stats:read`.",
"tags": ["admin"],
"summary": "Fetch Grafana Stats.",
"operationId": "getStats",
"responses": {
"200": {
"$ref": "#/responses/getStatsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users": {
"post": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:create`.\nNote that OrgId is an optional parameter that can be used to assign a new user to a different organization when `auto_assign_org` is set to `true`.",
"tags": ["admin_users"],
"summary": "Create new user.",
"operationId": "createUser",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AdminCreateUserForm"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/createUserResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"412": {
"$ref": "#/responses/preconditionFailedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users/{user_id}": {
"delete": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:delete` and scope `global.users:*`.",
"tags": ["admin_users"],
"summary": "Delete global User.",
"operationId": "deleteUser",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "user_id",
"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"
}
}
}
},
"/admin/users/{user_id}/auth-tokens": {
"get": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.authtoken:list` and scope `global.users:*`.",
"tags": ["admin_users"],
"summary": "Return a list of all auth tokens (devices) that the user currently have logged in from.",
"operationId": "getAuthTokens",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getAuthTokensResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users/{user_id}/disable": {
"post": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:disable` and scope `global.users:1` (userIDScope).",
"tags": ["admin_users"],
"summary": "Disable user.",
"operationId": "disableUser",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "user_id",
"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"
}
}
}
},
"/admin/users/{user_id}/enable": {
"post": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:enable` and scope `global.users:1` (userIDScope).",
"tags": ["admin_users"],
"summary": "Enable user.",
"operationId": "enableUser",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "user_id",
"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"
}
}
}
},
"/admin/users/{user_id}/logout": {
"post": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.logout` and scope `global.users:*`.",
"tags": ["admin_users"],
"summary": "Logout user revokes all auth tokens (devices) for the user. User of issued auth tokens (devices) will no longer be logged in and will be required to authenticate again upon next activity.",
"operationId": "logoutUser",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "user_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"
}
}
}
},
"/admin/users/{user_id}/password": {
"put": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.password:update` and scope `global.users:*`.",
"tags": ["admin_users"],
"summary": "Set password for user.",
"operationId": "setPassword",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AdminUpdateUserPasswordForm"
}
},
{
"type": "integer",
"format": "int64",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users/{user_id}/permissions": {
"put": {
"description": "Only works with Basic Authentication (username and password). See introduction for an explanation.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.permissions:update` and scope `global.users:*`.",
"tags": ["admin_users"],
"summary": "Set permissions for user.",
"operationId": "setPermissions",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AdminUpdateUserPermissionsForm"
}
},
{
"type": "integer",
"format": "int64",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users/{user_id}/quotas": {
"get": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.quotas:list` and scope `global.users:1` (userIDScope).",
"tags": ["admin_users"],
"summary": "Fetch user quota.",
"operationId": "getUserQuota",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getQuotaResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users/{user_id}/quotas/{quota_target}": {
"put": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.quotas:update` and scope `global.users:1` (userIDScope).",
"tags": ["admin_users"],
"summary": "Update user quota.",
"operationId": "updateUserQuota",
"parameters": [
{
"type": "string",
"name": "quota_target",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"name": "user_id",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateUserQuotaCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users/{user_id}/revoke-auth-token": {
"post": {
"security": [
{
"basic": []
}
],
"description": "Revokes the given auth token (device) for the user. User of issued auth token (device) will no longer be logged in and will be required to authenticate again upon next activity.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.authtoken:update` and scope `global.users:*`.",
"tags": ["admin_users"],
"summary": "Revoke auth token for user.",
"operationId": "revokeAuthToken",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RevokeAuthTokenCmd"
}
},
{
"type": "integer",
"format": "int64",
"name": "user_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"
}
}
}
},
"/alert-notifications": {
"get": {
"description": "Returns all notification channels that the authenticated user has permission to view.",
"tags": ["legacy_alerts_notification_channels"],
"summary": "Get all notification channels.",
"operationId": "getAlertNotificationChannels",
"responses": {
"200": {
"$ref": "#/responses/getAlertNotificationChannelsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "You can find the full list of [supported notifiers](https://grafana.com/docs/grafana/latest/alerting/old-alerting/notifications/#list-of-supported-notifiers) on the alert notifiers page.",
"tags": ["legacy_alerts_notification_channels"],
"summary": "Create notification channel.",
"operationId": "createAlertNotificationChannel",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateAlertNotificationCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/getAlertNotificationChannelResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"409": {
"$ref": "#/responses/conflictError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/alert-notifications/lookup": {
"get": {
"description": "Returns all notification channels, but with less detailed information. Accessible by any authenticated user and is mainly used by providing alert notification channels in Grafana UI when configuring alert rule.",
"tags": ["legacy_alerts_notification_channels"],
"summary": "Get all notification channels (lookup)",
"operationId": "lookupAlertNotificationChannels",
"responses": {
"200": {
"$ref": "#/responses/lookupAlertNotificationChannelsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/alert-notifications/test": {
"post": {
"description": "Sends a test notification to the channel.",
"tags": ["legacy_alerts_notification_channels"],
"summary": "Test notification channel.",
"operationId": "notificationChannelTest",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/NotificationTestCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"412": {
"$ref": "#/responses/SMTPNotEnabledError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/alert-notifications/uid/{notification_channel_uid}": {
"get": {
"description": "Returns the notification channel given the notification channel UID.",
"tags": ["legacy_alerts_notification_channels"],
"summary": "Get notification channel by UID",
"operationId": "getAlertNotificationChannelByUID",
"parameters": [
{
"type": "string",
"name": "notification_channel_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getAlertNotificationChannelResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"description": "Updates an existing notification channel identified by uid.",
"tags": ["legacy_alerts_notification_channels"],
"summary": "Update notification channel by UID.",
"operationId": "updateAlertNotificationChannelByUID",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateAlertNotificationWithUidCommand"
}
},
{
"type": "string",
"name": "notification_channel_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getAlertNotificationChannelResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "Deletes an existing notification channel identified by UID.",
"tags": ["legacy_alerts_notification_channels"],
"summary": "Delete alert notification by UID.",
"operationId": "deleteAlertNotificationChannelByUID",
"parameters": [
{
"type": "string",
"name": "notification_channel_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/deleteAlertNotificationChannelResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/alert-notifications/{notification_channel_id}": {
"get": {
"description": "Returns the notification channel given the notification channel ID.",
"tags": ["legacy_alerts_notification_channels"],
"summary": "Get notification channel by ID.",
"operationId": "getAlertNotificationChannelByID",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "notification_channel_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getAlertNotificationChannelResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"description": "Updates an existing notification channel identified by ID.",
"tags": ["legacy_alerts_notification_channels"],
"summary": "Update notification channel by ID.",
"operationId": "updateAlertNotificationChannel",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateAlertNotificationCommand"
}
},
{
"type": "integer",
"format": "int64",
"name": "notification_channel_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getAlertNotificationChannelResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "Deletes an existing notification channel identified by ID.",
"tags": ["legacy_alerts_notification_channels"],
"summary": "Delete alert notification by ID.",
"operationId": "deleteAlertNotificationChannel",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "notification_channel_id",
"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"
}
}
}
},
"/alerts": {
"get": {
"tags": ["legacy_alerts"],
"summary": "Get legacy alerts.",
"operationId": "getAlerts",
"parameters": [
{
"type": "array",
"items": {
"type": "string"
},
"description": "Limit response to alerts in specified dashboard(s). You can specify multiple dashboards.",
"name": "dashboardId",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Limit response to alert for a specified panel on a dashboard.",
"name": "panelId",
"in": "query"
},
{
"type": "string",
"description": "Limit response to alerts having a name like this value.",
"name": "query",
"in": "query"
},
{
"enum": ["all", "no_data", "paused", "alerting", "ok", "pending", "unknown"],
"type": "string",
"description": "Return alerts with one or more of the following alert states",
"name": "state",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Limit response to X number of alerts.",
"name": "limit",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"description": "Limit response to alerts of dashboards in specified folder(s). You can specify multiple folders",
"name": "folderId",
"in": "query"
},
{
"type": "string",
"description": "Limit response to alerts having a dashboard name like this value./ Limit response to alerts having a dashboard name like this value.",
"name": "dashboardQuery",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"description": "Limit response to alerts of dashboards with specified tags. To do an “AND” filtering with multiple tags, specify the tags parameter multiple times",
"name": "dashboardTag",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/getAlertsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/alerts/states-for-dashboard": {
"get": {
"tags": ["legacy_alerts"],
"summary": "Get alert states for a dashboard.",
"operationId": "getDashboardStates",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "dashboardId",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getDashboardStatesResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/alerts/test": {
"post": {
"tags": ["legacy_alerts"],
"summary": "Test alert.",
"operationId": "testAlert",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/AlertTestCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/testAlertResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"422": {
"$ref": "#/responses/unprocessableEntityError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/alerts/{alert_id}": {
"get": {
"description": "“evalMatches” data in the response is cached in the db when and only when the state of the alert changes (e.g. transitioning from “ok” to “alerting” state).\nIf data from one server triggers the alert first and, before that server is seen leaving alerting state, a second server also enters a state that would trigger the alert, the second server will not be visible in “evalMatches” data.",
"tags": ["legacy_alerts"],
"summary": "Get alert by ID.",
"operationId": "getAlertByID",
"parameters": [
{
"type": "string",
"name": "alert_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getAlertResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/alerts/{alert_id}/pause": {
"post": {
"tags": ["legacy_alerts"],
"summary": "Pause/unpause alert by id.",
"operationId": "pauseAlert",
"parameters": [
{
"type": "string",
"name": "alert_id",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PauseAlertCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/pauseAlertResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/annotations": {
"get": {
"description": "Starting in Grafana v6.4 regions annotations are now returned in one entity that now includes the timeEnd property.",
"tags": ["annotations"],
"summary": "Find Annotations.",
"operationId": "getAnnotations",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Find annotations created after specific epoch datetime in milliseconds.",
"name": "from",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Find annotations created before specific epoch datetime in milliseconds.",
"name": "to",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Limit response to annotations created by specific user.",
"name": "userId",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Find annotations for a specified alert.",
"name": "alertId",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Find annotations that are scoped to a specific dashboard",
"name": "dashboardId",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Find annotations that are scoped to a specific panel",
"name": "panelId",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Max limit for results returned.",
"name": "limit",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"description": "Use this to filter organization annotations. Organization annotations are annotations from an annotation data source that are not connected specifically to a dashboard or panel. You can filter by multiple tags.",
"name": "tags",
"in": "query"
},
{
"enum": ["alert", "annotation"],
"type": "string",
"description": "Return alerts or user created annotations",
"name": "type",
"in": "query"
},
{
"type": "boolean",
"description": "Match any or all tags",
"name": "matchAny",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/getAnnotationsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "Creates an annotation in the Grafana database. The dashboardId and panelId fields are optional. If they are not specified then an organization annotation is created and can be queried in any dashboard that adds the Grafana annotations data source. When creating a region annotation include the timeEnd property.\nThe format for `time` and `timeEnd` should be epoch numbers in millisecond resolution.\nThe response for this HTTP request is slightly different in versions prior to v6.4. In prior versions you would also get an endId if you where creating a region. But in 6.4 regions are represented using a single event with time and timeEnd properties.",
"tags": ["annotations"],
"summary": "Create Annotation.",
"operationId": "createAnnotation",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PostAnnotationsCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/createAnnotationResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/annotations/graphite": {
"post": {
"description": "Creates an annotation by using Graphite-compatible event format. The `when` and `data` fields are optional. If `when` is not specified then the current time will be used as annotation’s timestamp. The `tags` field can also be in prior to Graphite `0.10.0` format (string with multiple tags being separated by a space).",
"tags": ["annotations"],
"summary": "Create Annotation in Graphite format.",
"operationId": "createGraphiteAnnotation",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PostGraphiteAnnotationsCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/createAnnotationResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/annotations/mass-delete": {
"post": {
"tags": ["annotations"],
"summary": "Delete multiple annotations.",
"operationId": "massDeleteAnnotations",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MassDeleteAnnotationsCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/annotations/tags": {
"get": {
"description": "Find all the event tags created in the annotations.",
"tags": ["annotations"],
"summary": "Find Annotations Tags.",
"operationId": "getAnnotationTags",
"parameters": [
{
"type": "string",
"description": "Tag is a string that you can use to filter tags.",
"name": "tag",
"in": "query"
},
{
"type": "string",
"default": "100",
"description": "Max limit for results returned.",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/getAnnotationTagsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/annotations/{annotation_id}": {
"get": {
"tags": ["annotations"],
"summary": "Get Annotation by Id.",
"operationId": "getAnnotation",
"parameters": [
{
"type": "string",
"name": "annotation_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getAnnotationResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"description": "Updates all properties of an annotation that matches the specified id. To only update certain property, consider using the Patch Annotation operation.",
"tags": ["annotations"],
"summary": "Update Annotation.",
"operationId": "updateAnnotation",
"parameters": [
{
"type": "string",
"name": "annotation_id",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateAnnotationsCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "Deletes the annotation that matches the specified ID.",
"tags": ["annotations"],
"summary": "Delete Annotation By ID.",
"operationId": "deleteAnnotation",
"parameters": [
{
"type": "string",
"name": "annotation_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"patch": {
"description": "Updates one or more properties of an annotation that matches the specified ID.\nThis operation currently supports updating of the `text`, `tags`, `time` and `timeEnd` properties.\nThis is available in Grafana 6.0.0-beta2 and above.",
"tags": ["annotations"],
"summary": "Patch Annotation",
"operationId": "patchAnnotation",
"parameters": [
{
"type": "string",
"name": "annotation_id",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PatchAnnotationsCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/auth/keys": {
"get": {
"description": "Will return auth keys.",
"tags": ["api_keys"],
"summary": "Get auth keys.",
"operationId": "getAPIkeys",
"parameters": [
{
"type": "boolean",
"default": false,
"description": "Show expired keys",
"name": "includeExpired",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/getAPIkeyResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "Will return details of the created API key",
"tags": ["api_keys"],
"summary": "Creates an API key.",
"operationId": "addAPIkey",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddApiKeyCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/postAPIkeyResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"409": {
"$ref": "#/responses/conflictError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/auth/keys/{id}": {
"delete": {
"tags": ["api_keys"],
"summary": "Delete API key.",
"operationId": "deleteAPIkey",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "id",
"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"
}
}
}
},
"/dashboard/snapshots": {
"get": {
"tags": ["snapshots"],
"summary": "List snapshots.",
"operationId": "getSnapshots",
"parameters": [
{
"type": "string",
"description": "Search Query",
"name": "query",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 1000,
"description": "Limit the number of returned results",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/getSnapshotsResponse"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/calculate-diff": {
"post": {
"produces": ["application/json", "text/html"],
"tags": ["dashboards"],
"summary": "Perform diff on two dashboards.",
"operationId": "calcDashboardDiff",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/CalculateDiffTarget"
},
"diffType": {
"description": "The type of diff to return\nDescription:\n`basic`\n`json`",
"type": "string",
"enum": ["basic", "json"]
},
"new": {
"$ref": "#/definitions/CalculateDiffTarget"
}
}
}
}
],
"responses": {
"200": {
"$ref": "#/responses/dashboardDiffResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/db": {
"post": {
"description": "Creates a new dashboard or updates an existing dashboard.",
"tags": ["dashboards"],
"summary": "Create / Update dashboard",
"operationId": "postDashboard",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SaveDashboardCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/postDashboardResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"412": {
"$ref": "#/responses/preconditionFailedError"
},
"422": {
"$ref": "#/responses/unprocessableEntityError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/home": {
"get": {
"tags": ["dashboards"],
"summary": "Get home dashboard.",
"operationId": "getHomeDashboard",
"responses": {
"200": {
"$ref": "#/responses/getHomeDashboardResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/id/{DashboardID}/permissions": {
"get": {
"description": "Please refer to [updated API](#/dashboard_permissions/getDashboardPermissionsWithUid) instead",
"tags": ["dashboard_permissions"],
"summary": "Gets all existing permissions for the given dashboard.",
"operationId": "getDashboardPermissions",
"deprecated": true,
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "DashboardID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getDashboardPermissionsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "Please refer to [updated API](#/dashboard_permissions/postDashboardPermissionsWithUid) instead\n\nThis operation will remove existing permissions if they’re not included in the request.",
"tags": ["dashboard_permissions"],
"summary": "Updates permissions for a dashboard.",
"operationId": "postDashboardPermissions",
"deprecated": true,
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateDashboardAclCommand"
}
},
{
"type": "integer",
"format": "int64",
"name": "DashboardID",
"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"
}
}
}
},
"/dashboards/id/{DashboardID}/restore": {
"post": {
"description": "Please refer to [updated API](#/dashboard_versions/restoreDashboardVersionByUID) instead",
"tags": ["dashboard_versions"],
"summary": "Restore a dashboard to a given dashboard version.",
"operationId": "restoreDashboardVersion",
"deprecated": true,
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "DashboardID",
"in": "path",
"required": true
},
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RestoreDashboardVersionCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/postDashboardResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/id/{DashboardID}/versions": {
"get": {
"description": "Please refer to [updated API](#/dashboard_versions/getDashboardVersionsByUID) instead",
"tags": ["dashboard_versions"],
"summary": "Gets all existing versions for the dashboard.",
"operationId": "getDashboardVersions",
"deprecated": true,
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "DashboardID",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"default": 0,
"description": "Maximum number of results to return",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 0,
"description": "Version to start from when returning queries",
"name": "start",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/dashboardVersionsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/id/{DashboardID}/versions/{DashboardVersionID}": {
"get": {
"description": "Please refer to [updated API](#/dashboard_versions/getDashboardVersionByUID) instead",
"tags": ["dashboard_versions"],
"summary": "Get a specific dashboard version.",
"operationId": "getDashboardVersion",
"deprecated": true,
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "DashboardID",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"name": "DashboardVersionID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/dashboardVersionResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/import": {
"post": {
"tags": ["dashboards"],
"summary": "Import dashboard.",
"operationId": "importDashboard",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ImportDashboardRequest"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/importDashboardResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"412": {
"$ref": "#/responses/preconditionFailedError"
},
"422": {
"$ref": "#/responses/unprocessableEntityError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/tags": {
"get": {
"tags": ["dashboards"],
"summary": "Get all dashboards tags of an organisation.",
"operationId": "getDashboardTags",
"responses": {
"200": {
"$ref": "#/responses/dashboardsTagsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/trim": {
"post": {
"tags": ["dashboards"],
"summary": "Trim defaults from dashboard.",
"operationId": "trimDashboard",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/TrimDashboardCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/trimDashboardResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/uid/{uid}": {
"get": {
"description": "Will return the dashboard given the dashboard unique identifier (uid).",
"tags": ["dashboards"],
"summary": "Get dashboard by uid.",
"operationId": "getDashboardByUID",
"parameters": [
{
"type": "string",
"name": "uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/dashboardResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "Will delete the dashboard given the specified unique identifier (uid).",
"tags": ["dashboards"],
"summary": "Delete dashboard by uid.",
"operationId": "deleteDashboardByUID",
"parameters": [
{
"type": "string",
"name": "uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/deleteDashboardResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/uid/{uid}/permissions": {
"get": {
"tags": ["dashboard_permissions"],
"summary": "Gets all existing permissions for the given dashboard.",
"operationId": "getDashboardPermissionsWithUid",
"parameters": [
{
"type": "string",
"name": "uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getDashboardPermissionsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "This operation will remove existing permissions if they’re not included in the request.",
"tags": ["dashboard_permissions"],
"summary": "Updates permissions for a dashboard.",
"operationId": "postDashboardPermissionsWithUid",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateDashboardAclCommand"
}
},
{
"type": "string",
"name": "uid",
"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"
}
}
}
},
"/dashboards/uid/{uid}/restore": {
"post": {
"tags": ["dashboard_versions"],
"summary": "Restore a dashboard to a given dashboard version using UID.",
"operationId": "restoreDashboardVersionByUID",
"parameters": [
{
"type": "string",
"name": "uid",
"in": "path",
"required": true
},
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RestoreDashboardVersionCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/postDashboardResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/uid/{uid}/versions": {
"get": {
"tags": ["dashboard_versions"],
"summary": "Gets all existing versions for the dashboard using UID.",
"operationId": "getDashboardVersionsByUID",
"parameters": [
{
"type": "string",
"name": "uid",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"default": 0,
"description": "Maximum number of results to return",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 0,
"description": "Version to start from when returning queries",
"name": "start",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/dashboardVersionsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/uid/{uid}/versions/{DashboardVersionID}": {
"get": {
"tags": ["dashboard_versions"],
"summary": "Get a specific dashboard version using UID.",
"operationId": "getDashboardVersionByUID",
"parameters": [
{
"type": "string",
"name": "uid",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"name": "DashboardVersionID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/dashboardVersionResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources": {
"get": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scope: `datasources:*`.",
"tags": ["datasources"],
"summary": "Get all data sources.",
"operationId": "getDatasources",
"responses": {
"200": {
"$ref": "#/responses/getDatasourcesResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "By defining `password` and `basicAuthPassword` under secureJsonData property\nGrafana encrypts them securely as an encrypted blob in the database.\nThe response then lists the encrypted fields under secureJsonFields.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:create`",
"tags": ["datasources"],
"summary": "Create a data source.",
"operationId": "addDatasource",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddDataSourceCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/createOrUpdateDatasourceResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"409": {
"$ref": "#/responses/conflictError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/id/{name}": {
"get": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).",
"tags": ["datasources"],
"summary": "Get data source Id by Name.",
"operationId": "getDatasourceIdByName",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getDatasourceIDresponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/name/{name}": {
"get": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).",
"tags": ["datasources"],
"summary": "Get a single data source by Name.",
"operationId": "getDatasourceByName",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getDatasourceResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).",
"tags": ["datasources"],
"summary": "Delete an existing data source by name.",
"operationId": "deleteDatasourceByName",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/deleteDatasourceByNameResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/proxy/uid/{uid}/{datasource_proxy_route}": {
"get": {
"description": "Proxies all calls to the actual data source.",
"tags": ["datasources"],
"summary": "Data source proxy GET calls.",
"operationId": "datasourceProxyGETByUIDcalls",
"parameters": [
{
"type": "string",
"name": "datasource_proxy_route",
"in": "path",
"required": true
},
{
"type": "string",
"name": "uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": ""
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "Proxies all calls to the actual data source. The data source should support POST methods for the specific path and role as defined",
"tags": ["datasources"],
"summary": "Data source proxy POST calls.",
"operationId": "datasourceProxyPOSTByUIDcalls",
"parameters": [
{
"name": "DatasourceProxyParam",
"in": "body",
"required": true,
"schema": {
"type": "object"
}
},
{
"type": "string",
"name": "datasource_proxy_route",
"in": "path",
"required": true
},
{
"type": "string",
"name": "uid",
"in": "path",
"required": true
}
],
"responses": {
"201": {
"description": ""
},
"202": {
"description": ""
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "Proxies all calls to the actual data source.",
"tags": ["datasources"],
"summary": "Data source proxy DELETE calls.",
"operationId": "datasourceProxyDELETEByUIDcalls",
"parameters": [
{
"type": "string",
"name": "uid",
"in": "path",
"required": true
},
{
"type": "string",
"name": "datasource_proxy_route",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": ""
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/proxy/{id}/{datasource_proxy_route}": {
"get": {
"description": "Proxies all calls to the actual data source.\n\nPlease refer to [updated API](#/datasources/datasourceProxyGETByUIDcalls) instead",
"tags": ["datasources"],
"summary": "Data source proxy GET calls.",
"operationId": "datasourceProxyGETcalls",
"deprecated": true,
"parameters": [
{
"type": "string",
"name": "datasource_proxy_route",
"in": "path",
"required": true
},
{
"type": "string",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": ""
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "Proxies all calls to the actual data source. The data source should support POST methods for the specific path and role as defined\n\nPlease refer to [updated API](#/datasources/datasourceProxyPOSTByUIDcalls) instead",
"tags": ["datasources"],
"summary": "Data source proxy POST calls.",
"operationId": "datasourceProxyPOSTcalls",
"deprecated": true,
"parameters": [
{
"name": "DatasourceProxyParam",
"in": "body",
"required": true,
"schema": {
"type": "object"
}
},
{
"type": "string",
"name": "datasource_proxy_route",
"in": "path",
"required": true
},
{
"type": "string",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"201": {
"description": ""
},
"202": {
"description": ""
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "Proxies all calls to the actual data source.\n\nPlease refer to [updated API](#/datasources/datasourceProxyDELETEByUIDcalls) instead",
"tags": ["datasources"],
"summary": "Data source proxy DELETE calls.",
"operationId": "datasourceProxyDELETEcalls",
"deprecated": true,
"parameters": [
{
"type": "string",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"name": "datasource_proxy_route",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": ""
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/uid/{uid}": {
"get": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source).",
"tags": ["datasources"],
"summary": "Get a single data source by UID.",
"operationId": "getDatasourceByUID",
"parameters": [
{
"type": "string",
"name": "uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getDatasourceResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"description": "Similar to creating a data source, `password` and `basicAuthPassword` should be defined under\nsecureJsonData in order to be stored securely as an encrypted blob in the database. Then, the\nencrypted fields are listed under secureJsonFields section in the response.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:1` (single data source).",
"tags": ["datasources"],
"summary": "Update an existing data source.",
"operationId": "updateDatasourceByUID",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateDataSourceCommand"
}
},
{
"type": "string",
"name": "uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/createOrUpdateDatasourceResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source).",
"tags": ["datasources"],
"summary": "Delete an existing data source by UID.",
"operationId": "deleteDatasourceByUID",
"parameters": [
{
"type": "string",
"name": "uid",
"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"
}
}
}
},
"/datasources/uid/{uid}/health": {
"get": {
"tags": ["datasources"],
"summary": "Check data source health by Id.",
"operationId": "checkDatasourceHealth",
"parameters": [
{
"type": "string",
"name": "uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/uid/{uid}/resources/{datasource_proxy_route}": {
"get": {
"tags": ["datasources"],
"summary": "Fetch data source resources.",
"operationId": "fetchDatasourceResources",
"parameters": [
{
"type": "string",
"name": "uid",
"in": "path",
"required": true
},
{
"type": "string",
"name": "datasource_proxy_route",
"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"
}
}
}
},
"/datasources/{datasourceId}/disable-permissions": {
"post": {
"description": "Disables permissions for the data source with the given id. All existing permissions will be removed and anyone will be able to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).",
"tags": ["datasource_permissions", "enterprise"],
"summary": "Disable permissions for a data source.",
"operationId": "disablePermissions",
"parameters": [
{
"type": "string",
"name": "datasourceId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/createOrUpdateDatasourceResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/{datasourceId}/enable-permissions": {
"post": {
"description": "Enables permissions for the data source with the given id.\nNo one except Org Admins will be able to query the data source until permissions have been added\nwhich permit certain users or teams to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).",
"tags": ["datasource_permissions", "enterprise"],
"summary": "Enable permissions for a data source.",
"operationId": "enablePermissions",
"parameters": [
{
"type": "string",
"name": "datasourceId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/createOrUpdateDatasourceResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/{datasourceId}/permissions": {
"get": {
"description": "Gets all existing permissions for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:read` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).",
"tags": ["datasource_permissions", "enterprise"],
"summary": "Get permissions for a data source.",
"operationId": "getPermissions",
"parameters": [
{
"type": "string",
"name": "datasourceId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getPermissionseResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/{datasourceId}/permissions/{permissionId}": {
"delete": {
"description": "Removes the permission with the given permissionId for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:delete` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).",
"tags": ["datasource_permissions", "enterprise"],
"summary": "Remove permission for a data source.",
"operationId": "deletePermissions",
"parameters": [
{
"type": "string",
"name": "datasourceId",
"in": "path",
"required": true
},
{
"type": "string",
"name": "permissionId",
"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"
}
}
}
},
"/datasources/{id}": {
"get": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).\n\nPlease refer to [updated API](#/datasources/getDatasourceByUID) instead",
"tags": ["datasources"],
"summary": "Get a single data source by Id.",
"operationId": "getDatasourceByID",
"deprecated": true,
"parameters": [
{
"type": "string",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getDatasourceResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"description": "Similar to creating a data source, `password` and `basicAuthPassword` should be defined under\nsecureJsonData in order to be stored securely as an encrypted blob in the database. Then, the\nencrypted fields are listed under secureJsonFields section in the response.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).\n\nPlease refer to [updated API](#/datasources/updateDatasourceByUID) instead",
"tags": ["datasources"],
"summary": "Update an existing data source by its sequential ID.",
"operationId": "updateDatasourceByID",
"deprecated": true,
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateDataSourceCommand"
}
},
{
"type": "string",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/createOrUpdateDatasourceResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).\n\nPlease refer to [updated API](#/datasources/deleteDatasourceByUID) instead",
"tags": ["datasources"],
"summary": "Delete an existing data source by id.",
"operationId": "deleteDatasourceByID",
"deprecated": true,
"parameters": [
{
"type": "string",
"name": "id",
"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"
}
}
}
},
"/datasources/{id}/health": {
"get": {
"description": "Please refer to [updated API](#/datasources/checkDatasourceHealth) instead",
"tags": ["datasources"],
"summary": "Check data source health by Id.",
"operationId": "checkDatasourceHealthByID",
"deprecated": true,
"parameters": [
{
"type": "string",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/{id}/resources/{datasource_proxy_route}": {
"get": {
"description": "Please refer to [updated API](#/datasources/fetchDatasourceResources) instead",
"tags": ["datasources"],
"summary": "Fetch data source resources by Id.",
"operationId": "fetchDatasourceResourcesByID",
"deprecated": true,
"parameters": [
{
"type": "string",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"name": "datasource_proxy_route",
"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"
}
}
}
},
"/ds/query": {
"post": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:query`.",
"tags": ["ds"],
"summary": "Query metrics with expressions",
"operationId": "queryMetricsWithExpressions",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MetricRequest"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/queryDataResponse"
},
"207": {
"$ref": "#/responses/queryDataResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/folders": {
"get": {
"description": "Returns all folders that the authenticated user has permission to view.",
"tags": ["folders"],
"summary": "Get all folders.",
"operationId": "getFolders",
"parameters": [
{
"type": "integer",
"format": "int64",
"default": 1000,
"description": "Limit the maximum number of folders to return",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 1,
"description": "Page index for starting fetching folders",
"name": "page",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/getFoldersResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"tags": ["folders"],
"summary": "Create folder.",
"operationId": "createFolder",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateFolderCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/folderResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"409": {
"$ref": "#/responses/conflictError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/folders/id/{folder_id}": {
"get": {
"description": "Returns the folder identified by id.",
"tags": ["folders"],
"summary": "Get folder by id.",
"operationId": "getFolderByID",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "folder_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/folderResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/folders/{folder_uid}": {
"get": {
"tags": ["folders"],
"summary": "Get folder by uid.",
"operationId": "getFolderByUID",
"parameters": [
{
"type": "string",
"name": "folder_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": ""
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"tags": ["folders"],
"summary": "Update folder.",
"operationId": "updateFolder",
"parameters": [
{
"type": "string",
"name": "folder_uid",
"in": "path",
"required": true
},
{
"description": "To change the unique identifier (uid), provide another one.\nTo overwrite an existing folder with newer version, set `overwrite` to `true`.\nProvide the current version to safelly update the folder: if the provided version differs from the stored one the request will fail, unless `overwrite` is `true`.",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateFolderCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/folderResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"409": {
"$ref": "#/responses/conflictError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "Deletes an existing folder identified by UID along with all dashboards (and their alerts) stored in the folder. This operation cannot be reverted.",
"tags": ["folders"],
"summary": "Delete folder.",
"operationId": "deleteFolder",
"parameters": [
{
"type": "string",
"name": "folder_uid",
"in": "path",
"required": true
},
{
"type": "boolean",
"default": false,
"description": "If `true` any Grafana 8 Alerts under this folder will be deleted.\nSet to `false` so that the request will fail if the folder contains any Grafana 8 Alerts.",
"name": "forceDeleteRules",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/deleteFolderResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/folders/{folder_uid}/permissions": {
"get": {
"tags": ["folder_permissions"],
"summary": "Gets all existing permissions for the folder with the given `uid`.",
"operationId": "getFolderPermissions",
"parameters": [
{
"type": "string",
"name": "folder_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getDashboardPermissionsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"tags": ["folder_permissions"],
"summary": "Updates permissions for a folder. This operation will remove existing permissions if they’re not included in the request.",
"operationId": "updateFolderPermissions",
"parameters": [
{
"type": "string",
"name": "folder_uid",
"in": "path",
"required": true
},
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateDashboardAclCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/library-elements": {
"get": {
"description": "Returns a list of all library elements the authenticated user has permission to view.\nUse the `perPage` query parameter to control the maximum number of library elements returned; the default limit is `100`.\nYou can also use the `page` query parameter to fetch library elements from any page other than the first one.",
"tags": ["library_elements"],
"summary": "Get all library elements.",
"operationId": "getLibraryElements",
"parameters": [
{
"type": "string",
"description": "Part of the name or description searched for.",
"name": "searchString",
"in": "query"
},
{
"enum": [1, 2],
"type": "integer",
"format": "int64",
"description": "Kind of element to search for.",
"name": "kind",
"in": "query"
},
{
"enum": ["alpha-asc", "alpha-desc"],
"type": "string",
"description": "Sort order of elements.",
"name": "sortDirection",
"in": "query"
},
{
"type": "string",
"description": "A comma separated list of types to filter the elements by",
"name": "typeFilter",
"in": "query"
},
{
"type": "string",
"description": "Element UID to exclude from search results.",
"name": "excludeUid",
"in": "query"
},
{
"type": "string",
"description": "A comma separated list of folder ID(s) to filter the elements by.",
"name": "folderFilter",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 100,
"description": "The number of results per page.",
"name": "perPage",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 1,
"description": "The page for a set of records, given that only perPage records are returned at a time. Numbering starts at 1.",
"name": "page",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/getLibraryElementsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "Creates a new library element.",
"tags": ["library_elements"],
"summary": "Create library element.",
"operationId": "createLibraryElement",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateLibraryElementCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/getLibraryElementResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/library-elements/name/{library_element_name}": {
"get": {
"description": "Returns a library element with the given name.",
"tags": ["library_elements"],
"summary": "Get library element by name.",
"operationId": "getLibraryElementByName",
"parameters": [
{
"type": "string",
"name": "library_element_name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getLibraryElementResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/library-elements/{library_element_uid}": {
"get": {
"description": "Returns a library element with the given UID.",
"tags": ["library_elements"],
"summary": "Get library element by UID.",
"operationId": "getLibraryElementByUID",
"parameters": [
{
"type": "string",
"name": "library_element_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getLibraryElementResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "Deletes an existing library element as specified by the UID. This operation cannot be reverted.\nYou cannot delete a library element that is connected. This operation cannot be reverted.",
"tags": ["library_elements"],
"summary": "Delete library element.",
"operationId": "deleteLibraryElementByUID",
"parameters": [
{
"type": "string",
"name": "library_element_uid",
"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"
}
}
},
"patch": {
"description": "Updates an existing library element identified by uid.",
"tags": ["library_elements"],
"summary": "Update library element.",
"operationId": "updateLibraryElement",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PatchLibraryElementCommand"
}
},
{
"type": "string",
"name": "library_element_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getLibraryElementResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"412": {
"$ref": "#/responses/preconditionFailedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/library-elements/{library_element_uid}/connections/": {
"get": {
"description": "Returns a list of connections for a library element based on the UID specified.",
"tags": ["library_elements"],
"summary": "Get library element connections.",
"operationId": "getLibraryElementConnections",
"parameters": [
{
"type": "string",
"name": "library_element_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getLibraryElementConnectionsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/licensing/check": {
"get": {
"tags": ["licensing", "enterprise"],
"summary": "Check license availability.",
"operationId": "getLicenseStatus",
"responses": {
"200": {
"$ref": "#/responses/getLicenseStatusResponse"
}
}
}
},
"/licensing/custom-permissions": {
"get": {
"description": "You need to have a permission with action `licensing.reports:read`.",
"tags": ["licensing", "enterprise"],
"summary": "Get custom permissions report.",
"operationId": "getCustomPermissionsReport",
"responses": {
"200": {
"$ref": "#/responses/getCustomPermissionsReportResponse"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/licensing/custom-permissions-csv": {
"get": {
"description": "You need to have a permission with action `licensing.reports:read`.",
"produces": ["text/csv"],
"tags": ["licensing", "enterprise"],
"summary": "Get custom permissions report in CSV format.",
"operationId": "getCustomPermissionsCSV",
"responses": {
"200": {
"$ref": "#/responses/getCustomPermissionsReportResponse"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/licensing/refresh-stats": {
"get": {
"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`.",
"tags": ["licensing", "enterprise"],
"summary": "Manually force license refresh.",
"operationId": "postRenewLicenseToken",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/postRenewLicenseTokenResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"404": {
"$ref": "#/responses/notFoundError"
}
}
}
},
"/login/saml": {
"get": {
"tags": ["saml", "enterprise"],
"summary": "It initiates the login flow by redirecting the user to the IdP.",
"operationId": "getSAMLLogin",
"responses": {
"302": {
"description": ""
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/logout/saml": {
"get": {
"tags": ["saml", "enterprise"],
"summary": "GetLogout initiates single logout process.",
"operationId": "getSAMLLogout",
"responses": {
"302": {
"description": ""
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org": {
"get": {
"description": "Get current Organization",
"tags": ["current_org_details"],
"operationId": "getOrg",
"responses": {
"200": {
"$ref": "#/responses/getOrgResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"tags": ["current_org_details"],
"summary": "Update current Organization.",
"operationId": "updateOrg",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateOrgForm"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org/address": {
"put": {
"tags": ["current_org_details"],
"summary": "Update current Organization's address.",
"operationId": "updateOrgAddress",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateOrgAddressForm"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org/invites": {
"get": {
"tags": ["org_invites"],
"summary": "Get pending invites.",
"operationId": "getInvites",
"responses": {
"200": {
"$ref": "#/responses/getInvitesResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"tags": ["org_invites"],
"summary": "Add invite.",
"operationId": "addInvite",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddInviteForm"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/addOrgUser"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"412": {
"$ref": "#/responses/SMTPNotEnabledError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org/preferences": {
"get": {
"tags": ["org_preferences"],
"summary": "Get Current Org Prefs.",
"operationId": "getOrgPreferences",
"responses": {
"200": {
"$ref": "#/responses/getPreferencesResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"tags": ["org_preferences"],
"summary": "Update Current Org Prefs.",
"operationId": "updateOrgPreferences",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdatePrefsCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/addOrgUser"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"patch": {
"tags": ["org_preferences"],
"summary": "Patch Current Org Prefs.",
"operationId": "patchOrgPreferences",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PatchPrefsCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/addOrgUser"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org/users": {
"get": {
"description": "Returns all org users within the current organization. Accessible to users with org admin role.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:read` with scope `users:*`.",
"tags": ["current_org_details"],
"summary": "Get all users within the current organization.",
"operationId": "getOrgUsers",
"responses": {
"200": {
"$ref": "#/responses/getOrgUsersResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "Adds a global user to the current organization.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:add` with scope `users:*`.",
"tags": ["current_org_details"],
"summary": "Add a new user to the current organization",
"operationId": "addOrgUser",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddOrgUserCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org/users/lookup": {
"get": {
"description": "Returns all org users within the current organization, but with less detailed information.\nAccessible to users with org admin role, admin in any folder or admin of any team.\nMainly used by Grafana UI for providing list of users when adding team members and when editing folder/dashboard permissions.",
"tags": ["current_org_details"],
"summary": "Get all users within the current organization (lookup)",
"operationId": "lookupOrgUsers",
"parameters": [
{
"type": "string",
"name": "query",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/lookupOrgUsersResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org/users/{user_id}": {
"delete": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:remove` with scope `users:*`.",
"tags": ["current_org_details"],
"summary": "Delete user in current organization",
"operationId": "deleteOrgUser",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"patch": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users.role:update` with scope `users:*`.",
"tags": ["current_org_details"],
"summary": "Updates the given user",
"operationId": "updateOrgUser",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateOrgUserCommand"
}
},
{
"type": "integer",
"format": "int64",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org/{invitation_code}/invites": {
"delete": {
"tags": ["org_invites"],
"summary": "Revoke invite.",
"operationId": "revokeInvite",
"parameters": [
{
"type": "string",
"name": "invitation_code",
"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"
}
}
}
},
"/orgs": {
"get": {
"security": [
{
"basic": []
}
],
"description": "Search all Organizations",
"tags": ["orgs"],
"operationId": "searchOrg",
"parameters": [
{
"type": "integer",
"format": "int64",
"default": 1,
"name": "page",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 1000,
"description": "Number of items per page\nThe totalCount field in the response can be used for pagination list E.g. if totalCount is equal to 100 teams and the perpage parameter is set to 10 then there are 10 pages of teams.",
"name": "perpage",
"in": "query"
},
{
"type": "string",
"name": "name",
"in": "query"
},
{
"type": "string",
"description": "If set it will return results where the query value is contained in the name field. Query values with spaces need to be URL encoded.",
"name": "query",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/searchOrgResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"409": {
"$ref": "#/responses/conflictError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "Only works if [users.allow_org_create](https://grafana.com/docs/grafana/latest/administration/configuration/#allow_org_create) is set.",
"tags": ["orgs"],
"summary": "Create Organization.",
"operationId": "createOrg",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateOrgCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/createOrgResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"409": {
"$ref": "#/responses/conflictError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/orgs/name/{org_name}": {
"get": {
"security": [
{
"basic": []
}
],
"tags": ["orgs"],
"summary": "Get Organization by ID.",
"operationId": "getOrgByName",
"parameters": [
{
"type": "string",
"name": "org_name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getOrgResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/orgs/{org_id}": {
"get": {
"security": [
{
"basic": []
}
],
"tags": ["orgs"],
"summary": "Get Organization by ID.",
"operationId": "getOrgByID",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "org_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getOrgResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"security": [
{
"basic": []
}
],
"tags": ["orgs"],
"summary": "Update Organization.",
"operationId": "adminUpdateOrg",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateOrgForm"
}
},
{
"type": "integer",
"format": "int64",
"name": "org_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"security": [
{
"basic": []
}
],
"tags": ["orgs"],
"summary": "Delete Organization.",
"operationId": "adminDeleteOrg",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "org_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"
}
}
}
},
"/orgs/{org_id}/address": {
"put": {
"tags": ["orgs"],
"summary": "Update Organization's address.",
"operationId": "adminUpdateOrgAddress",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateOrgAddressForm"
}
},
{
"type": "integer",
"format": "int64",
"name": "org_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/orgs/{org_id}/quotas": {
"get": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:read` and scope `org:id:1` (orgIDScope).\nlist",
"tags": ["orgs"],
"summary": "Fetch Organization quota.",
"operationId": "getOrgQuota",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "org_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getQuotaResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/orgs/{org_id}/quotas/{quota_target}": {
"put": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:write` and scope `org:id:1` (orgIDScope).",
"tags": ["orgs"],
"summary": "Update user quota.",
"operationId": "updateOrgQuota",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateOrgQuotaCmd"
}
},
{
"type": "string",
"name": "quota_target",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"name": "org_id",
"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"
}
}
}
},
"/orgs/{org_id}/users": {
"get": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:read` with scope `users:*`.",
"tags": ["orgs"],
"summary": "Get Users in Organization.",
"operationId": "adminGetOrgUsers",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "org_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getOrgUsersResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "Adds a global user to the current organization.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:add` with scope `users:*`.",
"tags": ["orgs"],
"summary": "Add a new user to the current organization",
"operationId": "adminAddOrgUser",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddOrgUserCommand"
}
},
{
"type": "integer",
"format": "int64",
"name": "org_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/orgs/{org_id}/users/{user_id}": {
"delete": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:remove` with scope `users:*`.",
"tags": ["orgs"],
"summary": "Delete user in current organization",
"operationId": "adminDeleteOrgUser",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "org_id",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"patch": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users.role:update` with scope `users:*`.",
"tags": ["orgs"],
"summary": "Update Users in Organization.",
"operationId": "adminUpdateOrgUser",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateOrgUserCommand"
}
},
{
"type": "integer",
"format": "int64",
"name": "org_id",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/query-history": {
"get": {
"description": "Returns a list of queries in the query history that matches the search criteria.\nQuery history search supports pagination. Use the `limit` parameter to control the maximum number of queries returned; the default limit is 100.\nYou can also use the `page` query parameter to fetch queries from any page other than the first one.",
"tags": ["query_history"],
"summary": "Query history search.",
"operationId": "searchQueries",
"parameters": [
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"description": "List of data source UIDs to search for",
"name": "datasourceUid",
"in": "query"
},
{
"type": "string",
"description": "Text inside query or comments that is searched for",
"name": "searchString",
"in": "query"
},
{
"type": "boolean",
"description": "Flag indicating if only starred queries should be returned",
"name": "onlyStarred",
"in": "query"
},
{
"enum": ["time-desc", "time-asc"],
"type": "string",
"default": "time-desc",
"description": "Sort method",
"name": "sort",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Use this parameter to access hits beyond limit. Numbering starts at 1. limit param acts as page size.",
"name": "page",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Limit the number of returned results",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "From range for the query history search",
"name": "from",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "To range for the query history search",
"name": "to",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/getQueryHistorySearchResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "Adds new query to query history.",
"tags": ["query_history"],
"summary": "Add query to query history.",
"operationId": "createQuery",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateQueryInQueryHistoryCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/getQueryHistoryResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/query-history/migrate": {
"post": {
"description": "Adds multiple queries to query history.",
"tags": ["query_history"],
"summary": "Migrate queries to query history.",
"operationId": "migrateQueries",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MigrateQueriesToQueryHistoryCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/getQueryHistoryMigrationResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/query-history/star/{query_history_uid}": {
"post": {
"description": "Adds star to query in query history as specified by the UID.",
"tags": ["query_history"],
"summary": "Add star to query in query history.",
"operationId": "starQuery",
"parameters": [
{
"type": "string",
"name": "query_history_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getQueryHistoryResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "Removes star from query in query history as specified by the UID.",
"tags": ["query_history"],
"summary": "Remove star to query in query history.",
"operationId": "unstarQuery",
"parameters": [
{
"type": "string",
"name": "query_history_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getQueryHistoryResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/query-history/{query_history_uid}": {
"delete": {
"description": "Deletes an existing query in query history as specified by the UID. This operation cannot be reverted.",
"tags": ["query_history"],
"summary": "Delete query in query history.",
"operationId": "deleteQuery",
"parameters": [
{
"type": "string",
"name": "query_history_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getQueryHistoryDeleteQueryResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"patch": {
"description": "Updates comment for query in query history as specified by the UID.",
"tags": ["query_history"],
"summary": "Update comment for query in query history.",
"operationId": "patchQueryComment",
"parameters": [
{
"type": "string",
"name": "query_history_uid",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PatchQueryCommentInQueryHistoryCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/getQueryHistoryResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/recording-rules": {
"get": {
"tags": ["recording_rules", "enterprise"],
"summary": "Get all recording rules.",
"operationId": "listRecordingRules",
"responses": {
"200": {
"$ref": "#/responses/listRecordingRulesResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"tags": ["recording_rules", "enterprise"],
"summary": "Update a recording rule.",
"operationId": "updateRecordingRule",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RecordingRuleJSON"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/recordingRuleResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"tags": ["recording_rules", "enterprise"],
"summary": "Create a new recording rule.",
"operationId": "createRecordingRule",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RecordingRuleJSON"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/recordingRuleResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/recording-rules/test": {
"post": {
"tags": ["recording_rules", "enterprise"],
"summary": "Test a recording rule.",
"operationId": "testCreateRecordingRule",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RecordingRuleJSON"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"422": {
"$ref": "#/responses/unprocessableEntityError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/recording-rules/writer": {
"get": {
"tags": ["recording_rules", "enterprise"],
"summary": "Get the write target.",
"operationId": "getRecordingRuleWriteTarget",
"responses": {
"200": {
"$ref": "#/responses/recordingRuleWriteTargetResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"tags": ["recording_rules", "enterprise"],
"summary": "Create a new write target.",
"operationId": "createRecordingRuleWriteTarget",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PrometheusRemoteWriteTargetJSON"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/recordingRuleWriteTargetResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"422": {
"$ref": "#/responses/unprocessableEntityError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"tags": ["recording_rules", "enterprise"],
"summary": "Delete the write target.",
"operationId": "deleteRecordingRuleWriteTarget",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/recording-rules/{recordingRuleID}": {
"delete": {
"tags": ["recording_rules", "enterprise"],
"summary": "Delete a recording rule.",
"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`.",
"tags": ["reports", "enterprise"],
"summary": "Create a report.",
"operationId": "createReport",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateOrUpdateConfigCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/createReportResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/reports/email": {
"post": {
"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`.",
"tags": ["reports", "enterprise"],
"summary": "Send a report.",
"operationId": "sendReport",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ReportEmailDTO"
}
}
],
"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"
}
}
}
},
"/reports/render/pdf/{DashboardID}": {
"get": {
"description": "Please refer to [reports enterprise](#/reports/renderReportPDFs) instead. This will be removed in Grafana 10.",
"produces": ["application/pdf"],
"tags": ["reports", "enterprise"],
"summary": "Render report for dashboard.",
"operationId": "renderReportPDF",
"deprecated": true,
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "DashboardID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/contentResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/reports/render/pdfs": {
"get": {
"description": "Available to all users and with a valid license.",
"produces": ["application/pdf"],
"tags": ["reports", "enterprise"],
"summary": "Render report for multiple dashboards.",
"operationId": "renderReportPDFs",
"responses": {
"200": {
"$ref": "#/responses/contentResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/reports/settings": {
"get": {
"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.",
"tags": ["reports", "enterprise"],
"summary": "Save settings.",
"operationId": "saveReportSettings",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SettingsDTO"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/reports/test-email": {
"post": {
"description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports:send`.",
"tags": ["reports", "enterprise"],
"summary": "Send test report via email.",
"operationId": "sendTestEmail",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateOrUpdateConfigCmd"
}
}
],
"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"
}
}
}
},
"/reports/{reportID}": {
"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:id:\u003creport ID\u003e`.",
"tags": ["reports", "enterprise"],
"summary": "Get a report.",
"operationId": "getReport",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "reportID",
"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`.",
"tags": ["reports", "enterprise"],
"summary": "Update a report.",
"operationId": "updateReport",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateOrUpdateConfigCmd"
}
},
{
"type": "integer",
"format": "int64",
"name": "reportID",
"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": {
"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": "reportID",
"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": "getSAMLMetadata",
"responses": {
"200": {
"$ref": "#/responses/contentResponse"
}
}
}
},
"/saml/slo": {
"post": {
"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"
}
}
}
},
"/search": {
"get": {
"tags": ["search"],
"operationId": "search",
"parameters": [
{
"type": "string",
"description": "Search Query",
"name": "query",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"description": "List of tags to search for",
"name": "tag",
"in": "query"
},
{
"enum": ["dash-folder", "dash-db"],
"type": "string",
"description": "Type to search for, dash-folder or dash-db",
"name": "type",
"in": "query"
},
{
"type": "array",
"items": {
"type": "integer",
"format": "int64"
},
"description": "List of dashboard id’s to search for",
"name": "dashboardIds",
"in": "query"
},
{
"type": "array",
"items": {
"type": "integer",
"format": "int64"
},
"description": "List of folder id’s to search in for dashboards",
"name": "folderIds",
"in": "query"
},
{
"type": "boolean",
"description": "Flag indicating if only starred Dashboards should be returned",
"name": "starred",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Limit the number of returned results (max 5000)",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Use this parameter to access hits beyond limit. Numbering starts at 1. limit param acts as page size. Only available in Grafana v6.2+.",
"name": "page",
"in": "query"
},
{
"enum": ["Edit", "View"],
"type": "string",
"default": "View",
"description": "Set to `Edit` to return dashboards/folders that the user can edit",
"name": "permission",
"in": "query"
},
{
"enum": ["alpha-asc", "alpha-desc"],
"type": "string",
"default": "alpha-asc",
"description": "Sort method; for listing all the possible sort methods use the search sorting endpoint.",
"name": "sort",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/searchResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"422": {
"$ref": "#/responses/unprocessableEntityError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/search/sorting": {
"get": {
"description": "List search sorting options",
"tags": ["search"],
"operationId": "searchSorting",
"responses": {
"200": {
"$ref": "#/responses/searchSortingResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
}
}
}
},
"/snapshot/shared-options": {
"get": {
"tags": ["snapshots"],
"summary": "Get snapshot sharing settings.",
"operationId": "getSnapshotSharingOptions",
"responses": {
"200": {
"$ref": "#/responses/getSnapshotSharingOptionsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
}
}
}
},
"/snapshots": {
"post": {
"description": "Snapshot public mode should be enabled or authentication is required.",
"tags": ["snapshots"],
"summary": "When creating a snapshot using the API, you have to provide the full dashboard payload including the snapshot data. This endpoint is designed for the Grafana UI.",
"operationId": "createSnapshot",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateDashboardSnapshotCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/createSnapshotResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/snapshots-delete/{deleteKey}": {
"get": {
"description": "Snapshot public mode should be enabled or authentication is required.",
"tags": ["snapshots"],
"summary": "Delete Snapshot by deleteKey.",
"operationId": "deleteSnapshotByDeleteKey",
"parameters": [
{
"type": "string",
"name": "deleteKey",
"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"
}
}
}
},
"/snapshots/{key}": {
"get": {
"tags": ["snapshots"],
"summary": "Get Snapshot by Key.",
"operationId": "getSnapshotByKey",
"parameters": [
{
"type": "string",
"name": "key",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/snapshotResponse"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"tags": ["snapshots"],
"summary": "Delete Snapshot by Key.",
"operationId": "deleteSnapshotByKey",
"parameters": [
{
"type": "string",
"name": "key",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/teams": {
"post": {
"tags": ["teams"],
"summary": "Add Team.",
"operationId": "createTeam",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateTeamCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/createTeamResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"409": {
"$ref": "#/responses/conflictError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/teams/search": {
"get": {
"tags": ["teams"],
"summary": "Team Search With Paging.",
"operationId": "searchTeams",
"parameters": [
{
"type": "integer",
"format": "int64",
"default": 1,
"name": "page",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 1000,
"description": "Number of items per page\nThe totalCount field in the response can be used for pagination list E.g. if totalCount is equal to 100 teams and the perpage parameter is set to 10 then there are 10 pages of teams.",
"name": "perpage",
"in": "query"
},
{
"type": "string",
"name": "name",
"in": "query"
},
{
"type": "string",
"description": "If set it will return results where the query value is contained in the name field. Query values with spaces need to be URL encoded.",
"name": "query",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/searchTeamsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"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"
}
}
}
},
"/teams/{teamId}/groups/{groupId}": {
"delete": {
"tags": ["sync_team_groups", "enterprise"],
"summary": "Remove External Group.",
"operationId": "removeTeamGroupApi",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "teamId",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"name": "groupId",
"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"
}
}
}
},
"/teams/{team_id}": {
"get": {
"tags": ["teams"],
"summary": "Get Team By ID.",
"operationId": "getTeam",
"parameters": [
{
"type": "string",
"name": "team_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getTeamResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"tags": ["teams"],
"summary": "Update Team.",
"operationId": "updateTeam",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateTeamCommand"
}
},
{
"type": "string",
"name": "team_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"409": {
"$ref": "#/responses/conflictError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"tags": ["teams"],
"summary": "Delete Team By ID.",
"operationId": "deleteTeamByID",
"parameters": [
{
"type": "string",
"name": "team_id",
"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"
}
}
}
},
"/teams/{team_id}/members": {
"get": {
"tags": ["teams"],
"summary": "Get Team Members.",
"operationId": "getTeamMembers",
"parameters": [
{
"type": "string",
"name": "team_id",
"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"
}
}
},
"post": {
"tags": ["teams"],
"summary": "Add Team Member.",
"operationId": "addTeamMember",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddTeamMemberCommand"
}
},
{
"type": "string",
"name": "team_id",
"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"
}
}
}
},
"/teams/{team_id}/members/{user_id}": {
"put": {
"tags": ["teams"],
"summary": "Update Team Member.",
"operationId": "updateTeamMember",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateTeamMemberCommand"
}
},
{
"type": "string",
"name": "team_id",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"name": "user_id",
"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"
}
}
},
"delete": {
"tags": ["teams"],
"summary": "Remove Member From Team.",
"operationId": "removeTeamMember",
"parameters": [
{
"type": "string",
"name": "team_id",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"name": "user_id",
"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"
}
}
}
},
"/teams/{team_id}/preferences": {
"get": {
"tags": ["teams"],
"summary": "Get Team Preferences.",
"operationId": "getTeamPreferences",
"parameters": [
{
"type": "string",
"name": "team_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getPreferencesResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"tags": ["teams"],
"summary": "Update Team Preferences.",
"operationId": "updateTeamPreferences",
"parameters": [
{
"type": "string",
"name": "team_id",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdatePrefsCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user": {
"get": {
"tags": ["signed_in_user"],
"summary": "Get signed in User.",
"operationId": "getSignedInUser",
"responses": {
"200": {
"$ref": "#/responses/userResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"tags": ["signed_in_user"],
"summary": "Update signed in User.",
"operationId": "updateSignedInUser",
"parameters": [
{
"description": "To change the email, name, login, theme, provide another one.",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateUserCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/userResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/auth-tokens": {
"get": {
"description": "Return a list of all auth tokens (devices) that the actual user currently have logged in from.",
"tags": ["signed_in_user"],
"summary": "Auth tokens of the actual User.",
"operationId": "getSignedInUserAuthTokens",
"responses": {
"200": {
"$ref": "#/responses/getAuthTokensResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/helpflags/clear": {
"get": {
"tags": ["signed_in_user"],
"summary": "Clear user help flag.",
"operationId": "clearHelpFlags",
"responses": {
"200": {
"$ref": "#/responses/helpFlagResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/helpflags/{flag_id}": {
"put": {
"tags": ["signed_in_user"],
"summary": "Set user help flag.",
"operationId": "setHelpFlag",
"parameters": [
{
"type": "string",
"name": "flag_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/helpFlagResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/orgs": {
"get": {
"security": [
{
"basic": []
}
],
"description": "Return a list of all organizations of the current user.",
"tags": ["signed_in_user"],
"summary": "Organizations of the actual User.",
"operationId": "getSignedInUserOrgList",
"responses": {
"200": {
"$ref": "#/responses/getUserOrgListResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/password": {
"put": {
"security": [
{
"basic": []
}
],
"description": "Changes the password for the user.",
"tags": ["signed_in_user"],
"summary": "Change Password.",
"operationId": "changeUserPassword",
"parameters": [
{
"description": "To change the email, name, login, theme, provide another one.",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ChangeUserPasswordCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/preferences": {
"get": {
"tags": ["user_preferences"],
"summary": "Get user preferences.",
"operationId": "getUserPreferences",
"responses": {
"200": {
"$ref": "#/responses/getPreferencesResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"description": "Omitting a key (`theme`, `homeDashboardId`, `timezone`) will cause the current value to be replaced with the system default value.",
"tags": ["user_preferences"],
"summary": "Update user preferences.",
"operationId": "updateUserPreferences",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdatePrefsCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"patch": {
"tags": ["user_preferences"],
"summary": "Patch user preferences.",
"operationId": "patchUserPreferences",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PatchPrefsCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/quotas": {
"get": {
"tags": ["signed_in_user"],
"summary": "Fetch user quota.",
"operationId": "getUserQuotas",
"responses": {
"200": {
"$ref": "#/responses/getQuotaResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/revoke-auth-token": {
"post": {
"description": "Revokes the given auth token (device) for the actual user. User of issued auth token (device) will no longer be logged in and will be required to authenticate again upon next activity.",
"tags": ["signed_in_user"],
"summary": "Revoke an auth token of the actual User.",
"operationId": "revokeSignedInAuthToken",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RevokeAuthTokenCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/stars/dashboard/{dashboard_id}": {
"post": {
"description": "Stars the given Dashboard for the actual user.",
"tags": ["signed_in_user"],
"summary": "Star a dashboard.",
"operationId": "starDashboard",
"parameters": [
{
"type": "string",
"name": "dashboard_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "Deletes the starring of the given Dashboard for the actual user.",
"tags": ["signed_in_user"],
"summary": "Unstar a dashboard.",
"operationId": "unstarDashboard",
"parameters": [
{
"type": "string",
"name": "dashboard_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/teams": {
"get": {
"description": "Return a list of all teams that the current user is member of.",
"tags": ["signed_in_user"],
"summary": "Teams that the actual User is member of.",
"operationId": "getSignedInUserTeamList",
"responses": {
"200": {
"$ref": "#/responses/getUserOrgListResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/using/{org_id}": {
"post": {
"description": "Switch user context to the given organization.",
"tags": ["signed_in_user"],
"summary": "Switch user context for signed in user.",
"operationId": "userSetUsingOrg",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "org_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/users": {
"get": {
"description": "Returns all users that the authenticated user has permission to view, admin permission required.",
"tags": ["users"],
"summary": "Get users.",
"operationId": "searchUsers",
"parameters": [
{
"type": "integer",
"format": "int64",
"default": 1000,
"description": "Limit the maximum number of users to return per page",
"name": "perpage",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 1,
"description": "Page index for starting fetching users",
"name": "page",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/searchUsersResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/users/lookup": {
"get": {
"tags": ["users"],
"summary": "Get user by login or email.",
"operationId": "getUserByLoginOrEmail",
"parameters": [
{
"type": "string",
"description": "loginOrEmail of the user",
"name": "loginOrEmail",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/userResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/users/search": {
"get": {
"tags": ["users"],
"summary": "Get users with paging.",
"operationId": "searchUsersWithPaging",
"responses": {
"200": {
"$ref": "#/responses/searchUsersResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/users/{user_id}": {
"get": {
"tags": ["users"],
"summary": "Get user by id.",
"operationId": "getUserByID",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/userResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"description": "Update the user identified by id.",
"tags": ["users"],
"summary": "Update user.",
"operationId": "updateUser",
"parameters": [
{
"description": "To change the email, name, login, theme, provide another one.",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateUserCommand"
}
},
{
"type": "integer",
"format": "int64",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/userResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/users/{user_id}/orgs": {
"get": {
"description": "Get organizations for user identified by id.",
"tags": ["users"],
"summary": "Get organizations for user.",
"operationId": "getUserOrgList",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getUserOrgListResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/users/{user_id}/teams": {
"get": {
"description": "Get teams for user identified by id.",
"tags": ["users"],
"summary": "Get teams for user.",
"operationId": "getUserTeams",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getUserTeamsResponse"
},
"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",
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"nextSync": {
"type": "string",
"format": "date-time"
},
"prevSync": {
"$ref": "#/definitions/SyncResult"
},
"schedule": {
"type": "string"
}
}
},
"ActiveUserStats": {
"type": "object",
"properties": {
"active_admins_and_editors": {
"type": "integer",
"format": "int64"
},
"active_users": {
"type": "integer",
"format": "int64"
},
"active_viewers": {
"type": "integer",
"format": "int64"
}
}
},
"AddApiKeyCommand": {
"description": "COMMANDS",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"role": {
"type": "string",
"enum": ["Viewer", "Editor", "Admin"]
},
"secondsToLive": {
"type": "integer",
"format": "int64"
}
}
},
"AddBuiltInRoleCommand": {
"type": "object",
"properties": {
"builtInRole": {
"type": "string",
"enum": ["Viewer", " Editor", " Admin", " Grafana Admin"]
},
"global": {
"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 create organization local assignment. Refer to the Built-in role assignments for more information.",
"type": "boolean"
},
"roleUid": {
"type": "string"
}
}
},
"AddDataSourceCommand": {
"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"
},
"withCredentials": {
"type": "boolean"
}
}
},
"AddInviteForm": {
"type": "object",
"properties": {
"loginOrEmail": {
"type": "string"
},
"name": {
"type": "string"
},
"role": {
"type": "string",
"enum": ["Viewer", "Editor", "Admin"]
},
"sendEmail": {
"type": "boolean"
}
}
},
"AddOrgUserCommand": {
"type": "object",
"properties": {
"loginOrEmail": {
"type": "string"
},
"role": {
"type": "string",
"enum": ["Viewer", "Editor", "Admin"]
}
}
},
"AddPermissionDTO": {
"type": "object",
"properties": {
"builtinRole": {
"type": "string"
},
"permission": {
"$ref": "#/definitions/DsPermissionType"
},
"teamId": {
"type": "integer",
"format": "int64"
},
"userId": {
"type": "integer",
"format": "int64"
}
}
},
"AddTeamMemberCommand": {
"type": "object",
"properties": {
"userId": {
"type": "integer",
"format": "int64"
}
}
},
"AddTeamRoleCommand": {
"type": "object",
"properties": {
"roleUid": {
"type": "string"
}
}
},
"AddUserRoleCommand": {
"type": "object",
"properties": {
"global": {
"type": "boolean"
},
"roleUid": {
"type": "string"
}
}
},
"Address": {
"type": "object",
"properties": {
"address1": {
"type": "string"
},
"address2": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"state": {
"type": "string"
},
"zipCode": {
"type": "string"
}
}
},
"AdminCreateUserForm": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"login": {
"type": "string"
},
"name": {
"type": "string"
},
"orgId": {
"type": "integer",
"format": "int64"
},
"password": {
"type": "string"
}
}
},
"AdminStats": {
"type": "object",
"properties": {
"activeAdmins": {
"type": "integer",
"format": "int64"
},
"activeEditors": {
"type": "integer",
"format": "int64"
},
"activeSessions": {
"type": "integer",
"format": "int64"
},
"activeUsers": {
"type": "integer",
"format": "int64"
},
"activeViewers": {
"type": "integer",
"format": "int64"
},
"admins": {
"type": "integer",
"format": "int64"
},
"alerts": {
"type": "integer",
"format": "int64"
},
"dailyActiveAdmins": {
"type": "integer",
"format": "int64"
},
"dailyActiveEditors": {
"type": "integer",
"format": "int64"
},
"dailyActiveSessions": {
"type": "integer",
"format": "int64"
},
"dailyActiveUsers": {
"type": "integer",
"format": "int64"
},
"dailyActiveViewers": {
"type": "integer",
"format": "int64"
},
"dashboards": {
"type": "integer",
"format": "int64"
},
"datasources": {
"type": "integer",
"format": "int64"
},
"editors": {
"type": "integer",
"format": "int64"
},
"monthlyActiveUsers": {
"type": "integer",
"format": "int64"
},
"orgs": {
"type": "integer",
"format": "int64"
},
"playlists": {
"type": "integer",
"format": "int64"
},
"snapshots": {
"type": "integer",
"format": "int64"
},
"stars": {
"type": "integer",
"format": "int64"
},
"tags": {
"type": "integer",
"format": "int64"
},
"users": {
"type": "integer",
"format": "int64"
},
"viewers": {
"type": "integer",
"format": "int64"
}
}
},
"AdminUpdateUserPasswordForm": {
"type": "object",
"properties": {
"password": {
"type": "string"
}
}
},
"AdminUpdateUserPermissionsForm": {
"type": "object",
"properties": {
"isGrafanaAdmin": {
"type": "boolean"
}
}
},
"Alert": {
"type": "object",
"properties": {
"Created": {
"type": "string",
"format": "date-time"
},
"DashboardId": {
"type": "integer",
"format": "int64"
},
"EvalData": {
"$ref": "#/definitions/Json"
},
"ExecutionError": {
"type": "string"
},
"For": {
"$ref": "#/definitions/Duration"
},
"Frequency": {
"type": "integer",
"format": "int64"
},
"Handler": {
"type": "integer",
"format": "int64"
},
"Id": {
"type": "integer",
"format": "int64"
},
"Message": {
"type": "string"
},
"Name": {
"type": "string"
},
"NewStateDate": {
"type": "string",
"format": "date-time"
},
"OrgId": {
"type": "integer",
"format": "int64"
},
"PanelId": {
"type": "integer",
"format": "int64"
},
"Settings": {
"$ref": "#/definitions/Json"
},
"Severity": {
"type": "string"
},
"Silenced": {
"type": "boolean"
},
"State": {
"$ref": "#/definitions/AlertStateType"
},
"StateChanges": {
"type": "integer",
"format": "int64"
},
"Updated": {
"type": "string",
"format": "date-time"
},
"Version": {
"type": "integer",
"format": "int64"
}
}
},
"AlertListItemDTO": {
"type": "object",
"properties": {
"dashboardId": {
"type": "integer",
"format": "int64"
},
"dashboardSlug": {
"type": "string"
},
"dashboardUid": {
"type": "string"
},
"evalData": {
"$ref": "#/definitions/Json"
},
"evalDate": {
"type": "string",
"format": "date-time"
},
"executionError": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"newStateDate": {
"type": "string",
"format": "date-time"
},
"panelId": {
"type": "integer",
"format": "int64"
},
"state": {
"$ref": "#/definitions/AlertStateType"
},
"url": {
"type": "string"
}
}
},
"AlertNotification": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"disableResolveMessage": {
"type": "boolean"
},
"frequency": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"isDefault": {
"type": "boolean"
},
"name": {
"type": "string"
},
"secureFields": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
},
"sendReminder": {
"type": "boolean"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"type": "string"
},
"uid": {
"type": "string"
},
"updated": {
"type": "string",
"format": "date-time"
}
}
},
"AlertNotificationLookup": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"isDefault": {
"type": "boolean"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"uid": {
"type": "string"
}
}
},
"AlertStateInfoDTO": {
"type": "object",
"properties": {
"dashboardId": {
"type": "integer",
"format": "int64"
},
"id": {
"type": "integer",
"format": "int64"
},
"newStateDate": {
"type": "string",
"format": "date-time"
},
"panelId": {
"type": "integer",
"format": "int64"
},
"state": {
"$ref": "#/definitions/AlertStateType"
}
}
},
"AlertStateType": {
"type": "string"
},
"AlertTestCommand": {
"type": "object",
"properties": {
"dashboard": {
"$ref": "#/definitions/Json"
},
"panelId": {
"type": "integer",
"format": "int64"
}
}
},
"AlertTestResult": {
"type": "object",
"properties": {
"conditionEvals": {
"type": "string"
},
"error": {
"type": "string"
},
"firing": {
"type": "boolean"
},
"logs": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertTestResultLog"
}
},
"matches": {
"type": "array",
"items": {
"$ref": "#/definitions/EvalMatch"
}
},
"state": {
"$ref": "#/definitions/AlertStateType"
},
"timeMs": {
"type": "string"
}
}
},
"AlertTestResultLog": {
"type": "object",
"properties": {
"data": {
"type": "object"
},
"message": {
"type": "string"
}
}
},
"AnnotationActions": {
"type": "object",
"properties": {
"canAdd": {
"type": "boolean"
},
"canDelete": {
"type": "boolean"
},
"canEdit": {
"type": "boolean"
}
}
},
"AnnotationPermission": {
"type": "object",
"properties": {
"dashboard": {
"$ref": "#/definitions/AnnotationActions"
},
"organization": {
"$ref": "#/definitions/AnnotationActions"
}
}
},
"ApiKeyDTO": {
"type": "object",
"properties": {
"accessControl": {
"$ref": "#/definitions/Metadata"
},
"expiration": {
"type": "string",
"format": "date-time"
},
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"role": {
"type": "string",
"enum": ["Viewer", "Editor", "Admin"]
}
}
},
"BrandingOptionsDTO": {
"type": "object",
"properties": {
"emailFooterLink": {
"type": "string"
},
"emailFooterMode": {
"type": "string"
},
"emailFooterText": {
"type": "string"
},
"emailLogoUrl": {
"type": "string"
},
"reportLogoUrl": {
"type": "string"
}
}
},
"CalculateDiffTarget": {
"type": "object",
"properties": {
"dashboardId": {
"type": "integer",
"format": "int64"
},
"unsavedDashboard": {
"$ref": "#/definitions/Json"
},
"version": {
"type": "integer",
"format": "int64"
}
}
},
"ChangeUserPasswordCommand": {
"type": "object",
"properties": {
"newPassword": {
"type": "string"
},
"oldPassword": {
"type": "string"
}
}
},
"ConfFloat64": {
"description": "ConfFloat64 is a float64. It Marshals float64 values of NaN of Inf\nto null.",
"type": "number",
"format": "double"
},
"ConfigDTO": {
"description": "ConfigDTO is model representation in transfer",
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"dashboardId": {
"type": "integer",
"format": "int64"
},
"dashboardName": {
"type": "string"
},
"dashboardUid": {
"type": "string"
},
"dashboards": {
"type": "array",
"items": {
"$ref": "#/definitions/DashboardDTO"
}
},
"enableCsv": {
"type": "boolean"
},
"enableDashboardUrl": {
"type": "boolean"
},
"formats": {
"type": "array",
"items": {
"$ref": "#/definitions/Type"
}
},
"id": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string"
},
"name": {
"type": "string"
},
"options": {
"$ref": "#/definitions/ReportOptionsDTO"
},
"orgId": {
"type": "integer",
"format": "int64"
},
"recipients": {
"type": "string"
},
"replyTo": {
"type": "string"
},
"schedule": {
"$ref": "#/definitions/ScheduleDTO"
},
"state": {
"type": "string"
},
"templateVars": {
"type": "object"
},
"updated": {
"type": "string",
"format": "date-time"
},
"userId": {
"type": "integer",
"format": "int64"
}
}
},
"CreateAlertNotificationCommand": {
"type": "object",
"properties": {
"disableResolveMessage": {
"type": "boolean"
},
"frequency": {
"type": "string"
},
"isDefault": {
"type": "boolean"
},
"name": {
"type": "string"
},
"secureSettings": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"sendReminder": {
"type": "boolean"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"type": "string"
},
"uid": {
"type": "string"
}
}
},
"CreateDashboardSnapshotCommand": {
"type": "object",
"required": ["dashboard"],
"properties": {
"Result": {
"$ref": "#/definitions/DashboardSnapshot"
},
"dashboard": {
"$ref": "#/definitions/Json"
},
"deleteKey": {
"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`.",
"type": "string"
},
"name": {
"description": "Snapshot name",
"type": "string"
}
}
},
"CreateFolderCommand": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"uid": {
"type": "string"
}
}
},
"CreateLibraryElementCommand": {
"description": "CreateLibraryElementCommand is the command for adding a LibraryElement",
"type": "object",
"properties": {
"folderId": {
"description": "ID of the folder where the library element is stored.",
"type": "integer",
"format": "int64"
},
"folderUid": {
"description": "UID of the folder where the library element is stored.",
"type": "string"
},
"kind": {
"description": "Kind of element to create, Use 1 for library panels or 2 for c.\nDescription:\n1 - library panels\n2 - library variables",
"type": "integer",
"format": "int64",
"enum": [1, 2]
},
"model": {
"description": "The JSON model for the library element.",
"type": "object"
},
"name": {
"description": "Name of the library element.",
"type": "string"
},
"uid": {
"type": "string"
}
}
},
"CreateOrUpdateConfigCmd": {
"type": "object",
"properties": {
"dashboardId": {
"type": "integer",
"format": "int64"
},
"dashboardUid": {
"type": "string"
},
"dashboards": {
"type": "array",
"items": {
"$ref": "#/definitions/DashboardDTO"
}
},
"enableCsv": {
"type": "boolean"
},
"enableDashboardUrl": {
"type": "boolean"
},
"formats": {
"type": "array",
"items": {
"$ref": "#/definitions/Type"
}
},
"message": {
"type": "string"
},
"name": {
"type": "string"
},
"options": {
"$ref": "#/definitions/ReportOptionsDTO"
},
"recipients": {
"type": "string"
},
"replyTo": {
"type": "string"
},
"schedule": {
"$ref": "#/definitions/ScheduleDTO"
},
"state": {
"type": "string"
},
"templateVars": {
"type": "object"
}
}
},
"CreateOrgCommand": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
},
"CreateQueryInQueryHistoryCommand": {
"description": "CreateQueryInQueryHistoryCommand is the command for adding query history",
"type": "object",
"required": ["queries"],
"properties": {
"datasourceUid": {
"description": "UID of the data source for which are queries stored.",
"type": "string",
"example": "PE1C5CBDA0504A6A3"
},
"queries": {
"$ref": "#/definitions/Json"
}
}
},
"CreateRoleWithPermissionsCommand": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"displayName": {
"type": "string"
},
"group": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/Permission"
}
},
"uid": {
"type": "string"
},
"version": {
"type": "integer",
"format": "int64"
}
}
},
"CreateTeamCommand": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"CustomPermissionsRecordDTO": {
"type": "object",
"properties": {
"customPermissions": {
"type": "string"
},
"granteeName": {
"type": "string"
},
"granteeType": {
"type": "string"
},
"granteeUrl": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"isFolder": {
"type": "boolean"
},
"orgId": {
"type": "integer",
"format": "int64"
},
"orgRole": {
"type": "string"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"uid": {
"type": "string"
},
"url": {
"type": "string"
},
"usersCount": {
"type": "integer",
"format": "int64"
}
}
},
"DashboardAclInfoDTO": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"dashboardId": {
"type": "integer",
"format": "int64"
},
"folderId": {
"type": "integer",
"format": "int64"
},
"inherited": {
"type": "boolean"
},
"isFolder": {
"type": "boolean"
},
"permission": {
"$ref": "#/definitions/PermissionType"
},
"permissionName": {
"type": "string"
},
"role": {
"type": "string",
"enum": ["Viewer", "Editor", "Admin"]
},
"slug": {
"type": "string"
},
"team": {
"type": "string"
},
"teamAvatarUrl": {
"type": "string"
},
"teamEmail": {
"type": "string"
},
"teamId": {
"type": "integer",
"format": "int64"
},
"title": {
"type": "string"
},
"uid": {
"type": "string"
},
"updated": {
"type": "string",
"format": "date-time"
},
"url": {
"type": "string"
},
"userAvatarUrl": {
"type": "string"
},
"userEmail": {
"type": "string"
},
"userId": {
"type": "integer",
"format": "int64"
},
"userLogin": {
"type": "string"
}
}
},
"DashboardAclUpdateItem": {
"type": "object",
"properties": {
"permission": {
"$ref": "#/definitions/PermissionType"
},
"role": {
"type": "string",
"enum": ["Viewer", "Editor", "Admin"]
},
"teamId": {
"type": "integer",
"format": "int64"
},
"userId": {
"type": "integer",
"format": "int64"
}
}
},
"DashboardDTO": {
"type": "object",
"properties": {
"dashboard": {
"$ref": "#/definitions/DashboardReportDTO"
},
"reportVariables": {
"type": "object"
},
"timeRange": {
"$ref": "#/definitions/TimeRangeDTO"
}
}
},
"DashboardFullWithMeta": {
"type": "object",
"properties": {
"dashboard": {
"$ref": "#/definitions/Json"
},
"meta": {
"$ref": "#/definitions/DashboardMeta"
}
}
},
"DashboardMeta": {
"type": "object",
"properties": {
"annotationsPermissions": {
"$ref": "#/definitions/AnnotationPermission"
},
"canAdmin": {
"type": "boolean"
},
"canDelete": {
"type": "boolean"
},
"canEdit": {
"type": "boolean"
},
"canSave": {
"type": "boolean"
},
"canStar": {
"type": "boolean"
},
"created": {
"type": "string",
"format": "date-time"
},
"createdBy": {
"type": "string"
},
"expires": {
"type": "string",
"format": "date-time"
},
"folderId": {
"type": "integer",
"format": "int64"
},
"folderTitle": {
"type": "string"
},
"folderUid": {
"type": "string"
},
"folderUrl": {
"type": "string"
},
"hasAcl": {
"type": "boolean"
},
"isFolder": {
"type": "boolean"
},
"isHome": {
"type": "boolean"
},
"isPublic": {
"type": "boolean"
},
"isSnapshot": {
"type": "boolean"
},
"isStarred": {
"type": "boolean"
},
"provisioned": {
"type": "boolean"
},
"provisionedExternalId": {
"type": "string"
},
"publicDashboardUid": {
"type": "string"
},
"slug": {
"type": "string"
},
"type": {
"type": "string"
},
"updated": {
"type": "string",
"format": "date-time"
},
"updatedBy": {
"type": "string"
},
"url": {
"type": "string"
},
"version": {
"type": "integer",
"format": "int64"
}
}
},
"DashboardRedirect": {
"type": "object",
"properties": {
"redirectUri": {
"type": "string"
}
}
},
"DashboardReportDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"uid": {
"type": "string"
}
}
},
"DashboardSnapshot": {
"description": "DashboardSnapshot model",
"type": "object",
"properties": {
"Created": {
"type": "string",
"format": "date-time"
},
"Dashboard": {
"$ref": "#/definitions/Json"
},
"DashboardEncrypted": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8"
}
},
"DeleteKey": {
"type": "string"
},
"Expires": {
"type": "string",
"format": "date-time"
},
"External": {
"type": "boolean"
},
"ExternalDeleteUrl": {
"type": "string"
},
"ExternalUrl": {
"type": "string"
},
"Id": {
"type": "integer",
"format": "int64"
},
"Key": {
"type": "string"
},
"Name": {
"type": "string"
},
"OrgId": {
"type": "integer",
"format": "int64"
},
"Updated": {
"type": "string",
"format": "date-time"
},
"UserId": {
"type": "integer",
"format": "int64"
}
}
},
"DashboardSnapshotDTO": {
"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"
},
"id": {
"type": "integer",
"format": "int64"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"orgId": {
"type": "integer",
"format": "int64"
},
"updated": {
"type": "string",
"format": "date-time"
},
"userId": {
"type": "integer",
"format": "int64"
}
}
},
"DashboardTagCloudItem": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"format": "int64"
},
"term": {
"type": "string"
}
}
},
"DashboardVersionDTO": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"createdBy": {
"type": "string"
},
"dashboardId": {
"type": "integer",
"format": "int64"
},
"dashboardUid": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string"
},
"parentVersion": {
"type": "integer",
"format": "int64"
},
"restoredFrom": {
"type": "integer",
"format": "int64"
},
"version": {
"type": "integer",
"format": "int64"
}
}
},
"DashboardVersionMeta": {
"description": "DashboardVersionMeta extends the dashboard version model with the names\nassociated with the UserIds, overriding the field with the same name from\nthe DashboardVersion 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": {
"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 the corresponding DataQuery has an error.",
"type": "string"
},
"Frames": {
"$ref": "#/definitions/Frames"
}
}
},
"DataSource": {
"type": "object",
"properties": {
"access": {
"$ref": "#/definitions/DsAccess"
},
"accessControl": {
"$ref": "#/definitions/Metadata"
},
"basicAuth": {
"type": "boolean"
},
"basicAuthUser": {
"type": "string"
},
"database": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"isDefault": {
"type": "boolean"
},
"jsonData": {
"$ref": "#/definitions/Json"
},
"name": {
"type": "string"
},
"orgId": {
"type": "integer",
"format": "int64"
},
"readOnly": {
"type": "boolean"
},
"secureJsonFields": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
},
"type": {
"type": "string"
},
"typeLogoUrl": {
"type": "string"
},
"uid": {
"type": "string"
},
"url": {
"type": "string"
},
"user": {
"type": "string"
},
"version": {
"type": "integer",
"format": "int64"
},
"withCredentials": {
"type": "boolean"
}
}
},
"DataSourceList": {
"type": "array",
"items": {
"$ref": "#/definitions/DataSourceListItemDTO"
}
},
"DataSourceListItemDTO": {
"type": "object",
"properties": {
"access": {
"$ref": "#/definitions/DsAccess"
},
"basicAuth": {
"type": "boolean"
},
"database": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"isDefault": {
"type": "boolean"
},
"jsonData": {
"$ref": "#/definitions/Json"
},
"name": {
"type": "string"
},
"orgId": {
"type": "integer",
"format": "int64"
},
"readOnly": {
"type": "boolean"
},
"type": {
"type": "string"
},
"typeLogoUrl": {
"type": "string"
},
"typeName": {
"type": "string"
},
"uid": {
"type": "string"
},
"url": {
"type": "string"
},
"user": {
"type": "string"
}
}
},
"DeleteTokenCommand": {
"type": "object",
"properties": {
"instance": {
"type": "string"
}
}
},
"DsAccess": {
"type": "string"
},
"DsPermissionType": {
"description": "Datasource permission\nDescription:\n`0` - No Access\n`1` - Query\nEnum: 0,1",
"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.",
"type": "integer",
"format": "int64"
},
"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.",
"type": "string"
}
}
},
"EvalMatch": {
"type": "object",
"properties": {
"metric": {
"type": "string"
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"value": {
"$ref": "#/definitions/Float"
}
}
},
"FailedUser": {
"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/Labels"
},
"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": {
"type": "object"
}
},
"custom": {
"description": "Panel Specific Values",
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"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",
"type": "string"
},
"displayNameFromDS": {
"description": "DisplayNameFromDS overrides Grafana default naming in a better way that allows users to override it easily.",
"type": "string"
},
"filterable": {
"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"
},
"unit": {
"description": "Numeric Options",
"type": "string"
},
"writeable": {
"description": "Writeable indicates that the datasource knows how to update this value",
"type": "boolean"
}
}
},
"FindTagsResult": {
"type": "object",
"title": "FindTagsResult is the result of a tags search.",
"properties": {
"tags": {
"type": "array",
"items": {
"$ref": "#/definitions/TagsDTO"
}
}
}
},
"Float": {
"description": "It does not consider zero values to be null.\nIt will decode to null, not zero, if null.",
"type": "object",
"title": "Float is a nullable float64.",
"properties": {
"Float64": {
"type": "number",
"format": "double"
},
"Valid": {
"type": "boolean"
}
}
},
"Folder": {
"type": "object",
"properties": {
"canAdmin": {
"type": "boolean"
},
"canDelete": {
"type": "boolean"
},
"canEdit": {
"type": "boolean"
},
"canSave": {
"type": "boolean"
},
"created": {
"type": "string",
"format": "date-time"
},
"createdBy": {
"type": "string"
},
"hasAcl": {
"type": "boolean"
},
"id": {
"type": "integer",
"format": "int64"
},
"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"
},
"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.",
"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"
}
}
},
"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.",
"type": "object"
},
"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"
},
"preferredVisualisationType": {
"$ref": "#/definitions/VisType"
},
"stats": {
"description": "Stats is an array of query result statistics.",
"type": "array",
"items": {
"$ref": "#/definitions/QueryStat"
}
},
"type": {
"$ref": "#/definitions/FrameType"
}
}
},
"FrameType": {
"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.",
"type": "string"
},
"Frames": {
"description": "It is the main data container within a backend.DataResponse.",
"type": "array",
"title": "Frames is a slice of Frame pointers.",
"items": {
"$ref": "#/definitions/Frame"
}
},
"GetAnnotationTagsResponse": {
"type": "object",
"title": "GetAnnotationTagsResponse is a response struct for FindTagsResult.",
"properties": {
"result": {
"$ref": "#/definitions/FindTagsResult"
}
}
},
"GetHomeDashboardResponse": {
"title": "Get home dashboard response.",
"allOf": [
{
"type": "object",
"properties": {
"dashboard": {
"$ref": "#/definitions/Json"
},
"meta": {
"$ref": "#/definitions/DashboardMeta"
}
}
},
{
"type": "object",
"properties": {
"redirectUri": {
"type": "string"
}
}
}
]
},
"Hit": {
"type": "object",
"properties": {
"folderId": {
"type": "integer",
"format": "int64"
},
"folderTitle": {
"type": "string"
},
"folderUid": {
"type": "string"
},
"folderUrl": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"isStarred": {
"type": "boolean"
},
"slug": {
"type": "string"
},
"sortMeta": {
"type": "integer",
"format": "int64"
},
"sortMetaName": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"title": {
"type": "string"
},
"type": {
"$ref": "#/definitions/HitType"
},
"uid": {
"type": "string"
},
"uri": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"HitList": {
"type": "array",
"items": {
"$ref": "#/definitions/Hit"
}
},
"HitType": {
"type": "string"
},
"ImportDashboardInput": {
"type": "object",
"title": "ImportDashboardInput definition of input parameters when importing a dashboard.",
"properties": {
"name": {
"type": "string"
},
"pluginId": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"ImportDashboardRequest": {
"type": "object",
"title": "ImportDashboardRequest request object for importing a dashboard.",
"properties": {
"dashboard": {
"$ref": "#/definitions/Json"
},
"folderId": {
"type": "integer",
"format": "int64"
},
"folderUid": {
"type": "string"
},
"inputs": {
"type": "array",
"items": {
"$ref": "#/definitions/ImportDashboardInput"
}
},
"overwrite": {
"type": "boolean"
},
"path": {
"type": "string"
},
"pluginId": {
"type": "string"
}
}
},
"ImportDashboardResponse": {
"type": "object",
"title": "ImportDashboardResponse response object returned when importing a dashboard.",
"properties": {
"dashboardId": {
"type": "integer",
"format": "int64"
},
"description": {
"type": "string"
},
"folderId": {
"type": "integer",
"format": "int64"
},
"imported": {
"type": "boolean"
},
"importedRevision": {
"type": "integer",
"format": "int64"
},
"importedUri": {
"type": "string"
},
"importedUrl": {
"type": "string"
},
"path": {
"type": "string"
},
"pluginId": {
"type": "string"
},
"removed": {
"type": "boolean"
},
"revision": {
"type": "integer",
"format": "int64"
},
"slug": {
"type": "string"
},
"title": {
"type": "string"
},
"uid": {
"type": "string"
}
}
},
"InspectType": {
"type": "integer",
"format": "int64",
"title": "InspectType is a type for the Inspect property of a Notice."
},
"ItemDTO": {
"type": "object",
"properties": {
"alertId": {
"type": "integer",
"format": "int64"
},
"alertName": {
"type": "string"
},
"avatarUrl": {
"type": "string"
},
"created": {
"type": "integer",
"format": "int64"
},
"dashboardId": {
"type": "integer",
"format": "int64"
},
"dashboardUID": {
"type": "string"
},
"data": {
"$ref": "#/definitions/Json"
},
"email": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"login": {
"type": "string"
},
"newState": {
"type": "string"
},
"panelId": {
"type": "integer",
"format": "int64"
},
"prevState": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"text": {
"type": "string"
},
"time": {
"type": "integer",
"format": "int64"
},
"timeEnd": {
"type": "integer",
"format": "int64"
},
"updated": {
"type": "integer",
"format": "int64"
},
"userId": {
"type": "integer",
"format": "int64"
}
}
},
"Json": {
"type": "object"
},
"Labels": {
"description": "Labels are used to add metadata to an object. The JSON will always be sorted keys",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"LibraryElementConnectionDTO": {
"type": "object",
"title": "LibraryElementConnectionDTO is the frontend DTO for element connections.",
"properties": {
"connectionId": {
"type": "integer",
"format": "int64"
},
"created": {
"type": "string",
"format": "date-time"
},
"createdBy": {
"$ref": "#/definitions/LibraryElementDTOMetaUser"
},
"elementId": {
"type": "integer",
"format": "int64"
},
"id": {
"type": "integer",
"format": "int64"
},
"kind": {
"type": "integer",
"format": "int64"
}
}
},
"LibraryElementConnectionsResponse": {
"type": "object",
"title": "LibraryElementConnectionsResponse is a response struct for an array of LibraryElementConnectionDTO.",
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/definitions/LibraryElementConnectionDTO"
}
}
}
},
"LibraryElementDTO": {
"type": "object",
"title": "LibraryElementDTO is the frontend DTO for entities.",
"properties": {
"description": {
"type": "string"
},
"folderId": {
"type": "integer",
"format": "int64"
},
"folderUid": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"kind": {
"type": "integer",
"format": "int64"
},
"meta": {
"$ref": "#/definitions/LibraryElementDTOMeta"
},
"model": {
"type": "object"
},
"name": {
"type": "string"
},
"orgId": {
"type": "integer",
"format": "int64"
},
"type": {
"type": "string"
},
"uid": {
"type": "string"
},
"version": {
"type": "integer",
"format": "int64"
}
}
},
"LibraryElementDTOMeta": {
"type": "object",
"title": "LibraryElementDTOMeta is the meta information for LibraryElementDTO.",
"properties": {
"connectedDashboards": {
"type": "integer",
"format": "int64"
},
"created": {
"type": "string",
"format": "date-time"
},
"createdBy": {
"$ref": "#/definitions/LibraryElementDTOMetaUser"
},
"folderName": {
"type": "string"
},
"folderUid": {
"type": "string"
},
"updated": {
"type": "string",
"format": "date-time"
},
"updatedBy": {
"$ref": "#/definitions/LibraryElementDTOMetaUser"
}
}
},
"LibraryElementDTOMetaUser": {
"type": "object",
"title": "LibraryElementDTOMetaUser is the meta information for user that creates/changes the library element.",
"properties": {
"avatarUrl": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
}
}
},
"LibraryElementResponse": {
"type": "object",
"title": "LibraryElementResponse is a response struct for LibraryElementDTO.",
"properties": {
"result": {
"$ref": "#/definitions/LibraryElementDTO"
}
}
},
"LibraryElementSearchResponse": {
"type": "object",
"title": "LibraryElementSearchResponse is a response struct for LibraryElementSearchResult.",
"properties": {
"result": {
"$ref": "#/definitions/LibraryElementSearchResult"
}
}
},
"LibraryElementSearchResult": {
"type": "object",
"title": "LibraryElementSearchResult is the search result for entities.",
"properties": {
"elements": {
"type": "array",
"items": {
"$ref": "#/definitions/LibraryElementDTO"
}
},
"page": {
"type": "integer",
"format": "int64"
},
"perPage": {
"type": "integer",
"format": "int64"
},
"totalCount": {
"type": "integer",
"format": "int64"
}
}
},
"MassDeleteAnnotationsCmd": {
"type": "object",
"properties": {
"annotationId": {
"type": "integer",
"format": "int64"
},
"dashboardId": {
"type": "integer",
"format": "int64"
},
"dashboardUID": {
"type": "string"
},
"panelId": {
"type": "integer",
"format": "int64"
}
}
},
"Metadata": {
"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.",
"type": "string",
"example": "now"
}
}
},
"MigrateQueriesToQueryHistoryCommand": {
"description": "MigrateQueriesToQueryHistoryCommand is the command used for migration of old queries into query history",
"type": "object",
"properties": {
"queries": {
"description": "Array of queries to store in query history.",
"type": "array",
"items": {
"$ref": "#/definitions/QueryToMigrate"
}
}
}
},
"NavLink": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"target": {
"type": "string"
},
"text": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"NavbarPreference": {
"type": "object",
"properties": {
"savedItems": {
"type": "array",
"items": {
"$ref": "#/definitions/NavLink"
}
}
}
},
"NewApiKeyResult": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"Notice": {
"type": "object",
"title": "Notice provides a structure for presenting notifications in Grafana's user interface.",
"properties": {
"inspect": {
"$ref": "#/definitions/InspectType"
},
"link": {
"description": "Link is an optional link for display in the user interface and can be an\nabsolute URL or a path relative to Grafana's root url.",
"type": "string"
},
"severity": {
"$ref": "#/definitions/NoticeSeverity"
},
"text": {
"description": "Text is freeform descriptive text for the notice.",
"type": "string"
}
}
},
"NoticeSeverity": {
"type": "integer",
"format": "int64",
"title": "NoticeSeverity is a type for the Severity property of a Notice."
},
"NotificationTestCommand": {
"type": "object",
"properties": {
"disableResolveMessage": {
"type": "boolean"
},
"frequency": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"secureSettings": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"sendReminder": {
"type": "boolean"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"type": "string"
}
}
},
"OrgDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
}
}
},
"OrgDetailsDTO": {
"type": "object",
"properties": {
"address": {
"$ref": "#/definitions/Address"
},
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
}
}
},
"OrgUserDTO": {
"type": "object",
"properties": {
"accessControl": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
},
"avatarUrl": {
"type": "string"
},
"email": {
"type": "string"
},
"lastSeenAt": {
"type": "string",
"format": "date-time"
},
"lastSeenAtAge": {
"type": "string"
},
"login": {
"type": "string"
},
"name": {
"type": "string"
},
"orgId": {
"type": "integer",
"format": "int64"
},
"role": {
"type": "string"
},
"userId": {
"type": "integer",
"format": "int64"
}
}
},
"PatchAnnotationsCmd": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"text": {
"type": "string"
},
"time": {
"type": "integer",
"format": "int64"
},
"timeEnd": {
"type": "integer",
"format": "int64"
}
}
},
"PatchLibraryElementCommand": {
"description": "PatchLibraryElementCommand is the command for patching a LibraryElement",
"type": "object",
"properties": {
"folderId": {
"description": "ID of the folder where the library element is stored.",
"type": "integer",
"format": "int64"
},
"folderUid": {
"description": "UID of the folder where the library element is stored.",
"type": "string"
},
"kind": {
"description": "Kind of element to create, Use 1 for library panels or 2 for c.\nDescription:\n1 - library panels\n2 - library variables",
"type": "integer",
"format": "int64",
"enum": [1, 2]
},
"model": {
"description": "The JSON model for the library element.",
"type": "object"
},
"name": {
"description": "Name of the library element.",
"type": "string"
},
"uid": {
"type": "string"
},
"version": {
"description": "Version of the library element you are updating.",
"type": "integer",
"format": "int64"
}
}
},
"PatchPrefsCmd": {
"type": "object",
"properties": {
"homeDashboardId": {
"description": "The numerical :id of a favorited dashboard",
"type": "integer",
"format": "int64",
"default": 0
},
"homeDashboardUID": {
"type": "string"
},
"navbar": {
"$ref": "#/definitions/NavbarPreference"
},
"queryHistory": {
"$ref": "#/definitions/QueryHistoryPreference"
},
"theme": {
"type": "string",
"enum": ["light", "dark"]
},
"timezone": {
"type": "string",
"enum": ["utc", "browser"]
},
"weekStart": {
"type": "string"
}
}
},
"PatchQueryCommentInQueryHistoryCommand": {
"description": "PatchQueryCommentInQueryHistoryCommand is the command for updating comment for query in query history",
"type": "object",
"properties": {
"comment": {
"description": "Updated comment",
"type": "string"
}
}
},
"PauseAlertCommand": {
"type": "object",
"properties": {
"alertId": {
"type": "integer",
"format": "int64"
},
"paused": {
"type": "boolean"
}
}
},
"PauseAllAlertsCommand": {
"type": "object",
"properties": {
"paused": {
"type": "boolean"
}
}
},
"Permission": {
"type": "object",
"title": "Permission is the model for access control permissions.",
"properties": {
"action": {
"type": "string"
},
"created": {
"type": "string",
"format": "date-time"
},
"scope": {
"type": "string"
},
"updated": {
"type": "string",
"format": "date-time"
}
}
},
"PermissionType": {
"type": "integer",
"format": "int64"
},
"PostAnnotationsCmd": {
"type": "object",
"properties": {
"dashboardId": {
"type": "integer",
"format": "int64"
},
"dashboardUID": {
"type": "string"
},
"data": {
"$ref": "#/definitions/Json"
},
"panelId": {
"type": "integer",
"format": "int64"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"text": {
"type": "string"
},
"time": {
"type": "integer",
"format": "int64"
},
"timeEnd": {
"type": "integer",
"format": "int64"
}
}
},
"PostGraphiteAnnotationsCmd": {
"type": "object",
"properties": {
"data": {
"type": "string"
},
"tags": {
"type": "object"
},
"what": {
"type": "string"
},
"when": {
"type": "integer",
"format": "int64"
}
}
},
"Prefs": {
"type": "object",
"properties": {
"homeDashboardId": {
"type": "integer",
"format": "int64"
},
"homeDashboardUID": {
"type": "string"
},
"navbar": {
"$ref": "#/definitions/NavbarPreference"
},
"queryHistory": {
"$ref": "#/definitions/QueryHistoryPreference"
},
"theme": {
"type": "string"
},
"timezone": {
"type": "string"
},
"weekStart": {
"type": "string"
}
}
},
"PrometheusRemoteWriteTargetJSON": {
"type": "object",
"properties": {
"data_source_uid": {
"type": "string"
},
"id": {
"type": "string"
},
"remote_write_path": {
"type": "string"
}
}
},
"QueryDataResponse": {
"description": "It is the return type of a QueryData call.",
"type": "object",
"title": "QueryDataResponse contains the results from a QueryDataRequest.",
"properties": {
"Responses": {
"$ref": "#/definitions/Responses"
}
}
},
"QueryHistoryDTO": {
"type": "object",
"properties": {
"comment": {
"type": "string"
},
"createdAt": {
"type": "integer",
"format": "int64"
},
"createdBy": {
"type": "integer",
"format": "int64"
},
"datasourceUid": {
"type": "string"
},
"queries": {
"$ref": "#/definitions/Json"
},
"starred": {
"type": "boolean"
},
"uid": {
"type": "string"
}
}
},
"QueryHistoryDeleteQueryResponse": {
"description": "QueryHistoryDeleteQueryResponse is the response struct for deleting a query from query history",
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string"
}
}
},
"QueryHistoryMigrationResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"starredCount": {
"type": "integer",
"format": "int64"
},
"totalCount": {
"type": "integer",
"format": "int64"
}
}
},
"QueryHistoryPreference": {
"type": "object",
"properties": {
"homeTab": {
"type": "string"
}
}
},
"QueryHistoryResponse": {
"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": {
"type": "object"
}
},
"custom": {
"description": "Panel Specific Values",
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"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",
"type": "string"
},
"displayNameFromDS": {
"description": "DisplayNameFromDS overrides Grafana default naming in a better way that allows users to override it easily.",
"type": "string"
},
"filterable": {
"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"
},
"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"
}
}
},
"QueryToMigrate": {
"type": "object",
"properties": {
"comment": {
"type": "string"
},
"createdAt": {
"type": "integer",
"format": "int64"
},
"datasourceUid": {
"type": "string"
},
"queries": {
"$ref": "#/definitions/Json"
},
"starred": {
"type": "boolean"
}
}
},
"RecordingRuleJSON": {
"description": "RecordingRuleJSON is the external representation of a recording rule",
"type": "object",
"properties": {
"active": {
"type": "boolean"
},
"count": {
"type": "boolean"
},
"description": {
"type": "string"
},
"dest_data_source_uid": {
"type": "string"
},
"id": {
"type": "string"
},
"interval": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"prom_name": {
"type": "string"
},
"queries": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object"
}
}
},
"range": {
"type": "integer",
"format": "int64"
},
"target_ref_id": {
"type": "string"
}
}
},
"ReportEmailDTO": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"emails": {
"description": "Comma-separated list of emails to which to send the report to.",
"type": "string"
},
"id": {
"description": "Send the report to the emails specified in the report. Required if emails is not present.",
"type": "string",
"format": "int64"
},
"useEmailsFromReport": {
"description": "Send the report to the emails specified in the report. Required if emails is not present.",
"type": "boolean"
}
}
},
"ReportOptionsDTO": {
"type": "object",
"properties": {
"layout": {
"type": "string"
},
"orientation": {
"type": "string"
},
"timeRange": {
"$ref": "#/definitions/TimeRangeDTO"
}
}
},
"Responses": {
"description": "The QueryData method the QueryDataHandler method will set the RefId\nproperty on the DataRespones' frames based on these RefIDs.",
"type": "object",
"title": "Responses is a map of RefIDs (Unique Query ID) to DataResponses.",
"additionalProperties": {
"$ref": "#/definitions/DataResponse"
}
},
"RestoreDashboardVersionCommand": {
"type": "object",
"properties": {
"version": {
"type": "integer",
"format": "int64"
}
}
},
"RevokeAuthTokenCmd": {
"type": "object",
"properties": {
"authTokenId": {
"type": "integer",
"format": "int64"
}
}
},
"RoleDTO": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"delegatable": {
"type": "boolean"
},
"description": {
"type": "string"
},
"displayName": {
"type": "string"
},
"group": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/Permission"
}
},
"uid": {
"type": "string"
},
"updated": {
"type": "string",
"format": "date-time"
},
"version": {
"type": "integer",
"format": "int64"
}
}
},
"SaveDashboardCommand": {
"type": "object",
"properties": {
"UpdatedAt": {
"type": "string",
"format": "date-time"
},
"dashboard": {
"$ref": "#/definitions/Json"
},
"folderId": {
"type": "integer",
"format": "int64"
},
"folderUid": {
"type": "string"
},
"isFolder": {
"type": "boolean"
},
"message": {
"type": "string"
},
"overwrite": {
"type": "boolean"
},
"userId": {
"type": "integer",
"format": "int64"
}
}
},
"ScheduleDTO": {
"type": "object",
"properties": {
"day": {
"type": "string"
},
"dayOfMonth": {
"type": "string"
},
"endDate": {
"type": "string",
"format": "date-time"
},
"frequency": {
"type": "string"
},
"hour": {
"type": "integer",
"format": "int64"
},
"intervalAmount": {
"type": "integer",
"format": "int64"
},
"intervalFrequency": {
"type": "string"
},
"minute": {
"type": "integer",
"format": "int64"
},
"startDate": {
"type": "string",
"format": "date-time"
},
"timeZone": {
"type": "string"
},
"workdaysOnly": {
"type": "boolean"
}
}
},
"SearchTeamQueryResult": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"format": "int64"
},
"perPage": {
"type": "integer",
"format": "int64"
},
"teams": {
"type": "array",
"items": {
"$ref": "#/definitions/TeamDTO"
}
},
"totalCount": {
"type": "integer",
"format": "int64"
}
}
},
"SearchUserQueryResult": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"format": "int64"
},
"perPage": {
"type": "integer",
"format": "int64"
},
"totalCount": {
"type": "integer",
"format": "int64"
},
"users": {
"type": "array",
"items": {
"$ref": "#/definitions/UserSearchHitDTO"
}
}
}
},
"SetUserRolesCommand": {
"type": "object",
"properties": {
"global": {
"type": "boolean"
},
"includeHidden": {
"type": "boolean"
},
"roleUids": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"SettingsBag": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"SettingsDTO": {
"type": "object",
"properties": {
"branding": {
"$ref": "#/definitions/BrandingOptionsDTO"
},
"id": {
"type": "integer",
"format": "int64"
},
"orgId": {
"type": "integer",
"format": "int64"
},
"userId": {
"type": "integer",
"format": "int64"
}
}
},
"Status": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"SuccessResponseBody": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"SyncResult": {
"type": "object",
"title": "SyncResult holds the result of a sync with LDAP. This gives us information on which users were updated and how.",
"properties": {
"Elapsed": {
"$ref": "#/definitions/Duration"
},
"FailedUsers": {
"type": "array",
"items": {
"$ref": "#/definitions/FailedUser"
}
},
"MissingUserIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
}
},
"Started": {
"type": "string",
"format": "date-time"
},
"UpdatedUserIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
}
}
}
},
"TagsDTO": {
"type": "object",
"title": "TagsDTO is the frontend DTO for Tag.",
"properties": {
"count": {
"type": "integer",
"format": "int64"
},
"tag": {
"type": "string"
}
}
},
"TeamDTO": {
"type": "object",
"properties": {
"accessControl": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
},
"avatarUrl": {
"type": "string"
},
"email": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"memberCount": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"orgId": {
"type": "integer",
"format": "int64"
},
"permission": {
"$ref": "#/definitions/PermissionType"
}
}
},
"TeamGroupDTO": {
"type": "object",
"properties": {
"groupId": {
"type": "string"
},
"orgId": {
"type": "integer",
"format": "int64"
},
"teamId": {
"type": "integer",
"format": "int64"
}
}
},
"TeamGroupMapping": {
"type": "object",
"properties": {
"groupId": {
"type": "string"
}
}
},
"TeamMemberDTO": {
"type": "object",
"properties": {
"auth_module": {
"type": "string"
},
"avatarUrl": {
"type": "string"
},
"email": {
"type": "string"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"login": {
"type": "string"
},
"name": {
"type": "string"
},
"orgId": {
"type": "integer",
"format": "int64"
},
"permission": {
"$ref": "#/definitions/PermissionType"
},
"teamId": {
"type": "integer",
"format": "int64"
},
"userId": {
"type": "integer",
"format": "int64"
}
}
},
"TempUserDTO": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"createdOn": {
"type": "string",
"format": "date-time"
},
"email": {
"type": "string"
},
"emailSent": {
"type": "boolean"
},
"emailSentOn": {
"type": "string",
"format": "date-time"
},
"id": {
"type": "integer",
"format": "int64"
},
"invitedByEmail": {
"type": "string"
},
"invitedByLogin": {
"type": "string"
},
"invitedByName": {
"type": "string"
},
"name": {
"type": "string"
},
"orgId": {
"type": "integer",
"format": "int64"
},
"role": {
"type": "string",
"enum": ["Viewer", "Editor", "Admin"]
},
"status": {
"$ref": "#/definitions/TempUserStatus"
},
"url": {
"type": "string"
}
}
},
"TempUserStatus": {
"type": "string"
},
"Threshold": {
"description": "Threshold a single step on the threshold list",
"type": "object",
"properties": {
"color": {
"type": "string"
},
"state": {
"type": "string"
},
"value": {
"$ref": "#/definitions/ConfFloat64"
}
}
},
"ThresholdsConfig": {
"description": "ThresholdsConfig setup thresholds",
"type": "object",
"properties": {
"mode": {
"$ref": "#/definitions/ThresholdsMode"
},
"steps": {
"description": "Must be sorted by 'value', first value is always -Infinity",
"type": "array",
"items": {
"$ref": "#/definitions/Threshold"
}
}
}
},
"ThresholdsMode": {
"description": "ThresholdsMode absolute or percentage",
"type": "string"
},
"TimeRangeDTO": {
"type": "object",
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
}
}
},
"Token": {
"type": "object",
"properties": {
"account": {
"type": "string"
},
"company": {
"type": "string"
},
"details_url": {
"type": "string"
},
"exp": {
"type": "integer",
"format": "int64"
},
"iat": {
"type": "integer",
"format": "int64"
},
"included_users": {
"type": "integer",
"format": "int64"
},
"iss": {
"type": "string"
},
"jti": {
"type": "string"
},
"lexp": {
"type": "integer",
"format": "int64"
},
"lic_exp_warn_days": {
"type": "integer",
"format": "int64"
},
"lid": {
"type": "string"
},
"limit_by": {
"type": "string"
},
"max_concurrent_user_sessions": {
"type": "integer",
"format": "int64"
},
"nbf": {
"type": "integer",
"format": "int64"
},
"prod": {
"type": "array",
"items": {
"type": "string"
}
},
"slug": {
"type": "string"
},
"status": {
"$ref": "#/definitions/TokenStatus"
},
"sub": {
"type": "string"
},
"tok_exp_warn_days": {
"type": "integer",
"format": "int64"
},
"trial": {
"type": "boolean"
},
"trial_exp": {
"type": "integer",
"format": "int64"
},
"update_days": {
"type": "integer",
"format": "int64"
},
"usage_billing": {
"type": "boolean"
}
}
},
"TokenStatus": {
"type": "integer",
"format": "int64"
},
"TrimDashboardCommand": {
"type": "object",
"properties": {
"dashboard": {
"$ref": "#/definitions/Json"
},
"meta": {
"$ref": "#/definitions/Json"
}
}
},
"TrimDashboardFullWithMeta": {
"type": "object",
"properties": {
"dashboard": {
"$ref": "#/definitions/Json"
},
"meta": {
"$ref": "#/definitions/Json"
}
}
},
"Type": {
"type": "string"
},
"UpdateAlertNotificationCommand": {
"type": "object",
"properties": {
"disableResolveMessage": {
"type": "boolean"
},
"frequency": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"isDefault": {
"type": "boolean"
},
"name": {
"type": "string"
},
"secureSettings": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"sendReminder": {
"type": "boolean"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"type": "string"
},
"uid": {
"type": "string"
}
}
},
"UpdateAlertNotificationWithUidCommand": {
"type": "object",
"properties": {
"disableResolveMessage": {
"type": "boolean"
},
"frequency": {
"type": "string"
},
"isDefault": {
"type": "boolean"
},
"name": {
"type": "string"
},
"secureSettings": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"sendReminder": {
"type": "boolean"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"type": "string"
},
"uid": {
"type": "string"
}
}
},
"UpdateAnnotationsCmd": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"text": {
"type": "string"
},
"time": {
"type": "integer",
"format": "int64"
},
"timeEnd": {
"type": "integer",
"format": "int64"
}
}
},
"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": {
"type": "object",
"properties": {
"overwrite": {
"type": "boolean"
},
"title": {
"type": "string"
},
"uid": {
"type": "string"
},
"version": {
"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"
}
}
},
"UpdateOrgQuotaCmd": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"format": "int64"
},
"target": {
"type": "string"
}
}
},
"UpdateOrgUserCommand": {
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": ["Viewer", "Editor", "Admin"]
}
}
},
"UpdatePrefsCmd": {
"type": "object",
"properties": {
"homeDashboardId": {
"description": "The numerical :id of a favorited dashboard",
"type": "integer",
"format": "int64",
"default": 0
},
"homeDashboardUID": {
"type": "string"
},
"navbar": {
"$ref": "#/definitions/NavbarPreference"
},
"queryHistory": {
"$ref": "#/definitions/QueryHistoryPreference"
},
"theme": {
"type": "string",
"enum": ["light", "dark"]
},
"timezone": {
"type": "string",
"enum": ["utc", "browser"]
},
"weekStart": {
"type": "string"
}
}
},
"UpdateRoleCommand": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"displayName": {
"type": "string"
},
"global": {
"type": "boolean"
},
"group": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/Permission"
}
},
"version": {
"type": "integer",
"format": "int64"
}
}
},
"UpdateTeamCommand": {
"type": "object",
"properties": {
"Email": {
"type": "string"
},
"Id": {
"type": "integer",
"format": "int64"
},
"Name": {
"type": "string"
}
}
},
"UpdateTeamMemberCommand": {
"type": "object",
"properties": {
"permission": {
"$ref": "#/definitions/PermissionType"
}
}
},
"UpdateUserCommand": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"login": {
"type": "string"
},
"name": {
"type": "string"
},
"theme": {
"type": "string"
}
}
},
"UpdateUserQuotaCmd": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"format": "int64"
},
"target": {
"type": "string"
}
}
},
"UserIdDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string"
}
}
},
"UserLookupDTO": {
"type": "object",
"properties": {
"avatarUrl": {
"type": "string"
},
"login": {
"type": "string"
},
"userId": {
"type": "integer",
"format": "int64"
}
}
},
"UserOrgDTO": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"orgId": {
"type": "integer",
"format": "int64"
},
"role": {
"type": "string",
"enum": ["Viewer", "Editor", "Admin"]
}
}
},
"UserProfileDTO": {
"type": "object",
"properties": {
"accessControl": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
},
"authLabels": {
"type": "array",
"items": {
"type": "string"
}
},
"avatarUrl": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"email": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"isDisabled": {
"type": "boolean"
},
"isExternal": {
"type": "boolean"
},
"isGrafanaAdmin": {
"type": "boolean"
},
"login": {
"type": "string"
},
"name": {
"type": "string"
},
"orgId": {
"type": "integer",
"format": "int64"
},
"theme": {
"type": "string"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
}
},
"UserQuotaDTO": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"format": "int64"
},
"target": {
"type": "string"
},
"used": {
"type": "integer",
"format": "int64"
},
"user_id": {
"type": "integer",
"format": "int64"
}
}
},
"UserSearchHitDTO": {
"type": "object",
"properties": {
"authLabels": {
"type": "array",
"items": {
"type": "string"
}
},
"avatarUrl": {
"type": "string"
},
"email": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"isAdmin": {
"type": "boolean"
},
"isDisabled": {
"type": "boolean"
},
"lastSeenAt": {
"type": "string",
"format": "date-time"
},
"lastSeenAtAge": {
"type": "string"
},
"login": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"UserToken": {
"description": "UserToken represents a user token",
"type": "object",
"properties": {
"AuthToken": {
"type": "string"
},
"AuthTokenSeen": {
"type": "boolean"
},
"ClientIp": {
"type": "string"
},
"CreatedAt": {
"type": "integer",
"format": "int64"
},
"Id": {
"type": "integer",
"format": "int64"
},
"PrevAuthToken": {
"type": "string"
},
"RevokedAt": {
"type": "integer",
"format": "int64"
},
"RotatedAt": {
"type": "integer",
"format": "int64"
},
"SeenAt": {
"type": "integer",
"format": "int64"
},
"UnhashedToken": {
"type": "string"
},
"UpdatedAt": {
"type": "integer",
"format": "int64"
},
"UserAgent": {
"type": "string"
},
"UserId": {
"type": "integer",
"format": "int64"
}
}
},
"ValueMapping": {
"description": "ValueMapping allows mapping input values to text and color",
"type": "object"
},
"ValueMappings": {
"type": "array",
"items": {
"$ref": "#/definitions/ValueMapping"
}
},
"VisType": {
"type": "string",
"title": "VisType is used to indicate how the data should be visualized in explore."
}
},
"responses": {
"SMTPNotEnabledError": {
"description": ""
},
"acceptedResponse": {
"description": "AcceptedResponse",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"addOrgUser": {
"description": "",
"schema": {
"type": "object",
"required": ["id", "message"],
"properties": {
"id": {
"description": "ID Identifier of the added user.",
"type": "integer",
"format": "int64",
"example": 65
},
"message": {
"description": "Message Message of the added user.",
"type": "string",
"example": "Data source added"
}
}
}
},
"badRequestError": {
"description": "BadRequestError is returned when the request is invalid and it cannot be processed.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"conflictError": {
"description": "ConflictError",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"contentResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8"
}
}
},
"createAnnotationResponse": {
"description": "",
"schema": {
"type": "object",
"required": ["id", "message"],
"properties": {
"id": {
"description": "ID Identifier of the created annotation.",
"type": "integer",
"format": "int64",
"example": 65
},
"message": {
"description": "Message Message of the created annotation.",
"type": "string"
}
}
}
},
"createOrUpdateDatasourceResponse": {
"description": "",
"schema": {
"type": "object",
"required": ["id", "name", "message", "datasource"],
"properties": {
"datasource": {
"$ref": "#/definitions/DataSource"
},
"id": {
"description": "ID Identifier of the new data source.",
"type": "integer",
"format": "int64",
"example": 65
},
"message": {
"description": "Message Message of the deleted dashboard.",
"type": "string",
"example": "Data source added"
},
"name": {
"description": "Name of the new data source.",
"type": "string",
"example": "My Data source"
}
}
}
},
"createOrgResponse": {
"description": "",
"schema": {
"type": "object",
"required": ["orgId", "message"],
"properties": {
"message": {
"description": "Message Message of the created org.",
"type": "string",
"example": "Data source added"
},
"orgId": {
"description": "ID Identifier of the created org.",
"type": "integer",
"format": "int64",
"example": 65
}
}
}
},
"createReportResponse": {
"description": "",
"schema": {
"type": "object"
}
},
"createSnapshotResponse": {
"description": "",
"schema": {
"type": "object",
"properties": {
"deleteKey": {
"description": "Unique key used to delete the snapshot. It is different from the key so that only the creator can delete the snapshot.",
"type": "string"
},
"deleteUrl": {
"type": "string"
},
"id": {
"description": "Snapshot id",
"type": "integer",
"format": "int64"
},
"key": {
"description": "Unique key",
"type": "string"
},
"url": {
"type": "string"
}
}
}
},
"createTeamResponse": {
"description": "",
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"teamId": {
"type": "integer",
"format": "int64"
}
}
}
},
"createUserResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/UserIdDTO"
}
},
"dashboardDiffResponse": {
"description": "Calculate dashboard diff response.",
"schema": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8"
}
}
},
"dashboardResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/DashboardFullWithMeta"
}
},
"dashboardVersionResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/DashboardVersionMeta"
}
},
"dashboardVersionsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/DashboardVersionDTO"
}
}
},
"dashboardsTagsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/DashboardTagCloudItem"
}
}
},
"deleteAlertNotificationChannelResponse": {
"description": "",
"schema": {
"type": "object",
"required": ["id", "message"],
"properties": {
"id": {
"description": "ID Identifier of the deleted notification channel.",
"type": "integer",
"format": "int64",
"example": 65
},
"message": {
"description": "Message Message of the deleted notificatiton channel.",
"type": "string"
}
}
}
},
"deleteDashboardResponse": {
"description": "",
"schema": {
"type": "object",
"required": ["id", "title", "message"],
"properties": {
"id": {
"description": "ID Identifier of the deleted dashboard.",
"type": "integer",
"format": "int64",
"example": 65
},
"message": {
"description": "Message Message of the deleted dashboard.",
"type": "string",
"example": "Dashboard My Dashboard deleted"
},
"title": {
"description": "Title Title of the deleted dashboard.",
"type": "string",
"example": "My Dashboard"
}
}
}
},
"deleteDatasourceByNameResponse": {
"description": "",
"schema": {
"type": "object",
"required": ["id", "message"],
"properties": {
"id": {
"description": "ID Identifier of the deleted data source.",
"type": "integer",
"format": "int64",
"example": 65
},
"message": {
"description": "Message Message of the deleted dashboard.",
"type": "string",
"example": "Dashboard My Dashboard deleted"
}
}
}
},
"deleteFolderResponse": {
"description": "",
"schema": {
"type": "object",
"required": ["id", "title", "message"],
"properties": {
"id": {
"description": "ID Identifier of the deleted folder.",
"type": "integer",
"format": "int64",
"example": 65
},
"message": {
"description": "Message Message of the deleted folder.",
"type": "string",
"example": "Folder My Folder deleted"
},
"title": {
"description": "Title of the deleted folder.",
"type": "string",
"example": "My Folder"
}
}
}
},
"folderResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/Folder"
}
},
"forbiddenError": {
"description": "ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"genericError": {
"description": "A GenericError is the default error message that is generated.\nFor certain status codes there are more appropriate error structures.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"getAPIkeyResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/ApiKeyDTO"
}
}
},
"getAccessControlStatusResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/Status"
}
},
"getAlertNotificationChannelResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/AlertNotification"
}
},
"getAlertNotificationChannelsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertNotification"
}
}
},
"getAlertResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Alert"
}
}
},
"getAlertsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertListItemDTO"
}
}
},
"getAllRolesResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/RoleDTO"
}
}
},
"getAnnotationResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/ItemDTO"
}
},
"getAnnotationTagsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/GetAnnotationTagsResponse"
}
},
"getAnnotationsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/ItemDTO"
}
}
},
"getAuthTokensResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/UserToken"
}
}
},
"getCustomPermissionsReportResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/CustomPermissionsRecordDTO"
}
}
},
"getDashboardPermissionsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/DashboardAclInfoDTO"
}
}
},
"getDashboardStatesResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertStateInfoDTO"
}
}
},
"getDatasourceIDresponse": {
"description": "",
"schema": {
"type": "object",
"required": ["id"],
"properties": {
"id": {
"description": "ID Identifier of the data source.",
"type": "integer",
"format": "int64",
"example": 65
}
}
}
},
"getDatasourceResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/DataSource"
}
},
"getDatasourcesResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/DataSourceList"
}
},
"getFoldersResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/FolderSearchHit"
}
}
},
"getHomeDashboardResponse": {
"description": "Home dashboard response.",
"schema": {
"$ref": "#/definitions/GetHomeDashboardResponse"
}
},
"getInvitesResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/TempUserDTO"
}
}
},
"getLDAPSyncStatusResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/ActiveSyncStatusDTO"
}
},
"getLibraryElementConnectionsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/LibraryElementConnectionsResponse"
}
},
"getLibraryElementResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/LibraryElementResponse"
}
},
"getLibraryElementsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/LibraryElementSearchResponse"
}
},
"getLicenseStatusResponse": {
"description": ""
},
"getLicenseTokenResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/Token"
}
},
"getOrgResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/OrgDetailsDTO"
}
},
"getOrgUsersResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/OrgUserDTO"
}
}
},
"getPermissionseResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/AddPermissionDTO"
}
},
"getPreferencesResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/Prefs"
}
},
"getQueryHistoryDeleteQueryResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/QueryHistoryDeleteQueryResponse"
}
},
"getQueryHistoryMigrationResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/QueryHistoryMigrationResponse"
}
},
"getQueryHistoryResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/QueryHistoryResponse"
}
},
"getQueryHistorySearchResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/QueryHistorySearchResponse"
}
},
"getQuotaResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/UserQuotaDTO"
}
}
},
"getReportResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/ConfigDTO"
}
},
"getReportSettingsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/SettingsDTO"
}
},
"getReportsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfigDTO"
}
}
},
"getRoleResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/RoleDTO"
}
},
"getSettingsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/SettingsBag"
}
},
"getSnapshotSharingOptionsResponse": {
"description": "",
"schema": {
"type": "object",
"properties": {
"externalEnabled": {
"type": "boolean"
},
"externalSnapshotName": {
"type": "string"
},
"externalSnapshotURL": {
"type": "string"
}
}
}
},
"getSnapshotsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/DashboardSnapshotDTO"
}
}
},
"getStatsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/AdminStats"
}
},
"getTeamGroupsApiResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/TeamGroupDTO"
}
}
},
"getTeamMembersResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/TeamMemberDTO"
}
}
},
"getTeamResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/TeamDTO"
}
},
"getUserOrgListResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/UserOrgDTO"
}
}
},
"getUserTeamsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/TeamDTO"
}
}
},
"helpFlagResponse": {
"description": "",
"schema": {
"type": "object",
"properties": {
"helpFlags1": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string"
}
}
}
},
"importDashboardResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/ImportDashboardResponse"
}
},
"internalServerError": {
"description": "InternalServerError is a general error indicating something went wrong internally.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"listBuiltinRolesResponse": {
"description": "",
"schema": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/RoleDTO"
}
}
}
},
"listRecordingRulesResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/RecordingRuleJSON"
}
}
},
"lookupAlertNotificationChannelsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertNotificationLookup"
}
}
},
"lookupOrgUsersResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/UserLookupDTO"
}
}
},
"notFoundError": {
"description": "NotFoundError is returned when the requested resource was not found.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"okResponse": {
"description": "An OKResponse is returned if the request was successful.",
"schema": {
"$ref": "#/definitions/SuccessResponseBody"
}
},
"pauseAlertResponse": {
"description": "",
"schema": {
"type": "object",
"required": ["alertId", "message"],
"properties": {
"alertId": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string"
},
"state": {
"description": "Alert result state\nrequired true",
"type": "string"
}
}
}
},
"pauseAlertsResponse": {
"description": "",
"schema": {
"type": "object",
"required": ["alertsAffected", "message"],
"properties": {
"alertsAffected": {
"description": "AlertsAffected is the number of the affected alerts.",
"type": "integer",
"format": "int64"
},
"message": {
"type": "string"
},
"state": {
"description": "Alert result state\nrequired true",
"type": "string"
}
}
}
},
"postAPIkeyResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/NewApiKeyResult"
}
},
"postDashboardResponse": {
"description": "Create/update dashboard response.",
"schema": {
"type": "object",
"required": ["status", "title", "version", "id", "uid", "url"],
"properties": {
"id": {
"description": "ID The unique identifier (id) of the created/updated dashboard.",
"type": "string",
"example": "1"
},
"status": {
"description": "Status status of the response.",
"type": "string",
"example": "success"
},
"title": {
"description": "Slug The slug of the dashboard.",
"type": "string",
"example": "my-dashboard"
},
"uid": {
"description": "UID The unique identifier (uid) of the created/updated dashboard.",
"type": "string",
"example": "nHz3SXiiz"
},
"url": {
"description": "URL The relative URL for accessing the created/updated dashboard.",
"type": "string",
"example": "/d/nHz3SXiiz/my-dashboard"
},
"version": {
"description": "Version The version of the dashboard.",
"type": "integer",
"format": "int64",
"example": 2
}
}
}
},
"postRenewLicenseTokenResponse": {
"description": ""
},
"preconditionFailedError": {
"description": "PreconditionFailedError",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"queryDataResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/QueryDataResponse"
}
},
"recordingRuleResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/RecordingRuleJSON"
}
},
"recordingRuleWriteTargetResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/PrometheusRemoteWriteTargetJSON"
}
},
"refreshLicenseStatsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/ActiveUserStats"
}
},
"searchOrgResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/OrgDTO"
}
}
},
"searchResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/HitList"
}
},
"searchSortingResponse": {
"description": "",
"schema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"displayName": {
"type": "string"
},
"meta": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
},
"searchTeamsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/SearchTeamQueryResult"
}
},
"searchUsersResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/SearchUserQueryResult"
}
},
"snapshotResponse": {
"description": ""
},
"testAlertResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/AlertTestResult"
}
},
"trimDashboardResponse": {
"description": "Trimmed dashboard response.",
"schema": {
"$ref": "#/definitions/TrimDashboardFullWithMeta"
}
},
"unauthorisedError": {
"description": "UnauthorizedError is returned when the request is not authenticated.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"unprocessableEntityError": {
"description": "UnprocessableEntityError",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"userResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/UserProfileDTO"
}
}
},
"securityDefinitions": {
"api_key": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
},
"basic": {
"type": "basic"
}
},
"security": [
{
"basic": []
},
{
"api_key": []
}
],
"tags": [
{
"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.\n\nThe General folder (id=0) is special and is not part of the Folder API which means that you cannot use this API for retrieving information about the General folder.",
"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": "current_org_details"
},
{
"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.",
"name": "reports"
},
{
"description": "Grafana Alerting Alertmanager-compatible endpoints",
"name": "alertmanager"
},
{
"description": "Grafana Alerting endpoints for managing rules",
"name": "ruler"
},
{
"description": "Grafana Alerting testing endpoints",
"name": "testing"
},
{
"description": "Grafana Alerting Prometheus-compatible endpoints",
"name": "prometheus"
}
]
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...