Raw File
{
  "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"
    },
    "version": "0.0.1"
  },
  "basePath": "/api",
  "paths": {
    "/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:read` and scope `roles:*`.",
        "tags": [
          "access_control",
          "enterprise"
        ],
        "summary": "Get all roles.",
        "operationId": "listRoles",
        "parameters": [
          {
            "type": "boolean",
            "name": "delegatable",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/listRolesResponse"
          },
          "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": "createRole",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateRoleForm"
            }
          }
        ],
        "responses": {
          "201": {
            "$ref": "#/responses/createRoleResponse"
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/access-control/roles/{roleUID}": {
      "get": {
        "description": "Get a role for the given UID.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.",
        "tags": [
          "access_control",
          "enterprise"
        ],
        "summary": "Get a role.",
        "operationId": "getRole",
        "parameters": [
          {
            "type": "string",
            "name": "roleUID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getRoleResponse"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "put": {
        "description": "You need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.",
        "tags": [
          "access_control",
          "enterprise"
        ],
        "summary": "Update a custom role.",
        "operationId": "updateRole",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateRoleCommand"
            }
          },
          {
            "type": "string",
            "name": "roleUID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getRoleResponse"
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "delete": {
        "description": "Delete a role with the given UID, and it’s permissions. If the role is assigned to a built-in role, the deletion operation will fail, unless force query param is set to true, and in that case all assignments will also be deleted.\n\nYou need to have a permission with action `roles:delete` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only delete a custom role with the same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to delete a custom role which allows to do that.",
        "tags": [
          "access_control",
          "enterprise"
        ],
        "summary": "Delete a custom role.",
        "operationId": "deleteRole",
        "parameters": [
          {
            "type": "boolean",
            "name": "force",
            "in": "query"
          },
          {
            "type": "boolean",
            "name": "global",
            "in": "query"
          },
          {
            "type": "string",
            "name": "roleUID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/okResponse"
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/access-control/roles/{roleUID}/assignments": {
      "get": {
        "description": "Get role assignments for the role with the given UID.\n\nYou need to have a permission with action `teams.roles:list` and scope `teams:id:*` and `users.roles:list` and scope `users:id:*`.",
        "tags": [
          "access_control",
          "enterprise"
        ],
        "summary": "Get role assignments.",
        "operationId": "getRoleAssignments",
        "parameters": [
          {
            "type": "string",
            "name": "roleUID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getRoleAssignmentsResponse"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "put": {
        "description": "Set role assignments for the role with the given UID.\n\nYou need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate`, and `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate`.",
        "tags": [
          "access_control",
          "enterprise"
        ],
        "summary": "Set role assignments.",
        "operationId": "setRoleAssignments",
        "parameters": [
          {
            "type": "string",
            "name": "roleUID",
            "in": "path",
            "required": true
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SetRoleAssignmentsCommand"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/setRoleAssignmentsResponse"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/access-control/status": {
      "get": {
        "description": "Returns an indicator to check if fine-grained access control is enabled or not.\n\nYou need to have a permission with action `status:accesscontrol` and scope `services:accesscontrol`.",
        "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:read` 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:read` and scope `users:id:\u003cuser ID\u003e`.",
        "tags": [
          "access_control",
          "enterprise"
        ],
        "summary": "List roles assigned to a user.",
        "operationId": "listUserRoles",
        "parameters": [
          {
            "type": "integer",
            "format": "int64",
            "name": "userId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getAllRolesResponse"
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "put": {
        "description": "Update the user’s role assignments to match the provided set of UIDs. This will remove any assigned roles that aren’t in the request and add roles that are in the set but are not already assigned to the user.\nIf you want to add or remove a single role, consider using Add a user role assignment or Remove a user role assignment instead.\n\nYou need to have a permission with action `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate` for each. `permissions:type:delegate`  scope ensures that users can only assign or unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign or unassign a role which will allow to do that. This is done to prevent escalation of privileges.",
        "tags": [
          "access_control",
          "enterprise"
        ],
        "summary": "Set user role assignments.",
        "operationId": "setUserRoles",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SetUserRolesCommand"
            }
          },
          {
            "type": "integer",
            "format": "int64",
            "name": "userId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/okResponse"
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "post": {
        "description": "Assign a role to a specific user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:add` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only assign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign a role which will allow to do that. This is done to prevent escalation of privileges.",
        "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": "Returns the current state of the LDAP background sync integration.",
        "operationId": "getSyncStatus",
        "responses": {
          "200": {
            "$ref": "#/responses/getSyncStatusResponse"
          },
          "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": "reloadLDAPCfg",
        "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": "postSyncUserWithLDAP",
        "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": "getUserFromLDAP",
        "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/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": "adminProvisioningReloadDashboards",
        "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": "adminProvisioningReloadDatasources",
        "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": "adminProvisioningReloadNotifications",
        "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": "adminProvisioningReloadPlugins",
        "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": "adminGetSettings",
        "responses": {
          "200": {
            "$ref": "#/responses/adminGetSettingsResponse"
          },
          "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": "adminGetStats",
        "responses": {
          "200": {
            "$ref": "#/responses/adminGetStatsResponse"
          },
          "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": "adminCreateUser",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/AdminCreateUserForm"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/adminCreateUserResponse"
          },
          "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": "adminDeleteUser",
        "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": "adminGetUserAuthTokens",
        "parameters": [
          {
            "type": "integer",
            "format": "int64",
            "name": "user_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/adminGetUserAuthTokensResponse"
          },
          "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": "adminDisableUser",
        "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": "adminEnableUser",
        "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": "adminLogoutUser",
        "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": "adminUpdateUserPassword",
        "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": "adminUpdateUserPermissions",
        "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": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateUserQuotaCmd"
            }
          },
          {
            "type": "string",
            "name": "quota_target",
            "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"
          }
        }
      }
    },
    "/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": "adminRevokeUserAuthToken",
        "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": "getAlertNotificationLookup",
        "responses": {
          "200": {
            "$ref": "#/responses/getAlertNotificationLookupResponse"
          },
          "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": "string",
            "description": "Find annotations that are scoped to a specific dashboard",
            "name": "dashboardUID",
            "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": "postAnnotation",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostAnnotationsCmd"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/postAnnotationResponse"
          },
          "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": "postGraphiteAnnotation",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PostGraphiteAnnotationsCmd"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/postAnnotationResponse"
          },
          "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": "getAnnotationByID",
        "parameters": [
          {
            "type": "string",
            "name": "annotation_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getAnnotationByIDResponse"
          },
          "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": "deleteAnnotationByID",
        "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/AddCommand"
            }
          }
        ],
        "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": "searchDashboardSnapshots",
        "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/searchDashboardSnapshotsResponse"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/dashboards/calculate-diff": {
      "post": {
        "produces": [
          "application/json",
          "text/html"
        ],
        "tags": [
          "dashboards"
        ],
        "summary": "Perform diff on two dashboards.",
        "operationId": "calculateDashboardDiff",
        "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/calculateDashboardDiffResponse"
          },
          "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/getDashboardPermissionsListByUID) instead",
        "tags": [
          "dashboard_permissions"
        ],
        "summary": "Gets all existing permissions for the given dashboard.",
        "operationId": "getDashboardPermissionsListByID",
        "deprecated": true,
        "parameters": [
          {
            "type": "integer",
            "format": "int64",
            "name": "DashboardID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getDashboardPermissionsListResponse"
          },
          "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/updateDashboardPermissionsByUID) 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": "updateDashboardPermissionsByID",
        "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": "restoreDashboardVersionByID",
        "deprecated": true,
        "parameters": [
          {
            "name": "Body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/RestoreDashboardVersionCommand"
            }
          },
          {
            "type": "integer",
            "format": "int64",
            "name": "DashboardID",
            "in": "path",
            "required": true
          }
        ],
        "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": "getDashboardVersionsByID",
        "deprecated": true,
        "parameters": [
          {
            "type": "integer",
            "format": "int64",
            "name": "DashboardID",
            "in": "path",
            "required": true
          }
        ],
        "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": "getDashboardVersionByID",
        "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/getDashboardsTagsResponse"
          },
          "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": "getDashboardPermissionsListByUID",
        "parameters": [
          {
            "type": "string",
            "name": "uid",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getDashboardPermissionsListResponse"
          },
          "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": "updateDashboardPermissionsByUID",
        "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": [
          {
            "name": "Body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/RestoreDashboardVersionCommand"
            }
          },
          {
            "type": "string",
            "name": "uid",
            "in": "path",
            "required": true
          }
        ],
        "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": "integer",
            "format": "int64",
            "name": "DashboardVersionID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "uid",
            "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/correlations": {
      "get": {
        "tags": [
          "correlations"
        ],
        "summary": "Gets all correlations.",
        "operationId": "getCorrelations",
        "responses": {
          "200": {
            "$ref": "#/responses/getCorrelationsResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "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": "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": "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/{sourceUID}/correlations": {
      "get": {
        "tags": [
          "correlations"
        ],
        "summary": "Gets all correlations originating from the given data source.",
        "operationId": "getCorrelationsBySourceUID",
        "parameters": [
          {
            "type": "string",
            "name": "sourceUID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getCorrelationsBySourceUIDResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "correlations"
        ],
        "summary": "Add correlation.",
        "operationId": "createCorrelation",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateCorrelationCommand"
            }
          },
          {
            "type": "string",
            "name": "sourceUID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/createCorrelationResponse"
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/datasources/uid/{sourceUID}/correlations/{correlationUID}": {
      "get": {
        "tags": [
          "correlations"
        ],
        "summary": "Gets a correlation.",
        "operationId": "getCorrelation",
        "parameters": [
          {
            "type": "string",
            "name": "sourceUID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "correlationUID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getCorrelationResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "patch": {
        "tags": [
          "correlations"
        ],
        "summary": "Updates a correlation.",
        "operationId": "updateCorrelation",
        "parameters": [
          {
            "type": "string",
            "name": "sourceUID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "correlationUID",
            "in": "path",
            "required": true
          },
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/UpdateCorrelationCommand"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/updateCorrelationResponse"
          },
          "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}/correlations/{correlationUID}": {
      "delete": {
        "tags": [
          "correlations"
        ],
        "summary": "Delete a correlation.",
        "operationId": "deleteCorrelation",
        "parameters": [
          {
            "type": "string",
            "name": "uid",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "correlationUID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/deleteCorrelationResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/datasources/uid/{uid}/health": {
      "get": {
        "tags": [
          "datasources"
        ],
        "summary": "Sends a health check request to the plugin datasource identified by the UID.",
        "operationId": "checkDatasourceHealthWithUID",
        "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": "callDatasourceResourceWithUID",
        "parameters": [
          {
            "type": "string",
            "name": "datasource_proxy_route",
            "in": "path",
            "required": true
          },
          {
            "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"
          }
        }
      }
    },
    "/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": "getAllPermissions",
        "parameters": [
          {
            "type": "string",
            "name": "datasourceId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getAllPermissionseResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "post": {
        "description": "You 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": "Add permissions for a data source.",
        "operationId": "addPermission",
        "parameters": [
          {
            "type": "integer",
            "format": "int64",
            "name": "userId",
            "in": "query"
          },
          {
            "type": "integer",
            "format": "int64",
            "name": "teamId",
            "in": "query"
          },
          {
            "type": "string",
            "name": "builtinRole",
            "in": "query"
          },
          {
            "type": "integer",
            "format": "int64",
            "name": "permission",
            "in": "query"
          },
          {
            "type": "string",
            "name": "datasourceId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/addPermissionResponse"
          },
          "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"
          }
        }
      }
    },
    "/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/checkDatasourceHealthWithUID) instead",
        "tags": [
          "datasources"
        ],
        "summary": "Sends a health check request to the plugin datasource identified by the 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/callDatasourceResourceWithUID) instead",
        "tags": [
          "datasources"
        ],
        "summary": "Fetch data source resources by Id.",
        "operationId": "callDatasourceResourceByID",
        "deprecated": true,
        "parameters": [
          {
            "type": "string",
            "name": "datasource_proxy_route",
            "in": "path",
            "required": true
          },
          {
            "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"
          },
          "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": "DataSource query metrics with expressions.",
        "operationId": "queryMetricsWithExpressions",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/MetricRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/queryMetricsWithExpressionsRespons"
          },
          "207": {
            "$ref": "#/responses/queryMetricsWithExpressionsRespons"
          },
          "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": {
            "$ref": "#/responses/folderResponse"
          },
          "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": "getFolderPermissionList",
        "parameters": [
          {
            "type": "string",
            "name": "folder_uid",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getFolderPermissionListResponse"
          },
          "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": "getStatus",
        "responses": {
          "200": {
            "$ref": "#/responses/getStatusResponse"
          }
        }
      }
    },
    "/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"
          }
        }
      }
    },
    "/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": {
        "tags": [
          "org"
        ],
        "summary": "Get current Organization.",
        "operationId": "getCurrentOrg",
        "responses": {
          "200": {
            "$ref": "#/responses/getCurrentOrgResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "org"
        ],
        "summary": "Update current Organization.",
        "operationId": "updateCurrentOrg",
        "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": [
          "org"
        ],
        "summary": "Update current Organization's address.",
        "operationId": "updateCurrentOrgAddress",
        "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": "getPendingOrgInvites",
        "responses": {
          "200": {
            "$ref": "#/responses/getPendingOrgInvitesResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "org_invites"
        ],
        "summary": "Add invite.",
        "operationId": "addOrgInvite",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/AddInviteForm"
            }
          }
        ],
        "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"
          }
        }
      }
    },
    "/org/invites/{invitation_code}/revoke": {
      "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"
          }
        }
      }
    },
    "/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/okResponse"
          },
          "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/okResponse"
          },
          "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": [
          "org"
        ],
        "summary": "Get all users within the current organization.",
        "operationId": "getOrgUsersForCurrentOrg",
        "responses": {
          "200": {
            "$ref": "#/responses/getOrgUsersForCurrentOrgResponse"
          },
          "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": [
          "org"
        ],
        "summary": "Add a new user to the current organization.",
        "operationId": "addOrgUserToCurrentOrg",
        "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": [
          "org"
        ],
        "summary": "Get all users within the current organization (lookup)",
        "operationId": "getOrgUsersForCurrentOrgLookup",
        "parameters": [
          {
            "type": "string",
            "name": "query",
            "in": "query"
          },
          {
            "type": "integer",
            "format": "int64",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getOrgUsersForCurrentOrgLookupResponse"
          },
          "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": [
          "org"
        ],
        "summary": "Delete user in current organization.",
        "operationId": "removeOrgUserForCurrentOrg",
        "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": [
          "org"
        ],
        "summary": "Updates the given user.",
        "operationId": "updateOrgUserForCurrentOrg",
        "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"
          }
        }
      }
    },
    "/orgs": {
      "get": {
        "security": [
          {
            "basic": []
          }
        ],
        "tags": [
          "orgs"
        ],
        "summary": "Search all Organizations.",
        "operationId": "searchOrgs",
        "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/searchOrgsResponse"
          },
          "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/getOrgByNameResponse"
          },
          "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/getOrgByIDResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "put": {
        "security": [
          {
            "basic": []
          }
        ],
        "tags": [
          "orgs"
        ],
        "summary": "Update Organization.",
        "operationId": "updateOrg",
        "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": "deleteOrgByID",
        "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": "updateOrgAddress",
        "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).",
        "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": "getOrgUsers",
        "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": "addOrgUser",
        "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": "removeOrgUser",
        "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": "updateOrgUser",
        "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"
          }
        }
      }
    },
    "/playlists": {
      "get": {
        "tags": [
          "playlists"
        ],
        "summary": "Get playlists.",
        "operationId": "searchPlaylists",
        "parameters": [
          {
            "type": "string",
            "name": "query",
            "in": "query"
          },
          {
            "type": "integer",
            "format": "int64",
            "description": "in:limit",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/searchPlaylistsResponse"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "playlists"
        ],
        "summary": "Create playlist.",
        "operationId": "createPlaylist",
        "parameters": [
          {
            "name": "Body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreatePlaylistCommand"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/createPlaylistResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/playlists/{uid}": {
      "get": {
        "tags": [
          "playlists"
        ],
        "summary": "Get playlist.",
        "operationId": "getPlaylist",
        "parameters": [
          {
            "type": "string",
            "name": "uid",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getPlaylistResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "playlists"
        ],
        "summary": "Update playlist.",
        "operationId": "updatePlaylist",
        "parameters": [
          {
            "name": "Body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdatePlaylistCommand"
            }
          },
          {
            "type": "string",
            "name": "uid",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/updatePlaylistResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "playlists"
        ],
        "summary": "Delete playlist.",
        "operationId": "deletePlaylist",
        "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"
          }
        }
      }
    },
    "/playlists/{uid}/dashboards": {
      "get": {
        "tags": [
          "playlists"
        ],
        "summary": "Get playlist dashboards.",
        "operationId": "getPlaylistDashboards",
        "parameters": [
          {
            "type": "string",
            "name": "uid",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getPlaylistDashboardsResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/playlists/{uid}/items": {
      "get": {
        "tags": [
          "playlists"
        ],
        "summary": "Get playlist items.",
        "operationId": "getPlaylistItems",
        "parameters": [
          {
            "type": "string",
            "name": "uid",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getPlaylistItemsResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "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": "Lists all rules in the database: active or deleted.",
        "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 the active status of a 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 recording rule that is then registered and started.",
        "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": "Return the prometheus remote 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": {
        "description": "It returns a 422 if there is not an existing prometheus data source configured.",
        "tags": [
          "recording_rules",
          "enterprise"
        ],
        "summary": "Create a remote 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 remote 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 removes the rule from the registry and stops it.",
        "operationId": "deleteRecordingRule",
        "parameters": [
          {
            "type": "integer",
            "format": "int64",
            "name": "recordingRuleID",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/okResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/reports": {
      "get": {
        "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports:read` with scope `reports:*`.",
        "tags": [
          "reports",
          "enterprise"
        ],
        "summary": "List reports.",
        "operationId": "getReports",
        "responses": {
          "200": {
            "$ref": "#/responses/getReportsResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "post": {
        "description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports.admin:create`.",
        "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
          },
          {
            "type": "integer",
            "format": "int64",
            "name": "dashboardID",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "name": "title",
            "in": "query"
          },
          {
            "type": "string",
            "name": "variables",
            "in": "query"
          },
          {
            "type": "string",
            "name": "from",
            "in": "query"
          },
          {
            "type": "string",
            "name": "to",
            "in": "query"
          },
          {
            "type": "string",
            "name": "orientation",
            "in": "query"
          },
          {
            "type": "string",
            "name": "layout",
            "in": "query"
          }
        ],
        "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",
        "parameters": [
          {
            "type": "string",
            "name": "dashboardID",
            "in": "query"
          },
          {
            "type": "string",
            "name": "orientation",
            "in": "query"
          },
          {
            "type": "string",
            "name": "layout",
            "in": "query"
          }
        ],
        "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/{id}": {
      "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": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getReportResponse"
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "put": {
        "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.admin:write` with scope `reports:id:\u003creport ID\u003e`.",
        "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": "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"
          }
        }
      },
      "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": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/okResponse"
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/saml/acs": {
      "post": {
        "tags": [
          "saml",
          "enterprise"
        ],
        "summary": "It performs assertion Consumer Service (ACS).",
        "operationId": "postACS",
        "parameters": [
          {
            "type": "string",
            "name": "RelayState",
            "in": "query"
          }
        ],
        "responses": {
          "302": {
            "description": ""
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/saml/metadata": {
      "get": {
        "produces": [
          "application/xml;application/samlmetadata+xml"
        ],
        "tags": [
          "saml",
          "enterprise"
        ],
        "summary": "It exposes the SP (Grafana's) metadata for the IdP's consumption.",
        "operationId": "getMetadata",
        "responses": {
          "200": {
            "$ref": "#/responses/contentResponse"
          }
        }
      }
    },
    "/saml/slo": {
      "get": {
        "description": "There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.",
        "tags": [
          "saml",
          "enterprise"
        ],
        "summary": "It performs Single Logout (SLO) callback.",
        "operationId": "getSLO",
        "responses": {
          "302": {
            "description": ""
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "post": {
        "description": "There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.",
        "tags": [
          "saml",
          "enterprise"
        ],
        "summary": "It performs Single Logout (SLO) callback.",
        "operationId": "postSLO",
        "parameters": [
          {
            "type": "string",
            "name": "SAMLRequest",
            "in": "query"
          },
          {
            "type": "string",
            "name": "SAMLResponse",
            "in": "query"
          }
        ],
        "responses": {
          "302": {
            "description": ""
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/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": "string"
            },
            "description": "List of dashboard uid’s to search for",
            "name": "dashboardUIDs",
            "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": {
        "tags": [
          "search"
        ],
        "summary": "List search sorting options.",
        "operationId": "listSortOptions",
        "responses": {
          "200": {
            "$ref": "#/responses/listSortOptionsResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          }
        }
      }
    },
    "/serviceaccounts": {
      "post": {
        "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:*`\n\nRequires basic authentication and that the authenticated user is a Grafana Admin.",
        "tags": [
          "service_accounts"
        ],
        "summary": "Create service account",
        "operationId": "createServiceAccount",
        "parameters": [
          {
            "name": "Body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/CreateServiceAccountForm"
            }
          }
        ],
        "responses": {
          "201": {
            "$ref": "#/responses/createServiceAccountResponse"
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/serviceaccounts/search": {
      "get": {
        "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:read` scope: `serviceaccounts:*`",
        "tags": [
          "service_accounts"
        ],
        "summary": "Search service accounts with paging",
        "operationId": "searchOrgServiceAccountsWithPaging",
        "parameters": [
          {
            "type": "boolean",
            "name": "Disabled",
            "in": "query"
          },
          {
            "type": "boolean",
            "name": "expiredTokens",
            "in": "query"
          },
          {
            "type": "string",
            "description": "It will return results where the query value is contained in one of the name.\nQuery values with spaces need to be URL encoded.",
            "name": "query",
            "in": "query"
          },
          {
            "type": "integer",
            "format": "int64",
            "description": "The default value is 1000.",
            "name": "perpage",
            "in": "query"
          },
          {
            "type": "integer",
            "format": "int64",
            "description": "The default value is 1.",
            "name": "page",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/searchOrgServiceAccountsWithPagingResponse"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/serviceaccounts/{serviceAccountId}": {
      "get": {
        "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:read` scope: `serviceaccounts:id:1` (single service account)",
        "tags": [
          "service_accounts"
        ],
        "summary": "Get single serviceaccount by Id",
        "operationId": "retrieveServiceAccount",
        "parameters": [
          {
            "type": "integer",
            "format": "int64",
            "name": "serviceAccountId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/retrieveServiceAccountResponse"
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "delete": {
        "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:delete` scope: `serviceaccounts:id:1` (single service account)",
        "tags": [
          "service_accounts"
        ],
        "summary": "Delete service account",
        "operationId": "deleteServiceAccount",
        "parameters": [
          {
            "type": "integer",
            "format": "int64",
            "name": "serviceAccountId",
            "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": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account)",
        "tags": [
          "service_accounts"
        ],
        "summary": "Update service account",
        "operationId": "updateServiceAccount",
        "parameters": [
          {
            "type": "integer",
            "format": "int64",
            "name": "serviceAccountId",
            "in": "path",
            "required": true
          },
          {
            "name": "Body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/UpdateServiceAccountForm"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/updateServiceAccountResponse"
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/serviceaccounts/{serviceAccountId}/tokens": {
      "get": {
        "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:read` scope: `global:serviceaccounts:id:1` (single service account)\n\nRequires basic authentication and that the authenticated user is a Grafana Admin.",
        "tags": [
          "service_accounts"
        ],
        "summary": "Get service account tokens",
        "operationId": "listTokens",
        "parameters": [
          {
            "type": "integer",
            "format": "int64",
            "name": "serviceAccountId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/listTokensResponse"
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "post": {
        "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account)",
        "tags": [
          "service_accounts"
        ],
        "summary": "CreateNewToken adds a token to a service account",
        "operationId": "createToken",
        "parameters": [
          {
            "type": "integer",
            "format": "int64",
            "name": "serviceAccountId",
            "in": "path",
            "required": true
          },
          {
            "name": "Body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/AddServiceAccountTokenCommand"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/createTokenResponse"
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "401": {
            "$ref": "#/responses/unauthorisedError"
          },
          "403": {
            "$ref": "#/responses/forbiddenError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "409": {
            "$ref": "#/responses/conflictError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      }
    },
    "/serviceaccounts/{serviceAccountId}/tokens/{tokenId}": {
      "delete": {
        "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account)\n\nRequires basic authentication and that the authenticated user is a Grafana Admin.",
        "tags": [
          "service_accounts"
        ],
        "summary": "DeleteToken deletes service account tokens",
        "operationId": "deleteToken",
        "parameters": [
          {
            "type": "integer",
            "format": "int64",
            "name": "tokenId",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "format": "int64",
            "name": "serviceAccountId",
            "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"
          }
        }
      }
    },
    "/snapshot/shared-options": {
      "get": {
        "tags": [
          "snapshots"
        ],
        "summary": "Get snapshot sharing settings.",
        "operationId": "getSharingOptions",
        "responses": {
          "200": {
            "$ref": "#/responses/getSharingOptionsResponse"
          },
          "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": "createDashboardSnapshot",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateDashboardSnapshotCommand"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/createDashboardSnapshotResponse"
          },
          "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": "deleteDashboardSnapshotByDeleteKey",
        "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": "getDashboardSnapshot",
        "parameters": [
          {
            "type": "string",
            "name": "key",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getDashboardSnapshotResponse"
          },
          "400": {
            "$ref": "#/responses/badRequestError"
          },
          "404": {
            "$ref": "#/responses/notFoundError"
          },
          "500": {
            "$ref": "#/responses/internalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "snapshots"
        ],
        "summary": "Delete Snapshot by Key.",
        "operationId": "deleteDashboardSnapshot",
        "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": "string",
            "name": "groupId",
            "in": "path",
            "required": true
          },
          {
            "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/{team_id}": {
      "get": {
        "tags": [
          "teams"
        ],
        "summary": "Get Team By ID.",
        "operationId": "getTeamByID",
        "parameters": [
          {
            "type": "string",
            "name": "team_id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/getTeamByIDResponse"
          },
          "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/getTeamMembersResponse"
          },
          "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": {
        "description": "Get (current authenticated user)",
        "tags": [
          "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/okResponse"
          },
          "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": "getUserAuthTokens",
        "responses": {
          "200": {
            "$ref": "#/responses/getUserAuthTokensResponse"
          },
          "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/getSignedInUserOrgListResponse"
          },
          "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": "revokeUserAuthToken",
        "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/uid/{dashboard_uid}": {
      "post": {
        "description": "Stars the given Dashboard for the actual user.",
        "tags": [
          "signed_in_user"
        ],
        "summary": "Star a dashboard.",
        "operationId": "starDashboardByUID",
        "parameters": [
          {
            "type": "string",
            "name": "dashboard_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"
          }
        }
      },
      "delete": {
        "description": "Deletes the starring of the given Dashboard for the actual user.",
        "tags": [
          "signed_in_user"
        ],
        "summary": "Unstar a dashboard.",
        "operationId": "unstarDashboardByUID",
        "parameters": [
          {
            "type": "string",
            "name": "dashboard_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"
          }
        }
      }
    },
    "/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",
        "deprecated": true,
        "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",
        "deprecated": true,
        "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/getSignedInUserTeamListResponse"
          },
          "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/okResponse"
          },
          "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"
        }
      }
    },
    "AddCommand": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "role": {
          "type": "string",
          "enum": [
            "Viewer",
            "Editor",
            "Admin"
          ]
        },
        "secondsToLive": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "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"
        }
      }
    },
    "AddServiceAccountTokenCommand": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "secondsToLive": {
          "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"
        }
      }
    },
    "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": {},
        "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": {
          "$ref": "#/definitions/State"
        },
        "templateVars": {
          "type": "object"
        },
        "updated": {
          "type": "string",
          "format": "date-time"
        },
        "userId": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "Correlation": {
      "description": "Correlation is the model for correlations definitions",
      "type": "object",
      "properties": {
        "config": {
          "$ref": "#/definitions/CorrelationConfig"
        },
        "description": {
          "description": "Description of the correlation",
          "type": "string",
          "example": "Logs to Traces"
        },
        "label": {
          "description": "Label identifying the correlation",
          "type": "string",
          "example": "My Label"
        },
        "sourceUID": {
          "description": "UID of the data source the correlation originates from",
          "type": "string",
          "example": "d0oxYRg4z"
        },
        "targetUID": {
          "description": "UID of the data source the correlation points to",
          "type": "string",
          "example": "PE1C5CBDA0504A6A3"
        },
        "uid": {
          "description": "Unique identifier of the correlation",
          "type": "string",
          "example": "50xhMlg9k"
        }
      }
    },
    "CorrelationConfig": {
      "type": "object",
      "required": [
        "field",
        "type",
        "target"
      ],
      "properties": {
        "field": {
          "description": "Field used to attach the correlation link",
          "type": "string",
          "example": "message"
        },
        "target": {
          "description": "Target data query",
          "type": "object",
          "additionalProperties": {},
          "example": {
            "expr": "job=app"
          }
        },
        "type": {
          "$ref": "#/definitions/CorrelationConfigType"
        }
      }
    },
    "CorrelationConfigType": {
      "type": "string"
    },
    "CorrelationConfigUpdateDTO": {
      "type": "object",
      "properties": {
        "field": {
          "description": "Field used to attach the correlation link",
          "type": "string",
          "example": "message"
        },
        "target": {
          "description": "Target data query",
          "type": "object",
          "additionalProperties": {},
          "example": {
            "expr": "job=app"
          }
        },
        "type": {
          "$ref": "#/definitions/CorrelationConfigType"
        }
      }
    },
    "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"
        }
      }
    },
    "CreateCorrelationCommand": {
      "description": "CreateCorrelationCommand is the command for creating a correlation",
      "type": "object",
      "properties": {
        "config": {
          "$ref": "#/definitions/CorrelationConfig"
        },
        "description": {
          "description": "Optional description of the correlation",
          "type": "string",
          "example": "Logs to Traces"
        },
        "label": {
          "description": "Optional label identifying the correlation",
          "type": "string",
          "example": "My label"
        },
        "targetUID": {
          "description": "Target data source UID to which the correlation is created. required if config.type = query",
          "type": "string",
          "example": "PE1C5CBDA0504A6A3"
        }
      }
    },
    "CreateCorrelationResponseBody": {
      "description": "CreateCorrelationResponse is the response struct for CreateCorrelationCommand",
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "example": "Correlation created"
        },
        "result": {
          "$ref": "#/definitions/Correlation"
        }
      }
    },
    "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": {
          "$ref": "#/definitions/State"
        },
        "templateVars": {
          "type": "object"
        }
      }
    },
    "CreateOrgCommand": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        }
      }
    },
    "CreatePlaylistCommand": {
      "type": "object",
      "properties": {
        "interval": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PlaylistItem"
          }
        },
        "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"
        }
      }
    },
    "CreateRoleForm": {
      "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"
          }
        },
        "uid": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "CreateServiceAccountForm": {
      "type": "object",
      "properties": {
        "isDisabled": {
          "type": "boolean",
          "example": false
        },
        "name": {
          "type": "string",
          "example": "grafana"
        },
        "role": {
          "type": "string",
          "enum": [
            "Viewer",
            "Editor",
            "Admin"
          ],
          "example": "Admin"
        }
      }
    },
    "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"
        },
        "isSnapshot": {
          "type": "boolean"
        },
        "isStarred": {
          "type": "boolean"
        },
        "provisioned": {
          "type": "boolean"
        },
        "provisionedExternalId": {
          "type": "string"
        },
        "publicDashboardAccessToken": {
          "type": "string"
        },
        "publicDashboardEnabled": {
          "type": "boolean"
        },
        "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": {
          "description": "Since we get created by with left join user table, this can be null technically,\nbut in reality it will always be set, when database is not corrupted.",
          "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"
        }
      }
    },
    "DataSourcePermissionRuleDTO": {
      "type": "object",
      "properties": {
        "builtInRole": {
          "type": "string"
        },
        "created": {
          "type": "string",
          "format": "date-time"
        },
        "datasourceId": {
          "type": "integer",
          "format": "int64"
        },
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "isManaged": {
          "type": "boolean"
        },
        "permission": {
          "$ref": "#/definitions/DsPermissionType"
        },
        "permissionName": {
          "type": "string"
        },
        "team": {
          "type": "string"
        },
        "teamAvatarUrl": {
          "type": "string"
        },
        "teamEmail": {
          "type": "string"
        },
        "teamId": {
          "type": "integer",
          "format": "int64"
        },
        "updated": {
          "type": "string",
          "format": "date-time"
        },
        "userAvatarUrl": {
          "type": "string"
        },
        "userEmail": {
          "type": "string"
        },
        "userId": {
          "type": "integer",
          "format": "int64"
        },
        "userLogin": {
          "type": "string"
        }
      }
    },
    "DataSourcePermissionsDTO": {
      "type": "object",
      "properties": {
        "datasourceId": {
          "type": "integer",
          "format": "int64"
        },
        "enabled": {
          "type": "boolean"
        },
        "permissions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/DataSourcePermissionRuleDTO"
          }
        }
      }
    },
    "DataTopic": {
      "type": "string",
      "title": "DataTopic is used to identify which topic the frame should be assigned to."
    },
    "DeleteCorrelationResponseBody": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "example": "Correlation deleted"
        }
      }
    },
    "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": {
          "type": "string"
        }
      }
    },
    "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/FrameLabels"
        },
        "name": {
          "description": "Name is default identifier of the field. The name does not have to be unique, but the combination\nof name and Labels should be unique for proper behavior in all situations.",
          "type": "string"
        }
      }
    },
    "FieldConfig": {
      "type": "object",
      "title": "FieldConfig represents the display properties for a Field.",
      "properties": {
        "color": {
          "description": "Map values to a display color\nNOTE: this interface is under development in the frontend... so simple map for now",
          "type": "object",
          "additionalProperties": {}
        },
        "custom": {
          "description": "Panel Specific Values",
          "type": "object",
          "additionalProperties": {}
        },
        "decimals": {
          "type": "integer",
          "format": "uint16"
        },
        "description": {
          "description": "Description is human readable field metadata",
          "type": "string"
        },
        "displayName": {
          "description": "DisplayName overrides Grafana default naming, should not be used from a data source",
          "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"
          }
        }
      }
    },
    "Folder": {
      "type": "object",
      "properties": {
        "accessControl": {
          "$ref": "#/definitions/Metadata"
        },
        "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": {
        "accessControl": {
          "$ref": "#/definitions/Metadata"
        },
        "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"
        }
      }
    },
    "FrameLabels": {
      "description": "Labels are used to add metadata to an object.  The JSON will always be sorted keys",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "FrameMeta": {
      "description": "https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/types/data.ts#L11\nNOTE -- in javascript this can accept any `[key: string]: any;` however\nthis interface only exposes the values we want to be exposed",
      "type": "object",
      "title": "FrameMeta matches:",
      "properties": {
        "channel": {
          "description": "Channel is the path to a stream in grafana live that has real-time updates for this data.",
          "type": "string"
        },
        "custom": {
          "description": "Custom datasource specific values."
        },
        "dataTopic": {
          "$ref": "#/definitions/DataTopic"
        },
        "executedQueryString": {
          "description": "ExecutedQueryString is the raw query sent to the underlying system. All macros and templating\nhave been applied.  When metadata contains this value, it will be shown in the query inspector.",
          "type": "string"
        },
        "notices": {
          "description": "Notices provide additional information about the data in the Frame that\nGrafana can display to the user in the user interface.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Notice"
          }
        },
        "path": {
          "description": "Path is a browsable path on the datasource.",
          "type": "string"
        },
        "pathSeparator": {
          "description": "PathSeparator defines the separator pattern to decode a hierarchy. The default separator is '/'.",
          "type": "string"
        },
        "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"
    },
    "LegacyAlert": {
      "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"
        }
      }
    },
    "LibraryElementConnectionDTO": {
      "type": "object",
      "title": "LibraryElementConnectionDTO is the frontend DTO for element connections.",
      "properties": {
        "connectionId": {
          "type": "integer",
          "format": "int64"
        },
        "connectionUid": {
          "type": "string"
        },
        "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"
        },
        "publicDashboardAccessToken": {
          "type": "string"
        },
        "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"
          }
        }
      }
    },
    "Model": {
      "description": "THIS TYPE IS INTENDED FOR INTERNAL USE BY THE GRAFANA BACKEND, AND IS SUBJECT TO BREAKING CHANGES.\nEquivalent Go types at stable import paths are provided in https://github.com/grafana/grok.",
      "type": "object",
      "title": "Model is the Go representation of a playlist.",
      "properties": {
        "interval": {
          "description": "Interval sets the time between switching views in a playlist.\nFIXME: Is this based on a standardized format or what options are available? Can datemath be used?",
          "type": "string"
        },
        "items": {
          "description": "The ordered list of items that the playlist will iterate over.\nFIXME! This should not be optional, but changing it makes the godegen awkward",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PlaylistItem"
          }
        },
        "name": {
          "description": "Name of the playlist.",
          "type": "string"
        },
        "uid": {
          "description": "Unique playlist identifier. Generated on creation, either by the\ncreator of the playlist of by the application.",
          "type": "string"
        }
      }
    },
    "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",
          "example": 1
        },
        "key": {
          "type": "string",
          "example": "glsa_yscW25imSKJIuav8zF37RZmnbiDvB05G_fcaaf58a"
        },
        "name": {
          "type": "string",
          "example": "grafana"
        }
      }
    },
    "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"
        },
        "isDisabled": {
          "type": "boolean"
        },
        "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"
        },
        "locale": {
          "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"
    },
    "Playlist": {
      "description": "Playlist model",
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "interval": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "uid": {
          "type": "string"
        }
      }
    },
    "PlaylistDashboard": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "order": {
          "type": "integer",
          "format": "int64"
        },
        "slug": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "uri": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      }
    },
    "PlaylistDashboardsSlice": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/PlaylistDashboard"
      }
    },
    "PlaylistItem": {
      "description": "THIS TYPE IS INTENDED FOR INTERNAL USE BY THE GRAFANA BACKEND, AND IS SUBJECT TO BREAKING CHANGES.\nEquivalent Go types at stable import paths are provided in https://github.com/grafana/grok.",
      "type": "object",
      "title": "PlaylistItem is the Go representation of a playlist.Item.",
      "properties": {
        "title": {
          "description": "Title is an unused property -- it will be removed in the future",
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/PlaylistItemType"
        },
        "value": {
          "description": "Value depends on type and describes the playlist item.\n\ndashboard_by_id: The value is an internal numerical identifier set by Grafana. This\nis not portable as the numerical identifier is non-deterministic between different instances.\nWill be replaced by dashboard_by_uid in the future. (deprecated)\ndashboard_by_tag: The value is a tag which is set on any number of dashboards. All\ndashboards behind the tag will be added to the playlist.\ndashboard_by_uid: The value is the dashboard UID",
          "type": "string"
        }
      }
    },
    "PlaylistItemType": {
      "description": "THIS TYPE IS INTENDED FOR INTERNAL USE BY THE GRAFANA BACKEND, AND IS SUBJECT TO BREAKING CHANGES.\nEquivalent Go types at stable import paths are provided in https://github.com/grafana/grok.",
      "type": "string",
      "title": "Type of the item."
    },
    "Playlists": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Playlist"
      }
    },
    "PostAnnotationsCmd": {
      "type": "object",
      "required": [
        "text"
      ],
      "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": {},
        "what": {
          "type": "string"
        },
        "when": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "Prefs": {
      "type": "object",
      "properties": {
        "homeDashboardId": {
          "type": "integer",
          "format": "int64"
        },
        "homeDashboardUID": {
          "type": "string"
        },
        "locale": {
          "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": {}
        },
        "custom": {
          "description": "Panel Specific Values",
          "type": "object",
          "additionalProperties": {}
        },
        "decimals": {
          "type": "integer",
          "format": "uint16"
        },
        "description": {
          "description": "Description is human readable field metadata",
          "type": "string"
        },
        "displayName": {
          "description": "DisplayName overrides Grafana default naming, should not be used from a data source",
          "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": {}
          }
        },
        "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 DataResponses' 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"
        }
      }
    },
    "RoleAssignmentsDTO": {
      "type": "object",
      "properties": {
        "role_uid": {
          "type": "string"
        },
        "service_accounts": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64"
          }
        },
        "teams": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64"
          }
        },
        "users": {
          "type": "array",
          "items": {
            "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"
        }
      }
    },
    "SearchServiceAccountsResult": {
      "description": "swagger: model",
      "type": "object",
      "properties": {
        "page": {
          "type": "integer",
          "format": "int64"
        },
        "perPage": {
          "type": "integer",
          "format": "int64"
        },
        "serviceAccounts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ServiceAccountDTO"
          }
        },
        "totalCount": {
          "description": "It can be used for pagination of the user list\nE.g. if totalCount is equal to 100 users and\nthe perpage parameter is set to 10 then there are 10 pages of users.",
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "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"
          }
        }
      }
    },
    "ServiceAccountDTO": {
      "description": "swagger: model",
      "type": "object",
      "properties": {
        "accessControl": {
          "type": "object",
          "additionalProperties": {
            "type": "boolean"
          },
          "example": {
            "serviceaccounts:delete": true,
            "serviceaccounts:read": true,
            "serviceaccounts:write": true
          }
        },
        "avatarUrl": {
          "type": "string",
          "example": "/avatar/85ec38023d90823d3e5b43ef35646af9"
        },
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "isDisabled": {
          "type": "boolean",
          "example": false
        },
        "login": {
          "type": "string",
          "example": "sa-grafana"
        },
        "name": {
          "type": "string",
          "example": "grafana"
        },
        "orgId": {
          "type": "integer",
          "format": "int64",
          "example": 1
        },
        "role": {
          "type": "string",
          "example": "Viewer"
        },
        "tokens": {
          "type": "integer",
          "format": "int64",
          "example": 0
        }
      }
    },
    "ServiceAccountProfileDTO": {
      "type": "object",
      "properties": {
        "accessControl": {
          "type": "object",
          "additionalProperties": {
            "type": "boolean"
          }
        },
        "avatarUrl": {
          "type": "string",
          "example": "/avatar/8ea890a677d6a223c591a1beea6ea9d2"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "example": "2022-03-21T14:35:33Z"
        },
        "id": {
          "type": "integer",
          "format": "int64",
          "example": 2
        },
        "isDisabled": {
          "type": "boolean",
          "example": false
        },
        "login": {
          "type": "string",
          "example": "sa-grafana"
        },
        "name": {
          "type": "string",
          "example": "test"
        },
        "orgId": {
          "type": "integer",
          "format": "int64",
          "example": 1
        },
        "role": {
          "type": "string",
          "example": "Editor"
        },
        "teams": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "example": []
        },
        "tokens": {
          "type": "integer",
          "format": "int64"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "example": "2022-03-21T14:35:33Z"
        }
      }
    },
    "SetRoleAssignmentsCommand": {
      "type": "object",
      "properties": {
        "service_accounts": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64"
          }
        },
        "teams": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64"
          }
        },
        "users": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64"
          }
        }
      }
    },
    "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"
        }
      }
    },
    "State": {
      "type": "string"
    },
    "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"
        }
      }
    },
    "TokenDTO": {
      "type": "object",
      "properties": {
        "created": {
          "type": "string",
          "format": "date-time",
          "example": "2022-03-23T10:31:02Z"
        },
        "expiration": {
          "type": "string",
          "format": "date-time",
          "example": "2022-03-23T10:31:02Z"
        },
        "hasExpired": {
          "type": "boolean",
          "example": false
        },
        "id": {
          "type": "integer",
          "format": "int64",
          "example": 1
        },
        "isRevoked": {
          "type": "boolean",
          "example": false
        },
        "lastUsedAt": {
          "type": "string",
          "format": "date-time",
          "example": "2022-03-23T10:31:02Z"
        },
        "name": {
          "type": "string",
          "example": "grafana"
        },
        "secondsUntilExpiration": {
          "type": "number",
          "format": "double",
          "example": 0
        }
      }
    },
    "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"
        }
      }
    },
    "UpdateCorrelationCommand": {
      "description": "UpdateCorrelationCommand is the command for updating a correlation",
      "type": "object",
      "properties": {
        "config": {
          "$ref": "#/definitions/CorrelationConfigUpdateDTO"
        },
        "description": {
          "description": "Optional description of the correlation",
          "type": "string",
          "example": "Logs to Traces"
        },
        "label": {
          "description": "Optional label identifying the correlation",
          "type": "string",
          "example": "My label"
        }
      }
    },
    "UpdateCorrelationResponseBody": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "example": "Correlation updated"
        },
        "result": {
          "$ref": "#/definitions/Correlation"
        }
      }
    },
    "UpdateDashboardACLCommand": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/DashboardACLUpdateItem"
          }
        }
      }
    },
    "UpdateDataSourceCommand": {
      "description": "Also acts as api DTO",
      "type": "object",
      "properties": {
        "access": {
          "$ref": "#/definitions/DsAccess"
        },
        "basicAuth": {
          "type": "boolean"
        },
        "basicAuthUser": {
          "type": "string"
        },
        "database": {
          "type": "string"
        },
        "isDefault": {
          "type": "boolean"
        },
        "jsonData": {
          "$ref": "#/definitions/Json"
        },
        "name": {
          "type": "string"
        },
        "secureJsonData": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "type": {
          "type": "string"
        },
        "uid": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "user": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "format": "int64"
        },
        "withCredentials": {
          "type": "boolean"
        }
      }
    },
    "UpdateFolderCommand": {
      "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"
          ]
        }
      }
    },
    "UpdatePlaylistCommand": {
      "type": "object",
      "properties": {
        "interval": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PlaylistItem"
          }
        },
        "name": {
          "type": "string"
        },
        "uid": {
          "type": "string"
        }
      }
    },
    "UpdatePrefsCmd": {
      "type": "object",
      "properties": {
        "homeDashboardId": {
          "description": "The numerical :id of a favorited dashboard",
          "type": "integer",
          "format": "int64",
          "default": 0
        },
        "homeDashboardUID": {
          "type": "string"
        },
        "locale": {
          "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"
        }
      }
    },
    "UpdateServiceAccountForm": {
      "type": "object",
      "properties": {
        "isDisabled": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "role": {
          "type": "string",
          "enum": [
            "Viewer",
            "Editor",
            "Admin"
          ]
        }
      }
    },
    "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"
      }
    },
    "addPermissionResponse": {
      "description": "",
      "schema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "permissionId": {
            "type": "integer",
            "format": "int64"
          }
        }
      }
    },
    "adminCreateUserResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/UserIdDTO"
      }
    },
    "adminGetSettingsResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/SettingsBag"
      }
    },
    "adminGetStatsResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/AdminStats"
      }
    },
    "adminGetUserAuthTokensResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/UserToken"
        }
      }
    },
    "badRequestError": {
      "description": "BadRequestError is returned when the request is invalid and it cannot be processed.",
      "schema": {
        "$ref": "#/definitions/ErrorResponseBody"
      }
    },
    "calculateDashboardDiffResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "type": "integer",
          "format": "uint8"
        }
      }
    },
    "conflictError": {
      "description": "ConflictError",
      "schema": {
        "$ref": "#/definitions/ErrorResponseBody"
      }
    },
    "contentResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "type": "integer",
          "format": "uint8"
        }
      }
    },
    "createCorrelationResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/CreateCorrelationResponseBody"
      }
    },
    "createDashboardSnapshotResponse": {
      "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"
          }
        }
      }
    },
    "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
          }
        }
      }
    },
    "createPlaylistResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/Playlist"
      }
    },
    "createReportResponse": {
      "description": "",
      "schema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "message": {
            "type": "string"
          }
        }
      }
    },
    "createRoleResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/RoleDTO"
      }
    },
    "createServiceAccountResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/ServiceAccountDTO"
      }
    },
    "createTeamResponse": {
      "description": "",
      "schema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "teamId": {
            "type": "integer",
            "format": "int64"
          }
        }
      }
    },
    "createTokenResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/NewApiKeyResult"
      }
    },
    "dashboardResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/DashboardFullWithMeta"
      }
    },
    "dashboardVersionResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/DashboardVersionMeta"
      }
    },
    "dashboardVersionsResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/DashboardVersionDTO"
        }
      }
    },
    "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"
          }
        }
      }
    },
    "deleteCorrelationResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/DeleteCorrelationResponseBody"
      }
    },
    "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"
        }
      }
    },
    "getAlertNotificationLookupResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/AlertNotificationLookup"
        }
      }
    },
    "getAlertResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/LegacyAlert"
      }
    },
    "getAlertsResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/AlertListItemDTO"
        }
      }
    },
    "getAllPermissionseResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/DataSourcePermissionsDTO"
      }
    },
    "getAllRolesResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/RoleDTO"
        }
      }
    },
    "getAnnotationByIDResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/ItemDTO"
      }
    },
    "getAnnotationTagsResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/GetAnnotationTagsResponse"
      }
    },
    "getAnnotationsResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/ItemDTO"
        }
      }
    },
    "getCorrelationResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/Correlation"
      }
    },
    "getCorrelationsBySourceUIDResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/Correlation"
        }
      }
    },
    "getCorrelationsResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/Correlation"
        }
      }
    },
    "getCurrentOrgResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/OrgDetailsDTO"
      }
    },
    "getCustomPermissionsReportResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/CustomPermissionsRecordDTO"
        }
      }
    },
    "getDashboardPermissionsListResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/DashboardACLInfoDTO"
        }
      }
    },
    "getDashboardSnapshotResponse": {
      "description": ""
    },
    "getDashboardStatesResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/AlertStateInfoDTO"
        }
      }
    },
    "getDashboardsTagsResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/DashboardTagCloudItem"
        }
      }
    },
    "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"
      }
    },
    "getFolderPermissionListResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/DashboardACLInfoDTO"
        }
      }
    },
    "getFoldersResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/FolderSearchHit"
        }
      }
    },
    "getHomeDashboardResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/GetHomeDashboardResponse"
      }
    },
    "getLibraryElementConnectionsResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/LibraryElementConnectionsResponse"
      }
    },
    "getLibraryElementResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/LibraryElementResponse"
      }
    },
    "getLibraryElementsResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/LibraryElementSearchResponse"
      }
    },
    "getLicenseTokenResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/Token"
      }
    },
    "getOrgByIDResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/OrgDetailsDTO"
      }
    },
    "getOrgByNameResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/OrgDetailsDTO"
      }
    },
    "getOrgUsersForCurrentOrgLookupResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/UserLookupDTO"
        }
      }
    },
    "getOrgUsersForCurrentOrgResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/OrgUserDTO"
        }
      }
    },
    "getOrgUsersResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/OrgUserDTO"
        }
      }
    },
    "getPendingOrgInvitesResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/TempUserDTO"
        }
      }
    },
    "getPlaylistDashboardsResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/PlaylistDashboardsSlice"
      }
    },
    "getPlaylistItemsResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/PlaylistItem"
        }
      }
    },
    "getPlaylistResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/Model"
      }
    },
    "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"
        }
      }
    },
    "getRoleAssignmentsResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/RoleAssignmentsDTO"
      }
    },
    "getRoleResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/RoleDTO"
      }
    },
    "getSharingOptionsResponse": {
      "description": "",
      "schema": {
        "type": "object",
        "properties": {
          "externalEnabled": {
            "type": "boolean"
          },
          "externalSnapshotName": {
            "type": "string"
          },
          "externalSnapshotURL": {
            "type": "string"
          }
        }
      }
    },
    "getSignedInUserOrgListResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/UserOrgDTO"
        }
      }
    },
    "getSignedInUserTeamListResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/TeamDTO"
        }
      }
    },
    "getStatusResponse": {
      "description": ""
    },
    "getSyncStatusResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/ActiveSyncStatusDTO"
      }
    },
    "getTeamByIDResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/TeamDTO"
      }
    },
    "getTeamGroupsApiResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/TeamGroupDTO"
        }
      }
    },
    "getTeamMembersResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/TeamMemberDTO"
        }
      }
    },
    "getUserAuthTokensResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/UserToken"
        }
      }
    },
    "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"
        }
      }
    },
    "listRolesResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/RoleDTO"
        }
      }
    },
    "listSortOptionsResponse": {
      "description": "",
      "schema": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "meta": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      }
    },
    "listTokensResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/TokenDTO"
      }
    },
    "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"
      }
    },
    "postAnnotationResponse": {
      "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"
          }
        }
      }
    },
    "postDashboardResponse": {
      "description": "",
      "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"
      }
    },
    "queryMetricsWithExpressionsRespons": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/QueryDataResponse"
      }
    },
    "recordingRuleResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/RecordingRuleJSON"
      }
    },
    "recordingRuleWriteTargetResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/PrometheusRemoteWriteTargetJSON"
      }
    },
    "refreshLicenseStatsResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/ActiveUserStats"
      }
    },
    "retrieveServiceAccountResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/ServiceAccountDTO"
      }
    },
    "searchDashboardSnapshotsResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/DashboardSnapshotDTO"
        }
      }
    },
    "searchOrgServiceAccountsWithPagingResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/SearchServiceAccountsResult"
      }
    },
    "searchOrgsResponse": {
      "description": "",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/definitions/OrgDTO"
        }
      }
    },
    "searchPlaylistsResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/Playlists"
      }
    },
    "searchResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/HitList"
      }
    },
    "searchTeamsResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/SearchTeamQueryResult"
      }
    },
    "searchUsersResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/SearchUserQueryResult"
      }
    },
    "setRoleAssignmentsResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/RoleAssignmentsDTO"
      }
    },
    "testAlertResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/AlertTestResult"
      }
    },
    "trimDashboardResponse": {
      "description": "",
      "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"
      }
    },
    "updateCorrelationResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/UpdateCorrelationResponseBody"
      }
    },
    "updatePlaylistResponse": {
      "description": "",
      "schema": {
        "$ref": "#/definitions/Model"
      }
    },
    "updateServiceAccountResponse": {
      "description": "",
      "schema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "message": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "serviceaccount": {
            "$ref": "#/definitions/ServiceAccountProfileDTO"
          }
        }
      }
    },
    "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": "org"
    },
    {
      "description": "This API can be used to create/update/delete Teams and to add/remove users to Teams. All actions require that the user has the Admin role for the organization.",
      "name": "teams"
    },
    {
      "description": "This API can be used to enable, disable, list, add and remove permissions for a data source.\nPermissions can be set for a user or a team. Permissions cannot be set for Admins - they always have access to everything.\nThis is only available in Grafana Enterprise\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.",
      "name": "datasource_permissions"
    },
    {
      "description": "These are only available in Grafana Enterprise",
      "name": "enterprise"
    },
    {
      "description": "The API can be used to create, update, get and list roles, and create or remove built-in role assignments. To use the API, you would need to enable fine-grained access control.\nThis only available in Grafana Enterprise.\nThe API does not currently work with an API Token. So in order to use these API endpoints you will have to use Basic auth.",
      "name": "access_control"
    },
    {
      "description": "Licensing is only available in Grafana Enterprise. Read more about Grafana Enterprise.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.",
      "name": "licensing"
    },
    {
      "description": "This API allows you to interact programmatically with the Reporting feature.\nReporting is only available in Grafana Enterprise. Read more about Grafana Enterprise.\nIf you have Fine-grained access Control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.",
      "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"
    },
    {
      "description": "If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.",
      "name": "service_accounts"
    }
  ]
}
back to top