grafana/public/api-merged.json
2022-02-10 15:23:08 +01:00

18180 lines
508 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"consumes": ["application/json"],
"produces": ["application/json"],
"schemes": ["http", "https"],
"swagger": "2.0",
"info": {
"description": "The Grafana backend exposes an HTTP API, the same API is used by the frontend to do\neverything from saving dashboards, creating users and updating data sources.",
"title": "Grafana HTTP API.",
"contact": {
"name": "Grafana Labs",
"url": "https://grafana.com",
"email": "hello@grafana.com"
},
"license": {
"name": "GNU Affero General Public License v3.0",
"url": "https://www.gnu.org/licenses/agpl-3.0.en.html"
},
"version": "0.0.1"
},
"basePath": "/api",
"paths": {
"/access-control/builtin-roles": {
"get": {
"description": "You need to have a permission with action `roles.builtin:list` with scope `roles:*`.",
"tags": ["access_control", "enterprise"],
"summary": "Get all built-in role assignments.",
"operationId": "listBuiltinRoles",
"responses": {
"200": {
"$ref": "#/responses/listBuiltinRolesResponse"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "You need to have a permission with action `roles.builtin:add` and scope `permissions:delegate`. `permission:delegate` scope ensures that users can only create built-in role assignments with the roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they wont be able to create a built-in role assignment which will allow to do that. This is done to prevent escalation of privileges.",
"tags": ["access_control", "enterprise"],
"summary": "Create a built-in role assignment.",
"operationId": "addBuiltinRole",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddBuiltInRoleCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/access-control/builtin-roles/{builtinRole}/roles/{roleUID}": {
"delete": {
"description": "Deletes a built-in role assignment (for one of Viewer, Editor, Admin, or Grafana Admin) to the role with the provided UID.\n\nYou need to have a permission with action `roles.builtin:remove` and scope `permissions:delegate`. `permission:delegate` scope ensures that users can only remove built-in role assignments with the roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they wont be able to remove a built-in role assignment which allows to do that.",
"tags": ["access_control", "enterprise"],
"summary": "Remove a built-in role assignment.",
"operationId": "removeBuiltinRole",
"parameters": [
{
"type": "string",
"x-go-name": "RoleUID",
"name": "roleUID",
"in": "path",
"required": true
},
{
"type": "string",
"x-go-name": "RoleUID",
"name": "builtinRole",
"in": "path",
"required": true
},
{
"type": "boolean",
"x-go-name": "Global",
"description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to remove assignment.",
"name": "global",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/access-control/roles": {
"get": {
"description": "Gets all existing roles. The response contains all global and organization local roles, for the organization which user is signed in.\n\nYou need to have a permission with action `roles:list` and scope `roles:*`.",
"tags": ["access_control", "enterprise"],
"summary": "Get all roles.",
"operationId": "getAllRoles",
"responses": {
"200": {
"$ref": "#/responses/getAllRolesResponse"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "Creates a new custom role and maps given permissions to that role. Note that roles with the same prefix as Fixed Roles cant be created.\n\nYou need to have a permission with action `roles:write` and scope `permissions:delegate`. `permission: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 wont be able to create a custom role which allows to do that. This is done to prevent escalation of privileges.",
"tags": ["access_control", "enterprise"],
"summary": "Create a new custom role.",
"operationId": "createRoleWithPermissions",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SetUserRolesCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/getRoleResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/access-control/roles/{roleUID}": {
"get": {
"description": "Get a role for the given UID.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.",
"tags": ["access_control", "enterprise"],
"summary": "Get a role.",
"operationId": "getRole",
"parameters": [
{
"type": "string",
"x-go-name": "RoleUID",
"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:delegate`. `permission:delegate`` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.",
"tags": ["access_control", "enterprise"],
"summary": "Update a custom role.",
"operationId": "updateRoleWithPermissions",
"parameters": [
{
"type": "string",
"x-go-name": "RoleUID",
"name": "roleUID",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateRoleCommand"
}
}
],
"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 its 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:delegate`. `permission: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 wont be able to delete a custom role which allows to do that.",
"tags": ["access_control", "enterprise"],
"summary": "Delete a custom role.",
"operationId": "deleteCustomRole",
"parameters": [
{
"type": "string",
"x-go-name": "RoleUID",
"name": "roleUID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/access-control/status": {
"get": {
"description": "Returns an indicator to check if fine-grained access control is enabled or not.\n\nYou need to have a permission with action `status:accesscontrol` and scope `services:accesscontrol`.",
"tags": ["access_control", "enterprise"],
"summary": "Get status.",
"operationId": "getAccessControlStatus",
"responses": {
"200": {
"$ref": "#/responses/getAccessControlStatusResponse"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/access-control/teams/{teamId}/roles": {
"get": {
"description": "You need to have a permission with action `teams.roles:list` and scope `teams:id:\u003cteam ID\u003e`.",
"tags": ["access_control", "enterprise"],
"summary": "Get team roles.",
"operationId": "listTeamRoles",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "TeamID",
"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:delegate` for each.",
"tags": ["access_control", "enterprise"],
"summary": "Update team role.",
"operationId": "setTeamRoles",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "TeamID",
"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:delegate`.",
"tags": ["access_control", "enterprise"],
"summary": "Add team role.",
"operationId": "addTeamRole",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "TeamID",
"name": "teamId",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddTeamRoleCommand"
}
}
],
"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:delegate`.",
"tags": ["access_control", "enterprise"],
"summary": "Remove team role.",
"operationId": "removeTeamRole",
"parameters": [
{
"type": "string",
"x-go-name": "RoleUID",
"name": "roleUID",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"x-go-name": "TeamID",
"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/{user_id}/roles": {
"get": {
"description": "Lists the roles that have been directly assigned to a given user. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:list` and scope `users:id:\u003cuser ID\u003e`.",
"tags": ["access_control", "enterprise"],
"summary": "List roles assigned to a user.",
"operationId": "listUserRoles",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"name": "user_id",
"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 users role assignments to match the provided set of UIDs. This will remove any assigned roles that arent 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:delegate` for each. `permission: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 wont 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": [
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"name": "user_id",
"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:delegate`. `permission: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 wont 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": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddUserRoleCommand"
}
},
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/access-control/users/{user_id}/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:delegate`. `permission: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 wont 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": "string",
"x-go-name": "RoleUID",
"name": "roleUID",
"in": "path",
"required": true
},
{
"type": "boolean",
"x-go-name": "Global",
"description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to remove assignment.",
"name": "global",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/ldap-sync-status": {
"get": {
"description": "You need to have a permission with action `ldap.status:read`.",
"tags": ["ldap_debug"],
"summary": "Available to grafana admins.",
"operationId": "getLDAPSyncStatus",
"responses": {
"200": {
"$ref": "#/responses/getLDAPSyncStatusResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/ldap/reload": {
"post": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.config:reload`.",
"tags": ["admin_ldap"],
"summary": "Reloads the LDAP configuration.",
"operationId": "reloadLDAP",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/ldap/status": {
"get": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.status:read`.",
"tags": ["admin_ldap"],
"summary": "Attempts to connect to all the configured LDAP servers and returns information on whenever they're available or not.",
"operationId": "getLDAPStatus",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/ldap/sync/{user_id}": {
"post": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.user:sync`.",
"tags": ["admin_ldap"],
"summary": "Enables a single Grafana user to be synchronized against LDAP.",
"operationId": "syncLDAPUser",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/ldap/{user_name}": {
"get": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.user:read`.",
"tags": ["admin_ldap"],
"summary": "Finds an user based on a username in LDAP. This helps illustrate how would the particular user be mapped in Grafana when synced.",
"operationId": "getLDAPUser",
"parameters": [
{
"type": "string",
"x-go-name": "UserID",
"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": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PauseAllAlertsCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/pauseAlertsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/provisioning/access-control/reload": {
"post": {
"tags": ["access_control_provisioning", "enterprise"],
"summary": "You need to have a permission with action `provisioning:reload` with scope `provisioners:accesscontrol`.",
"operationId": "adminProvisioningReloadAccessControl",
"responses": {
"202": {
"$ref": "#/responses/acceptedResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
}
}
}
},
"/admin/provisioning/accesscontrol/reload": {
"post": {
"security": [
{
"basic": []
}
],
"description": "Reloads the provisioning config files for access control again. It wont return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:accesscontrol`.",
"tags": ["admin_provisioning"],
"summary": "Reload access control provisioning configurations.",
"operationId": "reloadProvisionedAccessControl",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/provisioning/dashboards/reload": {
"post": {
"security": [
{
"basic": []
}
],
"description": "Reloads the provisioning config files for dashboards again. It wont return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:dashboards`.",
"tags": ["admin_provisioning"],
"summary": "Reload dashboard provisioning configurations.",
"operationId": "reloadProvisionedDashboards",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/provisioning/datasources/reload": {
"post": {
"security": [
{
"basic": []
}
],
"description": "Reloads the provisioning config files for datasources again. It wont return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:datasources`.",
"tags": ["admin_provisioning"],
"summary": "Reload datasource provisioning configurations.",
"operationId": "reloadProvisionedDatasources",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/provisioning/notifications/reload": {
"post": {
"security": [
{
"basic": []
}
],
"description": "Reloads the provisioning config files for legacy alert notifiers again. It wont return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:notifications`.",
"tags": ["admin_provisioning"],
"summary": "Reload legacy alert notifier provisioning configurations.",
"operationId": "reloadProvisionedAlertNotifiers",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/provisioning/plugins/reload": {
"post": {
"security": [
{
"basic": []
}
],
"description": "Reloads the provisioning config files for plugins again. It wont return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:plugin`.",
"tags": ["admin_provisioning"],
"summary": "Reload plugin provisioning configurations.",
"operationId": "reloadProvisionedPlugins",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/settings": {
"get": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `settings:read` and scopes: `settings:*`, `settings:auth.saml:` and `settings:auth.saml:enabled` (property level).",
"tags": ["admin"],
"summary": "Fetch settings.",
"operationId": "getSettings",
"responses": {
"200": {
"$ref": "#/responses/getSettingsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
}
}
}
},
"/admin/stats": {
"get": {
"description": "Only works with Basic Authentication (username and password). See introduction for an explanation.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `server:stats:read`.",
"tags": ["admin"],
"summary": "Fetch Grafana Stats.",
"operationId": "getStats",
"responses": {
"200": {
"$ref": "#/responses/getStatsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users": {
"post": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:create`.\nNote that OrgId is an optional parameter that can be used to assign a new user to a different organization when `auto_assign_org` is set to `true`.",
"tags": ["admin_users"],
"summary": "Create new user.",
"operationId": "createUser",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AdminCreateUserForm"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/createUserResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"412": {
"$ref": "#/responses/preconditionFailedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users/{user_id}": {
"delete": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:delete` and scope `global:users:*`.",
"tags": ["admin_users"],
"summary": "Delete global User.",
"operationId": "deleteUser",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users/{user_id}/auth-tokens": {
"get": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.authtoken:list` and scope `global:users:*`.",
"tags": ["admin_users"],
"summary": "Return a list of all auth tokens (devices) that the user currently have logged in from.",
"operationId": "getAuthTokens",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getAuthTokensResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users/{user_id}/disable": {
"post": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:disable` and scope `global:users:1` (userIDScope).",
"tags": ["admin_users"],
"summary": "Disable user.",
"operationId": "disableUser",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users/{user_id}/enable": {
"post": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:enable` and scope `global:users:1` (userIDScope).",
"tags": ["admin_users"],
"summary": "Enable user.",
"operationId": "enableUser",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users/{user_id}/logout": {
"post": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.logout` and scope `global:users:*`.",
"tags": ["admin_users"],
"summary": "Logout user revokes all auth tokens (devices) for the user. User of issued auth tokens (devices) will no longer be logged in and will be required to authenticate again upon next activity.",
"operationId": "logoutUser",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users/{user_id}/password": {
"put": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.password:update` and scope `global:users:*`.",
"tags": ["admin_users"],
"summary": "Set password for user.",
"operationId": "setPassword",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AdminUpdateUserPasswordForm"
}
},
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users/{user_id}/permissions": {
"put": {
"description": "Only works with Basic Authentication (username and password). See introduction for an explanation.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.permissions:update` and scope `global:users:*`.",
"tags": ["admin_users"],
"summary": "Set permissions for user.",
"operationId": "setPermissions",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AdminUpdateUserPermissionsForm"
}
},
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"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",
"x-go-name": "UserID",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getQuotaResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/admin/users/{user_id}/quotas/{quota_target}": {
"put": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.quotas:update` and scope `global:users:1` (userIDScope).",
"tags": ["admin_users"],
"summary": "Update user quota.",
"operationId": "updateUserQuota",
"parameters": [
{
"type": "string",
"x-go-name": "QuotaTarget",
"name": "quota_target",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateUserQuotaCmd"
}
},
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"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": "revokeAuthToken",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RevokeAuthTokenCmd"
}
},
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"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": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateAlertNotificationCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/getAlertNotificationChannelResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"409": {
"$ref": "#/responses/conflictError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/alert-notifications/lookup": {
"get": {
"description": "Returns all notification channels, but with less detailed information. Accessible by any authenticated user and is mainly used by providing alert notification channels in Grafana UI when configuring alert rule.",
"tags": ["legacy_alerts_notification_channels"],
"summary": "Get all notification channels (lookup)",
"operationId": "lookupAlertNotificationChannels",
"responses": {
"200": {
"$ref": "#/responses/lookupAlertNotificationChannelsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/alert-notifications/test": {
"post": {
"description": "Sends a test notification to the channel.",
"tags": ["legacy_alerts_notification_channels"],
"summary": "Test notification channel.",
"operationId": "notificationChannelTest",
"parameters": [
{
"x-go-name": "Body",
"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",
"x-go-name": "NotificationUID",
"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": [
{
"type": "string",
"x-go-name": "NotificationUID",
"name": "notification_channel_uid",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateAlertNotificationWithUidCommand"
}
}
],
"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",
"x-go-name": "NotificationUID",
"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",
"x-go-name": "NotificationID",
"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": [
{
"type": "integer",
"format": "int64",
"x-go-name": "NotificationID",
"name": "notification_channel_id",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateAlertNotificationCommand"
}
}
],
"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",
"x-go-name": "NotificationID",
"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"
}
}
}
},
"/alertmanager/grafana/api/v2/alerts": {
"get": {
"description": "get alertmanager alerts",
"tags": ["alertmanager"],
"operationId": "RouteGetGrafanaAMAlerts",
"parameters": [
{
"type": "boolean",
"default": true,
"x-go-name": "Active",
"description": "Show active alerts",
"name": "active",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Silenced",
"description": "Show silenced alerts",
"name": "silenced",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Inhibited",
"description": "Show inhibited alerts",
"name": "inhibited",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Matchers",
"description": "A list of matchers to filter alerts by",
"name": "filter",
"in": "query"
},
{
"type": "string",
"x-go-name": "Receivers",
"description": "A regex matching receivers to filter alerts by",
"name": "receiver",
"in": "query"
}
],
"responses": {
"200": {
"description": "gettableAlerts",
"schema": {
"$ref": "#/definitions/gettableAlerts"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"post": {
"description": "create alertmanager alerts",
"tags": ["alertmanager"],
"operationId": "RoutePostGrafanaAMAlerts",
"parameters": [
{
"name": "PostableAlerts",
"in": "body",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/postableAlert"
}
}
}
],
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/alertmanager/grafana/api/v2/alerts/groups": {
"get": {
"description": "get alertmanager alerts",
"tags": ["alertmanager"],
"operationId": "RouteGetGrafanaAMAlertGroups",
"parameters": [
{
"type": "boolean",
"default": true,
"x-go-name": "Active",
"description": "Show active alerts",
"name": "active",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Silenced",
"description": "Show silenced alerts",
"name": "silenced",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Inhibited",
"description": "Show inhibited alerts",
"name": "inhibited",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Matchers",
"description": "A list of matchers to filter alerts by",
"name": "filter",
"in": "query"
},
{
"type": "string",
"x-go-name": "Receivers",
"description": "A regex matching receivers to filter alerts by",
"name": "receiver",
"in": "query"
}
],
"responses": {
"200": {
"description": "alertGroups",
"schema": {
"$ref": "#/definitions/alertGroups"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/alertmanager/grafana/api/v2/silence/{SilenceId}": {
"get": {
"description": "get silence",
"tags": ["alertmanager"],
"operationId": "RouteGetGrafanaSilence",
"parameters": [
{
"type": "string",
"name": "SilenceId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "gettableSilence",
"schema": {
"$ref": "#/definitions/gettableSilence"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"delete": {
"description": "delete silence",
"tags": ["alertmanager"],
"operationId": "RouteDeleteGrafanaSilence",
"parameters": [
{
"type": "string",
"name": "SilenceId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/alertmanager/grafana/api/v2/silences": {
"get": {
"description": "get silences",
"tags": ["alertmanager"],
"operationId": "RouteGetGrafanaSilences",
"parameters": [
{
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Filter",
"name": "filter",
"in": "query"
}
],
"responses": {
"200": {
"description": "gettableSilences",
"schema": {
"$ref": "#/definitions/gettableSilences"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"post": {
"description": "create silence",
"tags": ["alertmanager"],
"operationId": "RouteCreateGrafanaSilence",
"parameters": [
{
"name": "Silence",
"in": "body",
"schema": {
"$ref": "#/definitions/postableSilence"
}
}
],
"responses": {
"201": {
"description": "gettableSilence",
"schema": {
"$ref": "#/definitions/gettableSilence"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/alertmanager/grafana/api/v2/status": {
"get": {
"description": "get alertmanager status and configuration",
"tags": ["alertmanager"],
"operationId": "RouteGetGrafanaAMStatus",
"responses": {
"200": {
"description": "GettableStatus",
"schema": {
"$ref": "#/definitions/GettableStatus"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/alertmanager/grafana/config/api/v1/alerts": {
"get": {
"description": "gets an Alerting config",
"tags": ["alertmanager"],
"operationId": "RouteGetGrafanaAlertingConfig",
"responses": {
"200": {
"description": "GettableUserConfig",
"schema": {
"$ref": "#/definitions/GettableUserConfig"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"post": {
"description": "sets an Alerting config",
"tags": ["alertmanager"],
"operationId": "RoutePostGrafanaAlertingConfig",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/PostableUserConfig"
}
}
],
"responses": {
"201": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"delete": {
"description": "deletes the Alerting config for a tenant",
"tags": ["alertmanager"],
"operationId": "RouteDeleteGrafanaAlertingConfig",
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/alertmanager/grafana/config/api/v1/receivers/test": {
"post": {
"tags": ["alertmanager"],
"summary": "Test Grafana managed receivers without saving them.",
"operationId": "RoutePostTestGrafanaReceivers",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/TestReceiversConfigBodyParams"
}
}
],
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"207": {
"description": "MultiStatus",
"schema": {
"$ref": "#/definitions/MultiStatus"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
},
"403": {
"description": "PermissionDenied",
"schema": {
"$ref": "#/definitions/PermissionDenied"
}
},
"404": {
"description": "AlertManagerNotFound",
"schema": {
"$ref": "#/definitions/AlertManagerNotFound"
}
},
"408": {
"description": "Failure",
"schema": {
"$ref": "#/definitions/Failure"
}
},
"409": {
"description": "AlertManagerNotReady",
"schema": {
"$ref": "#/definitions/AlertManagerNotReady"
}
}
}
}
},
"/alertmanager/{Recipient}/api/v2/alerts": {
"get": {
"description": "get alertmanager alerts",
"tags": ["alertmanager"],
"operationId": "RouteGetAMAlerts",
"parameters": [
{
"type": "boolean",
"default": true,
"x-go-name": "Active",
"description": "Show active alerts",
"name": "active",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Silenced",
"description": "Show silenced alerts",
"name": "silenced",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Inhibited",
"description": "Show inhibited alerts",
"name": "inhibited",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Matchers",
"description": "A list of matchers to filter alerts by",
"name": "filter",
"in": "query"
},
{
"type": "string",
"x-go-name": "Receivers",
"description": "A regex matching receivers to filter alerts by",
"name": "receiver",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "gettableAlerts",
"schema": {
"$ref": "#/definitions/gettableAlerts"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"post": {
"description": "create alertmanager alerts",
"tags": ["alertmanager"],
"operationId": "RoutePostAMAlerts",
"parameters": [
{
"name": "PostableAlerts",
"in": "body",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/postableAlert"
}
}
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/alertmanager/{Recipient}/api/v2/alerts/groups": {
"get": {
"description": "get alertmanager alerts",
"tags": ["alertmanager"],
"operationId": "RouteGetAMAlertGroups",
"parameters": [
{
"type": "boolean",
"default": true,
"x-go-name": "Active",
"description": "Show active alerts",
"name": "active",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Silenced",
"description": "Show silenced alerts",
"name": "silenced",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Inhibited",
"description": "Show inhibited alerts",
"name": "inhibited",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Matchers",
"description": "A list of matchers to filter alerts by",
"name": "filter",
"in": "query"
},
{
"type": "string",
"x-go-name": "Receivers",
"description": "A regex matching receivers to filter alerts by",
"name": "receiver",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "alertGroups",
"schema": {
"$ref": "#/definitions/alertGroups"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/alertmanager/{Recipient}/api/v2/silence/{SilenceId}": {
"get": {
"description": "get silence",
"tags": ["alertmanager"],
"operationId": "RouteGetSilence",
"parameters": [
{
"type": "string",
"name": "SilenceId",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "gettableSilence",
"schema": {
"$ref": "#/definitions/gettableSilence"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"delete": {
"description": "delete silence",
"tags": ["alertmanager"],
"operationId": "RouteDeleteSilence",
"parameters": [
{
"type": "string",
"name": "SilenceId",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/alertmanager/{Recipient}/api/v2/silences": {
"get": {
"description": "get silences",
"tags": ["alertmanager"],
"operationId": "RouteGetSilences",
"parameters": [
{
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Filter",
"name": "filter",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "gettableSilences",
"schema": {
"$ref": "#/definitions/gettableSilences"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"post": {
"description": "create silence",
"tags": ["alertmanager"],
"operationId": "RouteCreateSilence",
"parameters": [
{
"name": "Silence",
"in": "body",
"schema": {
"$ref": "#/definitions/postableSilence"
}
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"201": {
"description": "gettableSilence",
"schema": {
"$ref": "#/definitions/gettableSilence"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/alertmanager/{Recipient}/api/v2/status": {
"get": {
"description": "get alertmanager status and configuration",
"tags": ["alertmanager"],
"operationId": "RouteGetAMStatus",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "GettableStatus",
"schema": {
"$ref": "#/definitions/GettableStatus"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/alertmanager/{Recipient}/config/api/v1/alerts": {
"get": {
"description": "gets an Alerting config",
"tags": ["alertmanager"],
"operationId": "RouteGetAlertingConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "GettableUserConfig",
"schema": {
"$ref": "#/definitions/GettableUserConfig"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"post": {
"description": "sets an Alerting config",
"tags": ["alertmanager"],
"operationId": "RoutePostAlertingConfig",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/PostableUserConfig"
}
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"201": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"delete": {
"description": "deletes the Alerting config for a tenant",
"tags": ["alertmanager"],
"operationId": "RouteDeleteAlertingConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/alertmanager/{Recipient}/config/api/v1/receivers/test": {
"post": {
"tags": ["alertmanager"],
"summary": "Test Grafana managed receivers without saving them.",
"operationId": "RoutePostTestReceivers",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/TestReceiversConfigBodyParams"
}
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"207": {
"description": "MultiStatus",
"schema": {
"$ref": "#/definitions/MultiStatus"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
},
"403": {
"description": "PermissionDenied",
"schema": {
"$ref": "#/definitions/PermissionDenied"
}
},
"404": {
"description": "AlertManagerNotFound",
"schema": {
"$ref": "#/definitions/AlertManagerNotFound"
}
},
"408": {
"description": "Failure",
"schema": {
"$ref": "#/definitions/Failure"
}
},
"409": {
"description": "AlertManagerNotReady",
"schema": {
"$ref": "#/definitions/AlertManagerNotReady"
}
}
}
}
},
"/alerts": {
"get": {
"tags": ["legacy_alerts"],
"summary": "Get legacy alerts.",
"operationId": "getAlerts",
"parameters": [
{
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "DashboardID",
"description": "Limit response to alerts in specified dashboard(s). You can specify multiple dashboards.",
"name": "dashboardId",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"x-go-name": "PanelID",
"description": "Limit response to alert for a specified panel on a dashboard.",
"name": "panelId",
"in": "query"
},
{
"type": "string",
"x-go-name": "Query",
"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",
"x-go-name": "State",
"description": "Return alerts with one or more of the following alert states",
"name": "state",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"x-go-name": "Limit",
"description": "Limit response to X number of alerts.",
"name": "limit",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"x-go-name": "FolderID",
"description": "Limit response to alerts of dashboards in specified folder(s). You can specify multiple folders",
"name": "folderId",
"in": "query"
},
{
"type": "string",
"x-go-name": "DashboardQuery",
"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",
"x-go-name": "DashboardTag",
"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",
"x-go-name": "DashboardID",
"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": [
{
"x-go-name": "Body",
"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",
"x-go-name": "AlertID",
"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",
"x-go-name": "AlertID",
"name": "alert_id",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"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",
"x-go-name": "From",
"description": "Find annotations created after specific epoch datetime in milliseconds.",
"name": "from",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"x-go-name": "To",
"description": "Find annotations created before specific epoch datetime in milliseconds.",
"name": "to",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"description": "Limit response to annotations created by specific user.",
"name": "userId",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"x-go-name": "AlertID",
"description": "Find annotations for a specified alert.",
"name": "alertId",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"x-go-name": "DashboardID",
"description": "Find annotations that are scoped to a specific dashboard",
"name": "dashboardId",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"x-go-name": "PanelID",
"description": "Find annotations that are scoped to a specific panel",
"name": "panelId",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"x-go-name": "Limit",
"description": "Max limit for results returned.",
"name": "limit",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"x-go-name": "Tags",
"description": "Use this to filter global annotations. Global 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",
"x-go-name": "Type",
"description": "Return alerts or user created annotations",
"name": "type",
"in": "query"
},
{
"type": "boolean",
"x-go-name": "MatchAny",
"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 a global annotation is created and can be queried in any dashboard that adds the Grafana annotations data source. When creating a region annotation include the timeEnd property.\nThe format for `time` and `timeEnd` should be epoch numbers in millisecond resolution.\nThe response for this HTTP request is slightly different in versions prior to v6.4. In prior versions you would also get an endId if you where creating a region. But in 6.4 regions are represented using a single event with time and timeEnd properties.",
"tags": ["annotations"],
"summary": "Create Annotation.",
"operationId": "createAnnotation",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PostAnnotationsCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/createAnnotationResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/annotations/graphite": {
"post": {
"description": "Creates an annotation by using Graphite-compatible event format. The `when` and `data` fields are optional. If `when` is not specified then the current time will be used as annotations timestamp. The `tags` field can also be in prior to Graphite `0.10.0` format (string with multiple tags being separated by a space).",
"tags": ["annotations"],
"summary": "Create Annotation in Graphite format.",
"operationId": "createGraphiteAnnotation",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PostGraphiteAnnotationsCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/createAnnotationResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/annotations/mass-delete": {
"post": {
"tags": ["annotations"],
"summary": "Delete multiple annotations.",
"operationId": "massDeleteAnnotations",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DeleteAnnotationsCmd"
}
}
],
"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",
"x-go-name": "Tag",
"description": "Tag is a string that you can use to filter tags.",
"name": "tag",
"in": "query"
},
{
"type": "string",
"default": "100",
"x-go-name": "Limit",
"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}": {
"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",
"x-go-name": "AnnotationID",
"name": "annotation_id",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateAnnotationsCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "Deletes the annotation that matches the specified ID.",
"tags": ["annotations"],
"summary": "Delete Annotation By ID.",
"operationId": "deleteAnnotation",
"parameters": [
{
"type": "string",
"x-go-name": "AnnotationID",
"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",
"x-go-name": "AnnotationID",
"name": "annotation_id",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"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,
"x-go-name": "IncludeExpired",
"description": "Show expired keys",
"name": "includeExpired",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/getAPIkeyResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "Will return details of the created API key",
"tags": ["api_keys"],
"summary": "Creates an API key.",
"operationId": "addAPIkey",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddApiKeyCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/postAPIkeyResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"409": {
"$ref": "#/responses/conflictError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/auth/keys/{id}": {
"delete": {
"tags": ["api_keys"],
"summary": "Delete API key.",
"operationId": "deleteAPIkey",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboard/snapshots": {
"get": {
"tags": ["snapshots"],
"summary": "List snapshots.",
"operationId": "getSnapshots",
"parameters": [
{
"type": "string",
"x-go-name": "Query",
"description": "Search Query",
"name": "query",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 1000,
"x-go-name": "Limit",
"description": "Limit the number of returned results",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/getSnapshotsResponse"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/calculate-diff": {
"post": {
"produces": ["application/json", "text/html"],
"tags": ["dashboards"],
"summary": "Perform diff on two dashboards.",
"operationId": "calcDashboardDiff",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"base": {
"$ref": "#/definitions/CalculateDiffTarget"
},
"diffType": {
"description": "The type of diff to return\nDescription:\n`basic`\n`json`",
"type": "string",
"enum": ["basic", "json"],
"x-go-name": "DiffType"
},
"new": {
"$ref": "#/definitions/CalculateDiffTarget"
}
}
}
}
],
"responses": {
"200": {
"$ref": "#/responses/dashboardDiffResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/db": {
"post": {
"description": "Creates a new dashboard or updates an existing dashboard.",
"tags": ["dashboards"],
"summary": "Create / Update dashboard",
"operationId": "postDashboard",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SaveDashboardCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/postDashboardResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"412": {
"$ref": "#/responses/preconditionFailedError"
},
"422": {
"$ref": "#/responses/unprocessableEntityError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/home": {
"get": {
"tags": ["dashboards"],
"summary": "Get home dashboard.",
"operationId": "getHomeDashboard",
"responses": {
"200": {
"$ref": "#/responses/getHomeDashboardResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/id/{DashboardID}/permissions": {
"get": {
"tags": ["dashboard_permissions"],
"summary": "Gets all existing permissions for the given dashboard.",
"operationId": "getDashboardPermissions",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "DashboardID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getDashboardPermissionsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "This operation will remove existing permissions if theyre not included in the request.",
"tags": ["dashboard_permissions"],
"summary": "Updates permissions for a dashboard.",
"operationId": "postDashboardPermissions",
"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": {
"tags": ["dashboard_versions"],
"summary": "Restore a dashboard to a given dashboard version.",
"operationId": "restoreDashboardVersion",
"parameters": [
{
"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": {
"tags": ["dashboard_versions"],
"summary": "Gets all existing versions for the dashboard.",
"operationId": "getDashboardVersions",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "DashboardID",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"default": 0,
"x-go-name": "Limit",
"description": "Maximum number of results to return",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 0,
"x-go-name": "Start",
"description": "Version to start from when returning queries",
"name": "start",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/dashboardVersionsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/id/{DashboardID}/versions/{DashboardVersionID}": {
"get": {
"tags": ["dashboard_versions"],
"summary": "Get a specific dashboard version.",
"operationId": "getDashboardVersion",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "DashboardID",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"name": "DashboardVersionID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/dashboardVersionResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/import": {
"post": {
"tags": ["dashboards"],
"summary": "Import dashboard.",
"operationId": "importDashboard",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ImportDashboardRequest"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/importDashboardResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"412": {
"$ref": "#/responses/preconditionFailedError"
},
"422": {
"$ref": "#/responses/unprocessableEntityError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/tags": {
"get": {
"tags": ["dashboards"],
"summary": "Get all dashboards tags of an organisation.",
"operationId": "getDashboardTags",
"responses": {
"200": {
"$ref": "#/responses/dashboardsTagsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/trim": {
"post": {
"tags": ["dashboards"],
"summary": "Trim defaults from dashboard.",
"operationId": "trimDashboard",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/TrimDashboardCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/trimDashboardResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboards/uid/{uid}": {
"get": {
"description": "Will return the dashboard given the dashboard unique identifier (uid).",
"tags": ["dashboards"],
"summary": "Get dashboard by uid.",
"operationId": "getDashboardByUID",
"parameters": [
{
"type": "string",
"x-go-name": "UID",
"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",
"x-go-name": "UID",
"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"
}
}
}
},
"/datasources": {
"get": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scope: `datasources:*`.",
"tags": ["datasources"],
"summary": "Get all data sources.",
"operationId": "getDatasources",
"responses": {
"200": {
"$ref": "#/responses/getDatasourcesResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "By defining `password` and `basicAuthPassword` under secureJsonData property\nGrafana encrypts them securely as an encrypted blob in the database.\nThe response then lists the encrypted fields under secureJsonFields.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:create`",
"tags": ["datasources"],
"summary": "Create a data source.",
"operationId": "addDatasource",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddDataSourceCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/createOrUpdateDatasourceResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"409": {
"$ref": "#/responses/conflictError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/id/{datasource_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",
"x-go-name": "DatasourceName",
"name": "datasource_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/{datasource_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",
"x-go-name": "DatasourceName",
"name": "datasource_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",
"x-go-name": "DatasourceName",
"name": "datasource_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/{datasource_id}/{datasource_proxy_route}": {
"get": {
"description": "Proxies all calls to the actual data source.",
"tags": ["datasources"],
"summary": "Data source proxy GET calls.",
"operationId": "datasourceProxyGETcalls",
"parameters": [
{
"type": "string",
"x-go-name": "DatasourceID",
"name": "datasource_id",
"in": "path",
"required": true
},
{
"type": "string",
"x-go-name": "DatasourceProxyRoute",
"name": "datasource_proxy_route",
"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": "datasourceProxyPOSTcalls",
"parameters": [
{
"type": "string",
"x-go-name": "DatasourceID",
"name": "datasource_id",
"in": "path",
"required": true
},
{
"type": "string",
"x-go-name": "DatasourceProxyRoute",
"name": "datasource_proxy_route",
"in": "path",
"required": true
},
{
"name": "DatasourceProxyParam",
"in": "body",
"required": true,
"schema": {
"type": "object"
}
}
],
"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": "datasourceProxyDELETEcalls",
"parameters": [
{
"type": "string",
"x-go-name": "DatasourceID",
"name": "datasource_id",
"in": "path",
"required": true
},
{
"type": "string",
"x-go-name": "DatasourceProxyRoute",
"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/{datasource_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",
"x-go-name": "DatasourceUID",
"name": "datasource_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"
}
}
},
"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",
"x-go-name": "DatasourceUID",
"name": "datasource_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/{datasource_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).",
"tags": ["datasources"],
"summary": "Get a single data source by Id.",
"operationId": "getDatasourceByID",
"parameters": [
{
"type": "string",
"x-go-name": "DatasourceID",
"name": "datasource_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).",
"tags": ["datasources"],
"summary": "Update an existing data source.",
"operationId": "updateDatasource",
"parameters": [
{
"type": "string",
"x-go-name": "DatasourceID",
"name": "datasource_id",
"in": "path",
"required": true
},
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateDataSourceCommand"
}
}
],
"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).",
"tags": ["datasources"],
"summary": "Delete an existing data source by id.",
"operationId": "deleteDatasourceByID",
"parameters": [
{
"type": "string",
"x-go-name": "DatasourceID",
"name": "datasource_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/{datasource_id}/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",
"x-go-name": "DatasourceID",
"name": "datasource_id",
"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/{datasource_id}/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",
"x-go-name": "DatasourceID",
"name": "datasource_id",
"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/{datasource_id}/permissions": {
"get": {
"description": "Gets all existing permissions for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:read` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).",
"tags": ["datasource_permissions", "enterprise"],
"summary": "Get permissions for a data source.",
"operationId": "getPermissions",
"parameters": [
{
"type": "string",
"x-go-name": "DatasourceID",
"name": "datasource_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getPermissionseResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/{datasource_id}/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",
"x-go-name": "DatasourceID",
"name": "datasource_id",
"in": "path",
"required": true
},
{
"type": "string",
"x-go-name": "PermissionID",
"name": "permissionId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/ds/query": {
"post": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:query`.",
"tags": ["ds"],
"summary": "Query metrics with expressions",
"operationId": "queryMetricsWithExpressions",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MetricRequest"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/queryDataResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/folders": {
"get": {
"description": "Returns all folders that the authenticated user has permission to view.",
"tags": ["folders"],
"summary": "Get all folders.",
"operationId": "getFolders",
"parameters": [
{
"type": "integer",
"format": "int64",
"default": 1000,
"x-go-name": "Limit",
"description": "Limit the maximum number of folders to return",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 1,
"x-go-name": "Page",
"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": [
{
"x-go-name": "Body",
"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",
"x-go-name": "FolderID",
"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",
"x-go-name": "FolderUID",
"name": "folder_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": ""
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"tags": ["folders"],
"summary": "Update folder.",
"operationId": "updateFolder",
"parameters": [
{
"type": "string",
"x-go-name": "FolderUID",
"name": "folder_uid",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"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",
"x-go-name": "FolderUID",
"name": "folder_uid",
"in": "path",
"required": true
},
{
"type": "boolean",
"default": false,
"x-go-name": "ForceDeleteRules",
"description": "If `true` any Grafana 8 Alerts under this folder will be deleted.\nSet to `false` so that the request will fail if the folder contains any Grafana 8 Alerts.",
"name": "forceDeleteRules",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/deleteFolderResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/folders/{folder_uid}/permissions": {
"get": {
"tags": ["folder_permissions"],
"summary": "Gets all existing permissions for the folder with the given `uid`.",
"operationId": "getFolderPermissions",
"parameters": [
{
"type": "string",
"x-go-name": "FolderUID",
"name": "folder_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getDashboardPermissionsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"tags": ["folder_permissions"],
"summary": "Updates permissions for a folder. This operation will remove existing permissions if theyre not included in the request.",
"operationId": "updateFolderPermissions",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateDashboardAclCommand"
}
},
{
"type": "string",
"x-go-name": "FolderUID",
"name": "folder_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"
}
}
}
},
"/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",
"x-go-name": "SearchString",
"description": "Part of the name or description searched for.",
"name": "searchString",
"in": "query"
},
{
"enum": [1, 2],
"type": "integer",
"format": "int64",
"x-go-name": "Kind",
"description": "Kind of element to search for.",
"name": "kind",
"in": "query"
},
{
"enum": ["alpha-asc", "alpha-desc"],
"type": "string",
"x-go-name": "SortDirection",
"description": "Sort order of elements.",
"name": "sortDirection",
"in": "query"
},
{
"type": "string",
"x-go-name": "TypeFilter",
"description": "A comma separated list of types to filter the elements by",
"name": "typeFilter",
"in": "query"
},
{
"type": "string",
"x-go-name": "ExcludeUID",
"description": "Element UID to exclude from search results.",
"name": "excludeUid",
"in": "query"
},
{
"type": "string",
"x-go-name": "FolderFilter",
"description": "A comma separated list of folder ID(s) to filter the elements by.",
"name": "folderFilter",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 100,
"x-go-name": "PerPage",
"description": "The number of results per page.",
"name": "perPage",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 1,
"x-go-name": "Page",
"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": [
{
"x-go-name": "Body",
"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",
"x-go-name": "Name",
"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",
"x-go-name": "UID",
"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",
"x-go-name": "UID",
"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": [
{
"type": "string",
"x-go-name": "UID",
"name": "library_element_uid",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PatchLibraryElementCommand"
}
}
],
"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",
"x-go-name": "UID",
"name": "library_element_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getLibraryElementConnectionsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/licensing/check": {
"get": {
"tags": ["licensing", "enterprise"],
"summary": "Check license availability.",
"operationId": "getLicenseStatus",
"responses": {
"200": {
"$ref": "#/responses/getLicenseStatusResponse"
}
}
}
},
"/licensing/custom-permissions": {
"get": {
"description": "You need to have a permission with action `licensing.reports:read`.",
"tags": ["licensing", "enterprise"],
"summary": "Get custom permissions report.",
"operationId": "getCustomPermissionsReport",
"responses": {
"200": {
"$ref": "#/responses/getCustomPermissionsReportResponse"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/licensing/custom-permissions-csv": {
"get": {
"description": "You need to have a permission with action `licensing.reports:read`.",
"produces": ["text/csv"],
"tags": ["licensing", "enterprise"],
"summary": "Get custom permissions report in CSV format.",
"operationId": "getCustomPermissionsCSV",
"responses": {
"200": {
"$ref": "#/responses/getCustomPermissionsReportResponse"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/licensing/refresh-stats": {
"get": {
"description": "You need to have a permission with action `licensing:read`.",
"tags": ["licensing", "enterprise"],
"summary": "Refresh license stats.",
"operationId": "refreshLicenseStats",
"responses": {
"200": {
"$ref": "#/responses/refreshLicenseStatsResponse"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/licensing/token": {
"get": {
"description": "You need to have a permission with action `licensing:read`.",
"tags": ["licensing", "enterprise"],
"summary": "Get license token.",
"operationId": "getLicenseToken",
"responses": {
"200": {
"$ref": "#/responses/getLicenseTokenResponse"
}
}
},
"post": {
"description": "You need to have a permission with action `licensing:update`.",
"tags": ["licensing", "enterprise"],
"summary": "Create license token.",
"operationId": "postLicenseToken",
"parameters": [
{
"x-go-name": "Body",
"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": [
{
"x-go-name": "Body",
"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": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/postRenewLicenseTokenResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"404": {
"$ref": "#/responses/notFoundError"
}
}
}
},
"/login/saml": {
"get": {
"tags": ["saml", "enterprise"],
"summary": "It initiates the login flow by redirecting the user to the IdP.",
"operationId": "getSAMLLogin",
"responses": {
"302": {
"description": ""
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/logout/saml": {
"get": {
"tags": ["saml", "enterprise"],
"summary": "GetLogout initiates single logout process.",
"operationId": "getSAMLLogout",
"responses": {
"302": {
"description": ""
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org": {
"get": {
"description": "Get current Organization",
"tags": ["current_org_details"],
"operationId": "getOrg",
"responses": {
"200": {
"$ref": "#/responses/getOrgResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"tags": ["current_org_details"],
"summary": "Update current Organization.",
"operationId": "updateOrg",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateOrgForm"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org/address": {
"put": {
"tags": ["current_org_details"],
"summary": "Update current Organization's address.",
"operationId": "updateOrgAddress",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateOrgAddressForm"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org/invites": {
"get": {
"tags": ["org_invites"],
"summary": "Get pending invites.",
"operationId": "getInvites",
"responses": {
"200": {
"$ref": "#/responses/getInvitesResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"tags": ["org_invites"],
"summary": "Add invite.",
"operationId": "addInvite",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddInviteForm"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/addOrgUser"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"412": {
"$ref": "#/responses/SMTPNotEnabledError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org/preferences": {
"get": {
"tags": ["org_preferences"],
"summary": "Get Current Org Prefs.",
"operationId": "getOrgPreferences",
"responses": {
"200": {
"$ref": "#/responses/getPreferencesResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"tags": ["org_preferences"],
"summary": "Update Current Org Prefs.",
"operationId": "updateOrgPreferences",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdatePrefsCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/addOrgUser"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org/users": {
"get": {
"description": "Returns all org users within the current organization. Accessible to users with org admin role.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:read` with scope `users:*`.",
"tags": ["current_org_details"],
"summary": "Get all users within the current organization.",
"operationId": "getOrgUsers",
"responses": {
"200": {
"$ref": "#/responses/getOrgUsersResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "Adds a global user to the current organization.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:add` with scope `users:*`.",
"tags": ["current_org_details"],
"summary": "Add a new user to the current organization",
"operationId": "addOrgUser",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddOrgUserCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org/users/lookup": {
"get": {
"description": "Returns all org users within the current organization, but with less detailed information.\nAccessible to users with org admin role, admin in any folder or admin of any team.\nMainly used by Grafana UI for providing list of users when adding team members and when editing folder/dashboard permissions.",
"tags": ["current_org_details"],
"summary": "Get all users within the current organization (lookup)",
"operationId": "lookupOrgUsers",
"parameters": [
{
"type": "string",
"x-go-name": "Query",
"name": "query",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"x-go-name": "Limit",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/lookupOrgUsersResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org/users/{user_id}": {
"delete": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:remove` with scope `users:*`.",
"tags": ["current_org_details"],
"summary": "Delete user in current organization",
"operationId": "deleteOrgUser",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"patch": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users.role:update` with scope `users:*`.",
"tags": ["current_org_details"],
"summary": "Updates the given user",
"operationId": "updateOrgUser",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateOrgUserCommand"
}
},
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/org/{invitation_code}/invites": {
"delete": {
"tags": ["org_invites"],
"summary": "Revoke invite.",
"operationId": "revokeInvite",
"parameters": [
{
"type": "string",
"x-go-name": "Code",
"name": "invitation_code",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/orgs": {
"get": {
"security": [
{
"basic": []
}
],
"description": "Search all Organizations",
"tags": ["orgs"],
"operationId": "searchOrg",
"parameters": [
{
"type": "integer",
"format": "int64",
"default": 1,
"x-go-name": "Page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 1000,
"x-go-name": "PerPage",
"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",
"x-go-name": "Name",
"name": "name",
"in": "query"
},
{
"type": "string",
"x-go-name": "Query",
"description": "If set it will return results where the query value is contained in the name field. Query values with spaces need to be URL encoded.",
"name": "query",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/searchOrgResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"409": {
"$ref": "#/responses/conflictError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "Only works if [users.allow_org_create](https://grafana.com/docs/grafana/latest/administration/configuration/#allow_org_create) is set.",
"tags": ["orgs"],
"summary": "Create Organization.",
"operationId": "createOrg",
"parameters": [
{
"x-go-name": "Body",
"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",
"x-go-name": "OrgName",
"name": "org_name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getOrgResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/orgs/{org_id}": {
"get": {
"security": [
{
"basic": []
}
],
"tags": ["orgs"],
"summary": "Get Organization by ID.",
"operationId": "getOrgByID",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "OrgID",
"name": "org_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getOrgResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"security": [
{
"basic": []
}
],
"tags": ["orgs"],
"summary": "Update Organization.",
"operationId": "adminUpdateOrg",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateOrgForm"
}
},
{
"type": "integer",
"format": "int64",
"x-go-name": "OrgID",
"name": "org_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"security": [
{
"basic": []
}
],
"tags": ["orgs"],
"summary": "Delete Organization.",
"operationId": "adminDeleteOrg",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "OrgID",
"name": "org_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/orgs/{org_id}/address": {
"put": {
"tags": ["orgs"],
"summary": "Update Organization's address.",
"operationId": "adminUpdateOrgAddress",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateOrgAddressForm"
}
},
{
"type": "integer",
"format": "int64",
"x-go-name": "OrgID",
"name": "org_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/orgs/{org_id}/quotas": {
"get": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:read` and scope `org:id:1` (orgIDScope).\nlist",
"tags": ["orgs"],
"summary": "Fetch Organization quota.",
"operationId": "getOrgQuota",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "OrgID",
"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": [
{
"type": "string",
"x-go-name": "QuotaTarget",
"name": "quota_target",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"x-go-name": "OrgID",
"name": "org_id",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateOrgQuotaCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/orgs/{org_id}/users": {
"get": {
"security": [
{
"basic": []
}
],
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:read` with scope `users:*`.",
"tags": ["orgs"],
"summary": "Get Users in Organization.",
"operationId": "adminGetOrgUsers",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "OrgID",
"name": "org_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getOrgUsersResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "Adds a global user to the current organization.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:add` with scope `users:*`.",
"tags": ["orgs"],
"summary": "Add a new user to the current organization",
"operationId": "adminAddOrgUser",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AddOrgUserCommand"
}
},
{
"type": "integer",
"format": "int64",
"x-go-name": "OrgID",
"name": "org_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/orgs/{org_id}/users/{user_id}": {
"delete": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:remove` with scope `users:*`.",
"tags": ["orgs"],
"summary": "Delete user in current organization",
"operationId": "adminDeleteOrgUser",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "OrgID",
"name": "org_id",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"name": "user_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"patch": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users.role:update` with scope `users:*`.",
"tags": ["orgs"],
"summary": "Update Users in Organization.",
"operationId": "adminUpdateOrgUser",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateOrgUserCommand"
}
},
{
"type": "integer",
"format": "int64",
"x-go-name": "OrgID",
"name": "org_id",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"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"
}
}
}
},
"/prometheus/grafana/api/v1/alerts": {
"get": {
"description": "gets the current alerts",
"tags": ["prometheus"],
"operationId": "RouteGetGrafanaAlertStatuses",
"responses": {
"200": {
"description": "AlertResponse",
"schema": {
"$ref": "#/definitions/AlertResponse"
}
}
}
}
},
"/prometheus/grafana/api/v1/rules": {
"get": {
"description": "gets the evaluation statuses of all rules",
"tags": ["prometheus"],
"operationId": "RouteGetGrafanaRuleStatuses",
"parameters": [
{
"type": "string",
"name": "DashboardUID",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"name": "PanelID",
"in": "query"
}
],
"responses": {
"200": {
"description": "RuleResponse",
"schema": {
"$ref": "#/definitions/RuleResponse"
}
}
}
}
},
"/prometheus/{Recipient}/api/v1/alerts": {
"get": {
"description": "gets the current alerts",
"tags": ["prometheus"],
"operationId": "RouteGetAlertStatuses",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "AlertResponse",
"schema": {
"$ref": "#/definitions/AlertResponse"
}
}
}
}
},
"/prometheus/{Recipient}/api/v1/rules": {
"get": {
"description": "gets the evaluation statuses of all rules",
"tags": ["prometheus"],
"operationId": "RouteGetRuleStatuses",
"parameters": [
{
"type": "string",
"name": "DashboardUID",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"name": "PanelID",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "RuleResponse",
"schema": {
"$ref": "#/definitions/RuleResponse"
}
}
}
}
},
"/recording-rules": {
"get": {
"tags": ["recording_rules", "enterprise"],
"summary": "Get all recording rules.",
"operationId": "listRecordingRules",
"responses": {
"200": {
"$ref": "#/responses/listRecordingRulesResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"tags": ["recording_rules", "enterprise"],
"summary": "Update a recording rule.",
"operationId": "updateRecordingRule",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RecordingRuleJSON"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/recordingRuleResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"tags": ["recording_rules", "enterprise"],
"summary": "Create a new recording rule.",
"operationId": "createRecordingRule",
"parameters": [
{
"x-go-name": "Body",
"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": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RecordingRuleJSON"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"422": {
"$ref": "#/responses/unprocessableEntityError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/recording-rules/writer": {
"get": {
"tags": ["recording_rules", "enterprise"],
"summary": "Get the write target.",
"operationId": "getRecordingRuleWriteTarget",
"responses": {
"200": {
"$ref": "#/responses/recordingRuleWriteTargetResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"tags": ["recording_rules", "enterprise"],
"summary": "Create a new write target.",
"operationId": "createRecordingRuleWriteTarget",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PrometheusRemoteWriteTargetJSON"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/recordingRuleWriteTargetResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"422": {
"$ref": "#/responses/unprocessableEntityError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"tags": ["recording_rules", "enterprise"],
"summary": "Delete the write target.",
"operationId": "deleteRecordingRuleWriteTarget",
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/recording-rules/{recordingRuleID}": {
"delete": {
"tags": ["recording_rules", "enterprise"],
"summary": "Delete a recording rule.",
"operationId": "deleteRecordingRule",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "RecordingRuleID",
"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": [
{
"x-go-name": "Body",
"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 clients 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": [
{
"x-go-name": "Body",
"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": "Available to all users and with a valid license.",
"produces": ["application/pdf"],
"tags": ["reports", "enterprise"],
"summary": "Render report for dashboard.",
"operationId": "renderReportPDF",
"parameters": [
{
"type": "integer",
"format": "int64",
"name": "DashboardID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/contentResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/reports/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": [
{
"x-go-name": "Body",
"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": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateOrUpdateConfigCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/reports/{reportID}": {
"get": {
"description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports:read` with scope `reports:id:\u003creport ID\u003e`.",
"tags": ["reports", "enterprise"],
"summary": "Get a report.",
"operationId": "getReport",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "ReportID",
"name": "reportID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getReportResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports.admin:write` with scope `reports:id:\u003creport ID\u003e`.",
"tags": ["reports", "enterprise"],
"summary": "Update a report.",
"operationId": "updateReport",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "ReportID",
"name": "reportID",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"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"
}
}
},
"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",
"x-go-name": "ReportID",
"name": "reportID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/ruler/grafana/api/v1/rules": {
"get": {
"description": "List rule groups",
"produces": ["application/json"],
"tags": ["ruler"],
"operationId": "RouteGetGrafanaRulesConfig",
"parameters": [
{
"type": "string",
"name": "DashboardUID",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"name": "PanelID",
"in": "query"
}
],
"responses": {
"202": {
"description": "NamespaceConfigResponse",
"schema": {
"$ref": "#/definitions/NamespaceConfigResponse"
}
}
}
}
},
"/ruler/grafana/api/v1/rules/{Namespace}": {
"get": {
"description": "Get rule groups by namespace",
"produces": ["application/json"],
"tags": ["ruler"],
"operationId": "RouteGetNamespaceGrafanaRulesConfig",
"parameters": [
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "NamespaceConfigResponse",
"schema": {
"$ref": "#/definitions/NamespaceConfigResponse"
}
}
}
},
"post": {
"description": "Creates or updates a rule group",
"consumes": ["application/json", "application/yaml"],
"tags": ["ruler"],
"operationId": "RoutePostNameGrafanaRulesConfig",
"parameters": [
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
},
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/PostableRuleGroupConfig"
}
}
],
"responses": {
"202": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
}
}
},
"delete": {
"description": "Delete namespace",
"tags": ["ruler"],
"operationId": "RouteDeleteNamespaceGrafanaRulesConfig",
"parameters": [
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
}
}
}
},
"/ruler/grafana/api/v1/rules/{Namespace}/{Groupname}": {
"get": {
"description": "Get rule group",
"produces": ["application/json"],
"tags": ["ruler"],
"operationId": "RouteGetGrafanaRuleGroupConfig",
"parameters": [
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Groupname",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "RuleGroupConfigResponse",
"schema": {
"$ref": "#/definitions/RuleGroupConfigResponse"
}
}
}
},
"delete": {
"description": "Delete rule group",
"tags": ["ruler"],
"operationId": "RouteDeleteGrafanaRuleGroupConfig",
"parameters": [
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Groupname",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
}
}
}
},
"/ruler/{Recipient}/api/v1/rules": {
"get": {
"description": "List rule groups",
"produces": ["application/json"],
"tags": ["ruler"],
"operationId": "RouteGetRulesConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
},
{
"type": "string",
"name": "DashboardUID",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"name": "PanelID",
"in": "query"
}
],
"responses": {
"202": {
"description": "NamespaceConfigResponse",
"schema": {
"$ref": "#/definitions/NamespaceConfigResponse"
}
}
}
}
},
"/ruler/{Recipient}/api/v1/rules/{Namespace}": {
"get": {
"description": "Get rule groups by namespace",
"produces": ["application/json"],
"tags": ["ruler"],
"operationId": "RouteGetNamespaceRulesConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "NamespaceConfigResponse",
"schema": {
"$ref": "#/definitions/NamespaceConfigResponse"
}
}
}
},
"post": {
"description": "Creates or updates a rule group",
"consumes": ["application/json", "application/yaml"],
"tags": ["ruler"],
"operationId": "RoutePostNameRulesConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
},
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/PostableRuleGroupConfig"
}
}
],
"responses": {
"202": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
}
}
},
"delete": {
"description": "Delete namespace",
"tags": ["ruler"],
"operationId": "RouteDeleteNamespaceRulesConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
}
}
}
},
"/ruler/{Recipient}/api/v1/rules/{Namespace}/{Groupname}": {
"get": {
"description": "Get rule group",
"produces": ["application/json"],
"tags": ["ruler"],
"operationId": "RouteGetRulegGroupConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Groupname",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "RuleGroupConfigResponse",
"schema": {
"$ref": "#/definitions/RuleGroupConfigResponse"
}
}
}
},
"delete": {
"description": "Delete rule group",
"tags": ["ruler"],
"operationId": "RouteDeleteRuleGroupConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Groupname",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
}
}
}
},
"/saml/acs": {
"post": {
"tags": ["saml", "enterprise"],
"summary": "It performs assertion Consumer Service (ACS).",
"operationId": "postACS",
"parameters": [
{
"type": "string",
"name": "RelayState",
"in": "query"
}
],
"responses": {
"302": {
"description": ""
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/saml/metadata": {
"get": {
"produces": ["application/xml;application/samlmetadata+xml"],
"tags": ["saml", "enterprise"],
"summary": "It exposes the SP (Grafana's) metadata for the IdP's consumption.",
"operationId": "getSAMLMetadata",
"responses": {
"200": {
"$ref": "#/responses/contentResponse"
}
}
}
},
"/saml/slo": {
"post": {
"tags": ["saml", "enterprise"],
"summary": "It performs Single Logout (SLO) callback.",
"operationId": "postSLO",
"parameters": [
{
"type": "string",
"name": "SAMLRequest",
"in": "query"
},
{
"type": "string",
"name": "SAMLResponse",
"in": "query"
}
],
"responses": {
"302": {
"description": ""
},
"400": {
"$ref": "#/responses/badRequestError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/search": {
"get": {
"tags": ["search"],
"operationId": "search",
"parameters": [
{
"type": "string",
"x-go-name": "Query",
"description": "Search Query",
"name": "query",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"x-go-name": "Tag",
"description": "List of tags to search for",
"name": "tag",
"in": "query"
},
{
"enum": ["dash-folder", "dash-db"],
"type": "string",
"x-go-name": "Type",
"description": "Type to search for, dash-folder or dash-db",
"name": "type",
"in": "query"
},
{
"type": "array",
"items": {
"type": "integer",
"format": "int64"
},
"x-go-name": "DashboardIds",
"description": "List of dashboard ids to search for",
"name": "dashboardIds",
"in": "query"
},
{
"type": "array",
"items": {
"type": "integer",
"format": "int64"
},
"x-go-name": "FolderIds",
"description": "List of folder ids to search in for dashboards",
"name": "folderIds",
"in": "query"
},
{
"type": "boolean",
"x-go-name": "Starred",
"description": "Flag indicating if only starred Dashboards should be returned",
"name": "starred",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"x-go-name": "Limit",
"description": "Limit the number of returned results (max 5000)",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"x-go-name": "Page",
"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",
"x-go-name": "Permission",
"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",
"x-go-name": "Sort",
"description": "Sort method; for listing all the possible sort methods use the search sorting endpoint.",
"name": "sort",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/searchResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"422": {
"$ref": "#/responses/unprocessableEntityError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/search/sorting": {
"get": {
"description": "List search sorting options",
"tags": ["search"],
"operationId": "searchSorting",
"responses": {
"200": {
"$ref": "#/responses/searchSortingResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
}
}
}
},
"/snapshot/shared-options": {
"get": {
"tags": ["snapshots"],
"summary": "Get snapshot sharing settings.",
"operationId": "getSnapshotSharingOptions",
"responses": {
"200": {
"$ref": "#/responses/getSnapshotSharingOptionsResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
}
}
}
},
"/snapshots": {
"post": {
"description": "Snapshot public mode should be enabled or authentication is required.",
"tags": ["snapshots"],
"summary": "When creating a snapshot using the API, you have to provide the full dashboard payload including the snapshot data. This endpoint is designed for the Grafana UI.",
"operationId": "createSnapshot",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateDashboardSnapshotCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/createSnapshotResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/snapshots-delete/{deleteKey}": {
"get": {
"description": "Snapshot public mode should be enabled or authentication is required.",
"tags": ["snapshots"],
"summary": "Delete Snapshot by deleteKey.",
"operationId": "deleteSnapshotByDeleteKey",
"parameters": [
{
"type": "string",
"x-go-name": "DeleteKey",
"name": "deleteKey",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/snapshots/{key}": {
"get": {
"tags": ["snapshots"],
"summary": "Get Snapshot by Key.",
"operationId": "getSnapshotByKey",
"parameters": [
{
"type": "string",
"x-go-name": "Key",
"name": "key",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/snapshotResponse"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"tags": ["snapshots"],
"summary": "Delete Snapshot by Key.",
"operationId": "deleteSnapshotByKey",
"parameters": [
{
"type": "string",
"x-go-name": "Key",
"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": [
{
"x-go-name": "Body",
"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,
"x-go-name": "Page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 1000,
"x-go-name": "PerPage",
"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",
"x-go-name": "Name",
"name": "name",
"in": "query"
},
{
"type": "string",
"x-go-name": "Query",
"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",
"x-go-name": "TeamID",
"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": [
{
"type": "integer",
"format": "int64",
"x-go-name": "TeamID",
"name": "teamId",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/TeamGroupMapping"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/teams/{teamId}/groups/{groupId}": {
"delete": {
"tags": ["sync_team_groups", "enterprise"],
"summary": "Remove External Group.",
"operationId": "removeTeamGroupApi",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "TeamID",
"name": "teamId",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"x-go-name": "GroupID",
"name": "groupId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/teams/{team_id}": {
"get": {
"tags": ["teams"],
"summary": "Get Team By ID.",
"operationId": "getTeam",
"parameters": [
{
"type": "string",
"x-go-name": "TeamID",
"name": "team_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/getTeamResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"tags": ["teams"],
"summary": "Update Team.",
"operationId": "updateTeam",
"parameters": [
{
"type": "string",
"x-go-name": "TeamID",
"name": "team_id",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateTeamCommand"
}
}
],
"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",
"x-go-name": "TeamID",
"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",
"x-go-name": "TeamID",
"name": "team_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"tags": ["teams"],
"summary": "Add Team Member.",
"operationId": "addTeamMember",
"parameters": [
{
"type": "string",
"x-go-name": "TeamID",
"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": [
{
"type": "string",
"x-go-name": "TeamID",
"name": "team_id",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateTeamMemberCommand"
}
},
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"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",
"x-go-name": "TeamID",
"name": "team_id",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"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",
"x-go-name": "TeamID",
"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",
"x-go-name": "TeamID",
"name": "team_id",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"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"
}
}
}
},
"/tsdb/query": {
"post": {
"description": "Queries a data source having backend implementation.\n\nMost of Grafanas builtin data sources have backend implementation.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:query`.",
"tags": ["datasources"],
"summary": "Query metrics.",
"operationId": "queryDatasource",
"parameters": [
{
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MetricRequest"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/queryDatasourceResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user": {
"get": {
"tags": ["signed_in_user"],
"summary": "Get signed in User.",
"operationId": "getSignedInUser",
"responses": {
"200": {
"$ref": "#/responses/userResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"404": {
"$ref": "#/responses/notFoundError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"put": {
"tags": ["signed_in_user"],
"summary": "Update signed in User.",
"operationId": "updateSignedInUser",
"parameters": [
{
"x-go-name": "Body",
"description": "To change the email, name, login, theme, provide another one.",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateUserCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/userResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/auth-tokens": {
"get": {
"description": "Return a list of all auth tokens (devices) that the actual user currently have logged in from.",
"tags": ["signed_in_user"],
"summary": "Auth tokens of the actual User.",
"operationId": "getSignedInUserAuthTokens",
"responses": {
"200": {
"$ref": "#/responses/getAuthTokensResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/helpflags/clear": {
"get": {
"tags": ["signed_in_user"],
"summary": "Clear user help flag.",
"operationId": "clearHelpFlags",
"responses": {
"200": {
"$ref": "#/responses/helpFlagResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/helpflags/{flag_id}": {
"put": {
"tags": ["signed_in_user"],
"summary": "Set user help flag.",
"operationId": "setHelpFlag",
"parameters": [
{
"type": "string",
"x-go-name": "FlagID",
"name": "flag_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/helpFlagResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/orgs": {
"get": {
"security": [
{
"basic": []
}
],
"description": "Return a list of all organizations of the current user.",
"tags": ["signed_in_user"],
"summary": "Organizations of the actual User.",
"operationId": "getSignedInUserOrgList",
"responses": {
"200": {
"$ref": "#/responses/getUserOrgListResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/password": {
"put": {
"security": [
{
"basic": []
}
],
"description": "Changes the password for the user.",
"tags": ["signed_in_user"],
"summary": "Change Password.",
"operationId": "changeUserPassword",
"parameters": [
{
"x-go-name": "Body",
"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": [
{
"x-go-name": "Body",
"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/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": "revokeSignedINAuthTokenCmd",
"parameters": [
{
"x-go-name": "Body",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RevokeAuthTokenCmd"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/stars/dashboard/{dashboard_id}": {
"post": {
"description": "Stars the given Dashboard for the actual user.",
"tags": ["signed_in_user"],
"summary": "Star a dashboard.",
"operationId": "starDashboard",
"parameters": [
{
"type": "string",
"x-go-name": "DashboardID",
"name": "dashboard_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "Deletes the starring of the given Dashboard for the actual user.",
"tags": ["signed_in_user"],
"summary": "Unstar a dashboard.",
"operationId": "unstarDashboard",
"parameters": [
{
"type": "string",
"x-go-name": "DashboardID",
"name": "dashboard_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/teams": {
"get": {
"description": "Return a list of all teams that the current user is member of.",
"tags": ["signed_in_user"],
"summary": "Teams that the actual User is member of.",
"operationId": "getSignedInUserTeamList",
"responses": {
"200": {
"$ref": "#/responses/getUserOrgListResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/using/{org_id}": {
"post": {
"description": "Switch user context to the given organization.",
"tags": ["signed_in_user"],
"summary": "Switch user context for signed in user.",
"operationId": "userSetUsingOrg",
"parameters": [
{
"type": "integer",
"format": "int64",
"x-go-name": "OrgID",
"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,
"x-go-name": "Limit",
"description": "Limit the maximum number of users to return per page",
"name": "perpage",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"default": 1,
"x-go-name": "Page",
"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",
"x-go-name": "LoginOrEmail",
"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",
"x-go-name": "UserID",
"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": [
{
"type": "integer",
"format": "int64",
"x-go-name": "UserID",
"name": "user_id",
"in": "path",
"required": true
},
{
"x-go-name": "Body",
"description": "To change the email, name, login, theme, provide another one.",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateUserCommand"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/userResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"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",
"x-go-name": "UserID",
"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",
"x-go-name": "UserID",
"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"
}
}
}
},
"/v1/eval": {
"post": {
"description": "Test rule",
"consumes": ["application/json"],
"produces": ["application/json"],
"tags": ["testing"],
"operationId": "RouteEvalQueries",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/EvalQueriesPayload"
}
}
],
"responses": {
"200": {
"description": "EvalQueriesResponse",
"schema": {
"$ref": "#/definitions/EvalQueriesResponse"
}
}
}
}
},
"/v1/ngalert/admin_config": {
"get": {
"produces": ["application/json"],
"tags": ["configuration"],
"summary": "Get the NGalert configuration of the user's organization, returns 404 if no configuration is present.",
"operationId": "RouteGetNGalertConfig",
"responses": {
"200": {
"description": "GettableNGalertConfig",
"schema": {
"$ref": "#/definitions/GettableNGalertConfig"
}
},
"404": {
"description": "Failure",
"schema": {
"$ref": "#/definitions/Failure"
}
},
"500": {
"description": "Failure",
"schema": {
"$ref": "#/definitions/Failure"
}
}
}
},
"post": {
"consumes": ["application/json"],
"tags": ["configuration"],
"summary": "Creates or updates the NGalert configuration of the user's organization. If no value is sent for alertmanagersChoice, it defaults to \"all\".",
"operationId": "RoutePostNGalertConfig",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/PostableNGalertConfig"
}
}
],
"responses": {
"201": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"delete": {
"consumes": ["application/json"],
"tags": ["configuration"],
"summary": "Deletes the NGalert configuration of the user's organization.",
"operationId": "RouteDeleteNGalertConfig",
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"500": {
"description": "Failure",
"schema": {
"$ref": "#/definitions/Failure"
}
}
}
}
},
"/v1/ngalert/alertmanagers": {
"get": {
"produces": ["application/json"],
"tags": ["configuration"],
"summary": "Get the discovered and dropped Alertmanagers of the user's organization based on the specified configuration.",
"operationId": "RouteGetAlertmanagers",
"responses": {
"200": {
"description": "GettableAlertmanagers",
"schema": {
"$ref": "#/definitions/GettableAlertmanagers"
}
}
}
}
},
"/v1/rule/test/grafana": {
"post": {
"description": "Test a rule against Grafana ruler",
"consumes": ["application/json"],
"produces": ["application/json"],
"tags": ["testing"],
"operationId": "RouteTestRuleGrafanaConfig",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/TestRulePayload"
}
}
],
"responses": {
"200": {
"description": "TestRuleResponse",
"schema": {
"$ref": "#/definitions/TestRuleResponse"
}
}
}
}
},
"/v1/rule/test/{Recipient}": {
"post": {
"description": "Test a rule against external data source ruler",
"consumes": ["application/json"],
"produces": ["application/json"],
"tags": ["testing"],
"operationId": "RouteTestRuleConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
},
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/TestRulePayload"
}
}
],
"responses": {
"200": {
"description": "TestRuleResponse",
"schema": {
"$ref": "#/definitions/TestRuleResponse"
}
}
}
}
}
},
"definitions": {
"Ack": {
"type": "object",
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"ActiveSyncStatusDTO": {
"description": "ActiveSyncStatusDTO holds the information for LDAP background Sync",
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"x-go-name": "Enabled"
},
"nextSync": {
"type": "string",
"format": "date-time",
"x-go-name": "NextSync"
},
"prevSync": {
"$ref": "#/definitions/SyncResult"
},
"schedule": {
"type": "string",
"x-go-name": "Schedule"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/ldapdebug"
},
"ActiveUserStats": {
"type": "object",
"properties": {
"active_admins_and_editors": {
"type": "integer",
"format": "int64",
"x-go-name": "ActiveAdminsAndEditors"
},
"active_users": {
"type": "integer",
"format": "int64",
"x-go-name": "ActiveUsers"
},
"active_viewers": {
"type": "integer",
"format": "int64",
"x-go-name": "ActiveViewers"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/licensing"
},
"AddApiKeyCommand": {
"description": "COMMANDS",
"type": "object",
"properties": {
"name": {
"type": "string",
"x-go-name": "Name"
},
"role": {
"$ref": "#/definitions/RoleType"
},
"secondsToLive": {
"type": "integer",
"format": "int64",
"x-go-name": "SecondsToLive"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"AddBuiltInRoleCommand": {
"type": "object",
"properties": {
"builtInRole": {
"type": "string",
"enum": ["Viewer", " Editor", " Admin", " Grafana Admin"],
"x-go-name": "BuiltinRole"
},
"global": {
"description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to create organization local assignment. Refer to the Built-in role assignments for more information.",
"type": "boolean",
"x-go-name": "Global"
},
"roleUid": {
"type": "string",
"x-go-name": "RoleUID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol"
},
"AddDataSourceCommand": {
"description": "Also acts as api DTO",
"type": "object",
"properties": {
"access": {
"$ref": "#/definitions/DsAccess"
},
"basicAuth": {
"type": "boolean",
"x-go-name": "BasicAuth"
},
"basicAuthPassword": {
"type": "string",
"x-go-name": "BasicAuthPassword"
},
"basicAuthUser": {
"type": "string",
"x-go-name": "BasicAuthUser"
},
"database": {
"type": "string",
"x-go-name": "Database"
},
"isDefault": {
"type": "boolean",
"x-go-name": "IsDefault"
},
"jsonData": {
"$ref": "#/definitions/Json"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"password": {
"type": "string",
"x-go-name": "Password"
},
"secureJsonData": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "SecureJsonData"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"uid": {
"type": "string",
"x-go-name": "Uid"
},
"url": {
"type": "string",
"x-go-name": "Url"
},
"user": {
"type": "string",
"x-go-name": "User"
},
"withCredentials": {
"type": "boolean",
"x-go-name": "WithCredentials"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"AddInviteForm": {
"type": "object",
"properties": {
"loginOrEmail": {
"type": "string",
"x-go-name": "LoginOrEmail"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"role": {
"$ref": "#/definitions/RoleType"
},
"sendEmail": {
"type": "boolean",
"x-go-name": "SendEmail"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"AddOrgUserCommand": {
"type": "object",
"properties": {
"loginOrEmail": {
"type": "string",
"x-go-name": "LoginOrEmail"
},
"role": {
"$ref": "#/definitions/RoleType"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"AddPermissionDTO": {
"type": "object",
"properties": {
"builtinRole": {
"type": "string",
"x-go-name": "BuiltinRole"
},
"permission": {
"$ref": "#/definitions/DsPermissionType"
},
"teamId": {
"type": "integer",
"format": "int64",
"x-go-name": "TeamId"
},
"userId": {
"type": "integer",
"format": "int64",
"x-go-name": "UserId"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/dspermissions"
},
"AddTeamMemberCommand": {
"type": "object",
"properties": {
"userId": {
"type": "integer",
"format": "int64",
"x-go-name": "UserId"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"AddTeamRoleCommand": {
"type": "object",
"properties": {
"roleUid": {
"type": "string",
"x-go-name": "RoleUID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol"
},
"AddUserRoleCommand": {
"type": "object",
"properties": {
"global": {
"type": "boolean",
"x-go-name": "Global"
},
"roleUid": {
"type": "string",
"x-go-name": "RoleUID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol"
},
"Address": {
"type": "object",
"properties": {
"address1": {
"type": "string",
"x-go-name": "Address1"
},
"address2": {
"type": "string",
"x-go-name": "Address2"
},
"city": {
"type": "string",
"x-go-name": "City"
},
"country": {
"type": "string",
"x-go-name": "Country"
},
"state": {
"type": "string",
"x-go-name": "State"
},
"zipCode": {
"type": "string",
"x-go-name": "ZipCode"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"AdminCreateUserForm": {
"type": "object",
"properties": {
"email": {
"type": "string",
"x-go-name": "Email"
},
"login": {
"type": "string",
"x-go-name": "Login"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgId"
},
"password": {
"type": "string",
"x-go-name": "Password"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"AdminStats": {
"type": "object",
"properties": {
"activeAdmins": {
"type": "integer",
"format": "int64",
"x-go-name": "ActiveAdmins"
},
"activeEditors": {
"type": "integer",
"format": "int64",
"x-go-name": "ActiveEditors"
},
"activeSessions": {
"type": "integer",
"format": "int64",
"x-go-name": "ActiveSessions"
},
"activeUsers": {
"type": "integer",
"format": "int64",
"x-go-name": "ActiveUsers"
},
"activeViewers": {
"type": "integer",
"format": "int64",
"x-go-name": "ActiveViewers"
},
"admins": {
"type": "integer",
"format": "int64",
"x-go-name": "Admins"
},
"alerts": {
"type": "integer",
"format": "int64",
"x-go-name": "Alerts"
},
"dailyActiveAdmins": {
"type": "integer",
"format": "int64",
"x-go-name": "DailyActiveAdmins"
},
"dailyActiveEditors": {
"type": "integer",
"format": "int64",
"x-go-name": "DailyActiveEditors"
},
"dailyActiveSessions": {
"type": "integer",
"format": "int64",
"x-go-name": "DailyActiveSessions"
},
"dailyActiveUsers": {
"type": "integer",
"format": "int64",
"x-go-name": "DailyActiveUsers"
},
"dailyActiveViewers": {
"type": "integer",
"format": "int64",
"x-go-name": "DailyActiveViewers"
},
"dashboards": {
"type": "integer",
"format": "int64",
"x-go-name": "Dashboards"
},
"datasources": {
"type": "integer",
"format": "int64",
"x-go-name": "Datasources"
},
"editors": {
"type": "integer",
"format": "int64",
"x-go-name": "Editors"
},
"monthlyActiveUsers": {
"type": "integer",
"format": "int64",
"x-go-name": "MonthlyActiveUsers"
},
"orgs": {
"type": "integer",
"format": "int64",
"x-go-name": "Orgs"
},
"playlists": {
"type": "integer",
"format": "int64",
"x-go-name": "Playlists"
},
"snapshots": {
"type": "integer",
"format": "int64",
"x-go-name": "Snapshots"
},
"stars": {
"type": "integer",
"format": "int64",
"x-go-name": "Stars"
},
"tags": {
"type": "integer",
"format": "int64",
"x-go-name": "Tags"
},
"users": {
"type": "integer",
"format": "int64",
"x-go-name": "Users"
},
"viewers": {
"type": "integer",
"format": "int64",
"x-go-name": "Viewers"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"AdminUpdateUserPasswordForm": {
"type": "object",
"properties": {
"password": {
"type": "string",
"x-go-name": "Password"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"AdminUpdateUserPermissionsForm": {
"type": "object",
"properties": {
"isGrafanaAdmin": {
"type": "boolean",
"x-go-name": "IsGrafanaAdmin"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"Alert": {
"type": "object",
"title": "Alert has info for an alert.",
"required": ["labels", "annotations", "state", "value"],
"properties": {
"activeAt": {
"type": "string",
"format": "date-time",
"x-go-name": "ActiveAt"
},
"annotations": {
"$ref": "#/definitions/overrideLabels"
},
"labels": {
"$ref": "#/definitions/overrideLabels"
},
"state": {
"type": "string",
"x-go-name": "State"
},
"value": {
"type": "string",
"x-go-name": "Value"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"AlertDiscovery": {
"type": "object",
"title": "AlertDiscovery has info for all active alerts.",
"required": ["alerts"],
"properties": {
"alerts": {
"type": "array",
"items": {
"$ref": "#/definitions/Alert"
},
"x-go-name": "Alerts"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"AlertInstancesResponse": {
"type": "object",
"properties": {
"instances": {
"description": "Instances is an array of arrow encoded dataframes\neach frame has a single row, and a column for each instance (alert identified by unique labels) with a boolean value (firing/not firing)",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8"
}
},
"x-go-name": "Instances"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"AlertListItemDTO": {
"type": "object",
"properties": {
"dashboardId": {
"type": "integer",
"format": "int64",
"x-go-name": "DashboardId"
},
"dashboardSlug": {
"type": "string",
"x-go-name": "DashboardSlug"
},
"dashboardUid": {
"type": "string",
"x-go-name": "DashboardUid"
},
"evalData": {
"$ref": "#/definitions/Json"
},
"evalDate": {
"type": "string",
"format": "date-time",
"x-go-name": "EvalDate"
},
"executionError": {
"type": "string",
"x-go-name": "ExecutionError"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"newStateDate": {
"type": "string",
"format": "date-time",
"x-go-name": "NewStateDate"
},
"panelId": {
"type": "integer",
"format": "int64",
"x-go-name": "PanelId"
},
"state": {
"$ref": "#/definitions/AlertStateType"
},
"url": {
"type": "string",
"x-go-name": "Url"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"AlertManager": {
"type": "object",
"title": "AlertManager models a configured Alert Manager.",
"properties": {
"url": {
"type": "string",
"x-go-name": "URL"
}
},
"x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1"
},
"AlertManagerNotFound": {
"type": "object",
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"AlertManagerNotReady": {
"type": "object",
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"AlertManagersResult": {
"type": "object",
"title": "AlertManagersResult contains the result from querying the alertmanagers endpoint.",
"properties": {
"activeAlertManagers": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertManager"
},
"x-go-name": "Active"
},
"droppedAlertManagers": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertManager"
},
"x-go-name": "Dropped"
}
},
"x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1"
},
"AlertNotification": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time",
"x-go-name": "Created"
},
"disableResolveMessage": {
"type": "boolean",
"x-go-name": "DisableResolveMessage"
},
"frequency": {
"type": "string",
"x-go-name": "Frequency"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"isDefault": {
"type": "boolean",
"x-go-name": "IsDefault"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"secureFields": {
"type": "object",
"additionalProperties": {
"type": "boolean"
},
"x-go-name": "SecureFields"
},
"sendReminder": {
"type": "boolean",
"x-go-name": "SendReminder"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"uid": {
"type": "string",
"x-go-name": "Uid"
},
"updated": {
"type": "string",
"format": "date-time",
"x-go-name": "Updated"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"AlertNotificationLookup": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"isDefault": {
"type": "boolean",
"x-go-name": "IsDefault"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"uid": {
"type": "string",
"x-go-name": "Uid"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"AlertQuery": {
"type": "object",
"title": "AlertQuery represents a single query associated with an alert definition.",
"properties": {
"datasourceUid": {
"description": "Grafana data source unique identifier; it should be '-100' for a Server Side Expression operation.",
"type": "string",
"x-go-name": "DatasourceUID"
},
"model": {
"description": "JSON is the raw JSON query and includes the above properties as well as custom properties.",
"type": "object",
"x-go-name": "Model"
},
"queryType": {
"description": "QueryType is an optional identifier for the type of query.\nIt can be used to distinguish different types of queries.",
"type": "string",
"x-go-name": "QueryType"
},
"refId": {
"description": "RefID is the unique identifier of the query, set by the frontend call.",
"type": "string",
"x-go-name": "RefID"
},
"relativeTimeRange": {
"$ref": "#/definitions/RelativeTimeRange"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models"
},
"AlertResponse": {
"type": "object",
"required": ["status"],
"properties": {
"data": {
"$ref": "#/definitions/AlertDiscovery"
},
"error": {
"type": "string",
"x-go-name": "Error"
},
"errorType": {
"$ref": "#/definitions/ErrorType"
},
"status": {
"type": "string",
"x-go-name": "Status"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"AlertStateInfoDTO": {
"type": "object",
"properties": {
"dashboardId": {
"type": "integer",
"format": "int64",
"x-go-name": "DashboardId"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"newStateDate": {
"type": "string",
"format": "date-time",
"x-go-name": "NewStateDate"
},
"panelId": {
"type": "integer",
"format": "int64",
"x-go-name": "PanelId"
},
"state": {
"$ref": "#/definitions/AlertStateType"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"AlertStateType": {
"type": "string",
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"AlertTestCommand": {
"type": "object",
"properties": {
"dashboard": {
"$ref": "#/definitions/Json"
},
"panelId": {
"type": "integer",
"format": "int64",
"x-go-name": "PanelId"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"AlertTestResult": {
"type": "object",
"properties": {
"conditionEvals": {
"type": "string",
"x-go-name": "ConditionEvals"
},
"error": {
"type": "string",
"x-go-name": "Error"
},
"firing": {
"type": "boolean",
"x-go-name": "Firing"
},
"logs": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertTestResultLog"
},
"x-go-name": "Logs"
},
"matches": {
"type": "array",
"items": {
"$ref": "#/definitions/EvalMatch"
},
"x-go-name": "EvalMatches"
},
"state": {
"$ref": "#/definitions/AlertStateType"
},
"timeMs": {
"type": "string",
"x-go-name": "TimeMs"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"AlertTestResultLog": {
"type": "object",
"properties": {
"data": {
"type": "object",
"x-go-name": "Data"
},
"message": {
"type": "string",
"x-go-name": "Message"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"AlertingRule": {
"description": "adapted from cortex",
"type": "object",
"required": ["name", "query", "health", "type", "state", "annotations", "alerts"],
"properties": {
"alerts": {
"type": "array",
"items": {
"$ref": "#/definitions/Alert"
},
"x-go-name": "Alerts"
},
"annotations": {
"$ref": "#/definitions/overrideLabels"
},
"duration": {
"type": "number",
"format": "double",
"x-go-name": "Duration"
},
"evaluationTime": {
"type": "number",
"format": "double",
"x-go-name": "EvaluationTime"
},
"health": {
"type": "string",
"x-go-name": "Health"
},
"labels": {
"$ref": "#/definitions/overrideLabels"
},
"lastError": {
"type": "string",
"x-go-name": "LastError"
},
"lastEvaluation": {
"type": "string",
"format": "date-time",
"x-go-name": "LastEvaluation"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"query": {
"type": "string",
"x-go-name": "Query"
},
"state": {
"description": "State can be \"pending\", \"firing\", \"inactive\".",
"type": "string",
"x-go-name": "State"
},
"type": {
"$ref": "#/definitions/RuleType"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"ApiKeyDTO": {
"type": "object",
"properties": {
"expiration": {
"type": "string",
"format": "date-time",
"x-go-name": "Expiration"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"role": {
"$ref": "#/definitions/RoleType"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"ApiRuleNode": {
"type": "object",
"properties": {
"alert": {
"type": "string",
"x-go-name": "Alert"
},
"annotations": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Annotations"
},
"expr": {
"type": "string",
"x-go-name": "Expr"
},
"for": {
"$ref": "#/definitions/Duration"
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Labels"
},
"record": {
"type": "string",
"x-go-name": "Record"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"Authorization": {
"type": "object",
"title": "Authorization contains HTTP authorization credentials.",
"properties": {
"credentials": {
"$ref": "#/definitions/Secret"
},
"credentials_file": {
"type": "string",
"x-go-name": "CredentialsFile"
},
"type": {
"type": "string",
"x-go-name": "Type"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"BasicAuth": {
"type": "object",
"title": "BasicAuth contains basic HTTP authentication credentials.",
"properties": {
"password": {
"$ref": "#/definitions/Secret"
},
"password_file": {
"type": "string",
"x-go-name": "PasswordFile"
},
"username": {
"type": "string",
"x-go-name": "Username"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"BrandingOptions": {
"type": "object",
"properties": {
"emailFooterLink": {
"type": "string",
"x-go-name": "EmailFooterLink"
},
"emailFooterMode": {
"type": "string",
"x-go-name": "EmailFooterMode"
},
"emailFooterText": {
"type": "string",
"x-go-name": "EmailFooterText"
},
"emailLogoUrl": {
"type": "string",
"x-go-name": "EmailLogo"
},
"reportLogoUrl": {
"type": "string",
"x-go-name": "ReportLogo"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/report"
},
"CalculateDiffTarget": {
"type": "object",
"properties": {
"dashboardId": {
"type": "integer",
"format": "int64",
"x-go-name": "DashboardId"
},
"unsavedDashboard": {
"$ref": "#/definitions/Json"
},
"version": {
"type": "integer",
"format": "int64",
"x-go-name": "Version"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"ChangeUserPasswordCommand": {
"type": "object",
"properties": {
"newPassword": {
"type": "string",
"x-go-name": "NewPassword"
},
"oldPassword": {
"type": "string",
"x-go-name": "OldPassword"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"Config": {
"type": "object",
"title": "Config is the top-level configuration for Alertmanager's config files.",
"properties": {
"global": {
"$ref": "#/definitions/GlobalConfig"
},
"inhibit_rules": {
"type": "array",
"items": {
"$ref": "#/definitions/InhibitRule"
},
"x-go-name": "InhibitRules"
},
"mute_time_intervals": {
"type": "array",
"items": {
"$ref": "#/definitions/MuteTimeInterval"
},
"x-go-name": "MuteTimeIntervals"
},
"route": {
"$ref": "#/definitions/Route"
},
"templates": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Templates"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"ConfigDTO": {
"description": "ConfigDTO is model representation in transfer",
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time",
"x-go-name": "Created"
},
"dashboardId": {
"type": "integer",
"format": "int64",
"x-go-name": "DashboardID"
},
"dashboardName": {
"type": "string",
"x-go-name": "DashboardName"
},
"dashboardUid": {
"type": "string",
"x-go-name": "DashboardUID"
},
"enableCsv": {
"type": "boolean",
"x-go-name": "EnableCSV"
},
"enableDashboardUrl": {
"type": "boolean",
"x-go-name": "EnableDashboardURL"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"options": {
"$ref": "#/definitions/ReportOptions"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgID"
},
"recipients": {
"type": "string",
"x-go-name": "Recipients"
},
"replyTo": {
"type": "string",
"x-go-name": "ReplyTo"
},
"schedule": {
"$ref": "#/definitions/Schedule"
},
"state": {
"$ref": "#/definitions/State"
},
"templateVars": {
"type": "object",
"x-go-name": "TemplateVars"
},
"updated": {
"type": "string",
"format": "date-time",
"x-go-name": "Updated"
},
"userId": {
"type": "integer",
"format": "int64",
"x-go-name": "UserID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/report"
},
"CreateAlertNotificationCommand": {
"type": "object",
"properties": {
"disableResolveMessage": {
"type": "boolean",
"x-go-name": "DisableResolveMessage"
},
"frequency": {
"type": "string",
"x-go-name": "Frequency"
},
"isDefault": {
"type": "boolean",
"x-go-name": "IsDefault"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"secureSettings": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "SecureSettings"
},
"sendReminder": {
"type": "boolean",
"x-go-name": "SendReminder"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"uid": {
"type": "string",
"x-go-name": "Uid"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"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",
"x-go-name": "DeleteKey"
},
"expires": {
"description": "When the snapshot should expire in seconds in seconds. Default is never to expire.",
"type": "integer",
"format": "int64",
"default": 0,
"x-go-name": "Expires"
},
"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,
"x-go-name": "External"
},
"key": {
"description": "Define the unique key. Required if `external` is `true`.",
"type": "string",
"x-go-name": "Key"
},
"name": {
"description": "Snapshot name",
"type": "string",
"x-go-name": "Name"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"CreateFolderCommand": {
"type": "object",
"properties": {
"title": {
"type": "string",
"x-go-name": "Title"
},
"uid": {
"type": "string",
"x-go-name": "Uid"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"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",
"x-go-name": "FolderID"
},
"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],
"x-go-name": "Kind"
},
"model": {
"description": "The JSON model for the library element.",
"type": "object",
"x-go-name": "Model"
},
"name": {
"description": "Name of the library element.",
"type": "string",
"x-go-name": "Name"
},
"uid": {
"type": "string",
"x-go-name": "UID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/libraryelements"
},
"CreateOrUpdateConfigCmd": {
"type": "object",
"properties": {
"dashboardId": {
"type": "integer",
"format": "int64",
"x-go-name": "DashboardID"
},
"dashboardUid": {
"type": "string",
"x-go-name": "DashboardUID"
},
"enableCsv": {
"type": "boolean",
"x-go-name": "EnableCSV"
},
"enableDashboardUrl": {
"type": "boolean",
"x-go-name": "EnableDashboardURL"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"options": {
"$ref": "#/definitions/ReportOptions"
},
"recipients": {
"type": "string",
"x-go-name": "Recipients"
},
"replyTo": {
"type": "string",
"x-go-name": "ReplyTo"
},
"schedule": {
"$ref": "#/definitions/Schedule"
},
"state": {
"type": "string",
"x-go-name": "State"
},
"templateVars": {
"type": "object",
"x-go-name": "TemplateVars"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/report"
},
"CreateOrgCommand": {
"type": "object",
"properties": {
"name": {
"type": "string",
"x-go-name": "Name"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"CreateRoleWithPermissionsCommand": {
"type": "object",
"properties": {
"description": {
"type": "string",
"x-go-name": "Description"
},
"displayName": {
"type": "string",
"x-go-name": "DisplayName"
},
"group": {
"type": "string",
"x-go-name": "Group"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/Permission"
},
"x-go-name": "Permissions"
},
"uid": {
"type": "string",
"x-go-name": "UID"
},
"version": {
"type": "integer",
"format": "int64",
"x-go-name": "Version"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol"
},
"CreateTeamCommand": {
"type": "object",
"properties": {
"email": {
"type": "string",
"x-go-name": "Email"
},
"name": {
"type": "string",
"x-go-name": "Name"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"CustomPermissionsRecordDTO": {
"type": "object",
"properties": {
"customPermissions": {
"type": "string",
"x-go-name": "CustomPermissions"
},
"granteeName": {
"type": "string",
"x-go-name": "GranteeName"
},
"granteeType": {
"type": "string",
"x-go-name": "GranteeType"
},
"granteeUrl": {
"type": "string",
"x-go-name": "GranteeURL"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"isFolder": {
"type": "boolean",
"x-go-name": "IsFolder"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgID"
},
"orgRole": {
"type": "string",
"x-go-name": "OrgRole"
},
"slug": {
"type": "string",
"x-go-name": "Slug"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"uid": {
"type": "string",
"x-go-name": "UID"
},
"url": {
"type": "string",
"x-go-name": "URL"
},
"usersCount": {
"type": "integer",
"format": "int64",
"x-go-name": "UsersCount"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/licensing"
},
"DashboardAclInfoDTO": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time",
"x-go-name": "Created"
},
"dashboardId": {
"type": "integer",
"format": "int64",
"x-go-name": "DashboardId"
},
"folderId": {
"type": "integer",
"format": "int64",
"x-go-name": "FolderId"
},
"inherited": {
"type": "boolean",
"x-go-name": "Inherited"
},
"isFolder": {
"type": "boolean",
"x-go-name": "IsFolder"
},
"permission": {
"$ref": "#/definitions/PermissionType"
},
"permissionName": {
"type": "string",
"x-go-name": "PermissionName"
},
"role": {
"$ref": "#/definitions/RoleType"
},
"slug": {
"type": "string",
"x-go-name": "Slug"
},
"team": {
"type": "string",
"x-go-name": "Team"
},
"teamAvatarUrl": {
"type": "string",
"x-go-name": "TeamAvatarUrl"
},
"teamEmail": {
"type": "string",
"x-go-name": "TeamEmail"
},
"teamId": {
"type": "integer",
"format": "int64",
"x-go-name": "TeamId"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"uid": {
"type": "string",
"x-go-name": "Uid"
},
"updated": {
"type": "string",
"format": "date-time",
"x-go-name": "Updated"
},
"url": {
"type": "string",
"x-go-name": "Url"
},
"userAvatarUrl": {
"type": "string",
"x-go-name": "UserAvatarUrl"
},
"userEmail": {
"type": "string",
"x-go-name": "UserEmail"
},
"userId": {
"type": "integer",
"format": "int64",
"x-go-name": "UserId"
},
"userLogin": {
"type": "string",
"x-go-name": "UserLogin"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"DashboardAclUpdateItem": {
"type": "object",
"properties": {
"permission": {
"$ref": "#/definitions/PermissionType"
},
"role": {
"$ref": "#/definitions/RoleType"
},
"teamId": {
"type": "integer",
"format": "int64",
"x-go-name": "TeamID"
},
"userId": {
"type": "integer",
"format": "int64",
"x-go-name": "UserID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"DashboardFullWithMeta": {
"type": "object",
"properties": {
"dashboard": {
"$ref": "#/definitions/Json"
},
"meta": {
"$ref": "#/definitions/DashboardMeta"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"DashboardMeta": {
"type": "object",
"properties": {
"canAdmin": {
"type": "boolean",
"x-go-name": "CanAdmin"
},
"canEdit": {
"type": "boolean",
"x-go-name": "CanEdit"
},
"canSave": {
"type": "boolean",
"x-go-name": "CanSave"
},
"canStar": {
"type": "boolean",
"x-go-name": "CanStar"
},
"created": {
"type": "string",
"format": "date-time",
"x-go-name": "Created"
},
"createdBy": {
"type": "string",
"x-go-name": "CreatedBy"
},
"expires": {
"type": "string",
"format": "date-time",
"x-go-name": "Expires"
},
"folderId": {
"type": "integer",
"format": "int64",
"x-go-name": "FolderId"
},
"folderTitle": {
"type": "string",
"x-go-name": "FolderTitle"
},
"folderUid": {
"type": "string",
"x-go-name": "FolderUid"
},
"folderUrl": {
"type": "string",
"x-go-name": "FolderUrl"
},
"hasAcl": {
"type": "boolean",
"x-go-name": "HasAcl"
},
"isFolder": {
"type": "boolean",
"x-go-name": "IsFolder"
},
"isHome": {
"type": "boolean",
"x-go-name": "IsHome"
},
"isSnapshot": {
"type": "boolean",
"x-go-name": "IsSnapshot"
},
"isStarred": {
"type": "boolean",
"x-go-name": "IsStarred"
},
"provisioned": {
"type": "boolean",
"x-go-name": "Provisioned"
},
"provisionedExternalId": {
"type": "string",
"x-go-name": "ProvisionedExternalId"
},
"slug": {
"type": "string",
"x-go-name": "Slug"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"updated": {
"type": "string",
"format": "date-time",
"x-go-name": "Updated"
},
"updatedBy": {
"type": "string",
"x-go-name": "UpdatedBy"
},
"url": {
"type": "string",
"x-go-name": "Url"
},
"version": {
"type": "integer",
"format": "int64",
"x-go-name": "Version"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"DashboardRedirect": {
"type": "object",
"properties": {
"redirectUri": {
"type": "string",
"x-go-name": "RedirectUri"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"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"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"DashboardSnapshotDTO": {
"description": "DashboardSnapshotDTO without dashboard map",
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time",
"x-go-name": "Created"
},
"expires": {
"type": "string",
"format": "date-time",
"x-go-name": "Expires"
},
"external": {
"type": "boolean",
"x-go-name": "External"
},
"externalUrl": {
"type": "string",
"x-go-name": "ExternalUrl"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"key": {
"type": "string",
"x-go-name": "Key"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgId"
},
"updated": {
"type": "string",
"format": "date-time",
"x-go-name": "Updated"
},
"userId": {
"type": "integer",
"format": "int64",
"x-go-name": "UserId"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"DashboardTagCloudItem": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"format": "int64",
"x-go-name": "Count"
},
"term": {
"type": "string",
"x-go-name": "Term"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"DashboardVersionDTO": {
"description": "DashboardVersionDTO represents a dashboard version, without the dashboard\nmap.",
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time",
"x-go-name": "Created"
},
"createdBy": {
"type": "string",
"x-go-name": "CreatedBy"
},
"dashboardId": {
"type": "integer",
"format": "int64",
"x-go-name": "DashboardId"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"parentVersion": {
"type": "integer",
"format": "int64",
"x-go-name": "ParentVersion"
},
"restoredFrom": {
"type": "integer",
"format": "int64",
"x-go-name": "RestoredFrom"
},
"version": {
"type": "integer",
"format": "int64",
"x-go-name": "Version"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"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",
"x-go-name": "Created"
},
"createdBy": {
"type": "string",
"x-go-name": "CreatedBy"
},
"dashboardId": {
"type": "integer",
"format": "int64",
"x-go-name": "DashboardId"
},
"data": {
"$ref": "#/definitions/Json"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"parentVersion": {
"type": "integer",
"format": "int64",
"x-go-name": "ParentVersion"
},
"restoredFrom": {
"type": "integer",
"format": "int64",
"x-go-name": "RestoredFrom"
},
"version": {
"type": "integer",
"format": "int64",
"x-go-name": "Version"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"DataFrames": {
"description": "See NewDecodedDataFrames and NewEncodedDataFrames for more information.",
"type": "object",
"title": "DataFrames is an interface for retrieving encoded and decoded data frames.",
"x-go-package": "github.com/grafana/grafana/pkg/tsdb/legacydata"
},
"DataQueryResult": {
"description": "Deprecated: DataQueryResult should use backend.QueryDataResponse",
"type": "object",
"properties": {
"dataframes": {
"$ref": "#/definitions/DataFrames"
},
"error": {
"type": "string",
"x-go-name": "ErrorString"
},
"meta": {
"$ref": "#/definitions/Json"
},
"refId": {
"type": "string",
"x-go-name": "RefID"
},
"series": {
"$ref": "#/definitions/DataTimeSeriesSlice"
},
"tables": {
"type": "array",
"items": {
"$ref": "#/definitions/DataTable"
},
"x-go-name": "Tables"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/tsdb/legacydata"
},
"DataResponse": {
"description": "Deprecated: DataResponse -- this structure is deprecated, all new work should use backend.QueryDataResponse",
"type": "object",
"properties": {
"message": {
"type": "string",
"x-go-name": "Message"
},
"results": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/DataQueryResult"
},
"x-go-name": "Results"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/tsdb/legacydata"
},
"DataRowValues": {
"type": "array",
"items": {
"type": "object"
},
"x-go-package": "github.com/grafana/grafana/pkg/tsdb/legacydata"
},
"DataSource": {
"type": "object",
"properties": {
"access": {
"$ref": "#/definitions/DsAccess"
},
"accessControl": {
"$ref": "#/definitions/Metadata"
},
"basicAuth": {
"type": "boolean",
"x-go-name": "BasicAuth"
},
"basicAuthPassword": {
"type": "string",
"x-go-name": "BasicAuthPassword"
},
"basicAuthUser": {
"type": "string",
"x-go-name": "BasicAuthUser"
},
"database": {
"type": "string",
"x-go-name": "Database"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"isDefault": {
"type": "boolean",
"x-go-name": "IsDefault"
},
"jsonData": {
"$ref": "#/definitions/Json"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgId"
},
"password": {
"type": "string",
"x-go-name": "Password"
},
"readOnly": {
"type": "boolean",
"x-go-name": "ReadOnly"
},
"secureJsonFields": {
"type": "object",
"additionalProperties": {
"type": "boolean"
},
"x-go-name": "SecureJsonFields"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"typeLogoUrl": {
"type": "string",
"x-go-name": "TypeLogoUrl"
},
"uid": {
"type": "string",
"x-go-name": "UID"
},
"url": {
"type": "string",
"x-go-name": "Url"
},
"user": {
"type": "string",
"x-go-name": "User"
},
"version": {
"type": "integer",
"format": "int64",
"x-go-name": "Version"
},
"withCredentials": {
"type": "boolean",
"x-go-name": "WithCredentials"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"DataSourceList": {
"type": "array",
"items": {
"$ref": "#/definitions/DataSourceListItemDTO"
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"DataSourceListItemDTO": {
"type": "object",
"properties": {
"access": {
"$ref": "#/definitions/DsAccess"
},
"basicAuth": {
"type": "boolean",
"x-go-name": "BasicAuth"
},
"database": {
"type": "string",
"x-go-name": "Database"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"isDefault": {
"type": "boolean",
"x-go-name": "IsDefault"
},
"jsonData": {
"$ref": "#/definitions/Json"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgId"
},
"password": {
"type": "string",
"x-go-name": "Password"
},
"readOnly": {
"type": "boolean",
"x-go-name": "ReadOnly"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"typeLogoUrl": {
"type": "string",
"x-go-name": "TypeLogoUrl"
},
"typeName": {
"type": "string",
"x-go-name": "TypeName"
},
"uid": {
"type": "string",
"x-go-name": "UID"
},
"url": {
"type": "string",
"x-go-name": "Url"
},
"user": {
"type": "string",
"x-go-name": "User"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"DataTable": {
"type": "object",
"properties": {
"columns": {
"type": "array",
"items": {
"$ref": "#/definitions/DataTableColumn"
},
"x-go-name": "Columns"
},
"rows": {
"type": "array",
"items": {
"$ref": "#/definitions/DataRowValues"
},
"x-go-name": "Rows"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/tsdb/legacydata"
},
"DataTableColumn": {
"type": "object",
"properties": {
"text": {
"type": "string",
"x-go-name": "Text"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/tsdb/legacydata"
},
"DataTimePoint": {
"type": "array",
"items": {
"$ref": "#/definitions/Float"
},
"x-go-package": "github.com/grafana/grafana/pkg/tsdb/legacydata"
},
"DataTimeSeries": {
"description": "DataTimeSeries -- this structure is deprecated, all new work should use DataFrames from the SDK",
"type": "object",
"properties": {
"name": {
"type": "string",
"x-go-name": "Name"
},
"points": {
"$ref": "#/definitions/DataTimeSeriesPoints"
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Tags"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/tsdb/legacydata"
},
"DataTimeSeriesPoints": {
"type": "array",
"items": {
"$ref": "#/definitions/DataTimePoint"
},
"x-go-package": "github.com/grafana/grafana/pkg/tsdb/legacydata"
},
"DataTimeSeriesSlice": {
"type": "array",
"items": {
"$ref": "#/definitions/DataTimeSeries"
},
"x-go-package": "github.com/grafana/grafana/pkg/tsdb/legacydata"
},
"DateTime": {
"description": "DateTime is a time but it serializes to ISO8601 format with millis\nIt knows how to read 3 different variations of a RFC3339 date time.\nMost APIs we encounter want either millisecond or second precision times.\nThis just tries to make it worry-free.",
"type": "string",
"format": "date-time",
"x-go-package": "github.com/go-openapi/strfmt"
},
"DayOfMonthRange": {
"type": "object",
"title": "A DayOfMonthRange is an inclusive range that may have negative Beginning/End values that represent distance from the End of the month Beginning at -1.",
"properties": {
"Begin": {
"type": "integer",
"format": "int64"
},
"End": {
"type": "integer",
"format": "int64"
}
},
"x-go-package": "github.com/prometheus/alertmanager/timeinterval"
},
"DeleteAnnotationsCmd": {
"type": "object",
"properties": {
"alertId": {
"type": "integer",
"format": "int64",
"x-go-name": "AlertId"
},
"annotationId": {
"type": "integer",
"format": "int64",
"x-go-name": "AnnotationId"
},
"dashboardId": {
"type": "integer",
"format": "int64",
"x-go-name": "DashboardId"
},
"panelId": {
"type": "integer",
"format": "int64",
"x-go-name": "PanelId"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"DeleteTokenCommand": {
"type": "object",
"properties": {
"instance": {
"type": "string",
"x-go-name": "Instance"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/licensing"
},
"DiscoveryBase": {
"type": "object",
"required": ["status"],
"properties": {
"error": {
"type": "string",
"x-go-name": "Error"
},
"errorType": {
"$ref": "#/definitions/ErrorType"
},
"status": {
"type": "string",
"x-go-name": "Status"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"DsAccess": {
"type": "string",
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"DsPermissionType": {
"description": "Datasource permission\nDescription:\n`0` - No Access\n`1` - Query\nEnum: 0,1",
"type": "integer",
"format": "int64",
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"Duration": {
"type": "integer",
"format": "int64",
"title": "Duration is a type used for marshalling durations."
},
"EmailConfig": {
"type": "object",
"title": "EmailConfig configures notifications via mail.",
"properties": {
"auth_identity": {
"type": "string",
"x-go-name": "AuthIdentity"
},
"auth_password": {
"$ref": "#/definitions/Secret"
},
"auth_secret": {
"$ref": "#/definitions/Secret"
},
"auth_username": {
"type": "string",
"x-go-name": "AuthUsername"
},
"from": {
"type": "string",
"x-go-name": "From"
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Headers"
},
"hello": {
"type": "string",
"x-go-name": "Hello"
},
"html": {
"type": "string",
"x-go-name": "HTML"
},
"require_tls": {
"type": "boolean",
"x-go-name": "RequireTLS"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"smarthost": {
"$ref": "#/definitions/HostPort"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"tls_config": {
"$ref": "#/definitions/TLSConfig"
},
"to": {
"description": "Email address to notify.",
"type": "string",
"x-go-name": "To"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"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",
"x-go-name": "Error"
},
"message": {
"description": "a human readable version of the error",
"type": "string",
"x-go-name": "Message"
},
"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",
"x-go-name": "Status"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/docs/definitions"
},
"ErrorType": {
"type": "string",
"title": "ErrorType models the different API error types.",
"x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1"
},
"EvalAlertConditionCommand": {
"description": "EvalAlertConditionCommand is the command for evaluating a condition",
"type": "object",
"properties": {
"condition": {
"type": "string",
"x-go-name": "Condition"
},
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertQuery"
},
"x-go-name": "Data"
},
"now": {
"type": "string",
"format": "date-time",
"x-go-name": "Now"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models"
},
"EvalMatch": {
"type": "object",
"properties": {
"metric": {
"type": "string",
"x-go-name": "Metric"
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Tags"
},
"value": {
"$ref": "#/definitions/Float"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"EvalQueriesPayload": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertQuery"
},
"x-go-name": "Data"
},
"now": {
"type": "string",
"format": "date-time",
"x-go-name": "Now"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"EvalQueriesResponse": {},
"ExtendedReceiver": {
"type": "object",
"properties": {
"email_configs": {
"$ref": "#/definitions/EmailConfig"
},
"grafana_managed_receiver": {
"$ref": "#/definitions/PostableGrafanaReceiver"
},
"opsgenie_configs": {
"$ref": "#/definitions/OpsGenieConfig"
},
"pagerduty_configs": {
"$ref": "#/definitions/PagerdutyConfig"
},
"pushover_configs": {
"$ref": "#/definitions/PushoverConfig"
},
"slack_configs": {
"$ref": "#/definitions/SlackConfig"
},
"victorops_configs": {
"$ref": "#/definitions/VictorOpsConfig"
},
"webhook_configs": {
"$ref": "#/definitions/WebhookConfig"
},
"wechat_configs": {
"$ref": "#/definitions/WechatConfig"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"FailedUser": {
"description": "FailedUser holds the information of an user that failed",
"type": "object",
"properties": {
"Error": {
"type": "string"
},
"Login": {
"type": "string"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/ldapsync"
},
"Failure": {
"$ref": "#/definitions/ResponseDetails"
},
"FindTagsResult": {
"type": "object",
"title": "FindTagsResult is the result of a tags search.",
"properties": {
"tags": {
"type": "array",
"items": {
"$ref": "#/definitions/TagsDTO"
},
"x-go-name": "Tags"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/annotations"
},
"Float": {
"description": "It does not consider zero values to be null.\nIt will decode to null, not zero, if null.",
"type": "object",
"title": "Float is a nullable float64.",
"properties": {
"Float64": {
"type": "number",
"format": "double"
},
"Valid": {
"type": "boolean"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/components/null"
},
"Folder": {
"type": "object",
"properties": {
"canAdmin": {
"type": "boolean",
"x-go-name": "CanAdmin"
},
"canEdit": {
"type": "boolean",
"x-go-name": "CanEdit"
},
"canSave": {
"type": "boolean",
"x-go-name": "CanSave"
},
"created": {
"type": "string",
"format": "date-time",
"x-go-name": "Created"
},
"createdBy": {
"type": "string",
"x-go-name": "CreatedBy"
},
"hasAcl": {
"type": "boolean",
"x-go-name": "HasAcl"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"uid": {
"type": "string",
"x-go-name": "Uid"
},
"updated": {
"type": "string",
"format": "date-time",
"x-go-name": "Updated"
},
"updatedBy": {
"type": "string",
"x-go-name": "UpdatedBy"
},
"url": {
"type": "string",
"x-go-name": "Url"
},
"version": {
"type": "integer",
"format": "int64",
"x-go-name": "Version"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"FolderSearchHit": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"uid": {
"type": "string",
"x-go-name": "Uid"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"GetAnnotationTagsResponse": {
"type": "object",
"title": "GetAnnotationTagsResponse is a response struct for FindTagsResult.",
"properties": {
"result": {
"$ref": "#/definitions/FindTagsResult"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/annotations"
},
"GetHomeDashboardResponse": {
"title": "Get home dashboard response.",
"allOf": [
{
"type": "object",
"properties": {
"dashboard": {
"$ref": "#/definitions/Json"
},
"meta": {
"$ref": "#/definitions/DashboardMeta"
}
}
},
{
"type": "object",
"properties": {
"redirectUri": {
"type": "string",
"x-go-name": "RedirectUri"
}
}
}
],
"x-go-name": "GetHomeDashboardResponseBody",
"x-go-package": "github.com/grafana/grafana/pkg/api/docs/definitions"
},
"GettableAlertmanagers": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/AlertManagersResult"
},
"status": {
"type": "string",
"x-go-name": "Status"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableApiAlertingConfig": {
"type": "object",
"properties": {
"global": {
"$ref": "#/definitions/GlobalConfig"
},
"inhibit_rules": {
"type": "array",
"items": {
"$ref": "#/definitions/InhibitRule"
},
"x-go-name": "InhibitRules"
},
"mute_time_intervals": {
"type": "array",
"items": {
"$ref": "#/definitions/MuteTimeInterval"
},
"x-go-name": "MuteTimeIntervals"
},
"receivers": {
"description": "Override with our superset receiver type",
"type": "array",
"items": {
"$ref": "#/definitions/GettableApiReceiver"
},
"x-go-name": "Receivers"
},
"route": {
"$ref": "#/definitions/Route"
},
"templates": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Templates"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableApiReceiver": {
"type": "object",
"properties": {
"email_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/EmailConfig"
},
"x-go-name": "EmailConfigs"
},
"grafana_managed_receiver_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/GettableGrafanaReceiver"
},
"x-go-name": "GrafanaManagedReceivers"
},
"name": {
"description": "A unique identifier for this receiver.",
"type": "string",
"x-go-name": "Name"
},
"opsgenie_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/OpsGenieConfig"
},
"x-go-name": "OpsGenieConfigs"
},
"pagerduty_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PagerdutyConfig"
},
"x-go-name": "PagerdutyConfigs"
},
"pushover_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PushoverConfig"
},
"x-go-name": "PushoverConfigs"
},
"slack_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/SlackConfig"
},
"x-go-name": "SlackConfigs"
},
"sns_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/SNSConfig"
},
"x-go-name": "SNSConfigs"
},
"victorops_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/VictorOpsConfig"
},
"x-go-name": "VictorOpsConfigs"
},
"webhook_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WebhookConfig"
},
"x-go-name": "WebhookConfigs"
},
"wechat_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WechatConfig"
},
"x-go-name": "WechatConfigs"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableExtendedRuleNode": {
"type": "object",
"properties": {
"alert": {
"type": "string",
"x-go-name": "Alert"
},
"annotations": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Annotations"
},
"expr": {
"type": "string",
"x-go-name": "Expr"
},
"for": {
"$ref": "#/definitions/Duration"
},
"grafana_alert": {
"$ref": "#/definitions/GettableGrafanaRule"
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Labels"
},
"record": {
"type": "string",
"x-go-name": "Record"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableGrafanaReceiver": {
"type": "object",
"properties": {
"disableResolveMessage": {
"type": "boolean",
"x-go-name": "DisableResolveMessage"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"secureFields": {
"type": "object",
"additionalProperties": {
"type": "boolean"
},
"x-go-name": "SecureFields"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"uid": {
"type": "string",
"x-go-name": "UID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableGrafanaReceivers": {
"type": "object",
"properties": {
"grafana_managed_receiver_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/GettableGrafanaReceiver"
},
"x-go-name": "GrafanaManagedReceivers"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableGrafanaRule": {
"type": "object",
"properties": {
"condition": {
"type": "string",
"x-go-name": "Condition"
},
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertQuery"
},
"x-go-name": "Data"
},
"exec_err_state": {
"type": "string",
"enum": ["Alerting", "Error"],
"x-go-enum-desc": "Alerting AlertingErrState\nError ErrorErrState",
"x-go-name": "ExecErrState"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"intervalSeconds": {
"type": "integer",
"format": "int64",
"x-go-name": "IntervalSeconds"
},
"namespace_id": {
"type": "integer",
"format": "int64",
"x-go-name": "NamespaceID"
},
"namespace_uid": {
"type": "string",
"x-go-name": "NamespaceUID"
},
"no_data_state": {
"type": "string",
"enum": ["Alerting", "NoData", "OK"],
"x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK",
"x-go-name": "NoDataState"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgID"
},
"rule_group": {
"type": "string",
"x-go-name": "RuleGroup"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"uid": {
"type": "string",
"x-go-name": "UID"
},
"updated": {
"type": "string",
"format": "date-time",
"x-go-name": "Updated"
},
"version": {
"type": "integer",
"format": "int64",
"x-go-name": "Version"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableNGalertConfig": {
"type": "object",
"properties": {
"alertmanagers": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Alertmanagers"
},
"alertmanagersChoice": {
"type": "string",
"enum": ["all", "internal", "external"],
"x-go-enum-desc": "all AllAlertmanagers\ninternal InternalAlertmanager\nexternal ExternalAlertmanagers",
"x-go-name": "AlertmanagersChoice"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableRuleGroupConfig": {
"type": "object",
"properties": {
"interval": {
"$ref": "#/definitions/Duration"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"rules": {
"type": "array",
"items": {
"$ref": "#/definitions/GettableExtendedRuleNode"
},
"x-go-name": "Rules"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableStatus": {
"type": "object",
"required": ["cluster", "config", "uptime", "versionInfo"],
"properties": {
"cluster": {
"$ref": "#/definitions/clusterStatus"
},
"config": {
"$ref": "#/definitions/PostableApiAlertingConfig"
},
"uptime": {
"description": "uptime",
"type": "string",
"format": "date-time",
"x-go-name": "Uptime"
},
"versionInfo": {
"$ref": "#/definitions/versionInfo"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableUserConfig": {
"type": "object",
"properties": {
"alertmanager_config": {
"$ref": "#/definitions/GettableApiAlertingConfig"
},
"template_files": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "TemplateFiles"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GlobalConfig": {
"description": "GlobalConfig defines configuration parameters that are valid globally\nunless overwritten.",
"type": "object",
"properties": {
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"opsgenie_api_key": {
"$ref": "#/definitions/Secret"
},
"opsgenie_api_key_file": {
"type": "string",
"x-go-name": "OpsGenieAPIKeyFile"
},
"opsgenie_api_url": {
"$ref": "#/definitions/URL"
},
"pagerduty_url": {
"$ref": "#/definitions/URL"
},
"resolve_timeout": {
"$ref": "#/definitions/Duration"
},
"slack_api_url": {
"$ref": "#/definitions/SecretURL"
},
"slack_api_url_file": {
"type": "string",
"x-go-name": "SlackAPIURLFile"
},
"smtp_auth_identity": {
"type": "string",
"x-go-name": "SMTPAuthIdentity"
},
"smtp_auth_password": {
"$ref": "#/definitions/Secret"
},
"smtp_auth_secret": {
"$ref": "#/definitions/Secret"
},
"smtp_auth_username": {
"type": "string",
"x-go-name": "SMTPAuthUsername"
},
"smtp_from": {
"type": "string",
"x-go-name": "SMTPFrom"
},
"smtp_hello": {
"type": "string",
"x-go-name": "SMTPHello"
},
"smtp_require_tls": {
"type": "boolean",
"x-go-name": "SMTPRequireTLS"
},
"smtp_smarthost": {
"$ref": "#/definitions/HostPort"
},
"victorops_api_key": {
"$ref": "#/definitions/Secret"
},
"victorops_api_url": {
"$ref": "#/definitions/URL"
},
"wechat_api_corp_id": {
"type": "string",
"x-go-name": "WeChatAPICorpID"
},
"wechat_api_secret": {
"$ref": "#/definitions/Secret"
},
"wechat_api_url": {
"$ref": "#/definitions/URL"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"HTTPClientConfig": {
"type": "object",
"title": "HTTPClientConfig configures an HTTP client.",
"properties": {
"authorization": {
"$ref": "#/definitions/Authorization"
},
"basic_auth": {
"$ref": "#/definitions/BasicAuth"
},
"bearer_token": {
"$ref": "#/definitions/Secret"
},
"bearer_token_file": {
"description": "The bearer token file for the targets. Deprecated in favour of\nAuthorization.CredentialsFile.",
"type": "string",
"x-go-name": "BearerTokenFile"
},
"follow_redirects": {
"description": "FollowRedirects specifies whether the client should follow HTTP 3xx redirects.\nThe omitempty flag is not set, because it would be hidden from the\nmarshalled configuration when set to false.",
"type": "boolean",
"x-go-name": "FollowRedirects"
},
"oauth2": {
"$ref": "#/definitions/OAuth2"
},
"proxy_url": {
"$ref": "#/definitions/URL"
},
"tls_config": {
"$ref": "#/definitions/TLSConfig"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"Hit": {
"type": "object",
"properties": {
"folderId": {
"type": "integer",
"format": "int64",
"x-go-name": "FolderID"
},
"folderTitle": {
"type": "string",
"x-go-name": "FolderTitle"
},
"folderUid": {
"type": "string",
"x-go-name": "FolderUID"
},
"folderUrl": {
"type": "string",
"x-go-name": "FolderURL"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"isStarred": {
"type": "boolean",
"x-go-name": "IsStarred"
},
"slug": {
"type": "string",
"x-go-name": "Slug"
},
"sortMeta": {
"type": "integer",
"format": "int64",
"x-go-name": "SortMeta"
},
"sortMetaName": {
"type": "string",
"x-go-name": "SortMetaName"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Tags"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"type": {
"$ref": "#/definitions/HitType"
},
"uid": {
"type": "string",
"x-go-name": "UID"
},
"uri": {
"type": "string",
"x-go-name": "URI"
},
"url": {
"type": "string",
"x-go-name": "URL"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/search"
},
"HitList": {
"type": "array",
"items": {
"$ref": "#/definitions/Hit"
},
"x-go-package": "github.com/grafana/grafana/pkg/services/search"
},
"HitType": {
"type": "string",
"x-go-package": "github.com/grafana/grafana/pkg/services/search"
},
"HostPort": {
"type": "object",
"title": "HostPort represents a \"host:port\" network address.",
"properties": {
"Host": {
"type": "string"
},
"Port": {
"type": "string"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"ImportDashboardInput": {
"type": "object",
"title": "ImportDashboardInput definition of input parameters when importing a dashboard.",
"properties": {
"name": {
"type": "string",
"x-go-name": "Name"
},
"pluginId": {
"type": "string",
"x-go-name": "PluginId"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"value": {
"type": "string",
"x-go-name": "Value"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/dashboardimport"
},
"ImportDashboardRequest": {
"type": "object",
"title": "ImportDashboardRequest request object for importing a dashboard.",
"properties": {
"dashboard": {
"$ref": "#/definitions/Json"
},
"folderId": {
"type": "integer",
"format": "int64",
"x-go-name": "FolderId"
},
"folderUid": {
"type": "string",
"x-go-name": "FolderUid"
},
"inputs": {
"type": "array",
"items": {
"$ref": "#/definitions/ImportDashboardInput"
},
"x-go-name": "Inputs"
},
"overwrite": {
"type": "boolean",
"x-go-name": "Overwrite"
},
"path": {
"type": "string",
"x-go-name": "Path"
},
"pluginId": {
"type": "string",
"x-go-name": "PluginId"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/dashboardimport"
},
"ImportDashboardResponse": {
"type": "object",
"title": "ImportDashboardResponse response object returned when importing a dashboard.",
"properties": {
"dashboardId": {
"type": "integer",
"format": "int64",
"x-go-name": "DashboardId"
},
"description": {
"type": "string",
"x-go-name": "Description"
},
"folderId": {
"type": "integer",
"format": "int64",
"x-go-name": "FolderId"
},
"imported": {
"type": "boolean",
"x-go-name": "Imported"
},
"importedRevision": {
"type": "integer",
"format": "int64",
"x-go-name": "ImportedRevision"
},
"importedUri": {
"type": "string",
"x-go-name": "ImportedUri"
},
"importedUrl": {
"type": "string",
"x-go-name": "ImportedUrl"
},
"path": {
"type": "string",
"x-go-name": "Path"
},
"pluginId": {
"type": "string",
"x-go-name": "PluginId"
},
"removed": {
"type": "boolean",
"x-go-name": "Removed"
},
"revision": {
"type": "integer",
"format": "int64",
"x-go-name": "Revision"
},
"slug": {
"type": "string",
"x-go-name": "Slug"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"uid": {
"type": "string",
"x-go-name": "UID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/dashboardimport"
},
"InclusiveRange": {
"type": "object",
"title": "InclusiveRange is used to hold the Beginning and End values of many time interval components.",
"properties": {
"Begin": {
"type": "integer",
"format": "int64"
},
"End": {
"type": "integer",
"format": "int64"
}
},
"x-go-package": "github.com/prometheus/alertmanager/timeinterval"
},
"InhibitRule": {
"description": "InhibitRule defines an inhibition rule that mutes alerts that match the\ntarget labels if an alert matching the source labels exists.\nBoth alerts have to have a set of labels being equal.",
"type": "object",
"properties": {
"equal": {
"$ref": "#/definitions/LabelNames"
},
"source_match": {
"description": "SourceMatch defines a set of labels that have to equal the given\nvalue for source alerts. Deprecated. Remove before v1.0 release.",
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "SourceMatch"
},
"source_match_re": {
"$ref": "#/definitions/MatchRegexps"
},
"source_matchers": {
"$ref": "#/definitions/Matchers"
},
"target_match": {
"description": "TargetMatch defines a set of labels that have to equal the given\nvalue for target alerts. Deprecated. Remove before v1.0 release.",
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "TargetMatch"
},
"target_match_re": {
"$ref": "#/definitions/MatchRegexps"
},
"target_matchers": {
"$ref": "#/definitions/Matchers"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"ItemDTO": {
"type": "object",
"properties": {
"alertId": {
"type": "integer",
"format": "int64",
"x-go-name": "AlertId"
},
"alertName": {
"type": "string",
"x-go-name": "AlertName"
},
"avatarUrl": {
"type": "string",
"x-go-name": "AvatarUrl"
},
"created": {
"type": "integer",
"format": "int64",
"x-go-name": "Created"
},
"dashboardId": {
"type": "integer",
"format": "int64",
"x-go-name": "DashboardId"
},
"data": {
"$ref": "#/definitions/Json"
},
"email": {
"type": "string",
"x-go-name": "Email"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"login": {
"type": "string",
"x-go-name": "Login"
},
"newState": {
"type": "string",
"x-go-name": "NewState"
},
"panelId": {
"type": "integer",
"format": "int64",
"x-go-name": "PanelId"
},
"prevState": {
"type": "string",
"x-go-name": "PrevState"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Tags"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"time": {
"type": "integer",
"format": "int64",
"x-go-name": "Time"
},
"timeEnd": {
"type": "integer",
"format": "int64",
"x-go-name": "TimeEnd"
},
"updated": {
"type": "integer",
"format": "int64",
"x-go-name": "Updated"
},
"userId": {
"type": "integer",
"format": "int64",
"x-go-name": "UserId"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/annotations"
},
"Json": {
"type": "object",
"x-go-package": "github.com/grafana/grafana/pkg/components/simplejson"
},
"Label": {
"type": "object",
"title": "Label is a key/value pair of strings.",
"properties": {
"Name": {
"type": "string",
"x-go-name": "Value"
}
},
"x-go-package": "github.com/prometheus/prometheus/pkg/labels"
},
"LabelName": {
"description": "A LabelName is a key for a LabelSet or Metric. It has a value associated\ntherewith.",
"type": "string",
"x-go-package": "github.com/prometheus/common/model"
},
"LabelNames": {
"type": "array",
"title": "LabelNames is a sortable LabelName slice. In implements sort.Interface.",
"items": {
"$ref": "#/definitions/LabelName"
},
"x-go-package": "github.com/prometheus/common/model"
},
"LabelSet": {
"description": "A LabelSet is a collection of LabelName and LabelValue pairs. The LabelSet\nmay be fully-qualified down to the point where it may resolve to a single\nMetric in the data store or not. All operations that occur within the realm\nof a LabelSet can emit a vector of Metric entities to which the LabelSet may\nmatch.",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/LabelValue"
},
"x-go-package": "github.com/prometheus/common/model"
},
"LabelValue": {
"type": "string",
"title": "A LabelValue is an associated value for a LabelName.",
"x-go-package": "github.com/prometheus/common/model"
},
"Labels": {
"description": "Labels is a sorted set of labels. Order has to be guaranteed upon\ninstantiation.",
"type": "array",
"items": {
"$ref": "#/definitions/Label"
},
"x-go-package": "github.com/prometheus/prometheus/pkg/labels"
},
"LibraryElementConnectionDTO": {
"type": "object",
"title": "LibraryElementConnectionDTO is the frontend DTO for element connections.",
"properties": {
"connectionId": {
"type": "integer",
"format": "int64",
"x-go-name": "ConnectionID"
},
"created": {
"type": "string",
"format": "date-time",
"x-go-name": "Created"
},
"createdBy": {
"$ref": "#/definitions/LibraryElementDTOMetaUser"
},
"elementId": {
"type": "integer",
"format": "int64",
"x-go-name": "ElementID"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"kind": {
"type": "integer",
"format": "int64",
"x-go-name": "Kind"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/libraryelements"
},
"LibraryElementConnectionsResponse": {
"type": "object",
"title": "LibraryElementConnectionsResponse is a response struct for an array of LibraryElementConnectionDTO.",
"properties": {
"result": {
"type": "array",
"items": {
"$ref": "#/definitions/LibraryElementConnectionDTO"
},
"x-go-name": "Result"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/libraryelements"
},
"LibraryElementDTO": {
"type": "object",
"title": "LibraryElementDTO is the frontend DTO for entities.",
"properties": {
"description": {
"type": "string",
"x-go-name": "Description"
},
"folderId": {
"type": "integer",
"format": "int64",
"x-go-name": "FolderID"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"kind": {
"type": "integer",
"format": "int64",
"x-go-name": "Kind"
},
"meta": {
"$ref": "#/definitions/LibraryElementDTOMeta"
},
"model": {
"type": "object",
"x-go-name": "Model"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgID"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"uid": {
"type": "string",
"x-go-name": "UID"
},
"version": {
"type": "integer",
"format": "int64",
"x-go-name": "Version"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/libraryelements"
},
"LibraryElementDTOMeta": {
"type": "object",
"title": "LibraryElementDTOMeta is the meta information for LibraryElementDTO.",
"properties": {
"connectedDashboards": {
"type": "integer",
"format": "int64",
"x-go-name": "ConnectedDashboards"
},
"created": {
"type": "string",
"format": "date-time",
"x-go-name": "Created"
},
"createdBy": {
"$ref": "#/definitions/LibraryElementDTOMetaUser"
},
"folderName": {
"type": "string",
"x-go-name": "FolderName"
},
"folderUid": {
"type": "string",
"x-go-name": "FolderUID"
},
"updated": {
"type": "string",
"format": "date-time",
"x-go-name": "Updated"
},
"updatedBy": {
"$ref": "#/definitions/LibraryElementDTOMetaUser"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/libraryelements"
},
"LibraryElementDTOMetaUser": {
"type": "object",
"title": "LibraryElementDTOMetaUser is the meta information for user that creates/changes the library element.",
"properties": {
"avatarUrl": {
"type": "string",
"x-go-name": "AvatarURL"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"name": {
"type": "string",
"x-go-name": "Name"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/libraryelements"
},
"LibraryElementResponse": {
"type": "object",
"title": "LibraryElementResponse is a response struct for LibraryElementDTO.",
"properties": {
"result": {
"$ref": "#/definitions/LibraryElementDTO"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/libraryelements"
},
"LibraryElementSearchResponse": {
"type": "object",
"title": "LibraryElementSearchResponse is a response struct for LibraryElementSearchResult.",
"properties": {
"result": {
"$ref": "#/definitions/LibraryElementSearchResult"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/libraryelements"
},
"LibraryElementSearchResult": {
"type": "object",
"title": "LibraryElementSearchResult is the search result for entities.",
"properties": {
"elements": {
"type": "array",
"items": {
"$ref": "#/definitions/LibraryElementDTO"
},
"x-go-name": "Elements"
},
"page": {
"type": "integer",
"format": "int64",
"x-go-name": "Page"
},
"perPage": {
"type": "integer",
"format": "int64",
"x-go-name": "PerPage"
},
"totalCount": {
"type": "integer",
"format": "int64",
"x-go-name": "TotalCount"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/libraryelements"
},
"MatchRegexps": {
"type": "object",
"title": "MatchRegexps represents a map of Regexp.",
"additionalProperties": {
"$ref": "#/definitions/Regexp"
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"MatchType": {
"type": "integer",
"format": "int64",
"title": "MatchType is an enum for label matching types.",
"x-go-package": "github.com/prometheus/alertmanager/pkg/labels"
},
"Matcher": {
"type": "object",
"title": "Matcher models the matching of a label.",
"properties": {
"Name": {
"type": "string"
},
"Type": {
"$ref": "#/definitions/MatchType"
},
"Value": {
"type": "string"
}
},
"x-go-package": "github.com/prometheus/alertmanager/pkg/labels"
},
"Matchers": {
"description": "Matchers is a slice of Matchers that is sortable, implements Stringer, and\nprovides a Matches method to match a LabelSet against all Matchers in the\nslice. Note that some users of Matchers might require it to be sorted.",
"type": "array",
"items": {
"$ref": "#/definitions/Matcher"
}
},
"Metadata": {
"description": "Metadata contains user accesses for a given resource\nEx: map[string]bool{\"create\":true, \"delete\": true}",
"type": "object",
"additionalProperties": {
"type": "boolean"
},
"x-go-package": "github.com/grafana/grafana/pkg/services/accesscontrol"
},
"MetricRequest": {
"type": "object",
"required": ["from", "to", "queries"],
"properties": {
"debug": {
"type": "boolean",
"x-go-name": "Debug"
},
"from": {
"description": "From Start time in epoch timestamps in milliseconds or relative using Grafana time units.",
"type": "string",
"x-go-name": "From",
"example": "now-1h"
},
"queries": {
"description": "queries.refId Specifies an identifier of the query. Is optional and default to “A”.\nqueries.datasourceId Specifies the data source to be queried. Each query in the request must have an unique datasourceId.\nqueries.maxDataPoints - Species maximum amount of data points that dashboard panel can render. Is optional and default to 100.\nqueries.intervalMs - Specifies the time interval in milliseconds of time series. Is optional and defaults to 1000.",
"type": "array",
"items": {
"$ref": "#/definitions/Json"
},
"x-go-name": "Queries",
"example": [
{
"datasourceId": 86,
"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",
"x-go-name": "To",
"example": "now"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"MonthRange": {
"type": "object",
"title": "A MonthRange is an inclusive range between [1, 12] where 1 = January.",
"properties": {
"Begin": {
"type": "integer",
"format": "int64"
},
"End": {
"type": "integer",
"format": "int64"
}
},
"x-go-package": "github.com/prometheus/alertmanager/timeinterval"
},
"MultiStatus": {
"type": "object",
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"MuteTimeInterval": {
"type": "object",
"title": "MuteTimeInterval represents a named set of time intervals for which a route should be muted.",
"properties": {
"name": {
"type": "string",
"x-go-name": "Name"
},
"time_intervals": {
"type": "array",
"items": {
"$ref": "#/definitions/TimeInterval"
},
"x-go-name": "TimeIntervals"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"NamespaceConfigResponse": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/GettableRuleGroupConfig"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"NewApiKeyResult": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"key": {
"type": "string",
"x-go-name": "Key"
},
"name": {
"type": "string",
"x-go-name": "Name"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"NotificationTestCommand": {
"type": "object",
"properties": {
"disableResolveMessage": {
"type": "boolean",
"x-go-name": "DisableResolveMessage"
},
"frequency": {
"type": "string",
"x-go-name": "Frequency"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"secureSettings": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "SecureSettings"
},
"sendReminder": {
"type": "boolean",
"x-go-name": "SendReminder"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"type": "string",
"x-go-name": "Type"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"NotifierConfig": {
"type": "object",
"title": "NotifierConfig contains base options common across all notifier configurations.",
"properties": {
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"OAuth2": {
"type": "object",
"title": "OAuth2 is the oauth2 client configuration.",
"properties": {
"TLSConfig": {
"$ref": "#/definitions/TLSConfig"
},
"client_id": {
"type": "string",
"x-go-name": "ClientID"
},
"client_secret": {
"$ref": "#/definitions/Secret"
},
"client_secret_file": {
"type": "string",
"x-go-name": "ClientSecretFile"
},
"endpoint_params": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "EndpointParams"
},
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Scopes"
},
"token_url": {
"type": "string",
"x-go-name": "TokenURL"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"ObjectMatchers": {
"description": "ObjectMatchers is Matchers with a different Unmarshal and Marshal methods that accept matchers as objects\nthat have already been parsed.",
"$ref": "#/definitions/Matchers"
},
"OpsGenieConfig": {
"type": "object",
"title": "OpsGenieConfig configures notifications via OpsGenie.",
"properties": {
"actions": {
"type": "string",
"x-go-name": "Actions"
},
"api_key": {
"$ref": "#/definitions/Secret"
},
"api_key_file": {
"type": "string",
"x-go-name": "APIKeyFile"
},
"api_url": {
"$ref": "#/definitions/URL"
},
"description": {
"type": "string",
"x-go-name": "Description"
},
"details": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Details"
},
"entity": {
"type": "string",
"x-go-name": "Entity"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"note": {
"type": "string",
"x-go-name": "Note"
},
"priority": {
"type": "string",
"x-go-name": "Priority"
},
"responders": {
"type": "array",
"items": {
"$ref": "#/definitions/OpsGenieConfigResponder"
},
"x-go-name": "Responders"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"source": {
"type": "string",
"x-go-name": "Source"
},
"tags": {
"type": "string",
"x-go-name": "Tags"
},
"update_alerts": {
"type": "boolean",
"x-go-name": "UpdateAlerts"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"OpsGenieConfigResponder": {
"type": "object",
"properties": {
"id": {
"description": "One of those 3 should be filled.",
"type": "string",
"x-go-name": "ID"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"type": {
"description": "team, user, escalation, schedule etc.",
"type": "string",
"x-go-name": "Type"
},
"username": {
"type": "string",
"x-go-name": "Username"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"OrgDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"name": {
"type": "string",
"x-go-name": "Name"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"OrgDetailsDTO": {
"type": "object",
"properties": {
"address": {
"$ref": "#/definitions/Address"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"name": {
"type": "string",
"x-go-name": "Name"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"OrgUserDTO": {
"type": "object",
"properties": {
"accessControl": {
"type": "object",
"additionalProperties": {
"type": "boolean"
},
"x-go-name": "AccessControl"
},
"avatarUrl": {
"type": "string",
"x-go-name": "AvatarUrl"
},
"email": {
"type": "string",
"x-go-name": "Email"
},
"lastSeenAt": {
"type": "string",
"format": "date-time",
"x-go-name": "LastSeenAt"
},
"lastSeenAtAge": {
"type": "string",
"x-go-name": "LastSeenAtAge"
},
"login": {
"type": "string",
"x-go-name": "Login"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgId"
},
"role": {
"type": "string",
"x-go-name": "Role"
},
"userId": {
"type": "integer",
"format": "int64",
"x-go-name": "UserId"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"PagerdutyConfig": {
"type": "object",
"title": "PagerdutyConfig configures notifications via PagerDuty.",
"properties": {
"class": {
"type": "string",
"x-go-name": "Class"
},
"client": {
"type": "string",
"x-go-name": "Client"
},
"client_url": {
"type": "string",
"x-go-name": "ClientURL"
},
"component": {
"type": "string",
"x-go-name": "Component"
},
"description": {
"type": "string",
"x-go-name": "Description"
},
"details": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Details"
},
"group": {
"type": "string",
"x-go-name": "Group"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"images": {
"type": "array",
"items": {
"$ref": "#/definitions/PagerdutyImage"
},
"x-go-name": "Images"
},
"links": {
"type": "array",
"items": {
"$ref": "#/definitions/PagerdutyLink"
},
"x-go-name": "Links"
},
"routing_key": {
"$ref": "#/definitions/Secret"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"service_key": {
"$ref": "#/definitions/Secret"
},
"severity": {
"type": "string",
"x-go-name": "Severity"
},
"url": {
"$ref": "#/definitions/URL"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"PagerdutyImage": {
"description": "PagerdutyImage is an image",
"type": "object",
"properties": {
"alt": {
"type": "string",
"x-go-name": "Alt"
},
"href": {
"type": "string",
"x-go-name": "Href"
},
"src": {
"type": "string",
"x-go-name": "Src"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"PagerdutyLink": {
"description": "PagerdutyLink is a link",
"type": "object",
"properties": {
"href": {
"type": "string",
"x-go-name": "Href"
},
"text": {
"type": "string",
"x-go-name": "Text"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"PatchAnnotationsCmd": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Tags"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"time": {
"type": "integer",
"format": "int64",
"x-go-name": "Time"
},
"timeEnd": {
"type": "integer",
"format": "int64",
"x-go-name": "TimeEnd"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"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",
"x-go-name": "FolderID"
},
"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],
"x-go-name": "Kind"
},
"model": {
"description": "The JSON model for the library element.",
"type": "object",
"x-go-name": "Model"
},
"name": {
"description": "Name of the library element.",
"type": "string",
"x-go-name": "Name"
},
"uid": {
"type": "string",
"x-go-name": "UID"
},
"version": {
"description": "Version of the library element you are updating.",
"type": "integer",
"format": "int64",
"x-go-name": "Version"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/libraryelements"
},
"PauseAlertCommand": {
"type": "object",
"properties": {
"alertId": {
"type": "integer",
"format": "int64",
"x-go-name": "AlertId"
},
"paused": {
"type": "boolean",
"x-go-name": "Paused"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"PauseAllAlertsCommand": {
"type": "object",
"properties": {
"paused": {
"type": "boolean",
"x-go-name": "Paused"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"Permission": {
"type": "object",
"title": "Permission is the model for access control permissions.",
"properties": {
"action": {
"type": "string",
"x-go-name": "Action"
},
"created": {
"type": "string",
"format": "date-time",
"x-go-name": "Created"
},
"scope": {
"type": "string",
"x-go-name": "Scope"
},
"updated": {
"type": "string",
"format": "date-time",
"x-go-name": "Updated"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/accesscontrol"
},
"PermissionDenied": {
"type": "object",
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PermissionType": {
"type": "integer",
"format": "int64",
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"Point": {
"type": "object",
"title": "Point represents a single data point for a given timestamp.",
"properties": {
"T": {
"type": "integer",
"format": "int64"
},
"V": {
"type": "number",
"format": "double"
}
},
"x-go-package": "github.com/prometheus/prometheus/promql"
},
"PostAnnotationsCmd": {
"type": "object",
"properties": {
"dashboardId": {
"type": "integer",
"format": "int64",
"x-go-name": "DashboardId"
},
"data": {
"$ref": "#/definitions/Json"
},
"panelId": {
"type": "integer",
"format": "int64",
"x-go-name": "PanelId"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Tags"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"time": {
"type": "integer",
"format": "int64",
"x-go-name": "Time"
},
"timeEnd": {
"type": "integer",
"format": "int64",
"x-go-name": "TimeEnd"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"PostGraphiteAnnotationsCmd": {
"type": "object",
"properties": {
"data": {
"type": "string",
"x-go-name": "Data"
},
"tags": {
"type": "object",
"x-go-name": "Tags"
},
"what": {
"type": "string",
"x-go-name": "What"
},
"when": {
"type": "integer",
"format": "int64",
"x-go-name": "When"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"PostableApiAlertingConfig": {
"type": "object",
"properties": {
"global": {
"$ref": "#/definitions/GlobalConfig"
},
"inhibit_rules": {
"type": "array",
"items": {
"$ref": "#/definitions/InhibitRule"
},
"x-go-name": "InhibitRules"
},
"mute_time_intervals": {
"type": "array",
"items": {
"$ref": "#/definitions/MuteTimeInterval"
},
"x-go-name": "MuteTimeIntervals"
},
"receivers": {
"description": "Override with our superset receiver type",
"type": "array",
"items": {
"$ref": "#/definitions/PostableApiReceiver"
},
"x-go-name": "Receivers"
},
"route": {
"$ref": "#/definitions/Route"
},
"templates": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Templates"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableApiReceiver": {
"type": "object",
"properties": {
"email_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/EmailConfig"
},
"x-go-name": "EmailConfigs"
},
"grafana_managed_receiver_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PostableGrafanaReceiver"
},
"x-go-name": "GrafanaManagedReceivers"
},
"name": {
"description": "A unique identifier for this receiver.",
"type": "string",
"x-go-name": "Name"
},
"opsgenie_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/OpsGenieConfig"
},
"x-go-name": "OpsGenieConfigs"
},
"pagerduty_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PagerdutyConfig"
},
"x-go-name": "PagerdutyConfigs"
},
"pushover_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PushoverConfig"
},
"x-go-name": "PushoverConfigs"
},
"slack_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/SlackConfig"
},
"x-go-name": "SlackConfigs"
},
"sns_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/SNSConfig"
},
"x-go-name": "SNSConfigs"
},
"victorops_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/VictorOpsConfig"
},
"x-go-name": "VictorOpsConfigs"
},
"webhook_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WebhookConfig"
},
"x-go-name": "WebhookConfigs"
},
"wechat_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WechatConfig"
},
"x-go-name": "WechatConfigs"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableExtendedRuleNode": {
"type": "object",
"properties": {
"alert": {
"type": "string",
"x-go-name": "Alert"
},
"annotations": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Annotations"
},
"expr": {
"type": "string",
"x-go-name": "Expr"
},
"for": {
"$ref": "#/definitions/Duration"
},
"grafana_alert": {
"$ref": "#/definitions/PostableGrafanaRule"
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Labels"
},
"record": {
"type": "string",
"x-go-name": "Record"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableGrafanaReceiver": {
"type": "object",
"properties": {
"disableResolveMessage": {
"type": "boolean",
"x-go-name": "DisableResolveMessage"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"secureSettings": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "SecureSettings"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"uid": {
"type": "string",
"x-go-name": "UID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableGrafanaReceivers": {
"type": "object",
"properties": {
"grafana_managed_receiver_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PostableGrafanaReceiver"
},
"x-go-name": "GrafanaManagedReceivers"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableGrafanaRule": {
"type": "object",
"properties": {
"condition": {
"type": "string",
"x-go-name": "Condition"
},
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertQuery"
},
"x-go-name": "Data"
},
"exec_err_state": {
"type": "string",
"enum": ["Alerting", "Error"],
"x-go-enum-desc": "Alerting AlertingErrState\nError ErrorErrState",
"x-go-name": "ExecErrState"
},
"no_data_state": {
"type": "string",
"enum": ["Alerting", "NoData", "OK"],
"x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK",
"x-go-name": "NoDataState"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"uid": {
"type": "string",
"x-go-name": "UID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableNGalertConfig": {
"type": "object",
"properties": {
"alertmanagers": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Alertmanagers"
},
"alertmanagersChoice": {
"type": "string",
"enum": ["all", "internal", "external"],
"x-go-enum-desc": "all AllAlertmanagers\ninternal InternalAlertmanager\nexternal ExternalAlertmanagers",
"x-go-name": "AlertmanagersChoice"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableRuleGroupConfig": {
"type": "object",
"properties": {
"interval": {
"$ref": "#/definitions/Duration"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"rules": {
"type": "array",
"items": {
"$ref": "#/definitions/PostableExtendedRuleNode"
},
"x-go-name": "Rules"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableUserConfig": {
"type": "object",
"properties": {
"alertmanager_config": {
"$ref": "#/definitions/PostableApiAlertingConfig"
},
"template_files": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "TemplateFiles"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"Prefs": {
"type": "object",
"properties": {
"homeDashboardId": {
"type": "integer",
"format": "int64",
"x-go-name": "HomeDashboardID"
},
"theme": {
"type": "string",
"x-go-name": "Theme"
},
"timezone": {
"type": "string",
"x-go-name": "Timezone"
},
"weekStart": {
"type": "string",
"x-go-name": "WeekStart"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"PrometheusRemoteWriteTargetJSON": {
"type": "object",
"properties": {
"data_source_uid": {
"type": "string",
"x-go-name": "DatasourceUID"
},
"id": {
"type": "string",
"x-go-name": "ID"
},
"remote_write_path": {
"type": "string",
"x-go-name": "WritePath"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/recordedqueries/api"
},
"PushoverConfig": {
"type": "object",
"properties": {
"expire": {
"$ref": "#/definitions/duration"
},
"html": {
"type": "boolean",
"x-go-name": "HTML"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"priority": {
"type": "string",
"x-go-name": "Priority"
},
"retry": {
"$ref": "#/definitions/duration"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"sound": {
"type": "string",
"x-go-name": "Sound"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"token": {
"$ref": "#/definitions/Secret"
},
"url": {
"type": "string",
"x-go-name": "URL"
},
"url_title": {
"type": "string",
"x-go-name": "URLTitle"
},
"user_key": {
"$ref": "#/definitions/Secret"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"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"
}
},
"x-go-package": "github.com/grafana/grafana-plugin-sdk-go/backend"
},
"Receiver": {
"type": "object",
"title": "Receiver configuration provides configuration on how to contact a receiver.",
"properties": {
"email_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/EmailConfig"
},
"x-go-name": "EmailConfigs"
},
"name": {
"description": "A unique identifier for this receiver.",
"type": "string",
"x-go-name": "Name"
},
"opsgenie_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/OpsGenieConfig"
},
"x-go-name": "OpsGenieConfigs"
},
"pagerduty_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PagerdutyConfig"
},
"x-go-name": "PagerdutyConfigs"
},
"pushover_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PushoverConfig"
},
"x-go-name": "PushoverConfigs"
},
"slack_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/SlackConfig"
},
"x-go-name": "SlackConfigs"
},
"sns_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/SNSConfig"
},
"x-go-name": "SNSConfigs"
},
"victorops_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/VictorOpsConfig"
},
"x-go-name": "VictorOpsConfigs"
},
"webhook_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WebhookConfig"
},
"x-go-name": "WebhookConfigs"
},
"wechat_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WechatConfig"
},
"x-go-name": "WechatConfigs"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"RecordingRuleJSON": {
"description": "RecordingRuleJSON is the external representation of a recording rule",
"type": "object",
"properties": {
"active": {
"type": "boolean",
"x-go-name": "Active"
},
"count": {
"type": "boolean",
"x-go-name": "Count"
},
"description": {
"type": "string",
"x-go-name": "Description"
},
"dest_data_source_uid": {
"type": "string",
"x-go-name": "DestDataSourceUID"
},
"id": {
"type": "string",
"x-go-name": "ID"
},
"interval": {
"type": "integer",
"format": "int64",
"x-go-name": "Interval"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"prom_name": {
"type": "string",
"x-go-name": "PromName"
},
"queries": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"x-go-name": "Queries"
},
"range": {
"type": "integer",
"format": "int64",
"x-go-name": "Range"
},
"target_ref_id": {
"type": "string",
"x-go-name": "TargetRefID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/recordedqueries/api"
},
"Regexp": {
"description": "A Regexp is safe for concurrent use by multiple goroutines,\nexcept for configuration methods, such as Longest.",
"type": "object",
"title": "Regexp is the representation of a compiled regular expression.",
"x-go-package": "regexp"
},
"RelativeTimeRange": {
"description": "RelativeTimeRange is the per query start and end time\nfor requests.",
"type": "object",
"properties": {
"from": {
"$ref": "#/definitions/Duration"
},
"to": {
"$ref": "#/definitions/Duration"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models"
},
"ReportEmailDTO": {
"type": "object",
"properties": {
"email": {
"type": "string",
"x-go-name": "Email"
},
"emails": {
"description": "Comma-separated list of emails to which to send the report to.",
"type": "string",
"x-go-name": "Emails"
},
"id": {
"description": "Send the report to the emails specified in the report. Required if emails is not present.",
"type": "string",
"format": "int64",
"x-go-name": "Id"
},
"useEmailsFromReport": {
"description": "Send the report to the emails specified in the report. Required if emails is not present.",
"type": "boolean",
"x-go-name": "UseEmailsFromReport"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/report"
},
"ReportOptions": {
"type": "object",
"properties": {
"layout": {
"type": "string",
"x-go-name": "Layout"
},
"orientation": {
"type": "string",
"x-go-name": "Orientation"
},
"timeRange": {
"$ref": "#/definitions/TimeRangeDTO"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/report"
},
"ResponseDetails": {
"type": "object",
"properties": {
"msg": {
"type": "string",
"x-go-name": "Msg"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"Responses": {
"description": "The QueryData method the QueryDataHandler method will set the RefId\nproperty on the DataRespones' frames based on these RefIDs.",
"type": "object",
"title": "Responses is a map of RefIDs (Unique Query ID) to DataResponses.",
"additionalProperties": {
"$ref": "#/definitions/DataResponse"
},
"x-go-package": "github.com/grafana/grafana-plugin-sdk-go/backend"
},
"RevokeAuthTokenCmd": {
"type": "object",
"properties": {
"authTokenId": {
"type": "integer",
"format": "int64",
"x-go-name": "AuthTokenId"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"RoleDTO": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time",
"x-go-name": "Created"
},
"delegatable": {
"type": "boolean",
"x-go-name": "Delegatable"
},
"description": {
"type": "string",
"x-go-name": "Description"
},
"displayName": {
"type": "string",
"x-go-name": "DisplayName"
},
"group": {
"type": "string",
"x-go-name": "Group"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/Permission"
},
"x-go-name": "Permissions"
},
"uid": {
"type": "string",
"x-go-name": "UID"
},
"updated": {
"type": "string",
"format": "date-time",
"x-go-name": "Updated"
},
"version": {
"type": "integer",
"format": "int64",
"x-go-name": "Version"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/accesscontrol"
},
"RoleType": {
"type": "string",
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"Route": {
"description": "A Route is a node that contains definitions of how to handle alerts. This is modified\nfrom the upstream alertmanager in that it adds the ObjectMatchers property.",
"type": "object",
"properties": {
"continue": {
"type": "boolean",
"x-go-name": "Continue"
},
"group_by": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "GroupByStr"
},
"group_interval": {
"$ref": "#/definitions/Duration"
},
"group_wait": {
"$ref": "#/definitions/Duration"
},
"match": {
"description": "Deprecated. Remove before v1.0 release.",
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Match"
},
"match_re": {
"$ref": "#/definitions/MatchRegexps"
},
"matchers": {
"$ref": "#/definitions/Matchers"
},
"mute_time_intervals": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "MuteTimeIntervals"
},
"object_matchers": {
"$ref": "#/definitions/ObjectMatchers"
},
"receiver": {
"type": "string",
"x-go-name": "Receiver"
},
"repeat_interval": {
"$ref": "#/definitions/Duration"
},
"routes": {
"type": "array",
"items": {
"$ref": "#/definitions/Route"
},
"x-go-name": "Routes"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"Rule": {
"description": "adapted from cortex",
"type": "object",
"required": ["name", "query", "health", "type"],
"properties": {
"evaluationTime": {
"type": "number",
"format": "double",
"x-go-name": "EvaluationTime"
},
"health": {
"type": "string",
"x-go-name": "Health"
},
"labels": {
"$ref": "#/definitions/overrideLabels"
},
"lastError": {
"type": "string",
"x-go-name": "LastError"
},
"lastEvaluation": {
"type": "string",
"format": "date-time",
"x-go-name": "LastEvaluation"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"query": {
"type": "string",
"x-go-name": "Query"
},
"type": {
"$ref": "#/definitions/RuleType"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"RuleDiscovery": {
"type": "object",
"required": ["groups"],
"properties": {
"groups": {
"type": "array",
"items": {
"$ref": "#/definitions/RuleGroup"
},
"x-go-name": "RuleGroups"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"RuleGroup": {
"type": "object",
"required": ["name", "file", "rules", "interval"],
"properties": {
"evaluationTime": {
"type": "number",
"format": "double",
"x-go-name": "EvaluationTime"
},
"file": {
"type": "string",
"x-go-name": "File"
},
"interval": {
"type": "number",
"format": "double",
"x-go-name": "Interval"
},
"lastEvaluation": {
"type": "string",
"format": "date-time",
"x-go-name": "LastEvaluation"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"rules": {
"description": "In order to preserve rule ordering, while exposing type (alerting or recording)\nspecific properties, both alerting and recording rules are exposed in the\nsame array.",
"type": "array",
"items": {
"$ref": "#/definitions/AlertingRule"
},
"x-go-name": "Rules"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"RuleGroupConfigResponse": {
"type": "object",
"properties": {
"interval": {
"$ref": "#/definitions/Duration"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"rules": {
"type": "array",
"items": {
"$ref": "#/definitions/GettableExtendedRuleNode"
},
"x-go-name": "Rules"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"RuleResponse": {
"type": "object",
"required": ["status"],
"properties": {
"data": {
"$ref": "#/definitions/RuleDiscovery"
},
"error": {
"type": "string",
"x-go-name": "Error"
},
"errorType": {
"$ref": "#/definitions/ErrorType"
},
"status": {
"type": "string",
"x-go-name": "Status"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"RuleType": {
"type": "string",
"title": "RuleType models the type of a rule.",
"x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1"
},
"SNSConfig": {
"type": "object",
"properties": {
"api_url": {
"type": "string",
"x-go-name": "APIUrl"
},
"attributes": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Attributes"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"phone_number": {
"type": "string",
"x-go-name": "PhoneNumber"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"sigv4": {
"$ref": "#/definitions/SigV4Config"
},
"subject": {
"type": "string",
"x-go-name": "Subject"
},
"target_arn": {
"type": "string",
"x-go-name": "TargetARN"
},
"topic_arn": {
"type": "string",
"x-go-name": "TopicARN"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"Sample": {
"type": "object",
"title": "Sample is a single sample belonging to a metric.",
"properties": {
"Metric": {
"$ref": "#/definitions/Labels"
},
"T": {
"type": "integer",
"format": "int64"
},
"V": {
"type": "number",
"format": "double"
}
},
"x-go-package": "github.com/prometheus/prometheus/promql"
},
"SaveDashboardCommand": {
"type": "object",
"properties": {
"UpdatedAt": {
"type": "string",
"format": "date-time"
},
"dashboard": {
"$ref": "#/definitions/Json"
},
"folderId": {
"type": "integer",
"format": "int64",
"x-go-name": "FolderId"
},
"folderUid": {
"type": "string",
"x-go-name": "FolderUid"
},
"isFolder": {
"type": "boolean",
"x-go-name": "IsFolder"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"overwrite": {
"type": "boolean",
"x-go-name": "Overwrite"
},
"userId": {
"type": "integer",
"format": "int64",
"x-go-name": "UserId"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"Schedule": {
"type": "object",
"properties": {
"day": {
"type": "string",
"x-go-name": "Day"
},
"dayOfMonth": {
"type": "string",
"x-go-name": "DayOfMonth"
},
"endDate": {
"type": "string",
"format": "date-time",
"x-go-name": "EndDate"
},
"frequency": {
"type": "string",
"x-go-name": "Frequency"
},
"hour": {
"type": "integer",
"format": "int64",
"x-go-name": "Hour"
},
"intervalAmount": {
"type": "integer",
"format": "int64",
"x-go-name": "IntervalAmount"
},
"intervalFrequency": {
"type": "string",
"x-go-name": "IntervalFrequency"
},
"minute": {
"type": "integer",
"format": "int64",
"x-go-name": "Minute"
},
"startDate": {
"type": "string",
"format": "date-time",
"x-go-name": "StartDate"
},
"timeZone": {
"type": "string",
"x-go-name": "TimeZone"
},
"workdaysOnly": {
"type": "boolean",
"x-go-name": "WorkdaysOnly"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/report"
},
"SearchTeamQueryResult": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"format": "int64",
"x-go-name": "Page"
},
"perPage": {
"type": "integer",
"format": "int64",
"x-go-name": "PerPage"
},
"teams": {
"type": "array",
"items": {
"$ref": "#/definitions/TeamDTO"
},
"x-go-name": "Teams"
},
"totalCount": {
"type": "integer",
"format": "int64",
"x-go-name": "TotalCount"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"SearchUserQueryResult": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"format": "int64",
"x-go-name": "Page"
},
"perPage": {
"type": "integer",
"format": "int64",
"x-go-name": "PerPage"
},
"totalCount": {
"type": "integer",
"format": "int64",
"x-go-name": "TotalCount"
},
"users": {
"type": "array",
"items": {
"$ref": "#/definitions/UserSearchHitDTO"
},
"x-go-name": "Users"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"Secret": {
"type": "string",
"title": "Secret special type for storing secrets.",
"x-go-package": "github.com/prometheus/common/config"
},
"SecretURL": {
"title": "SecretURL is a URL that must not be revealed on marshaling.",
"$ref": "#/definitions/URL"
},
"SetUserRolesCommand": {
"type": "object",
"properties": {
"global": {
"type": "boolean",
"x-go-name": "Global"
},
"roleUids": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "RoleUIDs"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol"
},
"SettingsBag": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/setting"
},
"SettingsDTO": {
"type": "object",
"properties": {
"branding": {
"$ref": "#/definitions/BrandingOptions"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgID"
},
"userId": {
"type": "integer",
"format": "int64",
"x-go-name": "UserID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/report"
},
"SigV4Config": {
"description": "SigV4Config is the configuration for signing remote write requests with\nAWS's SigV4 verification process. Empty values will be retrieved using the\nAWS default credentials chain.",
"type": "object",
"properties": {
"AccessKey": {
"type": "string"
},
"Profile": {
"type": "string"
},
"Region": {
"type": "string"
},
"RoleARN": {
"type": "string"
},
"SecretKey": {
"$ref": "#/definitions/Secret"
}
},
"x-go-package": "github.com/prometheus/common/sigv4"
},
"SlackAction": {
"description": "See https://api.slack.com/docs/message-attachments#action_fields and https://api.slack.com/docs/message-buttons\nfor more information.",
"type": "object",
"title": "SlackAction configures a single Slack action that is sent with each notification.",
"properties": {
"confirm": {
"$ref": "#/definitions/SlackConfirmationField"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"style": {
"type": "string",
"x-go-name": "Style"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"url": {
"type": "string",
"x-go-name": "URL"
},
"value": {
"type": "string",
"x-go-name": "Value"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"SlackConfig": {
"type": "object",
"title": "SlackConfig configures notifications via Slack.",
"properties": {
"actions": {
"type": "array",
"items": {
"$ref": "#/definitions/SlackAction"
},
"x-go-name": "Actions"
},
"api_url": {
"$ref": "#/definitions/SecretURL"
},
"api_url_file": {
"type": "string",
"x-go-name": "APIURLFile"
},
"callback_id": {
"type": "string",
"x-go-name": "CallbackID"
},
"channel": {
"description": "Slack channel override, (like #other-channel or @username).",
"type": "string",
"x-go-name": "Channel"
},
"color": {
"type": "string",
"x-go-name": "Color"
},
"fallback": {
"type": "string",
"x-go-name": "Fallback"
},
"fields": {
"type": "array",
"items": {
"$ref": "#/definitions/SlackField"
},
"x-go-name": "Fields"
},
"footer": {
"type": "string",
"x-go-name": "Footer"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"icon_emoji": {
"type": "string",
"x-go-name": "IconEmoji"
},
"icon_url": {
"type": "string",
"x-go-name": "IconURL"
},
"image_url": {
"type": "string",
"x-go-name": "ImageURL"
},
"link_names": {
"type": "boolean",
"x-go-name": "LinkNames"
},
"mrkdwn_in": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "MrkdwnIn"
},
"pretext": {
"type": "string",
"x-go-name": "Pretext"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"short_fields": {
"type": "boolean",
"x-go-name": "ShortFields"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"thumb_url": {
"type": "string",
"x-go-name": "ThumbURL"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"title_link": {
"type": "string",
"x-go-name": "TitleLink"
},
"username": {
"type": "string",
"x-go-name": "Username"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"SlackConfirmationField": {
"description": "SlackConfirmationField protect users from destructive actions or particularly distinguished decisions\nby asking them to confirm their button click one more time.\nSee https://api.slack.com/docs/interactive-message-field-guide#confirmation_fields for more information.",
"type": "object",
"properties": {
"dismiss_text": {
"type": "string",
"x-go-name": "DismissText"
},
"ok_text": {
"type": "string",
"x-go-name": "OkText"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"title": {
"type": "string",
"x-go-name": "Title"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"SlackField": {
"description": "Each field must contain a title, value, and optionally, a boolean value to indicate if the field\nis short enough to be displayed next to other fields designated as short.\nSee https://api.slack.com/docs/message-attachments#fields for more information.",
"type": "object",
"title": "SlackField configures a single Slack field that is sent with each notification.",
"properties": {
"short": {
"type": "boolean",
"x-go-name": "Short"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"value": {
"type": "string",
"x-go-name": "Value"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"SmtpNotEnabled": {
"$ref": "#/definitions/ResponseDetails"
},
"State": {
"type": "string",
"x-go-package": "github.com/grafana/grafana/pkg/extensions/report"
},
"Status": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"x-go-name": "Enabled"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol"
},
"Success": {
"$ref": "#/definitions/ResponseDetails"
},
"SuccessResponseBody": {
"type": "object",
"properties": {
"message": {
"type": "string",
"x-go-name": "Message"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/docs/definitions"
},
"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"
}
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/ldapsync"
},
"TLSConfig": {
"type": "object",
"title": "TLSConfig configures the options for TLS connections.",
"properties": {
"ca_file": {
"description": "The CA cert to use for the targets.",
"type": "string",
"x-go-name": "CAFile"
},
"cert_file": {
"description": "The client cert file for the targets.",
"type": "string",
"x-go-name": "CertFile"
},
"insecure_skip_verify": {
"description": "Disable target certificate validation.",
"type": "boolean",
"x-go-name": "InsecureSkipVerify"
},
"key_file": {
"description": "The client key file for the targets.",
"type": "string",
"x-go-name": "KeyFile"
},
"server_name": {
"description": "Used to verify the hostname for the targets.",
"type": "string",
"x-go-name": "ServerName"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"TagsDTO": {
"type": "object",
"title": "TagsDTO is the frontend DTO for Tag.",
"properties": {
"count": {
"type": "integer",
"format": "int64",
"x-go-name": "Count"
},
"tag": {
"type": "string",
"x-go-name": "Tag"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/annotations"
},
"TeamDTO": {
"type": "object",
"properties": {
"accessControl": {
"type": "object",
"additionalProperties": {
"type": "boolean"
},
"x-go-name": "AccessControl"
},
"avatarUrl": {
"type": "string",
"x-go-name": "AvatarUrl"
},
"email": {
"type": "string",
"x-go-name": "Email"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"memberCount": {
"type": "integer",
"format": "int64",
"x-go-name": "MemberCount"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgId"
},
"permission": {
"$ref": "#/definitions/PermissionType"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"TeamGroupDTO": {
"type": "object",
"properties": {
"groupId": {
"type": "string",
"x-go-name": "GroupId"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgId"
},
"teamId": {
"type": "integer",
"format": "int64",
"x-go-name": "TeamId"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/teamgroupsync/models"
},
"TeamGroupMapping": {
"type": "object",
"properties": {
"groupId": {
"type": "string",
"x-go-name": "GroupId"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/teamgroupsync/models"
},
"TeamMemberDTO": {
"type": "object",
"properties": {
"auth_module": {
"type": "string",
"x-go-name": "AuthModule"
},
"avatarUrl": {
"type": "string",
"x-go-name": "AvatarUrl"
},
"email": {
"type": "string",
"x-go-name": "Email"
},
"labels": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Labels"
},
"login": {
"type": "string",
"x-go-name": "Login"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgId"
},
"permission": {
"$ref": "#/definitions/PermissionType"
},
"teamId": {
"type": "integer",
"format": "int64",
"x-go-name": "TeamId"
},
"userId": {
"type": "integer",
"format": "int64",
"x-go-name": "UserId"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"TempUserDTO": {
"type": "object",
"properties": {
"code": {
"type": "string",
"x-go-name": "Code"
},
"createdOn": {
"type": "string",
"format": "date-time",
"x-go-name": "Created"
},
"email": {
"type": "string",
"x-go-name": "Email"
},
"emailSent": {
"type": "boolean",
"x-go-name": "EmailSent"
},
"emailSentOn": {
"type": "string",
"format": "date-time",
"x-go-name": "EmailSentOn"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"invitedByEmail": {
"type": "string",
"x-go-name": "InvitedByEmail"
},
"invitedByLogin": {
"type": "string",
"x-go-name": "InvitedByLogin"
},
"invitedByName": {
"type": "string",
"x-go-name": "InvitedByName"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgId"
},
"role": {
"$ref": "#/definitions/RoleType"
},
"status": {
"$ref": "#/definitions/TempUserStatus"
},
"url": {
"type": "string",
"x-go-name": "Url"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"TempUserStatus": {
"type": "string",
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"TestReceiverConfigResult": {
"type": "object",
"properties": {
"error": {
"type": "string",
"x-go-name": "Error"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"status": {
"type": "string",
"x-go-name": "Status"
},
"uid": {
"type": "string",
"x-go-name": "UID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"TestReceiverResult": {
"type": "object",
"properties": {
"grafana_managed_receiver_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/TestReceiverConfigResult"
},
"x-go-name": "Configs"
},
"name": {
"type": "string",
"x-go-name": "Name"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"TestReceiversConfigAlertParams": {
"type": "object",
"properties": {
"annotations": {
"$ref": "#/definitions/LabelSet"
},
"labels": {
"$ref": "#/definitions/LabelSet"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"TestReceiversConfigBodyParams": {
"type": "object",
"properties": {
"alert": {
"$ref": "#/definitions/TestReceiversConfigAlertParams"
},
"receivers": {
"type": "array",
"items": {
"$ref": "#/definitions/PostableApiReceiver"
},
"x-go-name": "Receivers"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"TestReceiversResult": {
"type": "object",
"properties": {
"alert": {
"$ref": "#/definitions/TestReceiversConfigAlertParams"
},
"notified_at": {
"type": "string",
"format": "date-time",
"x-go-name": "NotifiedAt"
},
"receivers": {
"type": "array",
"items": {
"$ref": "#/definitions/TestReceiverResult"
},
"x-go-name": "Receivers"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"TestRulePayload": {
"type": "object",
"properties": {
"expr": {
"type": "string",
"x-go-name": "Expr",
"example": "(node_filesystem_avail_bytes{fstype!=\"\",job=\"integrations/node_exporter\"} node_filesystem_size_bytes{fstype!=\"\",job=\"integrations/node_exporter\"} * 100 \u003c 5 and node_filesystem_readonly{fstype!=\"\",job=\"integrations/node_exporter\"} == 0)"
},
"grafana_condition": {
"$ref": "#/definitions/EvalAlertConditionCommand"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"TestRuleResponse": {
"type": "object",
"properties": {
"alerts": {
"$ref": "#/definitions/Vector"
},
"grafana_alert_instances": {
"$ref": "#/definitions/AlertInstancesResponse"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"TimeInterval": {
"description": "TimeInterval describes intervals of time. ContainsTime will tell you if a golang time is contained\nwithin the interval.",
"type": "object",
"properties": {
"days_of_month": {
"type": "array",
"items": {
"$ref": "#/definitions/DayOfMonthRange"
},
"x-go-name": "DaysOfMonth"
},
"months": {
"type": "array",
"items": {
"$ref": "#/definitions/MonthRange"
},
"x-go-name": "Months"
},
"times": {
"type": "array",
"items": {
"$ref": "#/definitions/TimeRange"
},
"x-go-name": "Times"
},
"weekdays": {
"type": "array",
"items": {
"$ref": "#/definitions/WeekdayRange"
},
"x-go-name": "Weekdays"
},
"years": {
"type": "array",
"items": {
"$ref": "#/definitions/YearRange"
},
"x-go-name": "Years"
}
},
"x-go-package": "github.com/prometheus/alertmanager/timeinterval"
},
"TimeRange": {
"description": "For example, 4:00PM to End of the day would Begin at 1020 and End at 1440.",
"type": "object",
"title": "TimeRange represents a range of minutes within a 1440 minute day, exclusive of the End minute. A day consists of 1440 minutes.",
"properties": {
"EndMinute": {
"type": "integer",
"format": "int64"
},
"StartMinute": {
"type": "integer",
"format": "int64"
}
},
"x-go-package": "github.com/prometheus/alertmanager/timeinterval"
},
"TimeRangeDTO": {
"type": "object",
"properties": {
"from": {
"type": "string",
"x-go-name": "From"
},
"to": {
"type": "string",
"x-go-name": "To"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/report"
},
"Token": {
"type": "object",
"properties": {
"account": {
"type": "string",
"x-go-name": "Account"
},
"company": {
"type": "string",
"x-go-name": "Company"
},
"details_url": {
"type": "string",
"x-go-name": "DetailsUrl"
},
"exp": {
"type": "integer",
"format": "int64",
"x-go-name": "Expires"
},
"iat": {
"type": "integer",
"format": "int64",
"x-go-name": "Issued"
},
"included_admins": {
"type": "integer",
"format": "int64",
"x-go-name": "IncludedAdmins"
},
"included_users": {
"type": "integer",
"format": "int64",
"x-go-name": "IncludedUsers"
},
"included_viewers": {
"type": "integer",
"format": "int64",
"x-go-name": "IncludedViewers"
},
"iss": {
"type": "string",
"x-go-name": "Issuer"
},
"jti": {
"type": "string",
"x-go-name": "Id"
},
"lexp": {
"type": "integer",
"format": "int64",
"x-go-name": "LicenseExpires"
},
"lic_exp_warn_days": {
"type": "integer",
"format": "int64",
"x-go-name": "LicenseExpiresWarnDays"
},
"lid": {
"type": "string",
"x-go-name": "LicenseId"
},
"limit_by": {
"type": "string",
"x-go-name": "LimitBy"
},
"max_concurrent_user_sessions": {
"type": "integer",
"format": "int64",
"x-go-name": "MaxConcurrentUserSessions"
},
"nbf": {
"type": "integer",
"format": "int64",
"x-go-name": "LicenseIssued"
},
"prod": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Products"
},
"slug": {
"type": "string",
"x-go-name": "Slug"
},
"status": {
"$ref": "#/definitions/TokenStatus"
},
"sub": {
"type": "string",
"x-go-name": "Subject"
},
"tok_exp_warn_days": {
"type": "integer",
"format": "int64",
"x-go-name": "TokenExpiresWarnDays"
},
"update_days": {
"type": "integer",
"format": "int64",
"x-go-name": "UpdateDays"
},
"usage_billing": {
"type": "boolean",
"x-go-name": "UsageBilling"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/licensing"
},
"TokenStatus": {
"type": "integer",
"format": "int64",
"x-go-package": "github.com/grafana/grafana/pkg/extensions/licensing"
},
"TrimDashboardCommand": {
"type": "object",
"properties": {
"dashboard": {
"$ref": "#/definitions/Json"
},
"meta": {
"$ref": "#/definitions/Json"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"TrimDashboardFullWithMeta": {
"type": "object",
"properties": {
"dashboard": {
"$ref": "#/definitions/Json"
},
"meta": {
"$ref": "#/definitions/Json"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"URL": {
"type": "object",
"title": "URL is a custom URL type that allows validation at configuration load time.",
"properties": {
"ForceQuery": {
"type": "boolean"
},
"Fragment": {
"type": "string"
},
"Host": {
"type": "string"
},
"Opaque": {
"type": "string"
},
"Path": {
"type": "string"
},
"RawFragment": {
"type": "string"
},
"RawPath": {
"type": "string"
},
"RawQuery": {
"type": "string"
},
"Scheme": {
"type": "string"
},
"User": {
"$ref": "#/definitions/Userinfo"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"UpdateAlertNotificationCommand": {
"type": "object",
"properties": {
"disableResolveMessage": {
"type": "boolean",
"x-go-name": "DisableResolveMessage"
},
"frequency": {
"type": "string",
"x-go-name": "Frequency"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"isDefault": {
"type": "boolean",
"x-go-name": "IsDefault"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"secureSettings": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "SecureSettings"
},
"sendReminder": {
"type": "boolean",
"x-go-name": "SendReminder"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"uid": {
"type": "string",
"x-go-name": "Uid"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"UpdateAlertNotificationWithUidCommand": {
"type": "object",
"properties": {
"disableResolveMessage": {
"type": "boolean",
"x-go-name": "DisableResolveMessage"
},
"frequency": {
"type": "string",
"x-go-name": "Frequency"
},
"isDefault": {
"type": "boolean",
"x-go-name": "IsDefault"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"secureSettings": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "SecureSettings"
},
"sendReminder": {
"type": "boolean",
"x-go-name": "SendReminder"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"uid": {
"type": "string",
"x-go-name": "NewUid"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"UpdateAnnotationsCmd": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Tags"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"time": {
"type": "integer",
"format": "int64",
"x-go-name": "Time"
},
"timeEnd": {
"type": "integer",
"format": "int64",
"x-go-name": "TimeEnd"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"UpdateDashboardAclCommand": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/DashboardAclUpdateItem"
},
"x-go-name": "Items"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"UpdateDataSourceCommand": {
"description": "Also acts as api DTO",
"type": "object",
"properties": {
"access": {
"$ref": "#/definitions/DsAccess"
},
"basicAuth": {
"type": "boolean",
"x-go-name": "BasicAuth"
},
"basicAuthPassword": {
"type": "string",
"x-go-name": "BasicAuthPassword"
},
"basicAuthUser": {
"type": "string",
"x-go-name": "BasicAuthUser"
},
"database": {
"type": "string",
"x-go-name": "Database"
},
"isDefault": {
"type": "boolean",
"x-go-name": "IsDefault"
},
"jsonData": {
"$ref": "#/definitions/Json"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"password": {
"type": "string",
"x-go-name": "Password"
},
"secureJsonData": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "SecureJsonData"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"uid": {
"type": "string",
"x-go-name": "Uid"
},
"url": {
"type": "string",
"x-go-name": "Url"
},
"user": {
"type": "string",
"x-go-name": "User"
},
"version": {
"type": "integer",
"format": "int64",
"x-go-name": "Version"
},
"withCredentials": {
"type": "boolean",
"x-go-name": "WithCredentials"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"UpdateFolderCommand": {
"type": "object",
"properties": {
"overwrite": {
"type": "boolean",
"x-go-name": "Overwrite"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"uid": {
"type": "string",
"x-go-name": "Uid"
},
"version": {
"type": "integer",
"format": "int64",
"x-go-name": "Version"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"UpdateOrgAddressForm": {
"type": "object",
"properties": {
"address1": {
"type": "string",
"x-go-name": "Address1"
},
"address2": {
"type": "string",
"x-go-name": "Address2"
},
"city": {
"type": "string",
"x-go-name": "City"
},
"country": {
"type": "string",
"x-go-name": "Country"
},
"state": {
"type": "string",
"x-go-name": "State"
},
"zipcode": {
"type": "string",
"x-go-name": "ZipCode"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"UpdateOrgForm": {
"type": "object",
"properties": {
"name": {
"type": "string",
"x-go-name": "Name"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"UpdateOrgQuotaCmd": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"format": "int64",
"x-go-name": "Limit"
},
"target": {
"type": "string",
"x-go-name": "Target"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"UpdateOrgUserCommand": {
"type": "object",
"properties": {
"role": {
"$ref": "#/definitions/RoleType"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"UpdatePrefsCmd": {
"type": "object",
"properties": {
"homeDashboardId": {
"description": "The numerical :id of a favorited dashboard",
"type": "integer",
"format": "int64",
"default": 0,
"x-go-name": "HomeDashboardID"
},
"theme": {
"type": "string",
"enum": ["light", "dark"],
"x-go-name": "Theme"
},
"timezone": {
"type": "string",
"enum": ["utc", "browser"],
"x-go-name": "Timezone"
},
"weekStart": {
"type": "string",
"x-go-name": "WeekStart"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"UpdateRoleCommand": {
"type": "object",
"properties": {
"description": {
"type": "string",
"x-go-name": "Description"
},
"displayName": {
"type": "string",
"x-go-name": "DisplayName"
},
"global": {
"type": "boolean",
"x-go-name": "Global"
},
"group": {
"type": "string",
"x-go-name": "Group"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/Permission"
},
"x-go-name": "Permissions"
},
"version": {
"type": "integer",
"format": "int64",
"x-go-name": "Version"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol"
},
"UpdateTeamCommand": {
"type": "object",
"properties": {
"Email": {
"type": "string"
},
"Id": {
"type": "integer",
"format": "int64"
},
"Name": {
"type": "string"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"UpdateTeamMemberCommand": {
"type": "object",
"properties": {
"permission": {
"$ref": "#/definitions/PermissionType"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"UpdateUserCommand": {
"type": "object",
"properties": {
"email": {
"type": "string",
"x-go-name": "Email"
},
"login": {
"type": "string",
"x-go-name": "Login"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"theme": {
"type": "string",
"x-go-name": "Theme"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"UpdateUserQuotaCmd": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"format": "int64",
"x-go-name": "Limit"
},
"target": {
"type": "string",
"x-go-name": "Target"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"UserIdDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"message": {
"type": "string",
"x-go-name": "Message"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"UserLookupDTO": {
"type": "object",
"properties": {
"avatarUrl": {
"type": "string",
"x-go-name": "AvatarURL"
},
"login": {
"type": "string",
"x-go-name": "Login"
},
"userId": {
"type": "integer",
"format": "int64",
"x-go-name": "UserID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/api/dtos"
},
"UserOrgDTO": {
"type": "object",
"properties": {
"name": {
"type": "string",
"x-go-name": "Name"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgId"
},
"role": {
"$ref": "#/definitions/RoleType"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"UserProfileDTO": {
"type": "object",
"properties": {
"accessControl": {
"type": "object",
"additionalProperties": {
"type": "boolean"
},
"x-go-name": "AccessControl"
},
"authLabels": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "AuthLabels"
},
"avatarUrl": {
"type": "string",
"x-go-name": "AvatarUrl"
},
"createdAt": {
"type": "string",
"format": "date-time",
"x-go-name": "CreatedAt"
},
"email": {
"type": "string",
"x-go-name": "Email"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"isDisabled": {
"type": "boolean",
"x-go-name": "IsDisabled"
},
"isExternal": {
"type": "boolean",
"x-go-name": "IsExternal"
},
"isGrafanaAdmin": {
"type": "boolean",
"x-go-name": "IsGrafanaAdmin"
},
"login": {
"type": "string",
"x-go-name": "Login"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgId"
},
"theme": {
"type": "string",
"x-go-name": "Theme"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"x-go-name": "UpdatedAt"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"UserQuotaDTO": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"format": "int64",
"x-go-name": "Limit"
},
"target": {
"type": "string",
"x-go-name": "Target"
},
"used": {
"type": "integer",
"format": "int64",
"x-go-name": "Used"
},
"user_id": {
"type": "integer",
"format": "int64",
"x-go-name": "UserId"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"UserSearchHitDTO": {
"type": "object",
"properties": {
"authLabels": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "AuthLabels"
},
"avatarUrl": {
"type": "string",
"x-go-name": "AvatarUrl"
},
"email": {
"type": "string",
"x-go-name": "Email"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "Id"
},
"isAdmin": {
"type": "boolean",
"x-go-name": "IsAdmin"
},
"isDisabled": {
"type": "boolean",
"x-go-name": "IsDisabled"
},
"lastSeenAt": {
"type": "string",
"format": "date-time",
"x-go-name": "LastSeenAt"
},
"lastSeenAtAge": {
"type": "string",
"x-go-name": "LastSeenAtAge"
},
"login": {
"type": "string",
"x-go-name": "Login"
},
"name": {
"type": "string",
"x-go-name": "Name"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"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"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"Userinfo": {
"description": "The Userinfo type is an immutable encapsulation of username and\npassword details for a URL. An existing Userinfo value is guaranteed\nto have a username set (potentially empty, as allowed by RFC 2396),\nand optionally a password.",
"type": "object",
"x-go-package": "net/url"
},
"ValidationError": {
"type": "object",
"properties": {
"msg": {
"type": "string",
"x-go-name": "Msg"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"Vector": {
"description": "Vector is basically only an alias for model.Samples, but the\ncontract is that in a Vector, all Samples have the same timestamp.",
"type": "array",
"items": {
"$ref": "#/definitions/Sample"
},
"x-go-package": "github.com/prometheus/prometheus/promql"
},
"VictorOpsConfig": {
"type": "object",
"title": "VictorOpsConfig configures notifications via VictorOps.",
"properties": {
"api_key": {
"$ref": "#/definitions/Secret"
},
"api_key_file": {
"$ref": "#/definitions/Secret"
},
"api_url": {
"$ref": "#/definitions/URL"
},
"custom_fields": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "CustomFields"
},
"entity_display_name": {
"type": "string",
"x-go-name": "EntityDisplayName"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message_type": {
"type": "string",
"x-go-name": "MessageType"
},
"monitoring_tool": {
"type": "string",
"x-go-name": "MonitoringTool"
},
"routing_key": {
"type": "string",
"x-go-name": "RoutingKey"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"state_message": {
"type": "string",
"x-go-name": "StateMessage"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"WebhookConfig": {
"type": "object",
"title": "WebhookConfig configures notifications via a generic webhook.",
"properties": {
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"max_alerts": {
"description": "MaxAlerts is the maximum number of alerts to be sent per webhook message.\nAlerts exceeding this threshold will be truncated. Setting this to 0\nallows an unlimited number of alerts.",
"type": "integer",
"format": "uint64",
"x-go-name": "MaxAlerts"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"url": {
"$ref": "#/definitions/URL"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"WechatConfig": {
"type": "object",
"title": "WechatConfig configures notifications via Wechat.",
"properties": {
"agent_id": {
"type": "string",
"x-go-name": "AgentID"
},
"api_secret": {
"$ref": "#/definitions/Secret"
},
"api_url": {
"$ref": "#/definitions/URL"
},
"corp_id": {
"type": "string",
"x-go-name": "CorpID"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"message_type": {
"type": "string",
"x-go-name": "MessageType"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"to_party": {
"type": "string",
"x-go-name": "ToParty"
},
"to_tag": {
"type": "string",
"x-go-name": "ToTag"
},
"to_user": {
"type": "string",
"x-go-name": "ToUser"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"WeekdayRange": {
"type": "object",
"title": "A WeekdayRange is an inclusive range between [0, 6] where 0 = Sunday.",
"properties": {
"Begin": {
"type": "integer",
"format": "int64"
},
"End": {
"type": "integer",
"format": "int64"
}
},
"x-go-package": "github.com/prometheus/alertmanager/timeinterval"
},
"YearRange": {
"type": "object",
"title": "A YearRange is a positive inclusive range.",
"properties": {
"Begin": {
"type": "integer",
"format": "int64"
},
"End": {
"type": "integer",
"format": "int64"
}
},
"x-go-package": "github.com/prometheus/alertmanager/timeinterval"
},
"alert": {
"description": "Alert alert",
"type": "object",
"required": ["labels"],
"properties": {
"generatorURL": {
"description": "generator URL\nFormat: uri",
"type": "string",
"format": "uri",
"x-go-name": "GeneratorURL"
},
"labels": {
"$ref": "#/definitions/labelSet"
}
},
"x-go-name": "Alert",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"alertGroup": {
"type": "object",
"required": ["alerts", "labels", "receiver"],
"properties": {
"alerts": {
"description": "alerts",
"type": "array",
"items": {
"$ref": "#/definitions/gettableAlert"
},
"x-go-name": "Alerts"
},
"labels": {
"$ref": "#/definitions/labelSet"
},
"receiver": {
"$ref": "#/definitions/receiver"
}
},
"x-go-name": "AlertGroup",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"alertGroups": {
"type": "array",
"items": {
"$ref": "#/definitions/alertGroup"
},
"x-go-name": "AlertGroups",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"alertStatus": {
"description": "AlertStatus alert status",
"type": "object",
"required": ["inhibitedBy", "silencedBy", "state"],
"properties": {
"inhibitedBy": {
"description": "inhibited by",
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "InhibitedBy"
},
"silencedBy": {
"description": "silenced by",
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "SilencedBy"
},
"state": {
"description": "state",
"type": "string",
"enum": ["[unprocessed active suppressed]"],
"x-go-name": "State"
}
},
"x-go-name": "AlertStatus",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"alertmanagerConfig": {
"description": "AlertmanagerConfig alertmanager config",
"type": "object",
"required": ["original"],
"properties": {
"original": {
"description": "original",
"type": "string",
"x-go-name": "Original"
}
},
"x-go-name": "AlertmanagerConfig",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"alertmanagerStatus": {
"description": "AlertmanagerStatus alertmanager status",
"type": "object",
"required": ["cluster", "config", "uptime", "versionInfo"],
"properties": {
"cluster": {
"$ref": "#/definitions/clusterStatus"
},
"config": {
"$ref": "#/definitions/alertmanagerConfig"
},
"uptime": {
"description": "uptime",
"type": "string",
"format": "date-time",
"x-go-name": "Uptime"
},
"versionInfo": {
"$ref": "#/definitions/versionInfo"
}
},
"x-go-name": "AlertmanagerStatus",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"clusterStatus": {
"description": "ClusterStatus cluster status",
"type": "object",
"required": ["status"],
"properties": {
"name": {
"description": "name",
"type": "string",
"x-go-name": "Name"
},
"peers": {
"description": "peers",
"type": "array",
"items": {
"$ref": "#/definitions/peerStatus"
},
"x-go-name": "Peers"
},
"status": {
"description": "status",
"type": "string",
"enum": ["[ready settling disabled]"],
"x-go-name": "Status"
}
},
"x-go-name": "ClusterStatus",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"duration": {
"$ref": "#/definitions/Duration"
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"type": "object",
"required": ["labels", "annotations", "endsAt", "fingerprint", "receivers", "startsAt", "status", "updatedAt"],
"properties": {
"annotations": {
"$ref": "#/definitions/labelSet"
},
"endsAt": {
"description": "ends at",
"type": "string",
"format": "date-time",
"x-go-name": "EndsAt"
},
"fingerprint": {
"description": "fingerprint",
"type": "string",
"x-go-name": "Fingerprint"
},
"generatorURL": {
"description": "generator URL\nFormat: uri",
"type": "string",
"format": "uri",
"x-go-name": "GeneratorURL"
},
"labels": {
"$ref": "#/definitions/labelSet"
},
"receivers": {
"description": "receivers",
"type": "array",
"items": {
"$ref": "#/definitions/receiver"
},
"x-go-name": "Receivers"
},
"startsAt": {
"description": "starts at",
"type": "string",
"format": "date-time",
"x-go-name": "StartsAt"
},
"status": {
"$ref": "#/definitions/alertStatus"
},
"updatedAt": {
"description": "updated at",
"type": "string",
"format": "date-time",
"x-go-name": "UpdatedAt"
}
}
},
"gettableAlerts": {
"type": "array",
"items": {
"$ref": "#/definitions/gettableAlert"
},
"x-go-name": "GettableAlerts",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"gettableSilence": {
"description": "GettableSilence gettable silence",
"type": "object",
"required": ["comment", "createdBy", "endsAt", "matchers", "startsAt", "id", "status", "updatedAt"],
"properties": {
"comment": {
"description": "comment",
"type": "string",
"x-go-name": "Comment"
},
"createdBy": {
"description": "created by",
"type": "string",
"x-go-name": "CreatedBy"
},
"endsAt": {
"description": "ends at",
"type": "string",
"format": "date-time",
"x-go-name": "EndsAt"
},
"id": {
"description": "id",
"type": "string",
"x-go-name": "ID"
},
"matchers": {
"$ref": "#/definitions/matchers"
},
"startsAt": {
"description": "starts at",
"type": "string",
"format": "date-time",
"x-go-name": "StartsAt"
},
"status": {
"$ref": "#/definitions/silenceStatus"
},
"updatedAt": {
"description": "updated at",
"type": "string",
"format": "date-time",
"x-go-name": "UpdatedAt"
}
}
},
"gettableSilences": {
"type": "array",
"items": {
"$ref": "#/definitions/gettableSilence"
},
"x-go-name": "GettableSilences",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"labelSet": {
"description": "LabelSet label set",
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "LabelSet",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"matcher": {
"description": "Matcher matcher",
"type": "object",
"required": ["isRegex", "name", "value"],
"properties": {
"isEqual": {
"description": "is equal",
"type": "boolean",
"x-go-name": "IsEqual"
},
"isRegex": {
"description": "is regex",
"type": "boolean",
"x-go-name": "IsRegex"
},
"name": {
"description": "name",
"type": "string",
"x-go-name": "Name"
},
"value": {
"description": "value",
"type": "string",
"x-go-name": "Value"
}
},
"x-go-name": "Matcher",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"matchers": {
"description": "Matchers matchers",
"type": "array",
"items": {
"$ref": "#/definitions/matcher"
},
"x-go-name": "Matchers",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"overrideLabels": {
"description": "The custom marshaling for labels.Labels ends up doing this anyways.",
"type": "object",
"title": "override the labels type with a map for generation.",
"additionalProperties": {
"type": "string"
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"peerStatus": {
"description": "PeerStatus peer status",
"type": "object",
"required": ["address", "name"],
"properties": {
"address": {
"description": "address",
"type": "string",
"x-go-name": "Address"
},
"name": {
"description": "name",
"type": "string",
"x-go-name": "Name"
}
},
"x-go-name": "PeerStatus",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"postableAlert": {
"description": "PostableAlert postable alert",
"type": "object",
"required": ["labels"],
"properties": {
"annotations": {
"$ref": "#/definitions/labelSet"
},
"endsAt": {
"description": "ends at\nFormat: date-time",
"type": "string",
"format": "date-time",
"x-go-name": "EndsAt"
},
"generatorURL": {
"description": "generator URL\nFormat: uri",
"type": "string",
"format": "uri",
"x-go-name": "GeneratorURL"
},
"labels": {
"$ref": "#/definitions/labelSet"
},
"startsAt": {
"description": "starts at\nFormat: date-time",
"type": "string",
"format": "date-time",
"x-go-name": "StartsAt"
}
},
"x-go-name": "PostableAlert",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"postableAlerts": {
"description": "PostableAlerts postable alerts",
"type": "array",
"items": {
"$ref": "#/definitions/postableAlert"
},
"x-go-name": "PostableAlerts",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"postableSilence": {
"description": "PostableSilence postable silence",
"type": "object",
"required": ["comment", "createdBy", "endsAt", "matchers", "startsAt"],
"properties": {
"comment": {
"description": "comment",
"type": "string",
"x-go-name": "Comment"
},
"createdBy": {
"description": "created by",
"type": "string",
"x-go-name": "CreatedBy"
},
"endsAt": {
"description": "ends at",
"type": "string",
"format": "date-time",
"x-go-name": "EndsAt"
},
"id": {
"description": "id",
"type": "string",
"x-go-name": "ID"
},
"matchers": {
"$ref": "#/definitions/matchers"
},
"startsAt": {
"description": "starts at",
"type": "string",
"format": "date-time",
"x-go-name": "StartsAt"
}
}
},
"receiver": {
"description": "Receiver receiver",
"type": "object",
"required": ["name"],
"properties": {
"name": {
"description": "name",
"type": "string",
"x-go-name": "Name"
}
}
},
"silence": {
"description": "Silence silence",
"type": "object",
"required": ["comment", "createdBy", "endsAt", "matchers", "startsAt"],
"properties": {
"comment": {
"description": "comment",
"type": "string",
"x-go-name": "Comment"
},
"createdBy": {
"description": "created by",
"type": "string",
"x-go-name": "CreatedBy"
},
"endsAt": {
"description": "ends at",
"type": "string",
"format": "date-time",
"x-go-name": "EndsAt"
},
"matchers": {
"$ref": "#/definitions/matchers"
},
"startsAt": {
"description": "starts at",
"type": "string",
"format": "date-time",
"x-go-name": "StartsAt"
}
},
"x-go-name": "Silence",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"silenceStatus": {
"description": "SilenceStatus silence status",
"type": "object",
"required": ["state"],
"properties": {
"state": {
"description": "state",
"type": "string",
"enum": ["[expired active pending]"],
"x-go-name": "State"
}
},
"x-go-name": "SilenceStatus",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"versionInfo": {
"description": "VersionInfo version info",
"type": "object",
"required": ["branch", "buildDate", "buildUser", "goVersion", "revision", "version"],
"properties": {
"branch": {
"description": "branch",
"type": "string",
"x-go-name": "Branch"
},
"buildDate": {
"description": "build date",
"type": "string",
"x-go-name": "BuildDate"
},
"buildUser": {
"description": "build user",
"type": "string",
"x-go-name": "BuildUser"
},
"goVersion": {
"description": "go version",
"type": "string",
"x-go-name": "GoVersion"
},
"revision": {
"description": "revision",
"type": "string",
"x-go-name": "Revision"
},
"version": {
"description": "version",
"type": "string",
"x-go-name": "Version"
}
},
"x-go-name": "VersionInfo",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
}
},
"responses": {
"SMTPNotEnabledError": {
"description": ""
},
"acceptedResponse": {
"description": "AcceptedResponse",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"addOrgUser": {
"description": "",
"schema": {
"type": "object",
"required": ["id", "message"],
"properties": {
"id": {
"description": "ID Identifier of the added user.",
"type": "integer",
"format": "int64",
"x-go-name": "UsedID",
"example": 65
},
"message": {
"description": "Message Message of the added user.",
"type": "string",
"x-go-name": "Message",
"example": "Data source added"
}
}
}
},
"badRequestError": {
"description": "BadRequestError is returned when the request is invalid and it cannot be processed.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"conflictError": {
"description": "ConflictError",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"contentResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8"
}
}
},
"createAnnotationResponse": {
"description": "",
"schema": {
"type": "object",
"required": ["id", "message"],
"properties": {
"id": {
"description": "ID Identifier of the created annotation.",
"type": "integer",
"format": "int64",
"x-go-name": "ID",
"example": 65
},
"message": {
"description": "Message Message of the created annotation.",
"type": "string",
"x-go-name": "Message"
}
}
}
},
"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",
"x-go-name": "ID",
"example": 65
},
"message": {
"description": "Message Message of the deleted dashboard.",
"type": "string",
"x-go-name": "Message",
"example": "Data source added"
},
"name": {
"description": "Name of the new data source.",
"type": "string",
"x-go-name": "Name",
"example": "My Data source"
}
}
}
},
"createOrgResponse": {
"description": "",
"schema": {
"type": "object",
"required": ["orgId", "message"],
"properties": {
"message": {
"description": "Message Message of the created org.",
"type": "string",
"x-go-name": "Message",
"example": "Data source added"
},
"orgId": {
"description": "ID Identifier of the created org.",
"type": "integer",
"format": "int64",
"x-go-name": "OrgID",
"example": 65
}
}
}
},
"createReportResponse": {
"description": "",
"schema": {
"type": "object"
}
},
"createSnapshotResponse": {
"description": "",
"schema": {
"type": "object",
"properties": {
"deleteKey": {
"description": "Unique key used to delete the snapshot. It is different from the key so that only the creator can delete the snapshot.",
"type": "string",
"x-go-name": "DeleteKey"
},
"deleteUrl": {
"type": "string",
"x-go-name": "DeleteUrl"
},
"id": {
"description": "Snapshot id",
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"key": {
"description": "Unique key",
"type": "string",
"x-go-name": "Key"
},
"url": {
"type": "string",
"x-go-name": "URL"
}
}
}
},
"createTeamResponse": {
"description": "",
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"x-go-name": "Message"
},
"teamId": {
"type": "integer",
"format": "int64",
"x-go-name": "TeamId"
}
}
}
},
"createUserResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/UserIdDTO"
}
},
"dashboardDiffResponse": {
"description": "Calculate dashboard diff response.",
"schema": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8"
}
}
},
"dashboardResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/DashboardFullWithMeta"
}
},
"dashboardVersionResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/DashboardVersionMeta"
}
},
"dashboardVersionsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/DashboardVersionDTO"
}
}
},
"dashboardsTagsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/DashboardTagCloudItem"
}
}
},
"deleteAlertNotificationChannelResponse": {
"description": "",
"schema": {
"type": "object",
"required": ["id", "message"],
"properties": {
"id": {
"description": "ID Identifier of the deleted notification channel.",
"type": "integer",
"format": "int64",
"x-go-name": "ID",
"example": 65
},
"message": {
"description": "Message Message of the deleted notificatiton channel.",
"type": "string",
"x-go-name": "Message"
}
}
}
},
"deleteDashboardResponse": {
"description": "",
"schema": {
"type": "object",
"required": ["id", "title", "message"],
"properties": {
"id": {
"description": "ID Identifier of the deleted dashboard.",
"type": "integer",
"format": "int64",
"x-go-name": "ID",
"example": 65
},
"message": {
"description": "Message Message of the deleted dashboard.",
"type": "string",
"x-go-name": "Message",
"example": "Dashboard My Dashboard deleted"
},
"title": {
"description": "Title Title of the deleted dashboard.",
"type": "string",
"x-go-name": "Title",
"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",
"x-go-name": "ID",
"example": 65
},
"message": {
"description": "Message Message of the deleted dashboard.",
"type": "string",
"x-go-name": "Message",
"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",
"x-go-name": "ID",
"example": 65
},
"message": {
"description": "Message Message of the deleted folder.",
"type": "string",
"x-go-name": "Message",
"example": "Folder My Folder deleted"
},
"title": {
"description": "Title of the deleted folder.",
"type": "string",
"x-go-name": "Title",
"example": "My Folder"
}
}
}
},
"folderResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/Folder"
}
},
"forbiddenError": {
"description": "ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"genericError": {
"description": "A GenericError is the default error message that is generated.\nFor certain status codes there are more appropriate error structures.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"getAPIkeyResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/ApiKeyDTO"
}
}
},
"getAccessControlStatusResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/Status"
}
},
"getAlertNotificationChannelResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/AlertNotification"
}
},
"getAlertNotificationChannelsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertNotification"
}
}
},
"getAlertResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Alert"
}
}
},
"getAlertsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertListItemDTO"
}
}
},
"getAllRolesResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/RoleDTO"
}
}
},
"getAnnotationTagsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/GetAnnotationTagsResponse"
}
},
"getAnnotationsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/ItemDTO"
}
}
},
"getAuthTokensResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/UserToken"
}
}
},
"getCustomPermissionsReportResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/CustomPermissionsRecordDTO"
}
}
},
"getDashboardPermissionsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/DashboardAclInfoDTO"
}
}
},
"getDashboardStatesResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertStateInfoDTO"
}
}
},
"getDatasourceIDresponse": {
"description": "",
"schema": {
"type": "object",
"required": ["id"],
"properties": {
"id": {
"description": "ID Identifier of the data source.",
"type": "integer",
"format": "int64",
"x-go-name": "ID",
"example": 65
}
}
}
},
"getDatasourceResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/DataSource"
}
},
"getDatasourcesResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/DataSourceList"
}
},
"getFoldersResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/FolderSearchHit"
}
}
},
"getHomeDashboardResponse": {
"description": "Home dashboard response.",
"schema": {
"$ref": "#/definitions/GetHomeDashboardResponse"
}
},
"getInvitesResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/TempUserDTO"
}
}
},
"getLDAPSyncStatusResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/ActiveSyncStatusDTO"
}
},
"getLibraryElementConnectionsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/LibraryElementConnectionsResponse"
}
},
"getLibraryElementResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/LibraryElementResponse"
}
},
"getLibraryElementsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/LibraryElementSearchResponse"
}
},
"getLicenseStatusResponse": {
"description": ""
},
"getLicenseTokenResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/Token"
}
},
"getOrgResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/OrgDetailsDTO"
}
},
"getOrgUsersResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/OrgUserDTO"
}
}
},
"getPermissionseResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/AddPermissionDTO"
}
},
"getPreferencesResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/Prefs"
}
},
"getQuotaResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/UserQuotaDTO"
}
}
},
"getReportResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/ConfigDTO"
}
},
"getReportSettingsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/SettingsDTO"
}
},
"getReportsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfigDTO"
}
}
},
"getRoleResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/RoleDTO"
}
},
"getSettingsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/SettingsBag"
}
},
"getSnapshotSharingOptionsResponse": {
"description": "",
"schema": {
"type": "object",
"properties": {
"externalEnabled": {
"type": "boolean",
"x-go-name": "ExternalEnabled"
},
"externalSnapshotName": {
"type": "string",
"x-go-name": "ExternalSnapshotName"
},
"externalSnapshotURL": {
"type": "string",
"x-go-name": "ExternalSnapshotURL"
}
}
}
},
"getSnapshotsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/DashboardSnapshotDTO"
}
}
},
"getStatsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/AdminStats"
}
},
"getTeamGroupsApiResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/TeamGroupDTO"
}
}
},
"getTeamMembersResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/TeamMemberDTO"
}
}
},
"getTeamResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/TeamDTO"
}
},
"getUserOrgListResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/UserOrgDTO"
}
}
},
"getUserTeamsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/TeamDTO"
}
}
},
"helpFlagResponse": {
"description": "",
"schema": {
"type": "object",
"properties": {
"helpFlags1": {
"type": "integer",
"format": "int64",
"x-go-name": "HelpFlags1"
},
"message": {
"type": "string",
"x-go-name": "Message"
}
}
}
},
"importDashboardResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/ImportDashboardResponse"
}
},
"internalServerError": {
"description": "InternalServerError is a general error indicating something went wrong internally.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"listBuiltinRolesResponse": {
"description": "",
"schema": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/RoleDTO"
}
}
}
},
"listRecordingRulesResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/RecordingRuleJSON"
}
}
},
"lookupAlertNotificationChannelsResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertNotificationLookup"
}
}
},
"lookupOrgUsersResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/UserLookupDTO"
}
}
},
"notFoundError": {
"description": "NotFoundError is returned when the requested resource was not found.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"okResponse": {
"description": "An OKResponse is returned if the request was successful.",
"schema": {
"$ref": "#/definitions/SuccessResponseBody"
}
},
"pauseAlertResponse": {
"description": "",
"schema": {
"type": "object",
"required": ["alertId", "message"],
"properties": {
"alertId": {
"type": "integer",
"format": "int64",
"x-go-name": "AlertID"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"state": {
"description": "Alert result state\nrequired true",
"type": "string",
"x-go-name": "State"
}
}
}
},
"pauseAlertsResponse": {
"description": "",
"schema": {
"type": "object",
"required": ["alertsAffected", "message"],
"properties": {
"alertsAffected": {
"description": "AlertsAffected is the number of the affected alerts.",
"type": "integer",
"format": "int64",
"x-go-name": "AlertsAffected"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"state": {
"description": "Alert result state\nrequired true",
"type": "string",
"x-go-name": "State"
}
}
}
},
"postAPIkeyResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/NewApiKeyResult"
}
},
"postDashboardResponse": {
"description": "Create/update dashboard response.",
"schema": {
"type": "object",
"required": ["status", "title", "version", "id", "uid", "url"],
"properties": {
"id": {
"description": "ID The unique identifier (id) of the created/updated dashboard.",
"type": "string",
"x-go-name": "ID",
"example": "1"
},
"status": {
"description": "Status status of the response.",
"type": "string",
"x-go-name": "Status",
"example": "success"
},
"title": {
"description": "Slug The slug of the dashboard.",
"type": "string",
"x-go-name": "Slug",
"example": "my-dashboard"
},
"uid": {
"description": "UID The unique identifier (uid) of the created/updated dashboard.",
"type": "string",
"x-go-name": "UID",
"example": "nHz3SXiiz"
},
"url": {
"description": "URL The relative URL for accessing the created/updated dashboard.",
"type": "string",
"x-go-name": "URL",
"example": "/d/nHz3SXiiz/my-dashboard"
},
"version": {
"description": "Version The version of the dashboard.",
"type": "integer",
"format": "int64",
"x-go-name": "Verion",
"example": 2
}
}
}
},
"postRenewLicenseTokenResponse": {
"description": ""
},
"preconditionFailedError": {
"description": "PreconditionFailedError",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"queryDataResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/QueryDataResponse"
}
},
"queryDatasourceResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/DataResponse"
}
},
"recordingRuleResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/RecordingRuleJSON"
}
},
"recordingRuleWriteTargetResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/PrometheusRemoteWriteTargetJSON"
}
},
"refreshLicenseStatsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/ActiveUserStats"
}
},
"searchOrgResponse": {
"description": "",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/OrgDTO"
}
}
},
"searchResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/HitList"
}
},
"searchSortingResponse": {
"description": "",
"schema": {
"type": "object",
"properties": {
"description": {
"type": "string",
"x-go-name": "Description"
},
"displayName": {
"type": "string",
"x-go-name": "DisplayName"
},
"meta": {
"type": "string",
"x-go-name": "Meta"
},
"name": {
"type": "string",
"x-go-name": "Name"
}
}
}
},
"searchTeamsResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/SearchTeamQueryResult"
}
},
"searchUsersResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/SearchUserQueryResult"
}
},
"snapshotResponse": {
"description": ""
},
"testAlertResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/AlertTestResult"
}
},
"trimDashboardResponse": {
"description": "Trimmed dashboard response.",
"schema": {
"$ref": "#/definitions/TrimDashboardFullWithMeta"
}
},
"unauthorisedError": {
"description": "UnauthorizedError is returned when the request is not authenticated.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"unprocessableEntityError": {
"description": "UnprocessableEntityError",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
},
"userResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/UserProfileDTO"
}
}
},
"securityDefinitions": {
"api_key": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
},
"basic": {
"type": "basic"
}
},
"security": [
{
"basic": []
},
{
"api_key": []
}
],
"tags": [
{
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.",
"name": "datasources"
},
{
"description": "Folders are identified by the identifier (id) and the unique identifier (uid).\nThe identifier (id) of a folder is an auto-incrementing numeric value and is only unique per Grafana install.\nThe unique identifier (uid) of a folder can be used for uniquely identify folders between multiple Grafana installs. Its 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. Its 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 global 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. Its 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 Admin Organizations HTTP API does not currently work with an API Token. API Tokens are currently only linked to an organization and an organization role. They cannot be given the permission of server admin, only users can be given that permission. So in order to use these API calls you will have to use Basic Auth and the Grafana user must have the Grafana Admin permission (The default admin user is called `admin` and has permission to use this API).",
"name": "orgs"
},
{
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.",
"name": "current_org_details"
},
{
"description": "This API can be used to create/update/delete Teams and to add/remove users to Teams. All actions require that the user has the Admin role for the organization.",
"name": "teams"
},
{
"description": "This API can be used to enable, disable, list, add and remove permissions for a data source.\nPermissions can be set for a user or a team. Permissions cannot be set for Admins - they always have access to everything.\nThis is only available in Grafana Enterprise\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.",
"name": "datasource_permissions"
},
{
"description": "These are only available in Grafana Enterprise",
"name": "enterprise"
},
{
"description": "The API can be used to create, update, get and list roles, and create or remove built-in role assignments. To use the API, you would need to enable fine-grained access control.\nThis only available in Grafana Enterprise.\nThe API does not currently work with an API Token. So in order to use these API endpoints you will have to use Basic auth.",
"name": "access_control"
},
{
"description": "Licensing is only available in Grafana Enterprise. Read more about Grafana Enterprise.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.",
"name": "licensing"
},
{
"description": "This API allows you to interact programmatically with the Reporting feature.\nReporting is only available in Grafana Enterprise. Read more about Grafana Enterprise.\nIf you have Fine-grained access Control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.",
"name": "reports"
},
{
"description": "Grafana Alerting Alertmanager-compatible endpoints",
"name": "alertmanager"
},
{
"description": "Grafana Alerting endpoints for managing rules",
"name": "ruler"
},
{
"description": "Grafana Alerting testing endpoints",
"name": "testing"
},
{
"description": "Grafana Alerting Prometheus-compatible endpoints",
"name": "prometheus"
}
]
}