From 805203dba9f858f48a0bba7028cf0684c92b25e1 Mon Sep 17 00:00:00 2001 From: Josh Hunt Date: Wed, 3 Aug 2022 11:41:31 +0100 Subject: [PATCH] Chore: Prettier ignore api-merged & api-spec swagger api specs (#53170) * Prettier ignore api-merged & api-spec swagger api specs * add enterprise --- .prettierignore | 4 + public/api-merged.json | 1742 +++++++++++++++++++++++++++++++--------- public/api-spec.json | 1369 ++++++++++++++++++++++++------- 3 files changed, 2429 insertions(+), 686 deletions(-) diff --git a/.prettierignore b/.prettierignore index ab2787f4961..31aa6079075 100644 --- a/.prettierignore +++ b/.prettierignore @@ -25,3 +25,7 @@ public/locales/**/*.js # Auto-generated theme files theme.light.generated.json theme.dark.generated.json + +# Generated Swagger API specs +public/api-spec.json +public/api-merged.json diff --git a/public/api-merged.json b/public/api-merged.json index 908510961ef..ef5d63c6331 100644 --- a/public/api-merged.json +++ b/public/api-merged.json @@ -1,7 +1,14 @@ { - "consumes": ["application/json"], - "produces": ["application/json"], - "schemes": ["http", "https"], + "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.", @@ -22,7 +29,10 @@ "/access-control/builtin-roles": { "get": { "description": "You need to have a permission with action `roles.builtin:list` with scope `roles:*`.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Get all built-in role assignments.", "operationId": "listBuiltinRoles", "responses": { @@ -39,7 +49,10 @@ }, "post": { "description": "You need to have a permission with action `roles.builtin:add` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create built-in role assignments with the roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to create a built-in role assignment which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Create a built-in role assignment.", "operationId": "addBuiltinRole", "parameters": [ @@ -71,7 +84,10 @@ "/access-control/builtin-roles/{builtinRole}/roles/{roleUID}": { "delete": { "description": "Deletes a built-in role assignment (for one of Viewer, Editor, Admin, or Grafana Admin) to the role with the provided UID.\n\nYou need to have a permission with action `roles.builtin:remove` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only remove built-in role assignments with the roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to remove a built-in role assignment which allows to do that.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Remove a built-in role assignment.", "operationId": "removeBuiltinRole", "parameters": [ @@ -116,7 +132,10 @@ "/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"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Get all roles.", "operationId": "listRoles", "parameters": [ @@ -140,7 +159,10 @@ }, "post": { "description": "Creates a new custom role and maps given permissions to that role. Note that roles with the same prefix as Fixed Roles can’t be created.\n\nYou need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate`` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.\nFor example, if a user does not have required permissions for creating users, they won’t be able to create a custom role which allows to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Create a new custom role.", "operationId": "createRole", "parameters": [ @@ -172,7 +194,10 @@ "/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"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Get a role.", "operationId": "getRole", "parameters": [ @@ -197,7 +222,10 @@ }, "put": { "description": "You need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate`` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Update a custom role.", "operationId": "updateRoleWithPermissions", "parameters": [ @@ -236,7 +264,10 @@ }, "delete": { "description": "Delete a role with the given UID, and it’s permissions. If the role is assigned to a built-in role, the deletion operation will fail, unless force query param is set to true, and in that case all assignments will also be deleted.\n\nYou need to have a permission with action `roles:delete` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only delete a custom role with the same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to delete a custom role which allows to do that.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Delete a custom role.", "operationId": "deleteCustomRole", "parameters": [ @@ -276,7 +307,10 @@ "/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"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Get status.", "operationId": "getAccessControlStatus", "responses": { @@ -298,7 +332,10 @@ "/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"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Get team roles.", "operationId": "listTeamRoles", "parameters": [ @@ -327,7 +364,10 @@ }, "put": { "description": "You need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate` for each.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Update team role.", "operationId": "setTeamRoles", "parameters": [ @@ -359,7 +399,10 @@ }, "post": { "description": "You need to have a permission with action `teams.roles:add` and scope `permissions:type:delegate`.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Add team role.", "operationId": "addTeamRole", "parameters": [ @@ -401,7 +444,10 @@ "/access-control/teams/{teamId}/roles/{roleUID}": { "delete": { "description": "You need to have a permission with action `teams.roles:remove` and scope `permissions:type:delegate`.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Remove team role.", "operationId": "removeTeamRole", "parameters": [ @@ -441,7 +487,10 @@ "/access-control/users/{userId}/roles": { "get": { "description": "Lists the roles that have been directly assigned to a given user. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:list` and scope `users:id:\u003cuser ID\u003e`.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "List roles assigned to a user.", "operationId": "listUserRoles", "parameters": [ @@ -470,7 +519,10 @@ }, "put": { "description": "Update the user’s role assignments to match the provided set of UIDs. This will remove any assigned roles that aren’t in the request and add roles that are in the set but are not already assigned to the user.\nIf you want to add or remove a single role, consider using Add a user role assignment or Remove a user role assignment instead.\n\nYou need to have a permission with action `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate` for each. `permissions:type:delegate` scope ensures that users can only assign or unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign or unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Set user role assignments.", "operationId": "setUserRoles", "parameters": [ @@ -510,7 +562,10 @@ }, "post": { "description": "Assign a role to a specific user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:add` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only assign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Add a user role assignment.", "operationId": "addUserRole", "parameters": [ @@ -549,7 +604,10 @@ "/access-control/users/{userId}/roles/{roleUID}": { "delete": { "description": "Revoke a role from a user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:remove` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Remove a user role assignment.", "operationId": "removeUserRole", "parameters": [ @@ -595,7 +653,9 @@ "/admin/ldap-sync-status": { "get": { "description": "You need to have a permission with action `ldap.status:read`.", - "tags": ["ldap_debug"], + "tags": [ + "ldap_debug" + ], "summary": "Returns the current state of the LDAP background sync integration", "operationId": "getSyncStatus", "responses": { @@ -622,7 +682,9 @@ } ], "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"], + "tags": [ + "admin_ldap" + ], "summary": "Reloads the LDAP configuration.", "operationId": "reloadLDAPCfg", "responses": { @@ -649,7 +711,9 @@ } ], "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"], + "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": { @@ -676,7 +740,9 @@ } ], "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"], + "tags": [ + "admin_ldap" + ], "summary": "Enables a single Grafana user to be synchronized against LDAP.", "operationId": "postSyncUserWithLDAP", "parameters": [ @@ -712,7 +778,9 @@ } ], "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"], + "tags": [ + "admin_ldap" + ], "summary": "Finds an user based on a username in LDAP. This helps illustrate how would the particular user be mapped in Grafana when synced.", "operationId": "getUserFromLDAP", "parameters": [ @@ -746,7 +814,9 @@ "basic": [] } ], - "tags": ["admin"], + "tags": [ + "admin" + ], "summary": "Pause/unpause all (legacy) alerts.", "operationId": "pauseAllAlerts", "parameters": [ @@ -777,7 +847,10 @@ }, "/admin/provisioning/access-control/reload": { "post": { - "tags": ["access_control_provisioning", "enterprise"], + "tags": [ + "access_control_provisioning", + "enterprise" + ], "summary": "You need to have a permission with action `provisioning:reload` with scope `provisioners:accesscontrol`.", "operationId": "adminProvisioningReloadAccessControl", "responses": { @@ -801,7 +874,9 @@ } ], "description": "Reloads the provisioning config files for dashboards again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:dashboards`.", - "tags": ["admin_provisioning"], + "tags": [ + "admin_provisioning" + ], "summary": "Reload dashboard provisioning configurations.", "operationId": "adminProvisioningReloadDashboards", "responses": { @@ -828,7 +903,9 @@ } ], "description": "Reloads the provisioning config files for datasources again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:datasources`.", - "tags": ["admin_provisioning"], + "tags": [ + "admin_provisioning" + ], "summary": "Reload datasource provisioning configurations.", "operationId": "adminProvisioningReloadDatasources", "responses": { @@ -855,7 +932,9 @@ } ], "description": "Reloads the provisioning config files for legacy alert notifiers again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:notifications`.", - "tags": ["admin_provisioning"], + "tags": [ + "admin_provisioning" + ], "summary": "Reload legacy alert notifier provisioning configurations.", "operationId": "adminProvisioningReloadNotifications", "responses": { @@ -882,7 +961,9 @@ } ], "description": "Reloads the provisioning config files for plugins again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:plugin`.", - "tags": ["admin_provisioning"], + "tags": [ + "admin_provisioning" + ], "summary": "Reload plugin provisioning configurations.", "operationId": "adminProvisioningReloadPlugins", "responses": { @@ -909,7 +990,9 @@ } ], "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"], + "tags": [ + "admin" + ], "summary": "Fetch settings.", "operationId": "adminGetSettings", "responses": { @@ -928,7 +1011,9 @@ "/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"], + "tags": [ + "admin" + ], "summary": "Fetch Grafana Stats.", "operationId": "adminGetStats", "responses": { @@ -955,7 +1040,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Create new user.", "operationId": "adminCreateUser", "parameters": [ @@ -998,7 +1085,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Delete global User.", "operationId": "adminDeleteUser", "parameters": [ @@ -1037,7 +1126,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Return a list of all auth tokens (devices) that the user currently have logged in from.", "operationId": "adminGetUserAuthTokens", "parameters": [ @@ -1073,7 +1164,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Disable user.", "operationId": "adminDisableUser", "parameters": [ @@ -1112,7 +1205,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Enable user.", "operationId": "adminEnableUser", "parameters": [ @@ -1151,7 +1246,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Logout user revokes all auth tokens (devices) for the user. User of issued auth tokens (devices) will no longer be logged in and will be required to authenticate again upon next activity.", "operationId": "adminLogoutUser", "parameters": [ @@ -1193,7 +1290,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Set password for user.", "operationId": "adminUpdateUserPassword", "parameters": [ @@ -1235,7 +1334,9 @@ "/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"], + "tags": [ + "admin_users" + ], "summary": "Set permissions for user.", "operationId": "adminUpdateUserPermissions", "parameters": [ @@ -1282,7 +1383,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Fetch user quota.", "operationId": "getUserQuota", "parameters": [ @@ -1321,7 +1424,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Update user quota.", "operationId": "updateUserQuota", "parameters": [ @@ -1374,7 +1479,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Revoke auth token for user.", "operationId": "adminRevokeUserAuthToken", "parameters": [ @@ -1419,7 +1526,9 @@ "/alert-notifications": { "get": { "description": "Returns all notification channels that the authenticated user has permission to view.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Get all notification channels.", "operationId": "getAlertNotificationChannels", "responses": { @@ -1439,7 +1548,9 @@ }, "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"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Create notification channel.", "operationId": "createAlertNotificationChannel", "parameters": [ @@ -1474,7 +1585,9 @@ "/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"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Get all notification channels (lookup)", "operationId": "getAlertNotificationLookup", "responses": { @@ -1496,7 +1609,9 @@ "/alert-notifications/test": { "post": { "description": "Sends a test notification to the channel.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Test notification channel.", "operationId": "notificationChannelTest", "parameters": [ @@ -1534,7 +1649,9 @@ "/alert-notifications/uid/{notification_channel_uid}": { "get": { "description": "Returns the notification channel given the notification channel UID.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Get notification channel by UID", "operationId": "getAlertNotificationChannelByUID", "parameters": [ @@ -1565,7 +1682,9 @@ }, "put": { "description": "Updates an existing notification channel identified by uid.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Update notification channel by UID.", "operationId": "updateAlertNotificationChannelByUID", "parameters": [ @@ -1604,7 +1723,9 @@ }, "delete": { "description": "Deletes an existing notification channel identified by UID.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Delete alert notification by UID.", "operationId": "deleteAlertNotificationChannelByUID", "parameters": [ @@ -1637,7 +1758,9 @@ "/alert-notifications/{notification_channel_id}": { "get": { "description": "Returns the notification channel given the notification channel ID.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Get notification channel by ID.", "operationId": "getAlertNotificationChannelByID", "parameters": [ @@ -1669,7 +1792,9 @@ }, "put": { "description": "Updates an existing notification channel identified by ID.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Update notification channel by ID.", "operationId": "updateAlertNotificationChannel", "parameters": [ @@ -1709,7 +1834,9 @@ }, "delete": { "description": "Deletes an existing notification channel identified by ID.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Delete alert notification by ID.", "operationId": "deleteAlertNotificationChannel", "parameters": [ @@ -1742,7 +1869,9 @@ }, "/alerts": { "get": { - "tags": ["legacy_alerts"], + "tags": [ + "legacy_alerts" + ], "summary": "Get legacy alerts.", "operationId": "getAlerts", "parameters": [ @@ -1769,7 +1898,15 @@ "in": "query" }, { - "enum": ["all", "no_data", "paused", "alerting", "ok", "pending", "unknown"], + "enum": [ + "all", + "no_data", + "paused", + "alerting", + "ok", + "pending", + "unknown" + ], "type": "string", "description": "Return alerts with one or more of the following alert states", "name": "state", @@ -1824,7 +1961,9 @@ }, "/alerts/states-for-dashboard": { "get": { - "tags": ["legacy_alerts"], + "tags": [ + "legacy_alerts" + ], "summary": "Get alert states for a dashboard.", "operationId": "getDashboardStates", "parameters": [ @@ -1851,7 +1990,9 @@ }, "/alerts/test": { "post": { - "tags": ["legacy_alerts"], + "tags": [ + "legacy_alerts" + ], "summary": "Test alert.", "operationId": "testAlert", "parameters": [ @@ -1885,7 +2026,9 @@ "/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"], + "tags": [ + "legacy_alerts" + ], "summary": "Get alert by ID.", "operationId": "getAlertByID", "parameters": [ @@ -1911,7 +2054,9 @@ }, "/alerts/{alert_id}/pause": { "post": { - "tags": ["legacy_alerts"], + "tags": [ + "legacy_alerts" + ], "summary": "Pause/unpause alert by id.", "operationId": "pauseAlert", "parameters": [ @@ -1952,7 +2097,9 @@ "/annotations": { "get": { "description": "Starting in Grafana v6.4 regions annotations are now returned in one entity that now includes the timeEnd property.", - "tags": ["annotations"], + "tags": [ + "annotations" + ], "summary": "Find Annotations.", "operationId": "getAnnotations", "parameters": [ @@ -2022,7 +2169,10 @@ "in": "query" }, { - "enum": ["alert", "annotation"], + "enum": [ + "alert", + "annotation" + ], "type": "string", "description": "Return alerts or user created annotations", "name": "type", @@ -2049,7 +2199,9 @@ }, "post": { "description": "Creates an annotation in the Grafana database. The dashboardId and panelId fields are optional. If they are not specified then an organization annotation is created and can be queried in any dashboard that adds the Grafana annotations data source. When creating a region annotation include the timeEnd property.\nThe format for `time` and `timeEnd` should be epoch numbers in millisecond resolution.\nThe response for this HTTP request is slightly different in versions prior to v6.4. In prior versions you would also get an endId if you where creating a region. But in 6.4 regions are represented using a single event with time and timeEnd properties.", - "tags": ["annotations"], + "tags": [ + "annotations" + ], "summary": "Create Annotation.", "operationId": "postAnnotation", "parameters": [ @@ -2084,7 +2236,9 @@ "/annotations/graphite": { "post": { "description": "Creates an annotation by using Graphite-compatible event format. The `when` and `data` fields are optional. If `when` is not specified then the current time will be used as annotation’s timestamp. The `tags` field can also be in prior to Graphite `0.10.0` format (string with multiple tags being separated by a space).", - "tags": ["annotations"], + "tags": [ + "annotations" + ], "summary": "Create Annotation in Graphite format.", "operationId": "postGraphiteAnnotation", "parameters": [ @@ -2118,7 +2272,9 @@ }, "/annotations/mass-delete": { "post": { - "tags": ["annotations"], + "tags": [ + "annotations" + ], "summary": "Delete multiple annotations.", "operationId": "massDeleteAnnotations", "parameters": [ @@ -2147,7 +2303,9 @@ "/annotations/tags": { "get": { "description": "Find all the event tags created in the annotations.", - "tags": ["annotations"], + "tags": [ + "annotations" + ], "summary": "Find Annotations Tags.", "operationId": "getAnnotationTags", "parameters": [ @@ -2180,7 +2338,9 @@ }, "/annotations/{annotation_id}": { "get": { - "tags": ["annotations"], + "tags": [ + "annotations" + ], "summary": "Get Annotation by Id.", "operationId": "getAnnotationByID", "parameters": [ @@ -2205,7 +2365,9 @@ }, "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"], + "tags": [ + "annotations" + ], "summary": "Update Annotation.", "operationId": "updateAnnotation", "parameters": [ @@ -2244,7 +2406,9 @@ }, "delete": { "description": "Deletes the annotation that matches the specified ID.", - "tags": ["annotations"], + "tags": [ + "annotations" + ], "summary": "Delete Annotation By ID.", "operationId": "deleteAnnotationByID", "parameters": [ @@ -2272,7 +2436,9 @@ }, "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"], + "tags": [ + "annotations" + ], "summary": "Patch Annotation", "operationId": "patchAnnotation", "parameters": [ @@ -2312,8 +2478,12 @@ }, "/api/v1/provisioning/alert-rules": { "post": { - "consumes": ["application/json"], - "tags": ["provisioning"], + "consumes": [ + "application/json" + ], + "tags": [ + "provisioning" + ], "summary": "Create a new alert rule.", "operationId": "RoutePostAlertRule", "parameters": [ @@ -2343,7 +2513,9 @@ }, "/api/v1/provisioning/alert-rules/{UID}": { "get": { - "tags": ["provisioning"], + "tags": [ + "provisioning" + ], "summary": "Get a specific alert rule by UID.", "operationId": "RouteGetAlertRule", "parameters": [ @@ -2368,8 +2540,12 @@ } }, "put": { - "consumes": ["application/json"], - "tags": ["provisioning"], + "consumes": [ + "application/json" + ], + "tags": [ + "provisioning" + ], "summary": "Update an existing alert rule.", "operationId": "RoutePutAlertRule", "parameters": [ @@ -2404,7 +2580,9 @@ } }, "delete": { - "tags": ["provisioning"], + "tags": [ + "provisioning" + ], "summary": "Delete a specific alert rule by UID.", "operationId": "RouteDeleteAlertRule", "parameters": [ @@ -2425,7 +2603,9 @@ }, "/api/v1/provisioning/contact-points": { "get": { - "tags": ["provisioning"], + "tags": [ + "provisioning" + ], "summary": "Get all the contact points.", "operationId": "RouteGetContactpoints", "parameters": [ @@ -2446,8 +2626,12 @@ } }, "post": { - "consumes": ["application/json"], - "tags": ["provisioning"], + "consumes": [ + "application/json" + ], + "tags": [ + "provisioning" + ], "summary": "Create a contact point.", "operationId": "RoutePostContactpoints", "parameters": [ @@ -2477,8 +2661,12 @@ }, "/api/v1/provisioning/contact-points/{UID}": { "put": { - "consumes": ["application/json"], - "tags": ["provisioning"], + "consumes": [ + "application/json" + ], + "tags": [ + "provisioning" + ], "summary": "Update an existing contact point.", "operationId": "RoutePutContactpoint", "parameters": [ @@ -2513,8 +2701,12 @@ } }, "delete": { - "consumes": ["application/json"], - "tags": ["provisioning"], + "consumes": [ + "application/json" + ], + "tags": [ + "provisioning" + ], "summary": "Delete a contact point.", "operationId": "RouteDeleteContactpoints", "parameters": [ @@ -2535,7 +2727,9 @@ }, "/api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}": { "get": { - "tags": ["provisioning"], + "tags": [ + "provisioning" + ], "summary": "Get a rule group.", "operationId": "RouteGetAlertRuleGroup", "parameters": [ @@ -2565,8 +2759,12 @@ } }, "put": { - "consumes": ["application/json"], - "tags": ["provisioning"], + "consumes": [ + "application/json" + ], + "tags": [ + "provisioning" + ], "summary": "Update the interval of a rule group.", "operationId": "RoutePutAlertRuleGroup", "parameters": [ @@ -2608,7 +2806,9 @@ }, "/api/v1/provisioning/mute-timings": { "get": { - "tags": ["provisioning"], + "tags": [ + "provisioning" + ], "summary": "Get all the mute timings.", "operationId": "RouteGetMuteTimings", "responses": { @@ -2621,8 +2821,12 @@ } }, "post": { - "consumes": ["application/json"], - "tags": ["provisioning"], + "consumes": [ + "application/json" + ], + "tags": [ + "provisioning" + ], "summary": "Create a new mute timing.", "operationId": "RoutePostMuteTiming", "parameters": [ @@ -2652,7 +2856,9 @@ }, "/api/v1/provisioning/mute-timings/{name}": { "get": { - "tags": ["provisioning"], + "tags": [ + "provisioning" + ], "summary": "Get a mute timing.", "operationId": "RouteGetMuteTiming", "parameters": [ @@ -2677,8 +2883,12 @@ } }, "put": { - "consumes": ["application/json"], - "tags": ["provisioning"], + "consumes": [ + "application/json" + ], + "tags": [ + "provisioning" + ], "summary": "Replace an existing mute timing.", "operationId": "RoutePutMuteTiming", "parameters": [ @@ -2713,7 +2923,9 @@ } }, "delete": { - "tags": ["provisioning"], + "tags": [ + "provisioning" + ], "summary": "Delete a mute timing.", "operationId": "RouteDeleteMuteTiming", "parameters": [ @@ -2734,7 +2946,9 @@ }, "/api/v1/provisioning/policies": { "get": { - "tags": ["provisioning"], + "tags": [ + "provisioning" + ], "summary": "Get the notification policy tree.", "operationId": "RouteGetPolicyTree", "responses": { @@ -2747,8 +2961,12 @@ } }, "put": { - "consumes": ["application/json"], - "tags": ["provisioning"], + "consumes": [ + "application/json" + ], + "tags": [ + "provisioning" + ], "summary": "Sets the notification policy tree.", "operationId": "RoutePutPolicyTree", "parameters": [ @@ -2777,8 +2995,12 @@ } }, "delete": { - "consumes": ["application/json"], - "tags": ["provisioning"], + "consumes": [ + "application/json" + ], + "tags": [ + "provisioning" + ], "summary": "Clears the notification policy tree.", "operationId": "RouteResetPolicyTree", "responses": { @@ -2793,7 +3015,9 @@ }, "/api/v1/provisioning/templates": { "get": { - "tags": ["provisioning"], + "tags": [ + "provisioning" + ], "summary": "Get all message templates.", "operationId": "RouteGetTemplates", "responses": { @@ -2811,7 +3035,9 @@ }, "/api/v1/provisioning/templates/{name}": { "get": { - "tags": ["provisioning"], + "tags": [ + "provisioning" + ], "summary": "Get a message template.", "operationId": "RouteGetTemplate", "parameters": [ @@ -2836,8 +3062,12 @@ } }, "put": { - "consumes": ["application/json"], - "tags": ["provisioning"], + "consumes": [ + "application/json" + ], + "tags": [ + "provisioning" + ], "summary": "Updates an existing template.", "operationId": "RoutePutTemplate", "parameters": [ @@ -2872,7 +3102,9 @@ } }, "delete": { - "tags": ["provisioning"], + "tags": [ + "provisioning" + ], "summary": "Delete a template.", "operationId": "RouteDeleteTemplate", "parameters": [ @@ -2894,7 +3126,9 @@ "/auth/keys": { "get": { "description": "Will return auth keys.", - "tags": ["api_keys"], + "tags": [ + "api_keys" + ], "summary": "Get auth keys.", "operationId": "getAPIkeys", "parameters": [ @@ -2926,7 +3160,9 @@ }, "post": { "description": "Will return details of the created API key", - "tags": ["api_keys"], + "tags": [ + "api_keys" + ], "summary": "Creates an API key.", "operationId": "addAPIkey", "parameters": [ @@ -2963,7 +3199,9 @@ }, "/auth/keys/{id}": { "delete": { - "tags": ["api_keys"], + "tags": [ + "api_keys" + ], "summary": "Delete API key.", "operationId": "deleteAPIkey", "parameters": [ @@ -2996,7 +3234,9 @@ }, "/dashboard/snapshots": { "get": { - "tags": ["snapshots"], + "tags": [ + "snapshots" + ], "summary": "List snapshots.", "operationId": "searchDashboardSnapshots", "parameters": [ @@ -3027,8 +3267,13 @@ }, "/dashboards/calculate-diff": { "post": { - "produces": ["application/json", "text/html"], - "tags": ["dashboards"], + "produces": [ + "application/json", + "text/html" + ], + "tags": [ + "dashboards" + ], "summary": "Perform diff on two dashboards.", "operationId": "calculateDashboardDiff", "parameters": [ @@ -3045,7 +3290,10 @@ "diffType": { "description": "The type of diff to return\nDescription:\n`basic`\n`json`", "type": "string", - "enum": ["basic", "json"] + "enum": [ + "basic", + "json" + ] }, "new": { "$ref": "#/definitions/CalculateDiffTarget" @@ -3073,7 +3321,9 @@ "/dashboards/db": { "post": { "description": "Creates a new dashboard or updates an existing dashboard.", - "tags": ["dashboards"], + "tags": [ + "dashboards" + ], "summary": "Create / Update dashboard", "operationId": "postDashboard", "parameters": [ @@ -3116,7 +3366,9 @@ }, "/dashboards/home": { "get": { - "tags": ["dashboards"], + "tags": [ + "dashboards" + ], "summary": "Get home dashboard.", "operationId": "getHomeDashboard", "responses": { @@ -3135,7 +3387,9 @@ "/dashboards/id/{DashboardID}/permissions": { "get": { "description": "Please refer to [updated API](#/dashboard_permissions/getDashboardPermissionsListByUID) instead", - "tags": ["dashboard_permissions"], + "tags": [ + "dashboard_permissions" + ], "summary": "Gets all existing permissions for the given dashboard.", "operationId": "getDashboardPermissionsListByID", "deprecated": true, @@ -3168,7 +3422,9 @@ }, "post": { "description": "Please refer to [updated API](#/dashboard_permissions/updateDashboardPermissionsByUID) instead\n\nThis operation will remove existing permissions if they’re not included in the request.", - "tags": ["dashboard_permissions"], + "tags": [ + "dashboard_permissions" + ], "summary": "Updates permissions for a dashboard.", "operationId": "updateDashboardPermissionsByID", "deprecated": true, @@ -3214,7 +3470,9 @@ "/dashboards/id/{DashboardID}/restore": { "post": { "description": "Please refer to [updated API](#/dashboard_versions/restoreDashboardVersionByUID) instead", - "tags": ["dashboard_versions"], + "tags": [ + "dashboard_versions" + ], "summary": "Restore a dashboard to a given dashboard version.", "operationId": "restoreDashboardVersionByID", "deprecated": true, @@ -3257,7 +3515,9 @@ "/dashboards/id/{DashboardID}/versions": { "get": { "description": "Please refer to [updated API](#/dashboard_versions/getDashboardVersionsByUID) instead", - "tags": ["dashboard_versions"], + "tags": [ + "dashboard_versions" + ], "summary": "Gets all existing versions for the dashboard.", "operationId": "getDashboardVersionsByID", "deprecated": true, @@ -3292,7 +3552,9 @@ "/dashboards/id/{DashboardID}/versions/{DashboardVersionID}": { "get": { "description": "Please refer to [updated API](#/dashboard_versions/getDashboardVersionByUID) instead", - "tags": ["dashboard_versions"], + "tags": [ + "dashboard_versions" + ], "summary": "Get a specific dashboard version.", "operationId": "getDashboardVersionByID", "deprecated": true, @@ -3333,7 +3595,9 @@ }, "/dashboards/import": { "post": { - "tags": ["dashboards"], + "tags": [ + "dashboards" + ], "summary": "Import dashboard.", "operationId": "importDashboard", "parameters": [ @@ -3370,7 +3634,9 @@ }, "/dashboards/tags": { "get": { - "tags": ["dashboards"], + "tags": [ + "dashboards" + ], "summary": "Get all dashboards tags of an organisation.", "operationId": "getDashboardTags", "responses": { @@ -3388,7 +3654,9 @@ }, "/dashboards/trim": { "post": { - "tags": ["dashboards"], + "tags": [ + "dashboards" + ], "summary": "Trim defaults from dashboard.", "operationId": "trimDashboard", "parameters": [ @@ -3417,7 +3685,9 @@ "/dashboards/uid/{uid}": { "get": { "description": "Will return the dashboard given the dashboard unique identifier (uid).", - "tags": ["dashboards"], + "tags": [ + "dashboards" + ], "summary": "Get dashboard by uid.", "operationId": "getDashboardByUID", "parameters": [ @@ -3448,7 +3718,9 @@ }, "delete": { "description": "Will delete the dashboard given the specified unique identifier (uid).", - "tags": ["dashboards"], + "tags": [ + "dashboards" + ], "summary": "Delete dashboard by uid.", "operationId": "deleteDashboardByUID", "parameters": [ @@ -3480,7 +3752,9 @@ }, "/dashboards/uid/{uid}/permissions": { "get": { - "tags": ["dashboard_permissions"], + "tags": [ + "dashboard_permissions" + ], "summary": "Gets all existing permissions for the given dashboard.", "operationId": "getDashboardPermissionsListByUID", "parameters": [ @@ -3511,7 +3785,9 @@ }, "post": { "description": "This operation will remove existing permissions if they’re not included in the request.", - "tags": ["dashboard_permissions"], + "tags": [ + "dashboard_permissions" + ], "summary": "Updates permissions for a dashboard.", "operationId": "updateDashboardPermissionsByUID", "parameters": [ @@ -3554,7 +3830,9 @@ }, "/dashboards/uid/{uid}/restore": { "post": { - "tags": ["dashboard_versions"], + "tags": [ + "dashboard_versions" + ], "summary": "Restore a dashboard to a given dashboard version using UID.", "operationId": "restoreDashboardVersionByUID", "parameters": [ @@ -3594,7 +3872,9 @@ }, "/dashboards/uid/{uid}/versions": { "get": { - "tags": ["dashboard_versions"], + "tags": [ + "dashboard_versions" + ], "summary": "Gets all existing versions for the dashboard using UID.", "operationId": "getDashboardVersionsByUID", "parameters": [ @@ -3642,7 +3922,9 @@ }, "/dashboards/uid/{uid}/versions/{DashboardVersionID}": { "get": { - "tags": ["dashboard_versions"], + "tags": [ + "dashboard_versions" + ], "summary": "Get a specific dashboard version using UID.", "operationId": "getDashboardVersionByUID", "parameters": [ @@ -3682,7 +3964,9 @@ "/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"], + "tags": [ + "datasources" + ], "summary": "Get all data sources.", "operationId": "getDataSources", "responses": { @@ -3702,7 +3986,9 @@ }, "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"], + "tags": [ + "datasources" + ], "summary": "Create a data source.", "operationId": "addDataSource", "parameters": [ @@ -3737,7 +4023,9 @@ "/datasources/id/{name}": { "get": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Get data source Id by Name.", "operationId": "getDataSourceIdByName", "parameters": [ @@ -3770,7 +4058,9 @@ "/datasources/name/{name}": { "get": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Get a single data source by Name.", "operationId": "getDataSourceByName", "parameters": [ @@ -3798,7 +4088,9 @@ }, "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"], + "tags": [ + "datasources" + ], "summary": "Delete an existing data source by name.", "operationId": "deleteDataSourceByName", "parameters": [ @@ -3831,7 +4123,9 @@ "/datasources/proxy/uid/{uid}/{datasource_proxy_route}": { "get": { "description": "Proxies all calls to the actual data source.", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Data source proxy GET calls.", "operationId": "datasourceProxyGETByUIDcalls", "parameters": [ @@ -3871,7 +4165,9 @@ }, "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"], + "tags": [ + "datasources" + ], "summary": "Data source proxy POST calls.", "operationId": "datasourceProxyPOSTByUIDcalls", "parameters": [ @@ -3922,7 +4218,9 @@ }, "delete": { "description": "Proxies all calls to the actual data source.", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Data source proxy DELETE calls.", "operationId": "datasourceProxyDELETEByUIDcalls", "parameters": [ @@ -3964,7 +4262,9 @@ "/datasources/proxy/{id}/{datasource_proxy_route}": { "get": { "description": "Proxies all calls to the actual data source.\n\nPlease refer to [updated API](#/datasources/datasourceProxyGETByUIDcalls) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Data source proxy GET calls.", "operationId": "datasourceProxyGETcalls", "deprecated": true, @@ -4005,7 +4305,9 @@ }, "post": { "description": "Proxies all calls to the actual data source. The data source should support POST methods for the specific path and role as defined\n\nPlease refer to [updated API](#/datasources/datasourceProxyPOSTByUIDcalls) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Data source proxy POST calls.", "operationId": "datasourceProxyPOSTcalls", "deprecated": true, @@ -4057,7 +4359,9 @@ }, "delete": { "description": "Proxies all calls to the actual data source.\n\nPlease refer to [updated API](#/datasources/datasourceProxyDELETEByUIDcalls) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Data source proxy DELETE calls.", "operationId": "datasourceProxyDELETEcalls", "deprecated": true, @@ -4099,7 +4403,9 @@ }, "/datasources/uid/{sourceUID}/correlations": { "post": { - "tags": ["correlations"], + "tags": [ + "correlations" + ], "summary": "Add correlation.", "operationId": "createCorrelation", "parameters": [ @@ -4143,7 +4449,9 @@ "/datasources/uid/{uid}": { "get": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source).", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Get a single data source by UID.", "operationId": "getDataSourceByUID", "parameters": [ @@ -4177,7 +4485,9 @@ }, "put": { "description": "Similar to creating a data source, `password` and `basicAuthPassword` should be defined under\nsecureJsonData in order to be stored securely as an encrypted blob in the database. Then, the\nencrypted fields are listed under secureJsonFields section in the response.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:1` (single data source).", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Update an existing data source.", "operationId": "updateDataSourceByUID", "parameters": [ @@ -4213,7 +4523,9 @@ }, "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"], + "tags": [ + "datasources" + ], "summary": "Delete an existing data source by UID.", "operationId": "deleteDataSourceByUID", "parameters": [ @@ -4245,7 +4557,9 @@ }, "/datasources/uid/{uid}/correlations/{correlationUID}": { "delete": { - "tags": ["correlations"], + "tags": [ + "correlations" + ], "summary": "Delete a correlation.", "operationId": "deleteCorrelation", "parameters": [ @@ -4283,7 +4597,9 @@ }, "/datasources/uid/{uid}/health": { "get": { - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Sends a health check request to the plugin datasource identified by the UID.", "operationId": "checkDatasourceHealthWithUID", "parameters": [ @@ -4315,7 +4631,9 @@ }, "/datasources/uid/{uid}/resources/{datasource_proxy_route}": { "get": { - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Fetch data source resources.", "operationId": "callDatasourceResourceWithUID", "parameters": [ @@ -4357,7 +4675,10 @@ "/datasources/{datasourceId}/disable-permissions": { "post": { "description": "Disables permissions for the data source with the given id. All existing permissions will be removed and anyone will be able to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], + "tags": [ + "datasource_permissions", + "enterprise" + ], "summary": "Disable permissions for a data source.", "operationId": "disablePermissions", "parameters": [ @@ -4393,7 +4714,10 @@ "/datasources/{datasourceId}/enable-permissions": { "post": { "description": "Enables permissions for the data source with the given id.\nNo one except Org Admins will be able to query the data source until permissions have been added\nwhich permit certain users or teams to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], + "tags": [ + "datasource_permissions", + "enterprise" + ], "summary": "Enable permissions for a data source.", "operationId": "enablePermissions", "parameters": [ @@ -4429,7 +4753,10 @@ "/datasources/{datasourceId}/permissions": { "get": { "description": "Gets all existing permissions for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:read` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], + "tags": [ + "datasource_permissions", + "enterprise" + ], "summary": "Get permissions for a data source.", "operationId": "getAllPermissions", "parameters": [ @@ -4460,7 +4787,10 @@ }, "post": { "description": "You need to have a permission with action `datasources.permissions:read` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], + "tags": [ + "datasource_permissions", + "enterprise" + ], "summary": "Add permissions for a data source.", "operationId": "addPermission", "parameters": [ @@ -4516,7 +4846,10 @@ "/datasources/{datasourceId}/permissions/{permissionId}": { "delete": { "description": "Removes the permission with the given permissionId for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:delete` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], + "tags": [ + "datasource_permissions", + "enterprise" + ], "summary": "Remove permission for a data source.", "operationId": "deletePermissions", "parameters": [ @@ -4552,7 +4885,9 @@ "/datasources/{id}": { "get": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).\n\nPlease refer to [updated API](#/datasources/getDataSourceByUID) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Get a single data source by Id.", "operationId": "getDataSourceByID", "deprecated": true, @@ -4587,7 +4922,9 @@ }, "put": { "description": "Similar to creating a data source, `password` and `basicAuthPassword` should be defined under\nsecureJsonData in order to be stored securely as an encrypted blob in the database. Then, the\nencrypted fields are listed under secureJsonFields section in the response.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).\n\nPlease refer to [updated API](#/datasources/updateDataSourceByUID) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Update an existing data source by its sequential ID.", "operationId": "updateDataSourceByID", "deprecated": true, @@ -4624,7 +4961,9 @@ }, "delete": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).\n\nPlease refer to [updated API](#/datasources/deleteDataSourceByUID) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Delete an existing data source by id.", "operationId": "deleteDataSourceByID", "deprecated": true, @@ -4658,7 +4997,9 @@ "/datasources/{id}/health": { "get": { "description": "Please refer to [updated API](#/datasources/checkDatasourceHealthWithUID) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Sends a health check request to the plugin datasource identified by the ID.", "operationId": "checkDatasourceHealthByID", "deprecated": true, @@ -4692,7 +5033,9 @@ "/datasources/{id}/resources/{datasource_proxy_route}": { "get": { "description": "Please refer to [updated API](#/datasources/callDatasourceResourceWithUID) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Fetch data source resources by Id.", "operationId": "callDatasourceResourceByID", "deprecated": true, @@ -4735,7 +5078,9 @@ "/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"], + "tags": [ + "ds" + ], "summary": "DataSource query metrics with expressions", "operationId": "queryMetricsWithExpressions", "parameters": [ @@ -4773,7 +5118,9 @@ "/folders": { "get": { "description": "Returns all folders that the authenticated user has permission to view.", - "tags": ["folders"], + "tags": [ + "folders" + ], "summary": "Get all folders.", "operationId": "getFolders", "parameters": [ @@ -4810,7 +5157,9 @@ } }, "post": { - "tags": ["folders"], + "tags": [ + "folders" + ], "summary": "Create folder.", "operationId": "createFolder", "parameters": [ @@ -4848,7 +5197,9 @@ "/folders/id/{folder_id}": { "get": { "description": "Returns the folder identified by id.", - "tags": ["folders"], + "tags": [ + "folders" + ], "summary": "Get folder by id.", "operationId": "getFolderByID", "parameters": [ @@ -4881,7 +5232,9 @@ }, "/folders/{folder_uid}": { "get": { - "tags": ["folders"], + "tags": [ + "folders" + ], "summary": "Get folder by uid.", "operationId": "getFolderByUID", "parameters": [ @@ -4911,7 +5264,9 @@ } }, "put": { - "tags": ["folders"], + "tags": [ + "folders" + ], "summary": "Update folder.", "operationId": "updateFolder", "parameters": [ @@ -4957,7 +5312,9 @@ }, "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"], + "tags": [ + "folders" + ], "summary": "Delete folder.", "operationId": "deleteFolder", "parameters": [ @@ -4999,7 +5356,9 @@ }, "/folders/{folder_uid}/permissions": { "get": { - "tags": ["folder_permissions"], + "tags": [ + "folder_permissions" + ], "summary": "Gets all existing permissions for the folder with the given `uid`.", "operationId": "getFolderPermissionList", "parameters": [ @@ -5029,7 +5388,9 @@ } }, "post": { - "tags": ["folder_permissions"], + "tags": [ + "folder_permissions" + ], "summary": "Updates permissions for a folder. This operation will remove existing permissions if they’re not included in the request.", "operationId": "updateFolderPermissions", "parameters": [ @@ -5070,7 +5431,9 @@ "/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"], + "tags": [ + "library_elements" + ], "summary": "Get all library elements.", "operationId": "getLibraryElements", "parameters": [ @@ -5081,7 +5444,10 @@ "in": "query" }, { - "enum": [1, 2], + "enum": [ + 1, + 2 + ], "type": "integer", "format": "int64", "description": "Kind of element to search for.", @@ -5089,7 +5455,10 @@ "in": "query" }, { - "enum": ["alpha-asc", "alpha-desc"], + "enum": [ + "alpha-asc", + "alpha-desc" + ], "type": "string", "description": "Sort order of elements.", "name": "sortDirection", @@ -5144,7 +5513,9 @@ }, "post": { "description": "Creates a new library element.", - "tags": ["library_elements"], + "tags": [ + "library_elements" + ], "summary": "Create library element.", "operationId": "createLibraryElement", "parameters": [ @@ -5182,7 +5553,9 @@ "/library-elements/name/{library_element_name}": { "get": { "description": "Returns a library element with the given name.", - "tags": ["library_elements"], + "tags": [ + "library_elements" + ], "summary": "Get library element by name.", "operationId": "getLibraryElementByName", "parameters": [ @@ -5212,7 +5585,9 @@ "/library-elements/{library_element_uid}": { "get": { "description": "Returns a library element with the given UID.", - "tags": ["library_elements"], + "tags": [ + "library_elements" + ], "summary": "Get library element by UID.", "operationId": "getLibraryElementByUID", "parameters": [ @@ -5240,7 +5615,9 @@ }, "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"], + "tags": [ + "library_elements" + ], "summary": "Delete library element.", "operationId": "deleteLibraryElementByUID", "parameters": [ @@ -5274,7 +5651,9 @@ }, "patch": { "description": "Updates an existing library element identified by uid.", - "tags": ["library_elements"], + "tags": [ + "library_elements" + ], "summary": "Update library element.", "operationId": "updateLibraryElement", "parameters": [ @@ -5321,7 +5700,9 @@ "/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"], + "tags": [ + "library_elements" + ], "summary": "Get library element connections.", "operationId": "getLibraryElementConnections", "parameters": [ @@ -5350,7 +5731,10 @@ }, "/licensing/check": { "get": { - "tags": ["licensing", "enterprise"], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Check license availability.", "operationId": "getStatus", "responses": { @@ -5363,7 +5747,10 @@ "/licensing/custom-permissions": { "get": { "description": "You need to have a permission with action `licensing.reports:read`.", - "tags": ["licensing", "enterprise"], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Get custom permissions report.", "operationId": "getCustomPermissionsReport", "responses": { @@ -5379,8 +5766,13 @@ "/licensing/custom-permissions-csv": { "get": { "description": "You need to have a permission with action `licensing.reports:read`.", - "produces": ["text/csv"], - "tags": ["licensing", "enterprise"], + "produces": [ + "text/csv" + ], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Get custom permissions report in CSV format.", "operationId": "getCustomPermissionsCSV", "responses": { @@ -5396,7 +5788,10 @@ "/licensing/refresh-stats": { "get": { "description": "You need to have a permission with action `licensing:read`.", - "tags": ["licensing", "enterprise"], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Refresh license stats.", "operationId": "refreshLicenseStats", "responses": { @@ -5412,7 +5807,10 @@ "/licensing/token": { "get": { "description": "You need to have a permission with action `licensing:read`.", - "tags": ["licensing", "enterprise"], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Get license token.", "operationId": "getLicenseToken", "responses": { @@ -5423,7 +5821,10 @@ }, "post": { "description": "You need to have a permission with action `licensing:update`.", - "tags": ["licensing", "enterprise"], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Create license token.", "operationId": "postLicenseToken", "parameters": [ @@ -5447,7 +5848,10 @@ }, "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"], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Remove license from database.", "operationId": "deleteLicenseToken", "parameters": [ @@ -5485,7 +5889,10 @@ "/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"], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Manually force license refresh.", "operationId": "postRenewLicenseToken", "parameters": [ @@ -5513,7 +5920,10 @@ }, "/logout/saml": { "get": { - "tags": ["saml", "enterprise"], + "tags": [ + "saml", + "enterprise" + ], "summary": "GetLogout initiates single logout process.", "operationId": "getSAMLLogout", "responses": { @@ -5532,7 +5942,9 @@ "/org": { "get": { "description": "Get current Organization", - "tags": ["org"], + "tags": [ + "org" + ], "operationId": "getCurrentOrg", "responses": { "200": { @@ -5550,7 +5962,9 @@ } }, "put": { - "tags": ["org"], + "tags": [ + "org" + ], "summary": "Update current Organization.", "operationId": "updateCurrentOrg", "parameters": [ @@ -5584,7 +5998,9 @@ }, "/org/address": { "put": { - "tags": ["org"], + "tags": [ + "org" + ], "summary": "Update current Organization's address.", "operationId": "updateCurrentOrgAddress", "parameters": [ @@ -5618,7 +6034,9 @@ }, "/org/invites": { "get": { - "tags": ["org_invites"], + "tags": [ + "org_invites" + ], "summary": "Get pending invites.", "operationId": "getPendingOrgInvites", "responses": { @@ -5637,7 +6055,9 @@ } }, "post": { - "tags": ["org_invites"], + "tags": [ + "org_invites" + ], "summary": "Add invite.", "operationId": "addOrgInvite", "parameters": [ @@ -5674,7 +6094,9 @@ }, "/org/invites/{invitation_code}/revoke": { "delete": { - "tags": ["org_invites"], + "tags": [ + "org_invites" + ], "summary": "Revoke invite.", "operationId": "revokeInvite", "parameters": [ @@ -5706,7 +6128,9 @@ }, "/org/preferences": { "get": { - "tags": ["org_preferences"], + "tags": [ + "org_preferences" + ], "summary": "Get Current Org Prefs.", "operationId": "getOrgPreferences", "responses": { @@ -5725,7 +6149,9 @@ } }, "put": { - "tags": ["org_preferences"], + "tags": [ + "org_preferences" + ], "summary": "Update Current Org Prefs.", "operationId": "updateOrgPreferences", "parameters": [ @@ -5757,7 +6183,9 @@ } }, "patch": { - "tags": ["org_preferences"], + "tags": [ + "org_preferences" + ], "summary": "Patch Current Org Prefs.", "operationId": "patchOrgPreferences", "parameters": [ @@ -5792,7 +6220,9 @@ "/org/users": { "get": { "description": "Returns all org users within the current organization. Accessible to users with org admin role.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:read` with scope `users:*`.", - "tags": ["org"], + "tags": [ + "org" + ], "summary": "Get all users within the current organization.", "operationId": "getOrgUsersForCurrentOrg", "responses": { @@ -5812,7 +6242,9 @@ }, "post": { "description": "Adds a global user to the current organization.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:add` with scope `users:*`.", - "tags": ["org"], + "tags": [ + "org" + ], "summary": "Add a new user to the current organization", "operationId": "addOrgUserToCurrentOrg", "parameters": [ @@ -5844,7 +6276,9 @@ "/org/users/lookup": { "get": { "description": "Returns all org users within the current organization, but with less detailed information.\nAccessible to users with org admin role, admin in any folder or admin of any team.\nMainly used by Grafana UI for providing list of users when adding team members and when editing folder/dashboard permissions.", - "tags": ["org"], + "tags": [ + "org" + ], "summary": "Get all users within the current organization (lookup)", "operationId": "getOrgUsersForCurrentOrgLookup", "parameters": [ @@ -5879,7 +6313,9 @@ "/org/users/{user_id}": { "delete": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:remove` with scope `users:*`.", - "tags": ["org"], + "tags": [ + "org" + ], "summary": "Delete user in current organization", "operationId": "removeOrgUserForCurrentOrg", "parameters": [ @@ -5911,7 +6347,9 @@ }, "patch": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users.role:update` with scope `users:*`.", - "tags": ["org"], + "tags": [ + "org" + ], "summary": "Updates the given user", "operationId": "updateOrgUserForCurrentOrg", "parameters": [ @@ -5958,7 +6396,9 @@ } ], "description": "Search all Organizations", - "tags": ["orgs"], + "tags": [ + "orgs" + ], "operationId": "searchOrgs", "parameters": [ { @@ -6008,7 +6448,9 @@ }, "post": { "description": "Only works if [users.allow_org_create](https://grafana.com/docs/grafana/latest/administration/configuration/#allow_org_create) is set.", - "tags": ["orgs"], + "tags": [ + "orgs" + ], "summary": "Create Organization.", "operationId": "createOrg", "parameters": [ @@ -6047,7 +6489,9 @@ "basic": [] } ], - "tags": ["orgs"], + "tags": [ + "orgs" + ], "summary": "Get Organization by ID.", "operationId": "getOrgByName", "parameters": [ @@ -6081,7 +6525,9 @@ "basic": [] } ], - "tags": ["orgs"], + "tags": [ + "orgs" + ], "summary": "Get Organization by ID.", "operationId": "getOrgByID", "parameters": [ @@ -6114,7 +6560,9 @@ "basic": [] } ], - "tags": ["orgs"], + "tags": [ + "orgs" + ], "summary": "Update Organization.", "operationId": "updateOrg", "parameters": [ @@ -6158,7 +6606,9 @@ "basic": [] } ], - "tags": ["orgs"], + "tags": [ + "orgs" + ], "summary": "Delete Organization.", "operationId": "deleteOrgByID", "parameters": [ @@ -6194,7 +6644,9 @@ }, "/orgs/{org_id}/address": { "put": { - "tags": ["orgs"], + "tags": [ + "orgs" + ], "summary": "Update Organization's address.", "operationId": "updateOrgAddress", "parameters": [ @@ -6236,7 +6688,9 @@ "/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"], + "tags": [ + "orgs" + ], "summary": "Fetch Organization quota.", "operationId": "getOrgQuota", "parameters": [ @@ -6275,7 +6729,9 @@ } ], "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"], + "tags": [ + "orgs" + ], "summary": "Update user quota.", "operationId": "updateOrgQuota", "parameters": [ @@ -6328,7 +6784,9 @@ } ], "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"], + "tags": [ + "orgs" + ], "summary": "Get Users in Organization.", "operationId": "getOrgUsers", "parameters": [ @@ -6357,7 +6815,9 @@ }, "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"], + "tags": [ + "orgs" + ], "summary": "Add a new user to the current organization", "operationId": "addOrgUser", "parameters": [ @@ -6396,7 +6856,9 @@ "/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"], + "tags": [ + "orgs" + ], "summary": "Delete user in current organization", "operationId": "removeOrgUser", "parameters": [ @@ -6435,7 +6897,9 @@ }, "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"], + "tags": [ + "orgs" + ], "summary": "Update Users in Organization.", "operationId": "updateOrgUser", "parameters": [ @@ -6483,7 +6947,9 @@ }, "/playlists": { "get": { - "tags": ["playlists"], + "tags": [ + "playlists" + ], "summary": "Get playlists.", "operationId": "searchPlaylists", "parameters": [ @@ -6510,7 +6976,9 @@ } }, "post": { - "tags": ["playlists"], + "tags": [ + "playlists" + ], "summary": "Create playlist.", "operationId": "createPlaylist", "parameters": [ @@ -6544,7 +7012,9 @@ }, "/playlists/{uid}": { "get": { - "tags": ["playlists"], + "tags": [ + "playlists" + ], "summary": "Get playlist.", "operationId": "getPlaylist", "parameters": [ @@ -6574,7 +7044,9 @@ } }, "put": { - "tags": ["playlists"], + "tags": [ + "playlists" + ], "summary": "Update playlist.", "operationId": "updatePlaylist", "parameters": [ @@ -6612,7 +7084,9 @@ } }, "delete": { - "tags": ["playlists"], + "tags": [ + "playlists" + ], "summary": "Delete playlist.", "operationId": "deletePlaylist", "parameters": [ @@ -6644,7 +7118,9 @@ }, "/playlists/{uid}/dashboards": { "get": { - "tags": ["playlists"], + "tags": [ + "playlists" + ], "summary": "Get playlist dashboards.", "operationId": "getPlaylistDashboards", "parameters": [ @@ -6676,7 +7152,9 @@ }, "/playlists/{uid}/items": { "get": { - "tags": ["playlists"], + "tags": [ + "playlists" + ], "summary": "Get playlist items.", "operationId": "getPlaylistItems", "parameters": [ @@ -6709,7 +7187,9 @@ "/query-history": { "get": { "description": "Returns a list of queries in the query history that matches the search criteria.\nQuery history search supports pagination. Use the `limit` parameter to control the maximum number of queries returned; the default limit is 100.\nYou can also use the `page` query parameter to fetch queries from any page other than the first one.", - "tags": ["query_history"], + "tags": [ + "query_history" + ], "summary": "Query history search.", "operationId": "searchQueries", "parameters": [ @@ -6736,7 +7216,10 @@ "in": "query" }, { - "enum": ["time-desc", "time-asc"], + "enum": [ + "time-desc", + "time-asc" + ], "type": "string", "default": "time-desc", "description": "Sort method", @@ -6786,7 +7269,9 @@ }, "post": { "description": "Adds new query to query history.", - "tags": ["query_history"], + "tags": [ + "query_history" + ], "summary": "Add query to query history.", "operationId": "createQuery", "parameters": [ @@ -6818,7 +7303,9 @@ "/query-history/migrate": { "post": { "description": "Adds multiple queries to query history.", - "tags": ["query_history"], + "tags": [ + "query_history" + ], "summary": "Migrate queries to query history.", "operationId": "migrateQueries", "parameters": [ @@ -6850,7 +7337,9 @@ "/query-history/star/{query_history_uid}": { "post": { "description": "Adds star to query in query history as specified by the UID.", - "tags": ["query_history"], + "tags": [ + "query_history" + ], "summary": "Add star to query in query history.", "operationId": "starQuery", "parameters": [ @@ -6875,7 +7364,9 @@ }, "delete": { "description": "Removes star from query in query history as specified by the UID.", - "tags": ["query_history"], + "tags": [ + "query_history" + ], "summary": "Remove star to query in query history.", "operationId": "unstarQuery", "parameters": [ @@ -6902,7 +7393,9 @@ "/query-history/{query_history_uid}": { "delete": { "description": "Deletes an existing query in query history as specified by the UID. This operation cannot be reverted.", - "tags": ["query_history"], + "tags": [ + "query_history" + ], "summary": "Delete query in query history.", "operationId": "deleteQuery", "parameters": [ @@ -6927,7 +7420,9 @@ }, "patch": { "description": "Updates comment for query in query history as specified by the UID.", - "tags": ["query_history"], + "tags": [ + "query_history" + ], "summary": "Update comment for query in query history.", "operationId": "patchQueryComment", "parameters": [ @@ -6965,7 +7460,10 @@ "/recording-rules": { "get": { "description": "Lists all rules in the database: active or deleted", - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "operationId": "listRecordingRules", "responses": { "200": { @@ -6987,7 +7485,10 @@ }, "put": { "description": "Update the active status of a rule", - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "operationId": "updateRecordingRule", "parameters": [ { @@ -7019,7 +7520,10 @@ }, "post": { "description": "Create a recording rule that is then registered and started", - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "operationId": "createRecordingRule", "parameters": [ { @@ -7052,7 +7556,10 @@ }, "/recording-rules/test": { "post": { - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "summary": "Test a recording rule.", "operationId": "testCreateRecordingRule", "parameters": [ @@ -7090,7 +7597,10 @@ "/recording-rules/writer": { "get": { "description": "Return the prometheus remote write target", - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "operationId": "getRecordingRuleWriteTarget", "responses": { "200": { @@ -7112,7 +7622,10 @@ }, "post": { "description": "It returns a 422 if there is not an existing prometheus data source configured", - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "summary": "Create a remote write target.", "operationId": "createRecordingRuleWriteTarget", "parameters": [ @@ -7147,7 +7660,10 @@ } }, "delete": { - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "summary": "Delete the remote write target.", "operationId": "deleteRecordingRuleWriteTarget", "responses": { @@ -7171,7 +7687,10 @@ }, "/recording-rules/{recordingRuleID}": { "delete": { - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "summary": "Delete removes the rule from the registry and stops it.", "operationId": "deleteRecordingRule", "parameters": [ @@ -7205,7 +7724,10 @@ "/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"], + "tags": [ + "reports", + "enterprise" + ], "summary": "List reports.", "operationId": "getReports", "responses": { @@ -7225,7 +7747,10 @@ }, "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"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Create a report.", "operationId": "createReport", "parameters": [ @@ -7263,7 +7788,10 @@ "/reports/email": { "post": { "description": "Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client’s timeout to at least 60 seconds. Available to org admins only and with a valid license.\n\nOnly available in Grafana Enterprise v7.0+.\nThis API endpoint is experimental and may be deprecated in a future release. On deprecation, a migration strategy will be provided and the endpoint will remain functional until the next major release of Grafana.\n\nYou need to have a permission with action `reports:send`.", - "tags": ["reports", "enterprise"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Send a report.", "operationId": "sendReport", "parameters": [ @@ -7301,8 +7829,13 @@ "/reports/render/pdf/{dashboardID}": { "get": { "description": "Please refer to [reports enterprise](#/reports/renderReportPDFs) instead. This will be removed in Grafana 10.", - "produces": ["application/pdf"], - "tags": ["reports", "enterprise"], + "produces": [ + "application/pdf" + ], + "tags": [ + "reports", + "enterprise" + ], "summary": "Render report for dashboard.", "operationId": "renderReportPDF", "deprecated": true, @@ -7371,8 +7904,13 @@ "/reports/render/pdfs": { "get": { "description": "Available to all users and with a valid license.", - "produces": ["application/pdf"], - "tags": ["reports", "enterprise"], + "produces": [ + "application/pdf" + ], + "tags": [ + "reports", + "enterprise" + ], "summary": "Render report for multiple dashboards.", "operationId": "renderReportPDFs", "parameters": [ @@ -7411,7 +7949,10 @@ "/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"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Get settings.", "operationId": "getReportSettings", "responses": { @@ -7431,7 +7972,10 @@ }, "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"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Save settings.", "operationId": "saveReportSettings", "parameters": [ @@ -7466,7 +8010,10 @@ "/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"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Send test report via email.", "operationId": "sendTestEmail", "parameters": [ @@ -7504,7 +8051,10 @@ "/reports/{id}": { "get": { "description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports:read` with scope `reports:id:\u003creport ID\u003e`.", - "tags": ["reports", "enterprise"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Get a report.", "operationId": "getReport", "parameters": [ @@ -7539,7 +8089,10 @@ }, "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"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Update a report.", "operationId": "updateReport", "parameters": [ @@ -7582,7 +8135,10 @@ }, "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"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Delete a report.", "operationId": "deleteReport", "parameters": [ @@ -7618,7 +8174,10 @@ }, "/saml/acs": { "post": { - "tags": ["saml", "enterprise"], + "tags": [ + "saml", + "enterprise" + ], "summary": "It performs assertion Consumer Service (ACS).", "operationId": "postACS", "parameters": [ @@ -7643,8 +8202,13 @@ }, "/saml/metadata": { "get": { - "produces": ["application/xml;application/samlmetadata+xml"], - "tags": ["saml", "enterprise"], + "produces": [ + "application/xml;application/samlmetadata+xml" + ], + "tags": [ + "saml", + "enterprise" + ], "summary": "It exposes the SP (Grafana's) metadata for the IdP's consumption.", "operationId": "getMetadata", "responses": { @@ -7655,9 +8219,35 @@ } }, "/saml/slo": { + "get": { + "description": "There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.", + "tags": [ + "saml", + "enterprise" + ], + "summary": "It performs Single Logout (SLO) callback.", + "operationId": "getSLO", + "responses": { + "302": { + "description": "(empty)" + }, + "400": { + "$ref": "#/responses/badRequestError" + }, + "403": { + "$ref": "#/responses/forbiddenError" + }, + "500": { + "$ref": "#/responses/internalServerError" + } + } + }, "post": { "description": "There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.", - "tags": ["saml", "enterprise"], + "tags": [ + "saml", + "enterprise" + ], "summary": "It performs Single Logout (SLO) callback.", "operationId": "postSLO", "parameters": [ @@ -7690,7 +8280,9 @@ }, "/search": { "get": { - "tags": ["search"], + "tags": [ + "search" + ], "operationId": "search", "parameters": [ { @@ -7710,7 +8302,10 @@ "in": "query" }, { - "enum": ["dash-folder", "dash-db"], + "enum": [ + "dash-folder", + "dash-db" + ], "type": "string", "description": "Type to search for, dash-folder or dash-db", "name": "type", @@ -7766,7 +8361,10 @@ "in": "query" }, { - "enum": ["Edit", "View"], + "enum": [ + "Edit", + "View" + ], "type": "string", "default": "View", "description": "Set to `Edit` to return dashboards/folders that the user can edit", @@ -7774,7 +8372,10 @@ "in": "query" }, { - "enum": ["alpha-asc", "alpha-desc"], + "enum": [ + "alpha-asc", + "alpha-desc" + ], "type": "string", "default": "alpha-asc", "description": "Sort method; for listing all the possible sort methods use the search sorting endpoint.", @@ -7801,7 +8402,9 @@ "/search/sorting": { "get": { "description": "List search sorting options", - "tags": ["search"], + "tags": [ + "search" + ], "operationId": "listSortOptions", "responses": { "200": { @@ -7816,7 +8419,9 @@ "/serviceaccounts": { "post": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:*`\n\nRequires basic authentication and that the authenticated user is a Grafana Admin.", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "Create service account", "operationId": "createServiceAccount", "parameters": [ @@ -7850,7 +8455,9 @@ "/serviceaccounts/search": { "get": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:read` scope: `serviceaccounts:*`", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "Search service accounts with paging", "operationId": "searchOrgServiceAccountsWithPaging", "parameters": [ @@ -7904,7 +8511,9 @@ "/serviceaccounts/{serviceAccountId}": { "get": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:read` scope: `serviceaccounts:id:1` (single service account)", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "Get single serviceaccount by Id", "operationId": "retrieveServiceAccount", "parameters": [ @@ -7939,7 +8548,9 @@ }, "delete": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:delete` scope: `serviceaccounts:id:1` (single service account)", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "Delete service account", "operationId": "deleteServiceAccount", "parameters": [ @@ -7971,7 +8582,9 @@ }, "patch": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account)", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "Update service account", "operationId": "updateServiceAccount", "parameters": [ @@ -8015,7 +8628,9 @@ "/serviceaccounts/{serviceAccountId}/tokens": { "get": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:read` scope: `global:serviceaccounts:id:1` (single service account)\n\nRequires basic authentication and that the authenticated user is a Grafana Admin.", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "Get service account tokens", "operationId": "listTokens", "parameters": [ @@ -8047,7 +8662,9 @@ }, "post": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account)", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "CreateNewToken adds a token to a service account", "operationId": "createToken", "parameters": [ @@ -8094,7 +8711,9 @@ "/serviceaccounts/{serviceAccountId}/tokens/{tokenId}": { "delete": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account)\n\nRequires basic authentication and that the authenticated user is a Grafana Admin.", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "DeleteToken deletes service account tokens", "operationId": "deleteToken", "parameters": [ @@ -8137,7 +8756,9 @@ }, "/snapshot/shared-options": { "get": { - "tags": ["snapshots"], + "tags": [ + "snapshots" + ], "summary": "Get snapshot sharing settings.", "operationId": "getSharingOptions", "responses": { @@ -8153,7 +8774,9 @@ "/snapshots": { "post": { "description": "Snapshot public mode should be enabled or authentication is required.", - "tags": ["snapshots"], + "tags": [ + "snapshots" + ], "summary": "When creating a snapshot using the API, you have to provide the full dashboard payload including the snapshot data. This endpoint is designed for the Grafana UI.", "operationId": "createDashboardSnapshot", "parameters": [ @@ -8185,7 +8808,9 @@ "/snapshots-delete/{deleteKey}": { "get": { "description": "Snapshot public mode should be enabled or authentication is required.", - "tags": ["snapshots"], + "tags": [ + "snapshots" + ], "summary": "Delete Snapshot by deleteKey.", "operationId": "deleteDashboardSnapshotByDeleteKey", "parameters": [ @@ -8217,7 +8842,9 @@ }, "/snapshots/{key}": { "get": { - "tags": ["snapshots"], + "tags": [ + "snapshots" + ], "summary": "Get Snapshot by Key.", "operationId": "getDashboardSnapshot", "parameters": [ @@ -8241,7 +8868,9 @@ } }, "delete": { - "tags": ["snapshots"], + "tags": [ + "snapshots" + ], "summary": "Delete Snapshot by Key.", "operationId": "deleteDashboardSnapshot", "parameters": [ @@ -8270,7 +8899,9 @@ }, "/teams": { "post": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Add Team.", "operationId": "createTeam", "parameters": [ @@ -8304,7 +8935,9 @@ }, "/teams/search": { "get": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Team Search With Paging.", "operationId": "searchTeams", "parameters": [ @@ -8353,7 +8986,10 @@ }, "/teams/{teamId}/groups": { "get": { - "tags": ["sync_team_groups", "enterprise"], + "tags": [ + "sync_team_groups", + "enterprise" + ], "summary": "Get External Groups.", "operationId": "getTeamGroupsApi", "parameters": [ @@ -8387,7 +9023,10 @@ } }, "post": { - "tags": ["sync_team_groups", "enterprise"], + "tags": [ + "sync_team_groups", + "enterprise" + ], "summary": "Add External Group.", "operationId": "addTeamGroupApi", "parameters": [ @@ -8431,7 +9070,10 @@ }, "/teams/{teamId}/groups/{groupId}": { "delete": { - "tags": ["sync_team_groups", "enterprise"], + "tags": [ + "sync_team_groups", + "enterprise" + ], "summary": "Remove External Group.", "operationId": "removeTeamGroupApi", "parameters": [ @@ -8473,7 +9115,9 @@ }, "/teams/{team_id}": { "get": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Get Team By ID.", "operationId": "getTeamByID", "parameters": [ @@ -8503,7 +9147,9 @@ } }, "put": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Update Team.", "operationId": "updateTeam", "parameters": [ @@ -8544,7 +9190,9 @@ } }, "delete": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Delete Team By ID.", "operationId": "deleteTeamByID", "parameters": [ @@ -8576,7 +9224,9 @@ }, "/teams/{team_id}/members": { "get": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Get Team Members.", "operationId": "getTeamMembers", "parameters": [ @@ -8606,7 +9256,9 @@ } }, "post": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Add Team Member.", "operationId": "addTeamMember", "parameters": [ @@ -8646,7 +9298,9 @@ }, "/teams/{team_id}/members/{user_id}": { "put": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Update Team Member.", "operationId": "updateTeamMember", "parameters": [ @@ -8691,7 +9345,9 @@ } }, "delete": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Remove Member From Team.", "operationId": "removeTeamMember", "parameters": [ @@ -8730,7 +9386,9 @@ }, "/teams/{team_id}/preferences": { "get": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Get Team Preferences.", "operationId": "getTeamPreferences", "parameters": [ @@ -8754,7 +9412,9 @@ } }, "put": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Update Team Preferences.", "operationId": "updateTeamPreferences", "parameters": [ @@ -8792,7 +9452,9 @@ "/user": { "get": { "description": "Get (current authenticated user)", - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "operationId": "getSignedInUser", "responses": { "200": { @@ -8813,7 +9475,9 @@ } }, "put": { - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Update signed in User.", "operationId": "updateSignedInUser", "parameters": [ @@ -8846,7 +9510,9 @@ "/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"], + "tags": [ + "signed_in_user" + ], "summary": "Auth tokens of the actual User.", "operationId": "getUserAuthTokens", "responses": { @@ -8867,7 +9533,9 @@ }, "/user/helpflags/clear": { "get": { - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Clear user help flag.", "operationId": "clearHelpFlags", "responses": { @@ -8888,7 +9556,9 @@ }, "/user/helpflags/{flag_id}": { "put": { - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Set user help flag.", "operationId": "setHelpFlag", "parameters": [ @@ -8923,7 +9593,9 @@ } ], "description": "Return a list of all organizations of the current user.", - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Organizations of the actual User.", "operationId": "getSignedInUserOrgList", "responses": { @@ -8950,7 +9622,9 @@ } ], "description": "Changes the password for the user.", - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Change Password.", "operationId": "changeUserPassword", "parameters": [ @@ -8985,7 +9659,9 @@ }, "/user/preferences": { "get": { - "tags": ["user_preferences"], + "tags": [ + "user_preferences" + ], "summary": "Get user preferences.", "operationId": "getUserPreferences", "responses": { @@ -9002,7 +9678,9 @@ }, "put": { "description": "Omitting a key (`theme`, `homeDashboardId`, `timezone`) will cause the current value to be replaced with the system default value.", - "tags": ["user_preferences"], + "tags": [ + "user_preferences" + ], "summary": "Update user preferences.", "operationId": "updateUserPreferences", "parameters": [ @@ -9031,7 +9709,9 @@ } }, "patch": { - "tags": ["user_preferences"], + "tags": [ + "user_preferences" + ], "summary": "Patch user preferences.", "operationId": "patchUserPreferences", "parameters": [ @@ -9062,7 +9742,9 @@ }, "/user/quotas": { "get": { - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Fetch user quota.", "operationId": "getUserQuotas", "responses": { @@ -9087,7 +9769,9 @@ "/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"], + "tags": [ + "signed_in_user" + ], "summary": "Revoke an auth token of the actual User.", "operationId": "revokeUserAuthToken", "parameters": [ @@ -9122,7 +9806,9 @@ "/user/stars/dashboard/{dashboard_id}": { "post": { "description": "Stars the given Dashboard for the actual user.", - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Star a dashboard.", "operationId": "starDashboard", "parameters": [ @@ -9153,7 +9839,9 @@ }, "delete": { "description": "Deletes the starring of the given Dashboard for the actual user.", - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Unstar a dashboard.", "operationId": "unstarDashboard", "parameters": [ @@ -9186,7 +9874,9 @@ "/user/teams": { "get": { "description": "Return a list of all teams that the current user is member of.", - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Teams that the actual User is member of.", "operationId": "getSignedInUserTeamList", "responses": { @@ -9208,7 +9898,9 @@ "/user/using/{org_id}": { "post": { "description": "Switch user context to the given organization.", - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Switch user context for signed in user.", "operationId": "userSetUsingOrg", "parameters": [ @@ -9242,7 +9934,9 @@ "/users": { "get": { "description": "Returns all users that the authenticated user has permission to view, admin permission required.", - "tags": ["users"], + "tags": [ + "users" + ], "summary": "Get users.", "operationId": "searchUsers", "parameters": [ @@ -9281,7 +9975,9 @@ }, "/users/lookup": { "get": { - "tags": ["users"], + "tags": [ + "users" + ], "summary": "Get user by login or email.", "operationId": "getUserByLoginOrEmail", "parameters": [ @@ -9314,7 +10010,9 @@ }, "/users/search": { "get": { - "tags": ["users"], + "tags": [ + "users" + ], "summary": "Get users with paging.", "operationId": "searchUsersWithPaging", "responses": { @@ -9338,7 +10036,9 @@ }, "/users/{user_id}": { "get": { - "tags": ["users"], + "tags": [ + "users" + ], "summary": "Get user by id.", "operationId": "getUserByID", "parameters": [ @@ -9370,7 +10070,9 @@ }, "put": { "description": "Update the user identified by id.", - "tags": ["users"], + "tags": [ + "users" + ], "summary": "Update user.", "operationId": "updateUser", "parameters": [ @@ -9413,7 +10115,9 @@ "/users/{user_id}/orgs": { "get": { "description": "Get organizations for user identified by id.", - "tags": ["users"], + "tags": [ + "users" + ], "summary": "Get organizations for user.", "operationId": "getUserOrgList", "parameters": [ @@ -9447,7 +10151,9 @@ "/users/{user_id}/teams": { "get": { "description": "Get teams for user identified by id.", - "tags": ["users"], + "tags": [ + "users" + ], "summary": "Get teams for user.", "operationId": "getUserTeams", "parameters": [ @@ -9528,7 +10234,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] }, "secondsToLive": { "type": "integer", @@ -9541,7 +10251,12 @@ "properties": { "builtInRole": { "type": "string", - "enum": ["Viewer", " Editor", " Admin", " Grafana Admin"] + "enum": [ + "Viewer", + " Editor", + " Admin", + " Grafana Admin" + ] }, "global": { "description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to create organization local assignment. Refer to the Built-in role assignments for more information.", @@ -9611,7 +10326,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] }, "sendEmail": { "type": "boolean" @@ -9626,7 +10345,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] } } }, @@ -9849,7 +10572,12 @@ "Alert": { "type": "object", "title": "Alert has info for an alert.", - "required": ["labels", "annotations", "state", "value"], + "required": [ + "labels", + "annotations", + "state", + "value" + ], "properties": { "activeAt": { "type": "string", @@ -9872,7 +10600,9 @@ "AlertDiscovery": { "type": "object", "title": "AlertDiscovery has info for all active alerts.", - "required": ["alerts"], + "required": [ + "alerts" + ], "properties": { "alerts": { "type": "array", @@ -10069,7 +10799,9 @@ }, "AlertResponse": { "type": "object", - "required": ["status"], + "required": [ + "status" + ], "properties": { "data": { "$ref": "#/definitions/AlertDiscovery" @@ -10109,7 +10841,11 @@ }, "ExecErrState": { "type": "string", - "enum": ["Alerting", "Error", "OK"] + "enum": [ + "Alerting", + "Error", + "OK" + ] }, "For": { "$ref": "#/definitions/Duration" @@ -10133,7 +10869,11 @@ }, "NoDataState": { "type": "string", - "enum": ["Alerting", "NoData", "OK"] + "enum": [ + "Alerting", + "NoData", + "OK" + ] }, "OrgID": { "type": "integer", @@ -10281,7 +11021,15 @@ "AlertingRule": { "description": "adapted from cortex", "type": "object", - "required": ["name", "query", "health", "type", "state", "annotations", "alerts"], + "required": [ + "name", + "query", + "health", + "type", + "state", + "annotations", + "alerts" + ], "properties": { "alerts": { "type": "array", @@ -10372,7 +11120,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] } } }, @@ -10703,7 +11455,9 @@ }, "CreateDashboardSnapshotCommand": { "type": "object", - "required": ["dashboard"], + "required": [ + "dashboard" + ], "properties": { "Result": { "$ref": "#/definitions/DashboardSnapshot" @@ -10764,7 +11518,10 @@ "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] + "enum": [ + 1, + 2 + ] }, "model": { "description": "The JSON model for the library element.", @@ -10861,7 +11618,9 @@ "CreateQueryInQueryHistoryCommand": { "description": "CreateQueryInQueryHistoryCommand is the command for adding query history", "type": "object", - "required": ["queries"], + "required": [ + "queries" + ], "properties": { "datasourceUid": { "description": "UID of the data source for which are queries stored.", @@ -10922,7 +11681,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"], + "enum": [ + "Viewer", + "Editor", + "Admin" + ], "example": "Admin" } } @@ -11014,7 +11777,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] }, "slug": { "type": "string" @@ -11068,7 +11835,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] }, "teamId": { "type": "integer", @@ -11688,7 +12459,9 @@ }, "DiscoveryBase": { "type": "object", - "required": ["status"], + "required": [ + "status" + ], "properties": { "error": { "type": "string" @@ -11769,7 +12542,10 @@ "EmbeddedContactPoint": { "description": "EmbeddedContactPoint is the contact point type that is used\nby grafanas embedded alertmanager implementation.", "type": "object", - "required": ["type", "settings"], + "required": [ + "type", + "settings" + ], "properties": { "disableResolveMessage": { "type": "boolean", @@ -11820,7 +12596,9 @@ }, "ErrorResponseBody": { "type": "object", - "required": ["message"], + "required": [ + "message" + ], "properties": { "error": { "description": "Error An optional detailed description of the actual error. Only included if running in developer mode.", @@ -12469,7 +13247,11 @@ }, "exec_err_state": { "type": "string", - "enum": ["OK", "Alerting", "Error"] + "enum": [ + "OK", + "Alerting", + "Error" + ] }, "id": { "type": "integer", @@ -12488,7 +13270,11 @@ }, "no_data_state": { "type": "string", - "enum": ["Alerting", "NoData", "OK"] + "enum": [ + "Alerting", + "NoData", + "OK" + ] }, "orgId": { "type": "integer", @@ -12527,7 +13313,11 @@ }, "alertmanagersChoice": { "type": "string", - "enum": ["all", "internal", "external"] + "enum": [ + "all", + "internal", + "external" + ] } } }, @@ -12556,7 +13346,12 @@ }, "GettableStatus": { "type": "object", - "required": ["cluster", "config", "uptime", "versionInfo"], + "required": [ + "cluster", + "config", + "uptime", + "versionInfo" + ], "properties": { "cluster": { "$ref": "#/definitions/clusterStatus" @@ -13388,7 +14183,11 @@ }, "MetricRequest": { "type": "object", - "required": ["from", "to", "queries"], + "required": [ + "from", + "to", + "queries" + ], "properties": { "debug": { "type": "boolean" @@ -13917,7 +14716,10 @@ "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] + "enum": [ + 1, + 2 + ] }, "model": { "description": "The JSON model for the library element.", @@ -13960,11 +14762,17 @@ }, "theme": { "type": "string", - "enum": ["light", "dark"] + "enum": [ + "light", + "dark" + ] }, "timezone": { "type": "string", - "enum": ["utc", "browser"] + "enum": [ + "utc", + "browser" + ] }, "weekStart": { "type": "string" @@ -14391,11 +15199,19 @@ }, "exec_err_state": { "type": "string", - "enum": ["OK", "Alerting", "Error"] + "enum": [ + "OK", + "Alerting", + "Error" + ] }, "no_data_state": { "type": "string", - "enum": ["Alerting", "NoData", "OK"] + "enum": [ + "Alerting", + "NoData", + "OK" + ] }, "title": { "type": "string" @@ -14416,7 +15232,11 @@ }, "alertmanagersChoice": { "type": "string", - "enum": ["all", "internal", "external"] + "enum": [ + "all", + "internal", + "external" + ] } } }, @@ -14537,7 +15357,10 @@ "conditions": [ { "evaluator": { - "params": [0, 0], + "params": [ + 0, + 0 + ], "type": "gt" }, "operator": { @@ -14575,7 +15398,11 @@ }, "execErrState": { "type": "string", - "enum": ["Alerting", "Error", "OK"] + "enum": [ + "Alerting", + "Error", + "OK" + ] }, "folderUID": { "type": "string", @@ -14599,7 +15426,11 @@ }, "noDataState": { "type": "string", - "enum": ["Alerting", "NoData", "OK"] + "enum": [ + "Alerting", + "NoData", + "OK" + ] }, "orgID": { "type": "integer", @@ -15197,7 +16028,12 @@ "Rule": { "description": "adapted from cortex", "type": "object", - "required": ["name", "query", "health", "type"], + "required": [ + "name", + "query", + "health", + "type" + ], "properties": { "evaluationTime": { "type": "number", @@ -15229,7 +16065,9 @@ }, "RuleDiscovery": { "type": "object", - "required": ["groups"], + "required": [ + "groups" + ], "properties": { "groups": { "type": "array", @@ -15241,7 +16079,12 @@ }, "RuleGroup": { "type": "object", - "required": ["name", "file", "rules", "interval"], + "required": [ + "name", + "file", + "rules", + "interval" + ], "properties": { "evaluationTime": { "type": "number", @@ -15295,7 +16138,9 @@ }, "RuleResponse": { "type": "object", - "required": ["status"], + "required": [ + "status" + ], "properties": { "data": { "$ref": "#/definitions/RuleDiscovery" @@ -16090,7 +16935,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] }, "status": { "$ref": "#/definitions/TempUserStatus" @@ -16717,7 +17566,11 @@ "properties": { "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] } } }, @@ -16764,11 +17617,17 @@ }, "theme": { "type": "string", - "enum": ["light", "dark"] + "enum": [ + "light", + "dark" + ] }, "timezone": { "type": "string", - "enum": ["utc", "browser"] + "enum": [ + "utc", + "browser" + ] }, "weekStart": { "type": "string" @@ -16819,7 +17678,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] } } }, @@ -16914,7 +17777,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] } } }, @@ -17253,7 +18120,9 @@ "alert": { "description": "Alert alert", "type": "object", - "required": ["labels"], + "required": [ + "labels" + ], "properties": { "generatorURL": { "description": "generator URL\nFormat: uri", @@ -17268,7 +18137,11 @@ "alertGroup": { "description": "AlertGroup alert group", "type": "object", - "required": ["alerts", "labels", "receiver"], + "required": [ + "alerts", + "labels", + "receiver" + ], "properties": { "alerts": { "description": "alerts", @@ -17294,7 +18167,11 @@ "alertStatus": { "description": "AlertStatus alert status", "type": "object", - "required": ["inhibitedBy", "silencedBy", "state"], + "required": [ + "inhibitedBy", + "silencedBy", + "state" + ], "properties": { "inhibitedBy": { "description": "inhibited by", @@ -17313,14 +18190,18 @@ "state": { "description": "state", "type": "string", - "enum": ["[unprocessed active suppressed]"] + "enum": [ + "[unprocessed active suppressed]" + ] } } }, "alertmanagerConfig": { "description": "AlertmanagerConfig alertmanager config", "type": "object", - "required": ["original"], + "required": [ + "original" + ], "properties": { "original": { "description": "original", @@ -17331,7 +18212,12 @@ "alertmanagerStatus": { "description": "AlertmanagerStatus alertmanager status", "type": "object", - "required": ["cluster", "config", "uptime", "versionInfo"], + "required": [ + "cluster", + "config", + "uptime", + "versionInfo" + ], "properties": { "cluster": { "$ref": "#/definitions/clusterStatus" @@ -17352,7 +18238,9 @@ "clusterStatus": { "description": "ClusterStatus cluster status", "type": "object", - "required": ["status"], + "required": [ + "status" + ], "properties": { "name": { "description": "name", @@ -17368,7 +18256,9 @@ "status": { "description": "status", "type": "string", - "enum": ["[ready settling disabled]"] + "enum": [ + "[ready settling disabled]" + ] } } }, @@ -17378,7 +18268,16 @@ "gettableAlert": { "description": "GettableAlert gettable alert", "type": "object", - "required": ["labels", "annotations", "endsAt", "fingerprint", "receivers", "startsAt", "status", "updatedAt"], + "required": [ + "labels", + "annotations", + "endsAt", + "fingerprint", + "receivers", + "startsAt", + "status", + "updatedAt" + ], "properties": { "annotations": { "$ref": "#/definitions/labelSet" @@ -17431,7 +18330,16 @@ }, "gettableSilence": { "type": "object", - "required": ["comment", "createdBy", "endsAt", "matchers", "startsAt", "id", "status", "updatedAt"], + "required": [ + "comment", + "createdBy", + "endsAt", + "matchers", + "startsAt", + "id", + "status", + "updatedAt" + ], "properties": { "comment": { "description": "comment", @@ -17485,7 +18393,11 @@ "matcher": { "description": "Matcher matcher", "type": "object", - "required": ["isRegex", "name", "value"], + "required": [ + "isRegex", + "name", + "value" + ], "properties": { "isEqual": { "description": "is equal", @@ -17523,7 +18435,10 @@ "peerStatus": { "description": "PeerStatus peer status", "type": "object", - "required": ["address", "name"], + "required": [ + "address", + "name" + ], "properties": { "address": { "description": "address", @@ -17538,7 +18453,9 @@ "postableAlert": { "description": "PostableAlert postable alert", "type": "object", - "required": ["labels"], + "required": [ + "labels" + ], "properties": { "annotations": { "$ref": "#/definitions/labelSet" @@ -17573,7 +18490,13 @@ "postableSilence": { "description": "PostableSilence postable silence", "type": "object", - "required": ["comment", "createdBy", "endsAt", "matchers", "startsAt"], + "required": [ + "comment", + "createdBy", + "endsAt", + "matchers", + "startsAt" + ], "properties": { "comment": { "description": "comment", @@ -17604,7 +18527,9 @@ }, "receiver": { "type": "object", - "required": ["name"], + "required": [ + "name" + ], "properties": { "name": { "description": "name", @@ -17615,7 +18540,13 @@ "silence": { "description": "Silence silence", "type": "object", - "required": ["comment", "createdBy", "endsAt", "matchers", "startsAt"], + "required": [ + "comment", + "createdBy", + "endsAt", + "matchers", + "startsAt" + ], "properties": { "comment": { "description": "comment", @@ -17643,19 +18574,30 @@ "silenceStatus": { "description": "SilenceStatus silence status", "type": "object", - "required": ["state"], + "required": [ + "state" + ], "properties": { "state": { "description": "state", "type": "string", - "enum": ["[expired active pending]"] + "enum": [ + "[expired active pending]" + ] } } }, "versionInfo": { "description": "VersionInfo version info", "type": "object", - "required": ["branch", "buildDate", "buildUser", "goVersion", "revision", "version"], + "required": [ + "branch", + "buildDate", + "buildUser", + "goVersion", + "revision", + "version" + ], "properties": { "branch": { "description": "branch", @@ -17805,7 +18747,12 @@ "description": "(empty)", "schema": { "type": "object", - "required": ["id", "name", "message", "datasource"], + "required": [ + "id", + "name", + "message", + "datasource" + ], "properties": { "datasource": { "$ref": "#/definitions/DataSource" @@ -17833,7 +18780,10 @@ "description": "(empty)", "schema": { "type": "object", - "required": ["orgId", "message"], + "required": [ + "orgId", + "message" + ], "properties": { "message": { "description": "Message Message of the created org.", @@ -17928,7 +18878,10 @@ "description": "(empty)", "schema": { "type": "object", - "required": ["id", "message"], + "required": [ + "id", + "message" + ], "properties": { "id": { "description": "ID Identifier of the deleted notification channel.", @@ -17953,7 +18906,11 @@ "description": "(empty)", "schema": { "type": "object", - "required": ["id", "title", "message"], + "required": [ + "id", + "title", + "message" + ], "properties": { "id": { "description": "ID Identifier of the deleted dashboard.", @@ -17978,7 +18935,10 @@ "description": "(empty)", "schema": { "type": "object", - "required": ["id", "message"], + "required": [ + "id", + "message" + ], "properties": { "id": { "description": "ID Identifier of the deleted data source.", @@ -17998,7 +18958,11 @@ "description": "(empty)", "schema": { "type": "object", - "required": ["id", "title", "message"], + "required": [ + "id", + "title", + "message" + ], "properties": { "id": { "description": "ID Identifier of the deleted folder.", @@ -18176,7 +19140,9 @@ "description": "(empty)", "schema": { "type": "object", - "required": ["id"], + "required": [ + "id" + ], "properties": { "id": { "description": "ID Identifier of the data source.", @@ -18576,7 +19542,10 @@ "description": "(empty)", "schema": { "type": "object", - "required": ["alertId", "message"], + "required": [ + "alertId", + "message" + ], "properties": { "alertId": { "type": "integer", @@ -18596,7 +19565,10 @@ "description": "(empty)", "schema": { "type": "object", - "required": ["alertsAffected", "message"], + "required": [ + "alertsAffected", + "message" + ], "properties": { "alertsAffected": { "description": "AlertsAffected is the number of the affected alerts.", @@ -18623,7 +19595,10 @@ "description": "(empty)", "schema": { "type": "object", - "required": ["id", "message"], + "required": [ + "id", + "message" + ], "properties": { "id": { "description": "ID Identifier of the created annotation.", @@ -18642,7 +19617,14 @@ "description": "(empty)", "schema": { "type": "object", - "required": ["status", "title", "version", "id", "uid", "url"], + "required": [ + "status", + "title", + "version", + "id", + "uid", + "url" + ], "properties": { "id": { "description": "ID The unique identifier (id) of the created/updated dashboard.", @@ -18931,4 +19913,4 @@ "name": "service_accounts" } ] -} +} \ No newline at end of file diff --git a/public/api-spec.json b/public/api-spec.json index 9957b5cd237..91ee58cd8e7 100644 --- a/public/api-spec.json +++ b/public/api-spec.json @@ -1,7 +1,14 @@ { - "consumes": ["application/json"], - "produces": ["application/json"], - "schemes": ["http", "https"], + "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.", @@ -22,7 +29,10 @@ "/access-control/builtin-roles": { "get": { "description": "You need to have a permission with action `roles.builtin:list` with scope `roles:*`.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Get all built-in role assignments.", "operationId": "listBuiltinRoles", "responses": { @@ -39,7 +49,10 @@ }, "post": { "description": "You need to have a permission with action `roles.builtin:add` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create built-in role assignments with the roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to create a built-in role assignment which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Create a built-in role assignment.", "operationId": "addBuiltinRole", "parameters": [ @@ -71,7 +84,10 @@ "/access-control/builtin-roles/{builtinRole}/roles/{roleUID}": { "delete": { "description": "Deletes a built-in role assignment (for one of Viewer, Editor, Admin, or Grafana Admin) to the role with the provided UID.\n\nYou need to have a permission with action `roles.builtin:remove` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only remove built-in role assignments with the roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to remove a built-in role assignment which allows to do that.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Remove a built-in role assignment.", "operationId": "removeBuiltinRole", "parameters": [ @@ -116,7 +132,10 @@ "/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"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Get all roles.", "operationId": "listRoles", "parameters": [ @@ -140,7 +159,10 @@ }, "post": { "description": "Creates a new custom role and maps given permissions to that role. Note that roles with the same prefix as Fixed Roles can’t be created.\n\nYou need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate`` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.\nFor example, if a user does not have required permissions for creating users, they won’t be able to create a custom role which allows to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Create a new custom role.", "operationId": "createRole", "parameters": [ @@ -172,7 +194,10 @@ "/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"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Get a role.", "operationId": "getRole", "parameters": [ @@ -197,7 +222,10 @@ }, "put": { "description": "You need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate`` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Update a custom role.", "operationId": "updateRoleWithPermissions", "parameters": [ @@ -236,7 +264,10 @@ }, "delete": { "description": "Delete a role with the given UID, and it’s permissions. If the role is assigned to a built-in role, the deletion operation will fail, unless force query param is set to true, and in that case all assignments will also be deleted.\n\nYou need to have a permission with action `roles:delete` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only delete a custom role with the same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to delete a custom role which allows to do that.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Delete a custom role.", "operationId": "deleteCustomRole", "parameters": [ @@ -276,7 +307,10 @@ "/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"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Get status.", "operationId": "getAccessControlStatus", "responses": { @@ -298,7 +332,10 @@ "/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"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Get team roles.", "operationId": "listTeamRoles", "parameters": [ @@ -327,7 +364,10 @@ }, "put": { "description": "You need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate` for each.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Update team role.", "operationId": "setTeamRoles", "parameters": [ @@ -359,7 +399,10 @@ }, "post": { "description": "You need to have a permission with action `teams.roles:add` and scope `permissions:type:delegate`.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Add team role.", "operationId": "addTeamRole", "parameters": [ @@ -401,7 +444,10 @@ "/access-control/teams/{teamId}/roles/{roleUID}": { "delete": { "description": "You need to have a permission with action `teams.roles:remove` and scope `permissions:type:delegate`.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Remove team role.", "operationId": "removeTeamRole", "parameters": [ @@ -441,7 +487,10 @@ "/access-control/users/{userId}/roles": { "get": { "description": "Lists the roles that have been directly assigned to a given user. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:list` and scope `users:id:\u003cuser ID\u003e`.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "List roles assigned to a user.", "operationId": "listUserRoles", "parameters": [ @@ -470,7 +519,10 @@ }, "put": { "description": "Update the user’s role assignments to match the provided set of UIDs. This will remove any assigned roles that aren’t in the request and add roles that are in the set but are not already assigned to the user.\nIf you want to add or remove a single role, consider using Add a user role assignment or Remove a user role assignment instead.\n\nYou need to have a permission with action `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate` for each. `permissions:type:delegate` scope ensures that users can only assign or unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign or unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Set user role assignments.", "operationId": "setUserRoles", "parameters": [ @@ -510,7 +562,10 @@ }, "post": { "description": "Assign a role to a specific user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:add` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only assign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Add a user role assignment.", "operationId": "addUserRole", "parameters": [ @@ -549,7 +604,10 @@ "/access-control/users/{userId}/roles/{roleUID}": { "delete": { "description": "Revoke a role from a user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:remove` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], + "tags": [ + "access_control", + "enterprise" + ], "summary": "Remove a user role assignment.", "operationId": "removeUserRole", "parameters": [ @@ -595,7 +653,9 @@ "/admin/ldap-sync-status": { "get": { "description": "You need to have a permission with action `ldap.status:read`.", - "tags": ["ldap_debug"], + "tags": [ + "ldap_debug" + ], "summary": "Returns the current state of the LDAP background sync integration", "operationId": "getSyncStatus", "responses": { @@ -622,7 +682,9 @@ } ], "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"], + "tags": [ + "admin_ldap" + ], "summary": "Reloads the LDAP configuration.", "operationId": "reloadLDAPCfg", "responses": { @@ -649,7 +711,9 @@ } ], "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"], + "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": { @@ -676,7 +740,9 @@ } ], "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"], + "tags": [ + "admin_ldap" + ], "summary": "Enables a single Grafana user to be synchronized against LDAP.", "operationId": "postSyncUserWithLDAP", "parameters": [ @@ -712,7 +778,9 @@ } ], "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"], + "tags": [ + "admin_ldap" + ], "summary": "Finds an user based on a username in LDAP. This helps illustrate how would the particular user be mapped in Grafana when synced.", "operationId": "getUserFromLDAP", "parameters": [ @@ -746,7 +814,9 @@ "basic": [] } ], - "tags": ["admin"], + "tags": [ + "admin" + ], "summary": "Pause/unpause all (legacy) alerts.", "operationId": "pauseAllAlerts", "parameters": [ @@ -777,7 +847,10 @@ }, "/admin/provisioning/access-control/reload": { "post": { - "tags": ["access_control_provisioning", "enterprise"], + "tags": [ + "access_control_provisioning", + "enterprise" + ], "summary": "You need to have a permission with action `provisioning:reload` with scope `provisioners:accesscontrol`.", "operationId": "adminProvisioningReloadAccessControl", "responses": { @@ -801,7 +874,9 @@ } ], "description": "Reloads the provisioning config files for dashboards again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:dashboards`.", - "tags": ["admin_provisioning"], + "tags": [ + "admin_provisioning" + ], "summary": "Reload dashboard provisioning configurations.", "operationId": "adminProvisioningReloadDashboards", "responses": { @@ -828,7 +903,9 @@ } ], "description": "Reloads the provisioning config files for datasources again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:datasources`.", - "tags": ["admin_provisioning"], + "tags": [ + "admin_provisioning" + ], "summary": "Reload datasource provisioning configurations.", "operationId": "adminProvisioningReloadDatasources", "responses": { @@ -855,7 +932,9 @@ } ], "description": "Reloads the provisioning config files for legacy alert notifiers again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:notifications`.", - "tags": ["admin_provisioning"], + "tags": [ + "admin_provisioning" + ], "summary": "Reload legacy alert notifier provisioning configurations.", "operationId": "adminProvisioningReloadNotifications", "responses": { @@ -882,7 +961,9 @@ } ], "description": "Reloads the provisioning config files for plugins again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:plugin`.", - "tags": ["admin_provisioning"], + "tags": [ + "admin_provisioning" + ], "summary": "Reload plugin provisioning configurations.", "operationId": "adminProvisioningReloadPlugins", "responses": { @@ -909,7 +990,9 @@ } ], "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"], + "tags": [ + "admin" + ], "summary": "Fetch settings.", "operationId": "adminGetSettings", "responses": { @@ -928,7 +1011,9 @@ "/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"], + "tags": [ + "admin" + ], "summary": "Fetch Grafana Stats.", "operationId": "adminGetStats", "responses": { @@ -955,7 +1040,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Create new user.", "operationId": "adminCreateUser", "parameters": [ @@ -998,7 +1085,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Delete global User.", "operationId": "adminDeleteUser", "parameters": [ @@ -1037,7 +1126,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Return a list of all auth tokens (devices) that the user currently have logged in from.", "operationId": "adminGetUserAuthTokens", "parameters": [ @@ -1073,7 +1164,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Disable user.", "operationId": "adminDisableUser", "parameters": [ @@ -1112,7 +1205,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Enable user.", "operationId": "adminEnableUser", "parameters": [ @@ -1151,7 +1246,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Logout user revokes all auth tokens (devices) for the user. User of issued auth tokens (devices) will no longer be logged in and will be required to authenticate again upon next activity.", "operationId": "adminLogoutUser", "parameters": [ @@ -1193,7 +1290,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Set password for user.", "operationId": "adminUpdateUserPassword", "parameters": [ @@ -1235,7 +1334,9 @@ "/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"], + "tags": [ + "admin_users" + ], "summary": "Set permissions for user.", "operationId": "adminUpdateUserPermissions", "parameters": [ @@ -1282,7 +1383,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Fetch user quota.", "operationId": "getUserQuota", "parameters": [ @@ -1321,7 +1424,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Update user quota.", "operationId": "updateUserQuota", "parameters": [ @@ -1374,7 +1479,9 @@ } ], "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"], + "tags": [ + "admin_users" + ], "summary": "Revoke auth token for user.", "operationId": "adminRevokeUserAuthToken", "parameters": [ @@ -1419,7 +1526,9 @@ "/alert-notifications": { "get": { "description": "Returns all notification channels that the authenticated user has permission to view.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Get all notification channels.", "operationId": "getAlertNotificationChannels", "responses": { @@ -1439,7 +1548,9 @@ }, "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"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Create notification channel.", "operationId": "createAlertNotificationChannel", "parameters": [ @@ -1474,7 +1585,9 @@ "/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"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Get all notification channels (lookup)", "operationId": "getAlertNotificationLookup", "responses": { @@ -1496,7 +1609,9 @@ "/alert-notifications/test": { "post": { "description": "Sends a test notification to the channel.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Test notification channel.", "operationId": "notificationChannelTest", "parameters": [ @@ -1534,7 +1649,9 @@ "/alert-notifications/uid/{notification_channel_uid}": { "get": { "description": "Returns the notification channel given the notification channel UID.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Get notification channel by UID", "operationId": "getAlertNotificationChannelByUID", "parameters": [ @@ -1565,7 +1682,9 @@ }, "put": { "description": "Updates an existing notification channel identified by uid.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Update notification channel by UID.", "operationId": "updateAlertNotificationChannelByUID", "parameters": [ @@ -1604,7 +1723,9 @@ }, "delete": { "description": "Deletes an existing notification channel identified by UID.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Delete alert notification by UID.", "operationId": "deleteAlertNotificationChannelByUID", "parameters": [ @@ -1637,7 +1758,9 @@ "/alert-notifications/{notification_channel_id}": { "get": { "description": "Returns the notification channel given the notification channel ID.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Get notification channel by ID.", "operationId": "getAlertNotificationChannelByID", "parameters": [ @@ -1669,7 +1792,9 @@ }, "put": { "description": "Updates an existing notification channel identified by ID.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Update notification channel by ID.", "operationId": "updateAlertNotificationChannel", "parameters": [ @@ -1709,7 +1834,9 @@ }, "delete": { "description": "Deletes an existing notification channel identified by ID.", - "tags": ["legacy_alerts_notification_channels"], + "tags": [ + "legacy_alerts_notification_channels" + ], "summary": "Delete alert notification by ID.", "operationId": "deleteAlertNotificationChannel", "parameters": [ @@ -1742,7 +1869,9 @@ }, "/alerts": { "get": { - "tags": ["legacy_alerts"], + "tags": [ + "legacy_alerts" + ], "summary": "Get legacy alerts.", "operationId": "getAlerts", "parameters": [ @@ -1769,7 +1898,15 @@ "in": "query" }, { - "enum": ["all", "no_data", "paused", "alerting", "ok", "pending", "unknown"], + "enum": [ + "all", + "no_data", + "paused", + "alerting", + "ok", + "pending", + "unknown" + ], "type": "string", "description": "Return alerts with one or more of the following alert states", "name": "state", @@ -1824,7 +1961,9 @@ }, "/alerts/states-for-dashboard": { "get": { - "tags": ["legacy_alerts"], + "tags": [ + "legacy_alerts" + ], "summary": "Get alert states for a dashboard.", "operationId": "getDashboardStates", "parameters": [ @@ -1851,7 +1990,9 @@ }, "/alerts/test": { "post": { - "tags": ["legacy_alerts"], + "tags": [ + "legacy_alerts" + ], "summary": "Test alert.", "operationId": "testAlert", "parameters": [ @@ -1885,7 +2026,9 @@ "/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"], + "tags": [ + "legacy_alerts" + ], "summary": "Get alert by ID.", "operationId": "getAlertByID", "parameters": [ @@ -1911,7 +2054,9 @@ }, "/alerts/{alert_id}/pause": { "post": { - "tags": ["legacy_alerts"], + "tags": [ + "legacy_alerts" + ], "summary": "Pause/unpause alert by id.", "operationId": "pauseAlert", "parameters": [ @@ -1952,7 +2097,9 @@ "/annotations": { "get": { "description": "Starting in Grafana v6.4 regions annotations are now returned in one entity that now includes the timeEnd property.", - "tags": ["annotations"], + "tags": [ + "annotations" + ], "summary": "Find Annotations.", "operationId": "getAnnotations", "parameters": [ @@ -2022,7 +2169,10 @@ "in": "query" }, { - "enum": ["alert", "annotation"], + "enum": [ + "alert", + "annotation" + ], "type": "string", "description": "Return alerts or user created annotations", "name": "type", @@ -2049,7 +2199,9 @@ }, "post": { "description": "Creates an annotation in the Grafana database. The dashboardId and panelId fields are optional. If they are not specified then an organization annotation is created and can be queried in any dashboard that adds the Grafana annotations data source. When creating a region annotation include the timeEnd property.\nThe format for `time` and `timeEnd` should be epoch numbers in millisecond resolution.\nThe response for this HTTP request is slightly different in versions prior to v6.4. In prior versions you would also get an endId if you where creating a region. But in 6.4 regions are represented using a single event with time and timeEnd properties.", - "tags": ["annotations"], + "tags": [ + "annotations" + ], "summary": "Create Annotation.", "operationId": "postAnnotation", "parameters": [ @@ -2084,7 +2236,9 @@ "/annotations/graphite": { "post": { "description": "Creates an annotation by using Graphite-compatible event format. The `when` and `data` fields are optional. If `when` is not specified then the current time will be used as annotation’s timestamp. The `tags` field can also be in prior to Graphite `0.10.0` format (string with multiple tags being separated by a space).", - "tags": ["annotations"], + "tags": [ + "annotations" + ], "summary": "Create Annotation in Graphite format.", "operationId": "postGraphiteAnnotation", "parameters": [ @@ -2118,7 +2272,9 @@ }, "/annotations/mass-delete": { "post": { - "tags": ["annotations"], + "tags": [ + "annotations" + ], "summary": "Delete multiple annotations.", "operationId": "massDeleteAnnotations", "parameters": [ @@ -2147,7 +2303,9 @@ "/annotations/tags": { "get": { "description": "Find all the event tags created in the annotations.", - "tags": ["annotations"], + "tags": [ + "annotations" + ], "summary": "Find Annotations Tags.", "operationId": "getAnnotationTags", "parameters": [ @@ -2180,7 +2338,9 @@ }, "/annotations/{annotation_id}": { "get": { - "tags": ["annotations"], + "tags": [ + "annotations" + ], "summary": "Get Annotation by Id.", "operationId": "getAnnotationByID", "parameters": [ @@ -2205,7 +2365,9 @@ }, "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"], + "tags": [ + "annotations" + ], "summary": "Update Annotation.", "operationId": "updateAnnotation", "parameters": [ @@ -2244,7 +2406,9 @@ }, "delete": { "description": "Deletes the annotation that matches the specified ID.", - "tags": ["annotations"], + "tags": [ + "annotations" + ], "summary": "Delete Annotation By ID.", "operationId": "deleteAnnotationByID", "parameters": [ @@ -2272,7 +2436,9 @@ }, "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"], + "tags": [ + "annotations" + ], "summary": "Patch Annotation", "operationId": "patchAnnotation", "parameters": [ @@ -2313,7 +2479,9 @@ "/auth/keys": { "get": { "description": "Will return auth keys.", - "tags": ["api_keys"], + "tags": [ + "api_keys" + ], "summary": "Get auth keys.", "operationId": "getAPIkeys", "parameters": [ @@ -2345,7 +2513,9 @@ }, "post": { "description": "Will return details of the created API key", - "tags": ["api_keys"], + "tags": [ + "api_keys" + ], "summary": "Creates an API key.", "operationId": "addAPIkey", "parameters": [ @@ -2382,7 +2552,9 @@ }, "/auth/keys/{id}": { "delete": { - "tags": ["api_keys"], + "tags": [ + "api_keys" + ], "summary": "Delete API key.", "operationId": "deleteAPIkey", "parameters": [ @@ -2415,7 +2587,9 @@ }, "/dashboard/snapshots": { "get": { - "tags": ["snapshots"], + "tags": [ + "snapshots" + ], "summary": "List snapshots.", "operationId": "searchDashboardSnapshots", "parameters": [ @@ -2446,8 +2620,13 @@ }, "/dashboards/calculate-diff": { "post": { - "produces": ["application/json", "text/html"], - "tags": ["dashboards"], + "produces": [ + "application/json", + "text/html" + ], + "tags": [ + "dashboards" + ], "summary": "Perform diff on two dashboards.", "operationId": "calculateDashboardDiff", "parameters": [ @@ -2464,7 +2643,10 @@ "diffType": { "description": "The type of diff to return\nDescription:\n`basic`\n`json`", "type": "string", - "enum": ["basic", "json"] + "enum": [ + "basic", + "json" + ] }, "new": { "$ref": "#/definitions/CalculateDiffTarget" @@ -2492,7 +2674,9 @@ "/dashboards/db": { "post": { "description": "Creates a new dashboard or updates an existing dashboard.", - "tags": ["dashboards"], + "tags": [ + "dashboards" + ], "summary": "Create / Update dashboard", "operationId": "postDashboard", "parameters": [ @@ -2535,7 +2719,9 @@ }, "/dashboards/home": { "get": { - "tags": ["dashboards"], + "tags": [ + "dashboards" + ], "summary": "Get home dashboard.", "operationId": "getHomeDashboard", "responses": { @@ -2554,7 +2740,9 @@ "/dashboards/id/{DashboardID}/permissions": { "get": { "description": "Please refer to [updated API](#/dashboard_permissions/getDashboardPermissionsListByUID) instead", - "tags": ["dashboard_permissions"], + "tags": [ + "dashboard_permissions" + ], "summary": "Gets all existing permissions for the given dashboard.", "operationId": "getDashboardPermissionsListByID", "deprecated": true, @@ -2587,7 +2775,9 @@ }, "post": { "description": "Please refer to [updated API](#/dashboard_permissions/updateDashboardPermissionsByUID) instead\n\nThis operation will remove existing permissions if they’re not included in the request.", - "tags": ["dashboard_permissions"], + "tags": [ + "dashboard_permissions" + ], "summary": "Updates permissions for a dashboard.", "operationId": "updateDashboardPermissionsByID", "deprecated": true, @@ -2633,7 +2823,9 @@ "/dashboards/id/{DashboardID}/restore": { "post": { "description": "Please refer to [updated API](#/dashboard_versions/restoreDashboardVersionByUID) instead", - "tags": ["dashboard_versions"], + "tags": [ + "dashboard_versions" + ], "summary": "Restore a dashboard to a given dashboard version.", "operationId": "restoreDashboardVersionByID", "deprecated": true, @@ -2676,7 +2868,9 @@ "/dashboards/id/{DashboardID}/versions": { "get": { "description": "Please refer to [updated API](#/dashboard_versions/getDashboardVersionsByUID) instead", - "tags": ["dashboard_versions"], + "tags": [ + "dashboard_versions" + ], "summary": "Gets all existing versions for the dashboard.", "operationId": "getDashboardVersionsByID", "deprecated": true, @@ -2711,7 +2905,9 @@ "/dashboards/id/{DashboardID}/versions/{DashboardVersionID}": { "get": { "description": "Please refer to [updated API](#/dashboard_versions/getDashboardVersionByUID) instead", - "tags": ["dashboard_versions"], + "tags": [ + "dashboard_versions" + ], "summary": "Get a specific dashboard version.", "operationId": "getDashboardVersionByID", "deprecated": true, @@ -2752,7 +2948,9 @@ }, "/dashboards/import": { "post": { - "tags": ["dashboards"], + "tags": [ + "dashboards" + ], "summary": "Import dashboard.", "operationId": "importDashboard", "parameters": [ @@ -2789,7 +2987,9 @@ }, "/dashboards/tags": { "get": { - "tags": ["dashboards"], + "tags": [ + "dashboards" + ], "summary": "Get all dashboards tags of an organisation.", "operationId": "getDashboardTags", "responses": { @@ -2807,7 +3007,9 @@ }, "/dashboards/trim": { "post": { - "tags": ["dashboards"], + "tags": [ + "dashboards" + ], "summary": "Trim defaults from dashboard.", "operationId": "trimDashboard", "parameters": [ @@ -2836,7 +3038,9 @@ "/dashboards/uid/{uid}": { "get": { "description": "Will return the dashboard given the dashboard unique identifier (uid).", - "tags": ["dashboards"], + "tags": [ + "dashboards" + ], "summary": "Get dashboard by uid.", "operationId": "getDashboardByUID", "parameters": [ @@ -2867,7 +3071,9 @@ }, "delete": { "description": "Will delete the dashboard given the specified unique identifier (uid).", - "tags": ["dashboards"], + "tags": [ + "dashboards" + ], "summary": "Delete dashboard by uid.", "operationId": "deleteDashboardByUID", "parameters": [ @@ -2899,7 +3105,9 @@ }, "/dashboards/uid/{uid}/permissions": { "get": { - "tags": ["dashboard_permissions"], + "tags": [ + "dashboard_permissions" + ], "summary": "Gets all existing permissions for the given dashboard.", "operationId": "getDashboardPermissionsListByUID", "parameters": [ @@ -2930,7 +3138,9 @@ }, "post": { "description": "This operation will remove existing permissions if they’re not included in the request.", - "tags": ["dashboard_permissions"], + "tags": [ + "dashboard_permissions" + ], "summary": "Updates permissions for a dashboard.", "operationId": "updateDashboardPermissionsByUID", "parameters": [ @@ -2973,7 +3183,9 @@ }, "/dashboards/uid/{uid}/restore": { "post": { - "tags": ["dashboard_versions"], + "tags": [ + "dashboard_versions" + ], "summary": "Restore a dashboard to a given dashboard version using UID.", "operationId": "restoreDashboardVersionByUID", "parameters": [ @@ -3013,7 +3225,9 @@ }, "/dashboards/uid/{uid}/versions": { "get": { - "tags": ["dashboard_versions"], + "tags": [ + "dashboard_versions" + ], "summary": "Gets all existing versions for the dashboard using UID.", "operationId": "getDashboardVersionsByUID", "parameters": [ @@ -3061,7 +3275,9 @@ }, "/dashboards/uid/{uid}/versions/{DashboardVersionID}": { "get": { - "tags": ["dashboard_versions"], + "tags": [ + "dashboard_versions" + ], "summary": "Get a specific dashboard version using UID.", "operationId": "getDashboardVersionByUID", "parameters": [ @@ -3101,7 +3317,9 @@ "/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"], + "tags": [ + "datasources" + ], "summary": "Get all data sources.", "operationId": "getDataSources", "responses": { @@ -3121,7 +3339,9 @@ }, "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"], + "tags": [ + "datasources" + ], "summary": "Create a data source.", "operationId": "addDataSource", "parameters": [ @@ -3156,7 +3376,9 @@ "/datasources/id/{name}": { "get": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Get data source Id by Name.", "operationId": "getDataSourceIdByName", "parameters": [ @@ -3189,7 +3411,9 @@ "/datasources/name/{name}": { "get": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Get a single data source by Name.", "operationId": "getDataSourceByName", "parameters": [ @@ -3217,7 +3441,9 @@ }, "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"], + "tags": [ + "datasources" + ], "summary": "Delete an existing data source by name.", "operationId": "deleteDataSourceByName", "parameters": [ @@ -3250,7 +3476,9 @@ "/datasources/proxy/uid/{uid}/{datasource_proxy_route}": { "get": { "description": "Proxies all calls to the actual data source.", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Data source proxy GET calls.", "operationId": "datasourceProxyGETByUIDcalls", "parameters": [ @@ -3290,7 +3518,9 @@ }, "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"], + "tags": [ + "datasources" + ], "summary": "Data source proxy POST calls.", "operationId": "datasourceProxyPOSTByUIDcalls", "parameters": [ @@ -3341,7 +3571,9 @@ }, "delete": { "description": "Proxies all calls to the actual data source.", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Data source proxy DELETE calls.", "operationId": "datasourceProxyDELETEByUIDcalls", "parameters": [ @@ -3383,7 +3615,9 @@ "/datasources/proxy/{id}/{datasource_proxy_route}": { "get": { "description": "Proxies all calls to the actual data source.\n\nPlease refer to [updated API](#/datasources/datasourceProxyGETByUIDcalls) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Data source proxy GET calls.", "operationId": "datasourceProxyGETcalls", "deprecated": true, @@ -3424,7 +3658,9 @@ }, "post": { "description": "Proxies all calls to the actual data source. The data source should support POST methods for the specific path and role as defined\n\nPlease refer to [updated API](#/datasources/datasourceProxyPOSTByUIDcalls) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Data source proxy POST calls.", "operationId": "datasourceProxyPOSTcalls", "deprecated": true, @@ -3476,7 +3712,9 @@ }, "delete": { "description": "Proxies all calls to the actual data source.\n\nPlease refer to [updated API](#/datasources/datasourceProxyDELETEByUIDcalls) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Data source proxy DELETE calls.", "operationId": "datasourceProxyDELETEcalls", "deprecated": true, @@ -3518,7 +3756,9 @@ }, "/datasources/uid/{sourceUID}/correlations": { "post": { - "tags": ["correlations"], + "tags": [ + "correlations" + ], "summary": "Add correlation.", "operationId": "createCorrelation", "parameters": [ @@ -3562,7 +3802,9 @@ "/datasources/uid/{uid}": { "get": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source).", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Get a single data source by UID.", "operationId": "getDataSourceByUID", "parameters": [ @@ -3596,7 +3838,9 @@ }, "put": { "description": "Similar to creating a data source, `password` and `basicAuthPassword` should be defined under\nsecureJsonData in order to be stored securely as an encrypted blob in the database. Then, the\nencrypted fields are listed under secureJsonFields section in the response.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:1` (single data source).", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Update an existing data source.", "operationId": "updateDataSourceByUID", "parameters": [ @@ -3632,7 +3876,9 @@ }, "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"], + "tags": [ + "datasources" + ], "summary": "Delete an existing data source by UID.", "operationId": "deleteDataSourceByUID", "parameters": [ @@ -3664,7 +3910,9 @@ }, "/datasources/uid/{uid}/correlations/{correlationUID}": { "delete": { - "tags": ["correlations"], + "tags": [ + "correlations" + ], "summary": "Delete a correlation.", "operationId": "deleteCorrelation", "parameters": [ @@ -3702,7 +3950,9 @@ }, "/datasources/uid/{uid}/health": { "get": { - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Sends a health check request to the plugin datasource identified by the UID.", "operationId": "checkDatasourceHealthWithUID", "parameters": [ @@ -3734,7 +3984,9 @@ }, "/datasources/uid/{uid}/resources/{datasource_proxy_route}": { "get": { - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Fetch data source resources.", "operationId": "callDatasourceResourceWithUID", "parameters": [ @@ -3776,7 +4028,10 @@ "/datasources/{datasourceId}/disable-permissions": { "post": { "description": "Disables permissions for the data source with the given id. All existing permissions will be removed and anyone will be able to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], + "tags": [ + "datasource_permissions", + "enterprise" + ], "summary": "Disable permissions for a data source.", "operationId": "disablePermissions", "parameters": [ @@ -3812,7 +4067,10 @@ "/datasources/{datasourceId}/enable-permissions": { "post": { "description": "Enables permissions for the data source with the given id.\nNo one except Org Admins will be able to query the data source until permissions have been added\nwhich permit certain users or teams to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], + "tags": [ + "datasource_permissions", + "enterprise" + ], "summary": "Enable permissions for a data source.", "operationId": "enablePermissions", "parameters": [ @@ -3848,7 +4106,10 @@ "/datasources/{datasourceId}/permissions": { "get": { "description": "Gets all existing permissions for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:read` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], + "tags": [ + "datasource_permissions", + "enterprise" + ], "summary": "Get permissions for a data source.", "operationId": "getAllPermissions", "parameters": [ @@ -3879,7 +4140,10 @@ }, "post": { "description": "You need to have a permission with action `datasources.permissions:read` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], + "tags": [ + "datasource_permissions", + "enterprise" + ], "summary": "Add permissions for a data source.", "operationId": "addPermission", "parameters": [ @@ -3935,7 +4199,10 @@ "/datasources/{datasourceId}/permissions/{permissionId}": { "delete": { "description": "Removes the permission with the given permissionId for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:delete` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], + "tags": [ + "datasource_permissions", + "enterprise" + ], "summary": "Remove permission for a data source.", "operationId": "deletePermissions", "parameters": [ @@ -3971,7 +4238,9 @@ "/datasources/{id}": { "get": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).\n\nPlease refer to [updated API](#/datasources/getDataSourceByUID) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Get a single data source by Id.", "operationId": "getDataSourceByID", "deprecated": true, @@ -4006,7 +4275,9 @@ }, "put": { "description": "Similar to creating a data source, `password` and `basicAuthPassword` should be defined under\nsecureJsonData in order to be stored securely as an encrypted blob in the database. Then, the\nencrypted fields are listed under secureJsonFields section in the response.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).\n\nPlease refer to [updated API](#/datasources/updateDataSourceByUID) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Update an existing data source by its sequential ID.", "operationId": "updateDataSourceByID", "deprecated": true, @@ -4043,7 +4314,9 @@ }, "delete": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).\n\nPlease refer to [updated API](#/datasources/deleteDataSourceByUID) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Delete an existing data source by id.", "operationId": "deleteDataSourceByID", "deprecated": true, @@ -4077,7 +4350,9 @@ "/datasources/{id}/health": { "get": { "description": "Please refer to [updated API](#/datasources/checkDatasourceHealthWithUID) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Sends a health check request to the plugin datasource identified by the ID.", "operationId": "checkDatasourceHealthByID", "deprecated": true, @@ -4111,7 +4386,9 @@ "/datasources/{id}/resources/{datasource_proxy_route}": { "get": { "description": "Please refer to [updated API](#/datasources/callDatasourceResourceWithUID) instead", - "tags": ["datasources"], + "tags": [ + "datasources" + ], "summary": "Fetch data source resources by Id.", "operationId": "callDatasourceResourceByID", "deprecated": true, @@ -4154,7 +4431,9 @@ "/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"], + "tags": [ + "ds" + ], "summary": "DataSource query metrics with expressions", "operationId": "queryMetricsWithExpressions", "parameters": [ @@ -4192,7 +4471,9 @@ "/folders": { "get": { "description": "Returns all folders that the authenticated user has permission to view.", - "tags": ["folders"], + "tags": [ + "folders" + ], "summary": "Get all folders.", "operationId": "getFolders", "parameters": [ @@ -4229,7 +4510,9 @@ } }, "post": { - "tags": ["folders"], + "tags": [ + "folders" + ], "summary": "Create folder.", "operationId": "createFolder", "parameters": [ @@ -4267,7 +4550,9 @@ "/folders/id/{folder_id}": { "get": { "description": "Returns the folder identified by id.", - "tags": ["folders"], + "tags": [ + "folders" + ], "summary": "Get folder by id.", "operationId": "getFolderByID", "parameters": [ @@ -4300,7 +4585,9 @@ }, "/folders/{folder_uid}": { "get": { - "tags": ["folders"], + "tags": [ + "folders" + ], "summary": "Get folder by uid.", "operationId": "getFolderByUID", "parameters": [ @@ -4330,7 +4617,9 @@ } }, "put": { - "tags": ["folders"], + "tags": [ + "folders" + ], "summary": "Update folder.", "operationId": "updateFolder", "parameters": [ @@ -4376,7 +4665,9 @@ }, "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"], + "tags": [ + "folders" + ], "summary": "Delete folder.", "operationId": "deleteFolder", "parameters": [ @@ -4418,7 +4709,9 @@ }, "/folders/{folder_uid}/permissions": { "get": { - "tags": ["folder_permissions"], + "tags": [ + "folder_permissions" + ], "summary": "Gets all existing permissions for the folder with the given `uid`.", "operationId": "getFolderPermissionList", "parameters": [ @@ -4448,7 +4741,9 @@ } }, "post": { - "tags": ["folder_permissions"], + "tags": [ + "folder_permissions" + ], "summary": "Updates permissions for a folder. This operation will remove existing permissions if they’re not included in the request.", "operationId": "updateFolderPermissions", "parameters": [ @@ -4489,7 +4784,9 @@ "/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"], + "tags": [ + "library_elements" + ], "summary": "Get all library elements.", "operationId": "getLibraryElements", "parameters": [ @@ -4500,7 +4797,10 @@ "in": "query" }, { - "enum": [1, 2], + "enum": [ + 1, + 2 + ], "type": "integer", "format": "int64", "description": "Kind of element to search for.", @@ -4508,7 +4808,10 @@ "in": "query" }, { - "enum": ["alpha-asc", "alpha-desc"], + "enum": [ + "alpha-asc", + "alpha-desc" + ], "type": "string", "description": "Sort order of elements.", "name": "sortDirection", @@ -4563,7 +4866,9 @@ }, "post": { "description": "Creates a new library element.", - "tags": ["library_elements"], + "tags": [ + "library_elements" + ], "summary": "Create library element.", "operationId": "createLibraryElement", "parameters": [ @@ -4601,7 +4906,9 @@ "/library-elements/name/{library_element_name}": { "get": { "description": "Returns a library element with the given name.", - "tags": ["library_elements"], + "tags": [ + "library_elements" + ], "summary": "Get library element by name.", "operationId": "getLibraryElementByName", "parameters": [ @@ -4631,7 +4938,9 @@ "/library-elements/{library_element_uid}": { "get": { "description": "Returns a library element with the given UID.", - "tags": ["library_elements"], + "tags": [ + "library_elements" + ], "summary": "Get library element by UID.", "operationId": "getLibraryElementByUID", "parameters": [ @@ -4659,7 +4968,9 @@ }, "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"], + "tags": [ + "library_elements" + ], "summary": "Delete library element.", "operationId": "deleteLibraryElementByUID", "parameters": [ @@ -4693,7 +5004,9 @@ }, "patch": { "description": "Updates an existing library element identified by uid.", - "tags": ["library_elements"], + "tags": [ + "library_elements" + ], "summary": "Update library element.", "operationId": "updateLibraryElement", "parameters": [ @@ -4740,7 +5053,9 @@ "/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"], + "tags": [ + "library_elements" + ], "summary": "Get library element connections.", "operationId": "getLibraryElementConnections", "parameters": [ @@ -4769,7 +5084,10 @@ }, "/licensing/check": { "get": { - "tags": ["licensing", "enterprise"], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Check license availability.", "operationId": "getStatus", "responses": { @@ -4782,7 +5100,10 @@ "/licensing/custom-permissions": { "get": { "description": "You need to have a permission with action `licensing.reports:read`.", - "tags": ["licensing", "enterprise"], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Get custom permissions report.", "operationId": "getCustomPermissionsReport", "responses": { @@ -4798,8 +5119,13 @@ "/licensing/custom-permissions-csv": { "get": { "description": "You need to have a permission with action `licensing.reports:read`.", - "produces": ["text/csv"], - "tags": ["licensing", "enterprise"], + "produces": [ + "text/csv" + ], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Get custom permissions report in CSV format.", "operationId": "getCustomPermissionsCSV", "responses": { @@ -4815,7 +5141,10 @@ "/licensing/refresh-stats": { "get": { "description": "You need to have a permission with action `licensing:read`.", - "tags": ["licensing", "enterprise"], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Refresh license stats.", "operationId": "refreshLicenseStats", "responses": { @@ -4831,7 +5160,10 @@ "/licensing/token": { "get": { "description": "You need to have a permission with action `licensing:read`.", - "tags": ["licensing", "enterprise"], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Get license token.", "operationId": "getLicenseToken", "responses": { @@ -4842,7 +5174,10 @@ }, "post": { "description": "You need to have a permission with action `licensing:update`.", - "tags": ["licensing", "enterprise"], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Create license token.", "operationId": "postLicenseToken", "parameters": [ @@ -4866,7 +5201,10 @@ }, "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"], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Remove license from database.", "operationId": "deleteLicenseToken", "parameters": [ @@ -4904,7 +5242,10 @@ "/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"], + "tags": [ + "licensing", + "enterprise" + ], "summary": "Manually force license refresh.", "operationId": "postRenewLicenseToken", "parameters": [ @@ -4932,7 +5273,10 @@ }, "/logout/saml": { "get": { - "tags": ["saml", "enterprise"], + "tags": [ + "saml", + "enterprise" + ], "summary": "GetLogout initiates single logout process.", "operationId": "getSAMLLogout", "responses": { @@ -4951,7 +5295,9 @@ "/org": { "get": { "description": "Get current Organization", - "tags": ["org"], + "tags": [ + "org" + ], "operationId": "getCurrentOrg", "responses": { "200": { @@ -4969,7 +5315,9 @@ } }, "put": { - "tags": ["org"], + "tags": [ + "org" + ], "summary": "Update current Organization.", "operationId": "updateCurrentOrg", "parameters": [ @@ -5003,7 +5351,9 @@ }, "/org/address": { "put": { - "tags": ["org"], + "tags": [ + "org" + ], "summary": "Update current Organization's address.", "operationId": "updateCurrentOrgAddress", "parameters": [ @@ -5037,7 +5387,9 @@ }, "/org/invites": { "get": { - "tags": ["org_invites"], + "tags": [ + "org_invites" + ], "summary": "Get pending invites.", "operationId": "getPendingOrgInvites", "responses": { @@ -5056,7 +5408,9 @@ } }, "post": { - "tags": ["org_invites"], + "tags": [ + "org_invites" + ], "summary": "Add invite.", "operationId": "addOrgInvite", "parameters": [ @@ -5093,7 +5447,9 @@ }, "/org/invites/{invitation_code}/revoke": { "delete": { - "tags": ["org_invites"], + "tags": [ + "org_invites" + ], "summary": "Revoke invite.", "operationId": "revokeInvite", "parameters": [ @@ -5125,7 +5481,9 @@ }, "/org/preferences": { "get": { - "tags": ["org_preferences"], + "tags": [ + "org_preferences" + ], "summary": "Get Current Org Prefs.", "operationId": "getOrgPreferences", "responses": { @@ -5144,7 +5502,9 @@ } }, "put": { - "tags": ["org_preferences"], + "tags": [ + "org_preferences" + ], "summary": "Update Current Org Prefs.", "operationId": "updateOrgPreferences", "parameters": [ @@ -5176,7 +5536,9 @@ } }, "patch": { - "tags": ["org_preferences"], + "tags": [ + "org_preferences" + ], "summary": "Patch Current Org Prefs.", "operationId": "patchOrgPreferences", "parameters": [ @@ -5211,7 +5573,9 @@ "/org/users": { "get": { "description": "Returns all org users within the current organization. Accessible to users with org admin role.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:read` with scope `users:*`.", - "tags": ["org"], + "tags": [ + "org" + ], "summary": "Get all users within the current organization.", "operationId": "getOrgUsersForCurrentOrg", "responses": { @@ -5231,7 +5595,9 @@ }, "post": { "description": "Adds a global user to the current organization.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:add` with scope `users:*`.", - "tags": ["org"], + "tags": [ + "org" + ], "summary": "Add a new user to the current organization", "operationId": "addOrgUserToCurrentOrg", "parameters": [ @@ -5263,7 +5629,9 @@ "/org/users/lookup": { "get": { "description": "Returns all org users within the current organization, but with less detailed information.\nAccessible to users with org admin role, admin in any folder or admin of any team.\nMainly used by Grafana UI for providing list of users when adding team members and when editing folder/dashboard permissions.", - "tags": ["org"], + "tags": [ + "org" + ], "summary": "Get all users within the current organization (lookup)", "operationId": "getOrgUsersForCurrentOrgLookup", "parameters": [ @@ -5298,7 +5666,9 @@ "/org/users/{user_id}": { "delete": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:remove` with scope `users:*`.", - "tags": ["org"], + "tags": [ + "org" + ], "summary": "Delete user in current organization", "operationId": "removeOrgUserForCurrentOrg", "parameters": [ @@ -5330,7 +5700,9 @@ }, "patch": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users.role:update` with scope `users:*`.", - "tags": ["org"], + "tags": [ + "org" + ], "summary": "Updates the given user", "operationId": "updateOrgUserForCurrentOrg", "parameters": [ @@ -5377,7 +5749,9 @@ } ], "description": "Search all Organizations", - "tags": ["orgs"], + "tags": [ + "orgs" + ], "operationId": "searchOrgs", "parameters": [ { @@ -5427,7 +5801,9 @@ }, "post": { "description": "Only works if [users.allow_org_create](https://grafana.com/docs/grafana/latest/administration/configuration/#allow_org_create) is set.", - "tags": ["orgs"], + "tags": [ + "orgs" + ], "summary": "Create Organization.", "operationId": "createOrg", "parameters": [ @@ -5466,7 +5842,9 @@ "basic": [] } ], - "tags": ["orgs"], + "tags": [ + "orgs" + ], "summary": "Get Organization by ID.", "operationId": "getOrgByName", "parameters": [ @@ -5500,7 +5878,9 @@ "basic": [] } ], - "tags": ["orgs"], + "tags": [ + "orgs" + ], "summary": "Get Organization by ID.", "operationId": "getOrgByID", "parameters": [ @@ -5533,7 +5913,9 @@ "basic": [] } ], - "tags": ["orgs"], + "tags": [ + "orgs" + ], "summary": "Update Organization.", "operationId": "updateOrg", "parameters": [ @@ -5577,7 +5959,9 @@ "basic": [] } ], - "tags": ["orgs"], + "tags": [ + "orgs" + ], "summary": "Delete Organization.", "operationId": "deleteOrgByID", "parameters": [ @@ -5613,7 +5997,9 @@ }, "/orgs/{org_id}/address": { "put": { - "tags": ["orgs"], + "tags": [ + "orgs" + ], "summary": "Update Organization's address.", "operationId": "updateOrgAddress", "parameters": [ @@ -5655,7 +6041,9 @@ "/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"], + "tags": [ + "orgs" + ], "summary": "Fetch Organization quota.", "operationId": "getOrgQuota", "parameters": [ @@ -5694,7 +6082,9 @@ } ], "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"], + "tags": [ + "orgs" + ], "summary": "Update user quota.", "operationId": "updateOrgQuota", "parameters": [ @@ -5747,7 +6137,9 @@ } ], "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"], + "tags": [ + "orgs" + ], "summary": "Get Users in Organization.", "operationId": "getOrgUsers", "parameters": [ @@ -5776,7 +6168,9 @@ }, "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"], + "tags": [ + "orgs" + ], "summary": "Add a new user to the current organization", "operationId": "addOrgUser", "parameters": [ @@ -5815,7 +6209,9 @@ "/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"], + "tags": [ + "orgs" + ], "summary": "Delete user in current organization", "operationId": "removeOrgUser", "parameters": [ @@ -5854,7 +6250,9 @@ }, "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"], + "tags": [ + "orgs" + ], "summary": "Update Users in Organization.", "operationId": "updateOrgUser", "parameters": [ @@ -5902,7 +6300,9 @@ }, "/playlists": { "get": { - "tags": ["playlists"], + "tags": [ + "playlists" + ], "summary": "Get playlists.", "operationId": "searchPlaylists", "parameters": [ @@ -5929,7 +6329,9 @@ } }, "post": { - "tags": ["playlists"], + "tags": [ + "playlists" + ], "summary": "Create playlist.", "operationId": "createPlaylist", "parameters": [ @@ -5963,7 +6365,9 @@ }, "/playlists/{uid}": { "get": { - "tags": ["playlists"], + "tags": [ + "playlists" + ], "summary": "Get playlist.", "operationId": "getPlaylist", "parameters": [ @@ -5993,7 +6397,9 @@ } }, "put": { - "tags": ["playlists"], + "tags": [ + "playlists" + ], "summary": "Update playlist.", "operationId": "updatePlaylist", "parameters": [ @@ -6031,7 +6437,9 @@ } }, "delete": { - "tags": ["playlists"], + "tags": [ + "playlists" + ], "summary": "Delete playlist.", "operationId": "deletePlaylist", "parameters": [ @@ -6063,7 +6471,9 @@ }, "/playlists/{uid}/dashboards": { "get": { - "tags": ["playlists"], + "tags": [ + "playlists" + ], "summary": "Get playlist dashboards.", "operationId": "getPlaylistDashboards", "parameters": [ @@ -6095,7 +6505,9 @@ }, "/playlists/{uid}/items": { "get": { - "tags": ["playlists"], + "tags": [ + "playlists" + ], "summary": "Get playlist items.", "operationId": "getPlaylistItems", "parameters": [ @@ -6128,7 +6540,9 @@ "/query-history": { "get": { "description": "Returns a list of queries in the query history that matches the search criteria.\nQuery history search supports pagination. Use the `limit` parameter to control the maximum number of queries returned; the default limit is 100.\nYou can also use the `page` query parameter to fetch queries from any page other than the first one.", - "tags": ["query_history"], + "tags": [ + "query_history" + ], "summary": "Query history search.", "operationId": "searchQueries", "parameters": [ @@ -6155,7 +6569,10 @@ "in": "query" }, { - "enum": ["time-desc", "time-asc"], + "enum": [ + "time-desc", + "time-asc" + ], "type": "string", "default": "time-desc", "description": "Sort method", @@ -6205,7 +6622,9 @@ }, "post": { "description": "Adds new query to query history.", - "tags": ["query_history"], + "tags": [ + "query_history" + ], "summary": "Add query to query history.", "operationId": "createQuery", "parameters": [ @@ -6237,7 +6656,9 @@ "/query-history/migrate": { "post": { "description": "Adds multiple queries to query history.", - "tags": ["query_history"], + "tags": [ + "query_history" + ], "summary": "Migrate queries to query history.", "operationId": "migrateQueries", "parameters": [ @@ -6269,7 +6690,9 @@ "/query-history/star/{query_history_uid}": { "post": { "description": "Adds star to query in query history as specified by the UID.", - "tags": ["query_history"], + "tags": [ + "query_history" + ], "summary": "Add star to query in query history.", "operationId": "starQuery", "parameters": [ @@ -6294,7 +6717,9 @@ }, "delete": { "description": "Removes star from query in query history as specified by the UID.", - "tags": ["query_history"], + "tags": [ + "query_history" + ], "summary": "Remove star to query in query history.", "operationId": "unstarQuery", "parameters": [ @@ -6321,7 +6746,9 @@ "/query-history/{query_history_uid}": { "delete": { "description": "Deletes an existing query in query history as specified by the UID. This operation cannot be reverted.", - "tags": ["query_history"], + "tags": [ + "query_history" + ], "summary": "Delete query in query history.", "operationId": "deleteQuery", "parameters": [ @@ -6346,7 +6773,9 @@ }, "patch": { "description": "Updates comment for query in query history as specified by the UID.", - "tags": ["query_history"], + "tags": [ + "query_history" + ], "summary": "Update comment for query in query history.", "operationId": "patchQueryComment", "parameters": [ @@ -6384,7 +6813,10 @@ "/recording-rules": { "get": { "description": "Lists all rules in the database: active or deleted", - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "operationId": "listRecordingRules", "responses": { "200": { @@ -6406,7 +6838,10 @@ }, "put": { "description": "Update the active status of a rule", - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "operationId": "updateRecordingRule", "parameters": [ { @@ -6438,7 +6873,10 @@ }, "post": { "description": "Create a recording rule that is then registered and started", - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "operationId": "createRecordingRule", "parameters": [ { @@ -6471,7 +6909,10 @@ }, "/recording-rules/test": { "post": { - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "summary": "Test a recording rule.", "operationId": "testCreateRecordingRule", "parameters": [ @@ -6509,7 +6950,10 @@ "/recording-rules/writer": { "get": { "description": "Return the prometheus remote write target", - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "operationId": "getRecordingRuleWriteTarget", "responses": { "200": { @@ -6531,7 +6975,10 @@ }, "post": { "description": "It returns a 422 if there is not an existing prometheus data source configured", - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "summary": "Create a remote write target.", "operationId": "createRecordingRuleWriteTarget", "parameters": [ @@ -6566,7 +7013,10 @@ } }, "delete": { - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "summary": "Delete the remote write target.", "operationId": "deleteRecordingRuleWriteTarget", "responses": { @@ -6590,7 +7040,10 @@ }, "/recording-rules/{recordingRuleID}": { "delete": { - "tags": ["recording_rules", "enterprise"], + "tags": [ + "recording_rules", + "enterprise" + ], "summary": "Delete removes the rule from the registry and stops it.", "operationId": "deleteRecordingRule", "parameters": [ @@ -6624,7 +7077,10 @@ "/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"], + "tags": [ + "reports", + "enterprise" + ], "summary": "List reports.", "operationId": "getReports", "responses": { @@ -6644,7 +7100,10 @@ }, "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"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Create a report.", "operationId": "createReport", "parameters": [ @@ -6682,7 +7141,10 @@ "/reports/email": { "post": { "description": "Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client’s timeout to at least 60 seconds. Available to org admins only and with a valid license.\n\nOnly available in Grafana Enterprise v7.0+.\nThis API endpoint is experimental and may be deprecated in a future release. On deprecation, a migration strategy will be provided and the endpoint will remain functional until the next major release of Grafana.\n\nYou need to have a permission with action `reports:send`.", - "tags": ["reports", "enterprise"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Send a report.", "operationId": "sendReport", "parameters": [ @@ -6720,8 +7182,13 @@ "/reports/render/pdf/{dashboardID}": { "get": { "description": "Please refer to [reports enterprise](#/reports/renderReportPDFs) instead. This will be removed in Grafana 10.", - "produces": ["application/pdf"], - "tags": ["reports", "enterprise"], + "produces": [ + "application/pdf" + ], + "tags": [ + "reports", + "enterprise" + ], "summary": "Render report for dashboard.", "operationId": "renderReportPDF", "deprecated": true, @@ -6790,8 +7257,13 @@ "/reports/render/pdfs": { "get": { "description": "Available to all users and with a valid license.", - "produces": ["application/pdf"], - "tags": ["reports", "enterprise"], + "produces": [ + "application/pdf" + ], + "tags": [ + "reports", + "enterprise" + ], "summary": "Render report for multiple dashboards.", "operationId": "renderReportPDFs", "parameters": [ @@ -6830,7 +7302,10 @@ "/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"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Get settings.", "operationId": "getReportSettings", "responses": { @@ -6850,7 +7325,10 @@ }, "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"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Save settings.", "operationId": "saveReportSettings", "parameters": [ @@ -6885,7 +7363,10 @@ "/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"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Send test report via email.", "operationId": "sendTestEmail", "parameters": [ @@ -6923,7 +7404,10 @@ "/reports/{id}": { "get": { "description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports:read` with scope `reports:id:\u003creport ID\u003e`.", - "tags": ["reports", "enterprise"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Get a report.", "operationId": "getReport", "parameters": [ @@ -6958,7 +7442,10 @@ }, "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"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Update a report.", "operationId": "updateReport", "parameters": [ @@ -7001,7 +7488,10 @@ }, "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"], + "tags": [ + "reports", + "enterprise" + ], "summary": "Delete a report.", "operationId": "deleteReport", "parameters": [ @@ -7037,7 +7527,10 @@ }, "/saml/acs": { "post": { - "tags": ["saml", "enterprise"], + "tags": [ + "saml", + "enterprise" + ], "summary": "It performs assertion Consumer Service (ACS).", "operationId": "postACS", "parameters": [ @@ -7062,8 +7555,13 @@ }, "/saml/metadata": { "get": { - "produces": ["application/xml;application/samlmetadata+xml"], - "tags": ["saml", "enterprise"], + "produces": [ + "application/xml;application/samlmetadata+xml" + ], + "tags": [ + "saml", + "enterprise" + ], "summary": "It exposes the SP (Grafana's) metadata for the IdP's consumption.", "operationId": "getMetadata", "responses": { @@ -7074,9 +7572,35 @@ } }, "/saml/slo": { + "get": { + "description": "There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.", + "tags": [ + "saml", + "enterprise" + ], + "summary": "It performs Single Logout (SLO) callback.", + "operationId": "getSLO", + "responses": { + "302": { + "description": "" + }, + "400": { + "$ref": "#/responses/badRequestError" + }, + "403": { + "$ref": "#/responses/forbiddenError" + }, + "500": { + "$ref": "#/responses/internalServerError" + } + } + }, "post": { "description": "There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.", - "tags": ["saml", "enterprise"], + "tags": [ + "saml", + "enterprise" + ], "summary": "It performs Single Logout (SLO) callback.", "operationId": "postSLO", "parameters": [ @@ -7109,7 +7633,9 @@ }, "/search": { "get": { - "tags": ["search"], + "tags": [ + "search" + ], "operationId": "search", "parameters": [ { @@ -7129,7 +7655,10 @@ "in": "query" }, { - "enum": ["dash-folder", "dash-db"], + "enum": [ + "dash-folder", + "dash-db" + ], "type": "string", "description": "Type to search for, dash-folder or dash-db", "name": "type", @@ -7185,7 +7714,10 @@ "in": "query" }, { - "enum": ["Edit", "View"], + "enum": [ + "Edit", + "View" + ], "type": "string", "default": "View", "description": "Set to `Edit` to return dashboards/folders that the user can edit", @@ -7193,7 +7725,10 @@ "in": "query" }, { - "enum": ["alpha-asc", "alpha-desc"], + "enum": [ + "alpha-asc", + "alpha-desc" + ], "type": "string", "default": "alpha-asc", "description": "Sort method; for listing all the possible sort methods use the search sorting endpoint.", @@ -7220,7 +7755,9 @@ "/search/sorting": { "get": { "description": "List search sorting options", - "tags": ["search"], + "tags": [ + "search" + ], "operationId": "listSortOptions", "responses": { "200": { @@ -7235,7 +7772,9 @@ "/serviceaccounts": { "post": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:*`\n\nRequires basic authentication and that the authenticated user is a Grafana Admin.", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "Create service account", "operationId": "createServiceAccount", "parameters": [ @@ -7269,7 +7808,9 @@ "/serviceaccounts/search": { "get": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:read` scope: `serviceaccounts:*`", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "Search service accounts with paging", "operationId": "searchOrgServiceAccountsWithPaging", "parameters": [ @@ -7323,7 +7864,9 @@ "/serviceaccounts/{serviceAccountId}": { "get": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:read` scope: `serviceaccounts:id:1` (single service account)", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "Get single serviceaccount by Id", "operationId": "retrieveServiceAccount", "parameters": [ @@ -7358,7 +7901,9 @@ }, "delete": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:delete` scope: `serviceaccounts:id:1` (single service account)", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "Delete service account", "operationId": "deleteServiceAccount", "parameters": [ @@ -7390,7 +7935,9 @@ }, "patch": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account)", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "Update service account", "operationId": "updateServiceAccount", "parameters": [ @@ -7434,7 +7981,9 @@ "/serviceaccounts/{serviceAccountId}/tokens": { "get": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:read` scope: `global:serviceaccounts:id:1` (single service account)\n\nRequires basic authentication and that the authenticated user is a Grafana Admin.", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "Get service account tokens", "operationId": "listTokens", "parameters": [ @@ -7466,7 +8015,9 @@ }, "post": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account)", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "CreateNewToken adds a token to a service account", "operationId": "createToken", "parameters": [ @@ -7513,7 +8064,9 @@ "/serviceaccounts/{serviceAccountId}/tokens/{tokenId}": { "delete": { "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account)\n\nRequires basic authentication and that the authenticated user is a Grafana Admin.", - "tags": ["service_accounts"], + "tags": [ + "service_accounts" + ], "summary": "DeleteToken deletes service account tokens", "operationId": "deleteToken", "parameters": [ @@ -7556,7 +8109,9 @@ }, "/snapshot/shared-options": { "get": { - "tags": ["snapshots"], + "tags": [ + "snapshots" + ], "summary": "Get snapshot sharing settings.", "operationId": "getSharingOptions", "responses": { @@ -7572,7 +8127,9 @@ "/snapshots": { "post": { "description": "Snapshot public mode should be enabled or authentication is required.", - "tags": ["snapshots"], + "tags": [ + "snapshots" + ], "summary": "When creating a snapshot using the API, you have to provide the full dashboard payload including the snapshot data. This endpoint is designed for the Grafana UI.", "operationId": "createDashboardSnapshot", "parameters": [ @@ -7604,7 +8161,9 @@ "/snapshots-delete/{deleteKey}": { "get": { "description": "Snapshot public mode should be enabled or authentication is required.", - "tags": ["snapshots"], + "tags": [ + "snapshots" + ], "summary": "Delete Snapshot by deleteKey.", "operationId": "deleteDashboardSnapshotByDeleteKey", "parameters": [ @@ -7636,7 +8195,9 @@ }, "/snapshots/{key}": { "get": { - "tags": ["snapshots"], + "tags": [ + "snapshots" + ], "summary": "Get Snapshot by Key.", "operationId": "getDashboardSnapshot", "parameters": [ @@ -7660,7 +8221,9 @@ } }, "delete": { - "tags": ["snapshots"], + "tags": [ + "snapshots" + ], "summary": "Delete Snapshot by Key.", "operationId": "deleteDashboardSnapshot", "parameters": [ @@ -7689,7 +8252,9 @@ }, "/teams": { "post": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Add Team.", "operationId": "createTeam", "parameters": [ @@ -7723,7 +8288,9 @@ }, "/teams/search": { "get": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Team Search With Paging.", "operationId": "searchTeams", "parameters": [ @@ -7772,7 +8339,10 @@ }, "/teams/{teamId}/groups": { "get": { - "tags": ["sync_team_groups", "enterprise"], + "tags": [ + "sync_team_groups", + "enterprise" + ], "summary": "Get External Groups.", "operationId": "getTeamGroupsApi", "parameters": [ @@ -7806,7 +8376,10 @@ } }, "post": { - "tags": ["sync_team_groups", "enterprise"], + "tags": [ + "sync_team_groups", + "enterprise" + ], "summary": "Add External Group.", "operationId": "addTeamGroupApi", "parameters": [ @@ -7850,7 +8423,10 @@ }, "/teams/{teamId}/groups/{groupId}": { "delete": { - "tags": ["sync_team_groups", "enterprise"], + "tags": [ + "sync_team_groups", + "enterprise" + ], "summary": "Remove External Group.", "operationId": "removeTeamGroupApi", "parameters": [ @@ -7892,7 +8468,9 @@ }, "/teams/{team_id}": { "get": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Get Team By ID.", "operationId": "getTeamByID", "parameters": [ @@ -7922,7 +8500,9 @@ } }, "put": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Update Team.", "operationId": "updateTeam", "parameters": [ @@ -7963,7 +8543,9 @@ } }, "delete": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Delete Team By ID.", "operationId": "deleteTeamByID", "parameters": [ @@ -7995,7 +8577,9 @@ }, "/teams/{team_id}/members": { "get": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Get Team Members.", "operationId": "getTeamMembers", "parameters": [ @@ -8025,7 +8609,9 @@ } }, "post": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Add Team Member.", "operationId": "addTeamMember", "parameters": [ @@ -8065,7 +8651,9 @@ }, "/teams/{team_id}/members/{user_id}": { "put": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Update Team Member.", "operationId": "updateTeamMember", "parameters": [ @@ -8110,7 +8698,9 @@ } }, "delete": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Remove Member From Team.", "operationId": "removeTeamMember", "parameters": [ @@ -8149,7 +8739,9 @@ }, "/teams/{team_id}/preferences": { "get": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Get Team Preferences.", "operationId": "getTeamPreferences", "parameters": [ @@ -8173,7 +8765,9 @@ } }, "put": { - "tags": ["teams"], + "tags": [ + "teams" + ], "summary": "Update Team Preferences.", "operationId": "updateTeamPreferences", "parameters": [ @@ -8211,7 +8805,9 @@ "/user": { "get": { "description": "Get (current authenticated user)", - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "operationId": "getSignedInUser", "responses": { "200": { @@ -8232,7 +8828,9 @@ } }, "put": { - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Update signed in User.", "operationId": "updateSignedInUser", "parameters": [ @@ -8265,7 +8863,9 @@ "/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"], + "tags": [ + "signed_in_user" + ], "summary": "Auth tokens of the actual User.", "operationId": "getUserAuthTokens", "responses": { @@ -8286,7 +8886,9 @@ }, "/user/helpflags/clear": { "get": { - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Clear user help flag.", "operationId": "clearHelpFlags", "responses": { @@ -8307,7 +8909,9 @@ }, "/user/helpflags/{flag_id}": { "put": { - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Set user help flag.", "operationId": "setHelpFlag", "parameters": [ @@ -8342,7 +8946,9 @@ } ], "description": "Return a list of all organizations of the current user.", - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Organizations of the actual User.", "operationId": "getSignedInUserOrgList", "responses": { @@ -8369,7 +8975,9 @@ } ], "description": "Changes the password for the user.", - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Change Password.", "operationId": "changeUserPassword", "parameters": [ @@ -8404,7 +9012,9 @@ }, "/user/preferences": { "get": { - "tags": ["user_preferences"], + "tags": [ + "user_preferences" + ], "summary": "Get user preferences.", "operationId": "getUserPreferences", "responses": { @@ -8421,7 +9031,9 @@ }, "put": { "description": "Omitting a key (`theme`, `homeDashboardId`, `timezone`) will cause the current value to be replaced with the system default value.", - "tags": ["user_preferences"], + "tags": [ + "user_preferences" + ], "summary": "Update user preferences.", "operationId": "updateUserPreferences", "parameters": [ @@ -8450,7 +9062,9 @@ } }, "patch": { - "tags": ["user_preferences"], + "tags": [ + "user_preferences" + ], "summary": "Patch user preferences.", "operationId": "patchUserPreferences", "parameters": [ @@ -8481,7 +9095,9 @@ }, "/user/quotas": { "get": { - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Fetch user quota.", "operationId": "getUserQuotas", "responses": { @@ -8506,7 +9122,9 @@ "/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"], + "tags": [ + "signed_in_user" + ], "summary": "Revoke an auth token of the actual User.", "operationId": "revokeUserAuthToken", "parameters": [ @@ -8541,7 +9159,9 @@ "/user/stars/dashboard/{dashboard_id}": { "post": { "description": "Stars the given Dashboard for the actual user.", - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Star a dashboard.", "operationId": "starDashboard", "parameters": [ @@ -8572,7 +9192,9 @@ }, "delete": { "description": "Deletes the starring of the given Dashboard for the actual user.", - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Unstar a dashboard.", "operationId": "unstarDashboard", "parameters": [ @@ -8605,7 +9227,9 @@ "/user/teams": { "get": { "description": "Return a list of all teams that the current user is member of.", - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Teams that the actual User is member of.", "operationId": "getSignedInUserTeamList", "responses": { @@ -8627,7 +9251,9 @@ "/user/using/{org_id}": { "post": { "description": "Switch user context to the given organization.", - "tags": ["signed_in_user"], + "tags": [ + "signed_in_user" + ], "summary": "Switch user context for signed in user.", "operationId": "userSetUsingOrg", "parameters": [ @@ -8661,7 +9287,9 @@ "/users": { "get": { "description": "Returns all users that the authenticated user has permission to view, admin permission required.", - "tags": ["users"], + "tags": [ + "users" + ], "summary": "Get users.", "operationId": "searchUsers", "parameters": [ @@ -8700,7 +9328,9 @@ }, "/users/lookup": { "get": { - "tags": ["users"], + "tags": [ + "users" + ], "summary": "Get user by login or email.", "operationId": "getUserByLoginOrEmail", "parameters": [ @@ -8733,7 +9363,9 @@ }, "/users/search": { "get": { - "tags": ["users"], + "tags": [ + "users" + ], "summary": "Get users with paging.", "operationId": "searchUsersWithPaging", "responses": { @@ -8757,7 +9389,9 @@ }, "/users/{user_id}": { "get": { - "tags": ["users"], + "tags": [ + "users" + ], "summary": "Get user by id.", "operationId": "getUserByID", "parameters": [ @@ -8789,7 +9423,9 @@ }, "put": { "description": "Update the user identified by id.", - "tags": ["users"], + "tags": [ + "users" + ], "summary": "Update user.", "operationId": "updateUser", "parameters": [ @@ -8832,7 +9468,9 @@ "/users/{user_id}/orgs": { "get": { "description": "Get organizations for user identified by id.", - "tags": ["users"], + "tags": [ + "users" + ], "summary": "Get organizations for user.", "operationId": "getUserOrgList", "parameters": [ @@ -8866,7 +9504,9 @@ "/users/{user_id}/teams": { "get": { "description": "Get teams for user identified by id.", - "tags": ["users"], + "tags": [ + "users" + ], "summary": "Get teams for user.", "operationId": "getUserTeams", "parameters": [ @@ -8944,7 +9584,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] }, "secondsToLive": { "type": "integer", @@ -8957,7 +9601,12 @@ "properties": { "builtInRole": { "type": "string", - "enum": ["Viewer", " Editor", " Admin", " Grafana Admin"] + "enum": [ + "Viewer", + " Editor", + " Admin", + " Grafana Admin" + ] }, "global": { "description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to create organization local assignment. Refer to the Built-in role assignments for more information.", @@ -9027,7 +9676,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] }, "sendEmail": { "type": "boolean" @@ -9042,7 +9695,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] } } }, @@ -9502,7 +10159,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] } } }, @@ -9738,7 +10399,9 @@ }, "CreateDashboardSnapshotCommand": { "type": "object", - "required": ["dashboard"], + "required": [ + "dashboard" + ], "properties": { "Result": { "$ref": "#/definitions/DashboardSnapshot" @@ -9799,7 +10462,10 @@ "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] + "enum": [ + 1, + 2 + ] }, "model": { "description": "The JSON model for the library element.", @@ -9896,7 +10562,9 @@ "CreateQueryInQueryHistoryCommand": { "description": "CreateQueryInQueryHistoryCommand is the command for adding query history", "type": "object", - "required": ["queries"], + "required": [ + "queries" + ], "properties": { "datasourceUid": { "description": "UID of the data source for which are queries stored.", @@ -9957,7 +10625,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"], + "enum": [ + "Viewer", + "Editor", + "Admin" + ], "example": "Admin" } } @@ -10049,7 +10721,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] }, "slug": { "type": "string" @@ -10103,7 +10779,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] }, "teamId": { "type": "integer", @@ -10717,7 +11397,9 @@ }, "ErrorResponseBody": { "type": "object", - "required": ["message"], + "required": [ + "message" + ], "properties": { "error": { "description": "Error An optional detailed description of the actual error. Only included if running in developer mode.", @@ -11616,7 +12298,11 @@ }, "MetricRequest": { "type": "object", - "required": ["from", "to", "queries"], + "required": [ + "from", + "to", + "queries" + ], "properties": { "debug": { "type": "boolean" @@ -11883,7 +12569,10 @@ "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] + "enum": [ + 1, + 2 + ] }, "model": { "description": "The JSON model for the library element.", @@ -11926,11 +12615,17 @@ }, "theme": { "type": "string", - "enum": ["light", "dark"] + "enum": [ + "light", + "dark" + ] }, "timezone": { "type": "string", - "enum": ["utc", "browser"] + "enum": [ + "utc", + "browser" + ] }, "weekStart": { "type": "string" @@ -13081,7 +13776,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] }, "status": { "$ref": "#/definitions/TempUserStatus" @@ -13523,7 +14222,11 @@ "properties": { "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] } } }, @@ -13570,11 +14273,17 @@ }, "theme": { "type": "string", - "enum": ["light", "dark"] + "enum": [ + "light", + "dark" + ] }, "timezone": { "type": "string", - "enum": ["utc", "browser"] + "enum": [ + "utc", + "browser" + ] }, "weekStart": { "type": "string" @@ -13625,7 +14334,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] } } }, @@ -13720,7 +14433,11 @@ }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"] + "enum": [ + "Viewer", + "Editor", + "Admin" + ] } } }, @@ -14029,7 +14746,12 @@ "description": "", "schema": { "type": "object", - "required": ["id", "name", "message", "datasource"], + "required": [ + "id", + "name", + "message", + "datasource" + ], "properties": { "datasource": { "$ref": "#/definitions/DataSource" @@ -14057,7 +14779,10 @@ "description": "", "schema": { "type": "object", - "required": ["orgId", "message"], + "required": [ + "orgId", + "message" + ], "properties": { "message": { "description": "Message Message of the created org.", @@ -14152,7 +14877,10 @@ "description": "", "schema": { "type": "object", - "required": ["id", "message"], + "required": [ + "id", + "message" + ], "properties": { "id": { "description": "ID Identifier of the deleted notification channel.", @@ -14177,7 +14905,11 @@ "description": "", "schema": { "type": "object", - "required": ["id", "title", "message"], + "required": [ + "id", + "title", + "message" + ], "properties": { "id": { "description": "ID Identifier of the deleted dashboard.", @@ -14202,7 +14934,10 @@ "description": "", "schema": { "type": "object", - "required": ["id", "message"], + "required": [ + "id", + "message" + ], "properties": { "id": { "description": "ID Identifier of the deleted data source.", @@ -14222,7 +14957,11 @@ "description": "", "schema": { "type": "object", - "required": ["id", "title", "message"], + "required": [ + "id", + "title", + "message" + ], "properties": { "id": { "description": "ID Identifier of the deleted folder.", @@ -14400,7 +15139,9 @@ "description": "", "schema": { "type": "object", - "required": ["id"], + "required": [ + "id" + ], "properties": { "id": { "description": "ID Identifier of the data source.", @@ -14800,7 +15541,10 @@ "description": "", "schema": { "type": "object", - "required": ["alertId", "message"], + "required": [ + "alertId", + "message" + ], "properties": { "alertId": { "type": "integer", @@ -14820,7 +15564,10 @@ "description": "", "schema": { "type": "object", - "required": ["alertsAffected", "message"], + "required": [ + "alertsAffected", + "message" + ], "properties": { "alertsAffected": { "description": "AlertsAffected is the number of the affected alerts.", @@ -14847,7 +15594,10 @@ "description": "", "schema": { "type": "object", - "required": ["id", "message"], + "required": [ + "id", + "message" + ], "properties": { "id": { "description": "ID Identifier of the created annotation.", @@ -14866,7 +15616,14 @@ "description": "", "schema": { "type": "object", - "required": ["status", "title", "version", "id", "uid", "url"], + "required": [ + "status", + "title", + "version", + "id", + "uid", + "url" + ], "properties": { "id": { "description": "ID The unique identifier (id) of the created/updated dashboard.", @@ -15155,4 +15912,4 @@ "name": "service_accounts" } ] -} +} \ No newline at end of file