From 2b052533ed34598b6890bf3a9690b50a6322c13a Mon Sep 17 00:00:00 2001 From: Mathieu Faucher <99497774+Math-Fauch@users.noreply.github.com> Date: Thu, 11 Jun 2026 15:27:27 -0400 Subject: [PATCH] chore(integrations): move grafana to lagoon (#15278) --- integrations/grafana/definitions/actions.ts | 56 - .../definitions/actions/create-alert-rule.ts | 135 - .../actions/create-contact-point.ts | 27 - .../definitions/actions/create-dashboard.ts | 14 - .../definitions/actions/create-folder.ts | 22 - .../actions/create-notification-policy.ts | 10 - .../definitions/actions/delete-alert-rule.ts | 13 - .../actions/delete-contact-point.ts | 17 - .../definitions/actions/delete-dashboard.ts | 17 - .../definitions/actions/delete-folder.ts | 17 - .../actions/delete-notification-policy.ts | 23 - .../actions/edit-dashboard-panel.ts | 25 - .../definitions/actions/edit-dashboard.ts | 21 - .../edit-default-notification-policy.ts | 12 - .../actions/edit-notification-policy.ts | 27 - .../definitions/actions/get-alert-rule.ts | 21 - .../definitions/actions/get-dashboard.ts | 25 - .../definitions/actions/list-alert-rules.ts | 24 - .../actions/list-contact-points.ts | 22 - .../definitions/actions/list-dashboards.ts | 21 - .../definitions/actions/list-datasources.ts | 23 - .../definitions/actions/list-folders.ts | 22 - .../definitions/actions/list-label-names.ts | 21 - .../definitions/actions/list-label-values.ts | 26 - .../definitions/actions/list-metric-names.ts | 24 - .../actions/list-notification-policies.ts | 28 - .../definitions/actions/query-metrics.ts | 37 - .../grafana/definitions/actions/types.ts | 4 - .../grafana/definitions/configuration.ts | 19 - .../grafana/definitions/dashboard-schemas.ts | 84 - integrations/grafana/definitions/events.ts | 21 - integrations/grafana/definitions/index.ts | 4 - .../definitions/notification-schemas.ts | 59 - integrations/grafana/definitions/states.ts | 16 - integrations/grafana/eslint.config.mjs | 13 - integrations/grafana/grafana-api/README.md | 42 - .../grafana-api/grafana-dashboard-k8s.json | 1154 - .../grafana-api/grafana-folder-k8s.json | 1244 - .../grafana/grafana-api/grafana-legacy.json | 24320 ---------------- integrations/grafana/hub.md | 21 - integrations/grafana/icon.svg | 57 - .../grafana/integration.definition.ts | 19 - integrations/grafana/package.json | 21 - integrations/grafana/src/actions/alerts.ts | 41 - .../grafana/src/actions/contactPoints.ts | 47 - .../grafana/src/actions/dashboards.ts | 63 - .../grafana/src/actions/datasources.ts | 50 - integrations/grafana/src/actions/folders.ts | 31 - .../grafana/src/actions/notifications.ts | 60 - integrations/grafana/src/client.ts | 626 - integrations/grafana/src/handler.ts | 73 - integrations/grafana/src/index.ts | 68 - integrations/grafana/src/register.ts | 31 - integrations/grafana/tsconfig.json | 8 - pnpm-lock.yaml | 271 +- 55 files changed, 2 insertions(+), 29195 deletions(-) delete mode 100644 integrations/grafana/definitions/actions.ts delete mode 100644 integrations/grafana/definitions/actions/create-alert-rule.ts delete mode 100644 integrations/grafana/definitions/actions/create-contact-point.ts delete mode 100644 integrations/grafana/definitions/actions/create-dashboard.ts delete mode 100644 integrations/grafana/definitions/actions/create-folder.ts delete mode 100644 integrations/grafana/definitions/actions/create-notification-policy.ts delete mode 100644 integrations/grafana/definitions/actions/delete-alert-rule.ts delete mode 100644 integrations/grafana/definitions/actions/delete-contact-point.ts delete mode 100644 integrations/grafana/definitions/actions/delete-dashboard.ts delete mode 100644 integrations/grafana/definitions/actions/delete-folder.ts delete mode 100644 integrations/grafana/definitions/actions/delete-notification-policy.ts delete mode 100644 integrations/grafana/definitions/actions/edit-dashboard-panel.ts delete mode 100644 integrations/grafana/definitions/actions/edit-dashboard.ts delete mode 100644 integrations/grafana/definitions/actions/edit-default-notification-policy.ts delete mode 100644 integrations/grafana/definitions/actions/edit-notification-policy.ts delete mode 100644 integrations/grafana/definitions/actions/get-alert-rule.ts delete mode 100644 integrations/grafana/definitions/actions/get-dashboard.ts delete mode 100644 integrations/grafana/definitions/actions/list-alert-rules.ts delete mode 100644 integrations/grafana/definitions/actions/list-contact-points.ts delete mode 100644 integrations/grafana/definitions/actions/list-dashboards.ts delete mode 100644 integrations/grafana/definitions/actions/list-datasources.ts delete mode 100644 integrations/grafana/definitions/actions/list-folders.ts delete mode 100644 integrations/grafana/definitions/actions/list-label-names.ts delete mode 100644 integrations/grafana/definitions/actions/list-label-values.ts delete mode 100644 integrations/grafana/definitions/actions/list-metric-names.ts delete mode 100644 integrations/grafana/definitions/actions/list-notification-policies.ts delete mode 100644 integrations/grafana/definitions/actions/query-metrics.ts delete mode 100644 integrations/grafana/definitions/actions/types.ts delete mode 100644 integrations/grafana/definitions/configuration.ts delete mode 100644 integrations/grafana/definitions/dashboard-schemas.ts delete mode 100644 integrations/grafana/definitions/events.ts delete mode 100644 integrations/grafana/definitions/index.ts delete mode 100644 integrations/grafana/definitions/notification-schemas.ts delete mode 100644 integrations/grafana/definitions/states.ts delete mode 100644 integrations/grafana/eslint.config.mjs delete mode 100644 integrations/grafana/grafana-api/README.md delete mode 100644 integrations/grafana/grafana-api/grafana-dashboard-k8s.json delete mode 100644 integrations/grafana/grafana-api/grafana-folder-k8s.json delete mode 100644 integrations/grafana/grafana-api/grafana-legacy.json delete mode 100644 integrations/grafana/hub.md delete mode 100644 integrations/grafana/icon.svg delete mode 100644 integrations/grafana/integration.definition.ts delete mode 100644 integrations/grafana/package.json delete mode 100644 integrations/grafana/src/actions/alerts.ts delete mode 100644 integrations/grafana/src/actions/contactPoints.ts delete mode 100644 integrations/grafana/src/actions/dashboards.ts delete mode 100644 integrations/grafana/src/actions/datasources.ts delete mode 100644 integrations/grafana/src/actions/folders.ts delete mode 100644 integrations/grafana/src/actions/notifications.ts delete mode 100644 integrations/grafana/src/client.ts delete mode 100644 integrations/grafana/src/handler.ts delete mode 100644 integrations/grafana/src/index.ts delete mode 100644 integrations/grafana/src/register.ts delete mode 100644 integrations/grafana/tsconfig.json diff --git a/integrations/grafana/definitions/actions.ts b/integrations/grafana/definitions/actions.ts deleted file mode 100644 index 6f6522dd912..00000000000 --- a/integrations/grafana/definitions/actions.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { createAlertRule } from './actions/create-alert-rule' -import { createContactPoint } from './actions/create-contact-point' -import { createDashboard } from './actions/create-dashboard' -import { createFolder } from './actions/create-folder' -import { createNotificationPolicy } from './actions/create-notification-policy' -import { deleteAlertRule } from './actions/delete-alert-rule' -import { deleteContactPoint } from './actions/delete-contact-point' -import { deleteDashboard } from './actions/delete-dashboard' -import { deleteFolder } from './actions/delete-folder' -import { deleteNotificationPolicy } from './actions/delete-notification-policy' -import { editDashboard } from './actions/edit-dashboard' -import { editDashboardPanel } from './actions/edit-dashboard-panel' -import { editDefaultNotificationPolicy } from './actions/edit-default-notification-policy' -import { editNotificationPolicy } from './actions/edit-notification-policy' -import { getAlertRule } from './actions/get-alert-rule' -import { getDashboard } from './actions/get-dashboard' -import { listAlertRules } from './actions/list-alert-rules' -import { listContactPoints } from './actions/list-contact-points' -import { listDashboards } from './actions/list-dashboards' -import { listDatasources } from './actions/list-datasources' -import { listFolders } from './actions/list-folders' -import { listLabelNames } from './actions/list-label-names' -import { listLabelValues } from './actions/list-label-values' -import { listMetricNames } from './actions/list-metric-names' -import { listNotificationPolicies } from './actions/list-notification-policies' -import { queryMetrics } from './actions/query-metrics' -import { ActionDefinitions } from './actions/types' - -export const actions = { - createDashboard, - getDashboard, - listDashboards, - editDashboard, - editDashboardPanel, - deleteDashboard, - createAlertRule, - getAlertRule, - listAlertRules, - deleteAlertRule, - createNotificationPolicy, - listNotificationPolicies, - deleteNotificationPolicy, - editNotificationPolicy, - editDefaultNotificationPolicy, - listContactPoints, - createContactPoint, - deleteContactPoint, - listDatasources, - queryMetrics, - listMetricNames, - listLabelNames, - listLabelValues, - listFolders, - createFolder, - deleteFolder, -} satisfies ActionDefinitions diff --git a/integrations/grafana/definitions/actions/create-alert-rule.ts b/integrations/grafana/definitions/actions/create-alert-rule.ts deleted file mode 100644 index 43ba5f11731..00000000000 --- a/integrations/grafana/definitions/actions/create-alert-rule.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const dataArraySchema = z.object({ - datasourceUid: z - .string() - .min(1, 'Datasource UID is required') - .title('Datasource UID') - .describe('UID of the Prometheus datasource to query'), - query: z - .string() - .min(1, 'Query expression is required') - .title('Query') - .describe('PromQL expression to evaluate (e.g. rate(cpu_usage[5m]))'), - reducer: z - .enum(['last', 'mean', 'max', 'min']) - .default('mean') - .title('Reducer') - .describe('Aggregation function applied to the query results over the evaluation period'), - thresholdType: z - .enum(['gt', 'lt', 'gte', 'lte']) - .title('Threshold Type') - .describe('Comparison operator for the threshold condition (gt = greater than, lt = less than)'), - thresholdValue: z.number().title('Threshold Value').describe('Numeric value to compare against'), -}) - -export const alertRuleSchema = z.object({ - title: z.string().min(1, 'Title is required').title('Title').describe('Name of the alert rule'), - folderUID: z - .string() - .min(1, 'Folder UID is required') - .title('Folder UID') - .describe('UID of the folder to create the alert rule in'), - dashboardUid: z - .string() - .optional() - .title('Dashboard UID') - .describe('Dashboard UID to visually link the alert to a panel'), - panelId: z.string().optional().title('Panel ID').describe('Panel ID string to visually link the alert to a panel'), - dataArray: dataArraySchema.title('Query Config').describe('Datasource query and alerting condition configuration'), - forDuration: z - .string() - .optional() - .default('5m') - .title('For Duration') - .describe('How long the condition must be true before alerting (e.g. "5m")'), - ruleGroup: z - .string() - .optional() - .default('default') - .title('Rule Group') - .describe('Rule group name — groups rules that share the same evaluation interval'), - labels: z - .record(z.string()) - .optional() - .title('Labels') - .describe('Key-value labels used to route the alert (e.g. { severity: "critical" })'), - noDataState: z - .enum(['Alerting', 'NoData', 'OK']) - .optional() - .default('NoData') - .title('No Data State') - .describe('Alert state when the query returns no data'), - execErrState: z - .enum(['OK', 'Alerting', 'Error']) - .optional() - .default('Error') - .title('Execution Error State') - .describe('Alert state when the query returns an error'), - isPaused: z.boolean().optional().title('Is Paused').describe('Whether the alert rule is paused'), - keep_firing_for: z - .string() - .optional() - .title('Keep Firing For') - .describe('Duration to keep firing after the condition is no longer true (e.g. "5m")'), - missingSeriesEvalsToResolve: z - .number() - .optional() - .title('Missing Series Evals To Resolve') - .describe('Number of consecutive evaluations with missing data before the alert resolves'), - uid: z.string().optional().title('UID').describe('Optional custom UID for the alert rule'), - botpressId: z - .string() - .optional() - .title('Botpress ID') - .describe('Arbitrary ID stored as a botpress_id label — returned on every alertFired event to identify the target'), - notification_settings: z - .object({ - receiver: z - .string() - .min(1, 'Receiver name is required') - .title('Receiver') - .describe('Name of the contact point to route alerts to directly'), - group_by: z.array(z.string()).optional().title('Group By').describe('Labels to group alerts by'), - group_wait: z - .string() - .optional() - .title('Group Wait') - .describe('Time to wait before sending the first notification (e.g. "30s")'), - group_interval: z - .string() - .optional() - .title('Group Interval') - .describe('Interval between notifications for ongoing alerts (e.g. "5m")'), - repeat_interval: z - .string() - .optional() - .title('Repeat Interval') - .describe('Interval before re-sending a notification (e.g. "4h")'), - mute_time_intervals: z - .array(z.string()) - .optional() - .title('Mute Time Intervals') - .describe('Named time intervals during which notifications are muted'), - active_time_intervals: z - .array(z.string()) - .optional() - .title('Active Time Intervals') - .describe('Named time intervals during which this policy is active'), - }) - .optional() - .title('Notification Settings') - .describe('Wire the alert directly to a contact point, skipping notification policies'), -}) - -export const createAlertRule = { - title: 'Create Alert Rule', - description: 'Create a Grafana alert rule', - input: { schema: alertRuleSchema }, - output: { - schema: z.object({ - uid: z.string().title('UID').describe('UID of the created alert rule'), - }), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/create-contact-point.ts b/integrations/grafana/definitions/actions/create-contact-point.ts deleted file mode 100644 index 64c7acc2671..00000000000 --- a/integrations/grafana/definitions/actions/create-contact-point.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const createContactPoint = { - title: 'Create Contact Point', - description: 'Create a Grafana webhook contact point pointing at the bot webhook URL', - input: { - schema: z.object({ - webhookUrl: z - .string() - .optional() - .title('Webhook URL') - .describe('Webhook URL to send alerts to. Defaults to the bot webhook URL saved at registration'), - name: z - .string() - .optional() - .default('BotpressWebhook') - .title('Name') - .describe('Contact point display name in Grafana'), - }), - }, - output: { - schema: z.object({ - uid: z.string().title('UID').describe('UID of the created contact point'), - }), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/create-dashboard.ts b/integrations/grafana/definitions/actions/create-dashboard.ts deleted file mode 100644 index f1638ea013f..00000000000 --- a/integrations/grafana/definitions/actions/create-dashboard.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { z } from '@botpress/sdk' -import { createDashboardInputSchema } from '../dashboard-schemas' -import { ActionDef } from './types' - -export const createDashboard = { - title: 'Create Dashboard', - description: 'Create a new Grafana dashboard', - input: { - schema: createDashboardInputSchema, - }, - output: { - schema: z.object({}), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/create-folder.ts b/integrations/grafana/definitions/actions/create-folder.ts deleted file mode 100644 index 1206b2bea8a..00000000000 --- a/integrations/grafana/definitions/actions/create-folder.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const createFolderSchema = z.object({ - title: z.string().min(1, 'Title is required').title('Title').describe('Folder display name'), - uid: z.string().optional().title('UID').describe('Optional custom UID for the folder'), - parentUid: z.string().optional().title('Parent UID').describe('UID of the parent folder to nest this folder under'), - description: z.string().optional().title('Description').describe('Folder description'), -}) - -export const createFolder = { - title: 'Create Folder', - description: 'Create a new Grafana folder', - input: { - schema: createFolderSchema, - }, - output: { - schema: z.object({ - uid: z.string().title('UID').describe('UID of the created folder'), - }), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/create-notification-policy.ts b/integrations/grafana/definitions/actions/create-notification-policy.ts deleted file mode 100644 index 78d99950677..00000000000 --- a/integrations/grafana/definitions/actions/create-notification-policy.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { z } from '@botpress/sdk' -import { notificationPolicySchema } from '../notification-schemas' -import { ActionDef } from './types' - -export const createNotificationPolicy = { - title: 'Create Notification Policy', - description: 'Add a notification policy routing alerts to a contact point', - input: { schema: notificationPolicySchema }, - output: { schema: z.object({}) }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/delete-alert-rule.ts b/integrations/grafana/definitions/actions/delete-alert-rule.ts deleted file mode 100644 index 52908bddd80..00000000000 --- a/integrations/grafana/definitions/actions/delete-alert-rule.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const deleteAlertRule = { - title: 'Delete Alert Rule', - description: 'Delete a Grafana alert rule by UID', - input: { - schema: z.object({ - uid: z.string().min(1, 'Alert rule UID is required').title('UID').describe('UID of the alert rule to delete'), - }), - }, - output: { schema: z.object({}) }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/delete-contact-point.ts b/integrations/grafana/definitions/actions/delete-contact-point.ts deleted file mode 100644 index c2e75a1464d..00000000000 --- a/integrations/grafana/definitions/actions/delete-contact-point.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const deleteContactPoint = { - title: 'Delete Contact Point', - description: 'Delete a Grafana contact point by UID', - input: { - schema: z.object({ - uid: z - .string() - .min(1, 'Contact point UID is required') - .title('UID') - .describe('UID of the contact point to delete'), - }), - }, - output: { schema: z.object({}) }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/delete-dashboard.ts b/integrations/grafana/definitions/actions/delete-dashboard.ts deleted file mode 100644 index b4d535052d0..00000000000 --- a/integrations/grafana/definitions/actions/delete-dashboard.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const deleteDashboard = { - title: 'Delete Dashboard', - description: 'Delete a Grafana dashboard', - input: { - schema: z.object({ - dashboardName: z - .string() - .min(1, 'Dashboard name is required') - .title('Dashboard Name') - .describe('UID/name of the dashboard to delete (the "name" field from listDashboards)'), - }), - }, - output: { schema: z.object({}) }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/delete-folder.ts b/integrations/grafana/definitions/actions/delete-folder.ts deleted file mode 100644 index 129daf52765..00000000000 --- a/integrations/grafana/definitions/actions/delete-folder.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const deleteFolder = { - title: 'Delete Folder', - description: 'Delete a Grafana folder by UID. Also deletes all dashboards inside it.', - input: { - schema: z.object({ - folderUid: z - .string() - .min(1, 'Folder UID is required') - .title('Folder UID') - .describe('UID of the folder to delete'), - }), - }, - output: { schema: z.object({}) }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/delete-notification-policy.ts b/integrations/grafana/definitions/actions/delete-notification-policy.ts deleted file mode 100644 index 2e234f3ab35..00000000000 --- a/integrations/grafana/definitions/actions/delete-notification-policy.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { z } from '@botpress/sdk' -import { matcherSchema } from '../notification-schemas' -import { ActionDef } from './types' - -export const deleteNotificationPolicy = { - title: 'Delete Notification Policy', - description: 'Delete a specific notification policy route by receiver and matchers', - input: { - schema: z.object({ - receiver: z - .string() - .min(1, 'Receiver name is required') - .title('Receiver') - .describe('Name of the contact point that identifies the policy to delete'), - matchers: z - .array(matcherSchema) - .min(1, 'At least one matcher is required to identify the policy') - .title('Matchers') - .describe('Label matchers that identify the exact policy route to delete'), - }), - }, - output: { schema: z.object({}) }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/edit-dashboard-panel.ts b/integrations/grafana/definitions/actions/edit-dashboard-panel.ts deleted file mode 100644 index 95e0e00760c..00000000000 --- a/integrations/grafana/definitions/actions/edit-dashboard-panel.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { z } from '@botpress/sdk' -import { panelSchema } from '../dashboard-schemas' -import { ActionDef } from './types' - -export const editDashboardPanel = { - title: 'Edit Dashboard Panel', - description: - 'Edit a single panel in a Grafana dashboard by its numeric panel ID. Merges the provided fields into the existing panel without touching other panels.', - input: { - schema: z.object({ - dashboardUid: z - .string() - .min(1, 'Dashboard UID is required') - .title('Dashboard UID') - .describe('UID of the dashboard containing the panel (the "name" field from listDashboards)'), - panelId: z - .number() - .int() - .title('Panel ID') - .describe('Numeric ID of the panel to edit (visible in Grafana panel JSON or from getDashboard)'), - panel: panelSchema.title('Panel').describe('Panel fields to update — merged into the existing panel'), - }), - }, - output: { schema: z.object({}) }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/edit-dashboard.ts b/integrations/grafana/definitions/actions/edit-dashboard.ts deleted file mode 100644 index 9701dc0d13d..00000000000 --- a/integrations/grafana/definitions/actions/edit-dashboard.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { z } from '@botpress/sdk' -import { createDashboardInputSchema } from '../dashboard-schemas' -import { ActionDef } from './types' - -export const editDashboard = { - title: 'Edit Dashboard', - description: - 'Edit an existing Grafana dashboard. WARNING: providing the "panels" field replaces ALL existing panels.', - input: { - schema: z - .object({ - dashboardUid: z - .string() - .min(1, 'Dashboard UID is required') - .title('Dashboard UID') - .describe('UID of the dashboard to edit (the "name" field from listDashboards)'), - }) - .merge(createDashboardInputSchema.omit({ uid: true }).partial()), - }, - output: { schema: z.object({}) }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/edit-default-notification-policy.ts b/integrations/grafana/definitions/actions/edit-default-notification-policy.ts deleted file mode 100644 index 1ff09415320..00000000000 --- a/integrations/grafana/definitions/actions/edit-default-notification-policy.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { z } from '@botpress/sdk' -import { notificationPolicySchema } from '../notification-schemas' -import { ActionDef } from './types' - -export const editDefaultNotificationPolicy = { - title: 'Edit Default Notification Policy', - description: 'Edit the root notification policy (catches all alerts not matched by a child route)', - input: { - schema: notificationPolicySchema.omit({ matchers: true }).partial(), - }, - output: { schema: z.object({}) }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/edit-notification-policy.ts b/integrations/grafana/definitions/actions/edit-notification-policy.ts deleted file mode 100644 index 775820eb779..00000000000 --- a/integrations/grafana/definitions/actions/edit-notification-policy.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { z } from '@botpress/sdk' -import { matcherSchema, notificationPolicySchema } from '../notification-schemas' -import { ActionDef } from './types' - -export const editNotificationPolicy = { - title: 'Edit Notification Policy', - description: 'Edit an existing notification policy identified by receiver and matchers', - input: { - schema: z.object({ - receiver: z - .string() - .min(1, 'Receiver name is required to identify the policy') - .title('Receiver') - .describe('Contact point name that identifies the policy to edit'), - matchers: z - .array(matcherSchema) - .min(1, 'At least one matcher is required to identify the policy') - .title('Matchers') - .describe('Label matchers that identify the exact policy route to edit'), - updates: notificationPolicySchema - .partial() - .title('Updates') - .describe('Fields to update on the notification policy'), - }), - }, - output: { schema: z.object({}) }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/get-alert-rule.ts b/integrations/grafana/definitions/actions/get-alert-rule.ts deleted file mode 100644 index 06dca2cd736..00000000000 --- a/integrations/grafana/definitions/actions/get-alert-rule.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const getAlertRule = { - title: 'Get Alert Rule', - description: 'Get a Grafana alert rule by UID', - input: { - schema: z.object({ - uid: z.string().title('UID').describe('UID of the alert rule to retrieve'), - }), - }, - output: { - schema: z.object({ - uid: z.string().optional().title('UID').describe('Alert rule UID'), - title: z.string().optional().title('Title').describe('Alert rule name'), - ruleGroup: z.string().optional().title('Rule Group').describe('Rule group this alert belongs to'), - folderUID: z.string().optional().title('Folder UID').describe('UID of the containing folder'), - labels: z.record(z.string()).optional().title('Labels').describe('Key-value labels on the alert rule'), - }), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/get-dashboard.ts b/integrations/grafana/definitions/actions/get-dashboard.ts deleted file mode 100644 index 8ed993b1363..00000000000 --- a/integrations/grafana/definitions/actions/get-dashboard.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const getDashboard = { - title: 'Get Dashboard', - description: 'Retrieve metadata and spec of a Grafana dashboard', - input: { - schema: z.object({ - dashboardUid: z - .string() - .min(1, 'Dashboard UID is required') - .title('Dashboard UID') - .describe('UID of the dashboard to retrieve (the "name" field from listDashboards, not the title)'), - }), - }, - output: { - schema: z.object({ - dashboard: z - .any() - .title('Dashboard') - .describe('Dashboard specification including all panels, variables, and settings'), - meta: z.any().title('Metadata').describe('Dashboard metadata including folder UID'), - }), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/list-alert-rules.ts b/integrations/grafana/definitions/actions/list-alert-rules.ts deleted file mode 100644 index 5cbe9f878b1..00000000000 --- a/integrations/grafana/definitions/actions/list-alert-rules.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const listAlertRules = { - title: 'List Alert Rules', - description: 'List all Grafana alert rules', - input: { schema: z.object({}) }, - output: { - schema: z.object({ - alertRules: z - .array( - z.object({ - uid: z.string().optional().title('UID').describe('Alert rule UID'), - title: z.string().optional().title('Title').describe('Alert rule name'), - ruleGroup: z.string().optional().title('Rule Group').describe('Rule group this alert belongs to'), - folderUID: z.string().optional().title('Folder UID').describe('UID of the containing folder'), - labels: z.record(z.string()).optional().title('Labels').describe('Key-value labels on the alert rule'), - }) - ) - .title('Alert Rules') - .describe('List of all alert rules'), - }), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/list-contact-points.ts b/integrations/grafana/definitions/actions/list-contact-points.ts deleted file mode 100644 index 08b1942eef1..00000000000 --- a/integrations/grafana/definitions/actions/list-contact-points.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const listContactPoints = { - title: 'List Contact Points', - description: 'List all Grafana contact points', - input: { schema: z.object({}) }, - output: { - schema: z.object({ - contactPoints: z - .array( - z.object({ - uid: z.string().optional().title('UID').describe('Contact point UID'), - name: z.string().optional().title('Name').describe('Contact point display name'), - type: z.string().title('Type').describe('Contact point type (e.g. "webhook", "email")'), - }) - ) - .title('Contact Points') - .describe('List of all contact points'), - }), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/list-dashboards.ts b/integrations/grafana/definitions/actions/list-dashboards.ts deleted file mode 100644 index 72acae61c2b..00000000000 --- a/integrations/grafana/definitions/actions/list-dashboards.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const listDashboards = { - title: 'List Dashboards', - description: 'List all Grafana dashboards in the namespace', - input: { schema: z.object({}) }, - output: { - schema: z.object({ - dashboards: z - .array( - z.object({ - name: z.string().title('Name').describe('Dashboard UID — use this value for other dashboard actions'), - title: z.string().title('Title').describe('Dashboard display title'), - }) - ) - .title('Dashboards') - .describe('List of all dashboards in the namespace'), - }), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/list-datasources.ts b/integrations/grafana/definitions/actions/list-datasources.ts deleted file mode 100644 index 4bfe44433d6..00000000000 --- a/integrations/grafana/definitions/actions/list-datasources.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const listDatasources = { - title: 'List Datasources', - description: 'List all Grafana datasources', - input: { schema: z.object({}) }, - output: { - schema: z.object({ - datasources: z - .array( - z.object({ - uid: z.string().optional().title('UID').describe('Datasource UID — use this for metric queries'), - name: z.string().optional().title('Name').describe('Datasource display name'), - type: z.string().optional().title('Type').describe('Datasource type (e.g. "prometheus", "loki")'), - isDefault: z.boolean().optional().title('Is Default').describe('Whether this is the default datasource'), - }) - ) - .title('Datasources') - .describe('List of all datasources'), - }), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/list-folders.ts b/integrations/grafana/definitions/actions/list-folders.ts deleted file mode 100644 index 92047683e3c..00000000000 --- a/integrations/grafana/definitions/actions/list-folders.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const listFolders = { - title: 'List Folders', - description: 'List all Grafana folders', - input: { schema: z.object({}) }, - output: { - schema: z.object({ - folders: z - .array( - z.object({ - uid: z.string().optional().title('UID').describe('Folder UID'), - title: z.string().optional().title('Title').describe('Folder display name'), - parentUid: z.string().optional().title('Parent UID').describe('UID of the parent folder, if nested'), - }) - ) - .title('Folders') - .describe('List of all folders'), - }), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/list-label-names.ts b/integrations/grafana/definitions/actions/list-label-names.ts deleted file mode 100644 index 2feb0b67a5e..00000000000 --- a/integrations/grafana/definitions/actions/list-label-names.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const listLabelNames = { - title: 'List Label Names', - description: 'List all label names available in a Prometheus datasource', - input: { - schema: z.object({ - datasourceUid: z - .string() - .min(1, 'Datasource UID is required') - .title('Datasource UID') - .describe('UID of the Prometheus datasource to query'), - }), - }, - output: { - schema: z.object({ - labelNames: z.array(z.string()).title('Label Names').describe('List of all label names in the datasource'), - }), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/list-label-values.ts b/integrations/grafana/definitions/actions/list-label-values.ts deleted file mode 100644 index bbb6058fa78..00000000000 --- a/integrations/grafana/definitions/actions/list-label-values.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const listLabelValues = { - title: 'List Label Values', - description: 'List all values for a specific label in a Prometheus datasource', - input: { - schema: z.object({ - datasourceUid: z - .string() - .min(1, 'Datasource UID is required') - .title('Datasource UID') - .describe('UID of the Prometheus datasource to query'), - labelName: z - .string() - .min(1, 'Label name is required') - .title('Label Name') - .describe('Label name to list values for (e.g. "job", "instance")'), - }), - }, - output: { - schema: z.object({ - labelValues: z.array(z.string()).title('Label Values').describe('List of all values for the specified label'), - }), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/list-metric-names.ts b/integrations/grafana/definitions/actions/list-metric-names.ts deleted file mode 100644 index 939b9231af4..00000000000 --- a/integrations/grafana/definitions/actions/list-metric-names.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const listMetricNames = { - title: 'List Metric Names', - description: 'List all available metric names in a Prometheus datasource', - input: { - schema: z.object({ - datasourceUid: z - .string() - .min(1, 'Datasource UID is required') - .title('Datasource UID') - .describe('UID of the Prometheus datasource to query'), - }), - }, - output: { - schema: z.object({ - metricNames: z - .array(z.string()) - .title('Metric Names') - .describe('List of all metric names available in the datasource'), - }), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/list-notification-policies.ts b/integrations/grafana/definitions/actions/list-notification-policies.ts deleted file mode 100644 index cd9dc61df20..00000000000 --- a/integrations/grafana/definitions/actions/list-notification-policies.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const listNotificationPolicies = { - title: 'List Notification Policies', - description: 'List all notification policy routes', - input: { schema: z.object({}) }, - output: { - schema: z.object({ - policies: z - .array( - z.object({ - receiver: z.string().optional().title('Receiver').describe('Contact point this policy routes to'), - matchers: z.any().optional().title('Matchers').describe('String-format label matchers'), - object_matchers: z - .any() - .optional() - .title('Object Matchers') - .describe('Structured label matchers as [name, operator, value] tuples'), - group_by: z.array(z.string()).optional().title('Group By').describe('Labels used to group alerts'), - continue: z.boolean().optional().title('Continue').describe('Whether matching continues to sibling routes'), - }) - ) - .title('Policies') - .describe('List of notification policy routes'), - }), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/query-metrics.ts b/integrations/grafana/definitions/actions/query-metrics.ts deleted file mode 100644 index 42962ec0df6..00000000000 --- a/integrations/grafana/definitions/actions/query-metrics.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { z } from '@botpress/sdk' -import { ActionDef } from './types' - -export const queryMetrics = { - title: 'Query Metrics', - description: 'Run a PromQL query over a time range against a Prometheus datasource', - input: { - schema: z.object({ - datasourceUid: z - .string() - .min(1, 'Datasource UID is required') - .title('Datasource UID') - .describe('UID of the Prometheus datasource to query'), - query: z - .string() - .min(1, 'PromQL expression is required') - .title('Query') - .describe('PromQL expression to evaluate (e.g. rate(http_requests_total[5m]))'), - start: z - .string() - .min(1, 'Start time is required') - .title('Start') - .describe('Start time as Unix timestamp or RFC3339 (e.g. "now-1h")'), - end: z - .string() - .min(1, 'End time is required') - .title('End') - .describe('End time as Unix timestamp or RFC3339 (e.g. "now")'), - step: z.string().optional().title('Step').describe('Query resolution step (e.g. "60s", "5m"). Defaults to auto'), - }), - }, - output: { - schema: z.object({ - data: z.any().title('Data').describe('Prometheus range query result'), - }), - }, -} satisfies ActionDef diff --git a/integrations/grafana/definitions/actions/types.ts b/integrations/grafana/definitions/actions/types.ts deleted file mode 100644 index b3cade88725..00000000000 --- a/integrations/grafana/definitions/actions/types.ts +++ /dev/null @@ -1,4 +0,0 @@ -import * as sdk from '@botpress/sdk' - -export type ActionDefinitions = NonNullable -export type ActionDef = ActionDefinitions[string] diff --git a/integrations/grafana/definitions/configuration.ts b/integrations/grafana/definitions/configuration.ts deleted file mode 100644 index a19be57d133..00000000000 --- a/integrations/grafana/definitions/configuration.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as sdk from '@botpress/sdk' -const { z } = sdk - -export const configuration = { - schema: z - .object({ - grafanaUsername: z - .string() - .min(1, 'The username for Grafana is required') - .title('Grafana username') - .describe('The username for your Grafana instance (e.g., USERNAME)'), - grafanaServiceAccountToken: z - .string() - .min(1, 'Service account token is required') - .title('Service account token') - .describe('The Service account token for your Grafana instance'), - }) - .strict(), -} diff --git a/integrations/grafana/definitions/dashboard-schemas.ts b/integrations/grafana/definitions/dashboard-schemas.ts deleted file mode 100644 index 79db07fb2f2..00000000000 --- a/integrations/grafana/definitions/dashboard-schemas.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { z } from '@botpress/sdk' - -export const gridPosSchema = z.object({ - h: z.number().optional().title('Height').describe('Panel height in grid units'), - w: z.number().optional().title('Width').describe('Panel width in grid units'), - x: z.number().optional().title('X').describe('Panel X position in grid units'), - y: z.number().optional().title('Y').describe('Panel Y position in grid units'), -}) - -export const textPanelSchema = z.object({ - type: z.literal('text').title('Type').describe('Panel type — must be "text"'), - title: z.string().min(1).title('Title').describe('Panel display title'), - description: z.string().optional().title('Description').describe('Panel description shown as a tooltip'), - content: z.string().optional().title('Content').describe('Text content to display in the panel'), - mode: z - .enum(['markdown', 'html', 'code']) - .default('markdown') - .title('Mode') - .describe('Rendering mode for the content'), - id: z.number().optional().title('ID').describe('Numeric panel ID (assigned by Grafana)'), - gridPos: gridPosSchema.optional().title('Grid Position').describe('Position and size of the panel in the grid'), -}) - -export const datasourceSchema = z.object({ - type: z.string().title('Type').describe('Datasource type (e.g. "prometheus")'), - uid: z.string().title('UID').describe('Datasource UID'), -}) - -export const timeSeriesPanelSchema = z.object({ - type: z.literal('timeseries').title('Type').describe('Panel type — must be "timeseries"'), - title: z.string().min(1).title('Title').describe('Panel display title'), - description: z.string().optional().title('Description').describe('Panel description shown as a tooltip'), - datasource: datasourceSchema.optional().title('Datasource').describe('Datasource to query'), - id: z.number().optional().title('ID').describe('Numeric panel ID (assigned by Grafana)'), - gridPos: gridPosSchema.optional().title('Grid Position').describe('Position and size of the panel in the grid'), - targets: z - .array( - z.object({ - refId: z.string().title('Ref ID').describe('Query reference ID (e.g. "A")'), - datasource: datasourceSchema.optional().title('Datasource').describe('Datasource override for this query'), - expr: z.string().optional().title('Expression').describe('PromQL or query expression'), - }) - ) - .optional() - .title('Targets') - .describe('Query targets for this panel'), - fieldConfig: z.any().optional().title('Field Config').describe('Field display configuration'), - options: z.any().optional().title('Options').describe('Panel display options'), -}) - -export const panelSchema = z.discriminatedUnion('type', [textPanelSchema, timeSeriesPanelSchema]) - -export const createDashboardInputSchema = z.object({ - uid: z.string().min(1, 'Dashboard UID is required').title('UID').describe('Unique identifier for the dashboard'), - title: z.string().min(1, 'Title is required').title('Title').describe('Dashboard display name'), - tags: z.array(z.string()).optional().title('Tags').describe('Tags to categorize the dashboard'), - timezone: z - .string() - .optional() - .title('Timezone') - .describe('Dashboard timezone (e.g. "browser", "utc"). Defaults to "browser"'), - editable: z.boolean().optional().title('Editable').describe('Whether the dashboard can be edited by viewers'), - graphTooltip: z - .number() - .optional() - .title('Graph Tooltip') - .describe('Tooltip sharing mode: 0 = default, 1 = shared crosshair, 2 = shared tooltip'), - time: z - .object({ from: z.string(), to: z.string() }) - .optional() - .title('Time Range') - .describe('Default time range for the dashboard (e.g. { from: "now-6h", to: "now" })'), - timepicker: z.any().optional().title('Time Picker').describe('Time picker configuration'), - templating: z.any().optional().title('Templating').describe('Template variable definitions'), - annotations: z.any().optional().title('Annotations').describe('Annotation query definitions'), - refresh: z - .string() - .optional() - .title('Refresh') - .describe('Auto-refresh interval (e.g. "5s", "1m"). Leave empty to disable'), - schemaVersion: z.number().optional().title('Schema Version').describe('Grafana dashboard schema version'), - panels: z.array(panelSchema).optional().title('Panels').describe('List of panels on the dashboard'), - folderUid: z.string().optional().title('Folder UID').describe('UID of the folder to place the dashboard in'), -}) diff --git a/integrations/grafana/definitions/events.ts b/integrations/grafana/definitions/events.ts deleted file mode 100644 index c77fb17ec7b..00000000000 --- a/integrations/grafana/definitions/events.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as sdk from '@botpress/sdk' -const { z } = sdk - -export const events = { - alertFired: { - title: 'Alert Fired', - description: 'Emitted when Grafana sends an alert webhook', - schema: z.object({ - alertName: z.string().title('Alert Name').describe('Name of the alert rule that fired'), - status: z.string().title('Status').describe('Current status of the alert (e.g. firing, resolved)'), - ruleUid: z.string().title('Rule UID').describe('UID of the Grafana alert rule'), - botpressId: z - .string() - .optional() - .title('Botpress ID') - .describe('Optional correlation ID round-tripped through Grafana labels'), - labels: z.record(z.string()).optional().title('Labels').describe('Key-value label set attached to the alert'), - startsAt: z.string().optional().title('Starts At').describe('ISO 8601 timestamp when the alert started firing'), - }), - }, -} diff --git a/integrations/grafana/definitions/index.ts b/integrations/grafana/definitions/index.ts deleted file mode 100644 index 2619660793f..00000000000 --- a/integrations/grafana/definitions/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { configuration } from './configuration' -export { states } from './states' -export { actions } from './actions' -export { events } from './events' diff --git a/integrations/grafana/definitions/notification-schemas.ts b/integrations/grafana/definitions/notification-schemas.ts deleted file mode 100644 index 64a5fb9c477..00000000000 --- a/integrations/grafana/definitions/notification-schemas.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { z } from '@botpress/sdk' - -export const matcherSchema = z.object({ - name: z.string().title('Label Name').describe('Label name to match'), - operator: z - .enum(['=', '!=', '=~', '!~']) - .title('Operator') - .describe('Match operator: = equals, != not equals, =~ regex match, !~ regex no match'), - value: z.string().title('Value').describe('Label value or regex pattern to match against'), -}) - -export const notificationPolicySchema = z.object({ - receiver: z - .string() - .min(1, 'Contact point name is required') - .title('Receiver') - .describe('Name of the contact point to route matching alerts to'), - matchers: z - .array(matcherSchema) - .optional() - .title('Matchers') - .describe('Label matchers to route alerts to this policy'), - continue: z - .boolean() - .optional() - .default(true) - .title('Continue') - .describe('Whether to continue matching other policies after this one matches'), - group_by: z - .array(z.string()) - .optional() - .title('Group By') - .describe('Labels to group alerts by when sending notifications'), - group_wait: z - .string() - .optional() - .title('Group Wait') - .describe('Time to wait before sending the first notification for a new alert group (e.g. "30s")'), - group_interval: z - .string() - .optional() - .title('Group Interval') - .describe('Interval between notifications for ongoing alert groups (e.g. "5m")'), - repeat_interval: z - .string() - .optional() - .title('Repeat Interval') - .describe('Interval before re-sending a notification for an ongoing alert (e.g. "4h")'), - mute_time_intervals: z - .array(z.string()) - .optional() - .title('Mute Time Intervals') - .describe('Named time intervals during which notifications are muted'), - active_time_intervals: z - .array(z.string()) - .optional() - .title('Active Time Intervals') - .describe('Named time intervals during which this policy is active'), -}) diff --git a/integrations/grafana/definitions/states.ts b/integrations/grafana/definitions/states.ts deleted file mode 100644 index b474decea5b..00000000000 --- a/integrations/grafana/definitions/states.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as sdk from '@botpress/sdk' -const { z } = sdk - -export const states = { - webhookConfig: { - type: 'integration' as const, - schema: z.object({ - webhookUrl: z.string().title('Webhook URL').describe('Public URL Grafana posts alert webhooks to'), - k8sNamespace: z.string().title('K8s Namespace').describe('Kubernetes namespace used for webhook routing'), - webhookSecret: z - .string() - .title('Webhook Secret') - .describe('HMAC secret used to validate incoming webhook payloads'), - }), - }, -} diff --git a/integrations/grafana/eslint.config.mjs b/integrations/grafana/eslint.config.mjs deleted file mode 100644 index 8c81907e7de..00000000000 --- a/integrations/grafana/eslint.config.mjs +++ /dev/null @@ -1,13 +0,0 @@ -import rootConfig from '../../eslint.config.mjs' - -export default [ - ...rootConfig, - { - languageOptions: { - parserOptions: { - project: ['./tsconfig.json'], - tsconfigRootDir: import.meta.dirname, - }, - }, - }, -] diff --git a/integrations/grafana/grafana-api/README.md b/integrations/grafana/grafana-api/README.md deleted file mode 100644 index 5449eb32d89..00000000000 --- a/integrations/grafana/grafana-api/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Grafana API Specs - -Source specs for the two generated clients. Re-fetch these when the Grafana API changes, then run `pnpm run generate`. - -## grafana-legacy.json - -Grafana's legacy HTTP API (`/api/...`). Covers alerts, notifications, datasources, and contact points. - -- **Swagger UI**: https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/public/api-merged.json -- **Re-fetch**: - ```sh - curl -s "https://raw.githubusercontent.com/grafana/grafana/main/public/api-merged.json" \ - -o src/gen/specs/grafana-legacy.json - ``` - -## grafana-dashboard-k8s.json / grafana-folder-k8s.json - -Grafana's Kubernetes-style API (`/apis/...`). These must be fetched from a live Grafana instance using a service account token. - -- **Discovery** (lists all available K8s API groups): - ```sh - curl -s -H "Authorization: Bearer $TOKEN" -H "Accept: application/json" \ - "https://your-stack.grafana.net/openapi/v3" | python3 -m json.tool | grep "grafana.app" - ``` -- **Re-fetch**: - - ```sh - TOKEN="your-grafana-service-account-token" - BASE="https://your-stack.grafana.net" - - curl -s -H "Authorization: Bearer $TOKEN" -H "Accept: application/json" \ - "$BASE/openapi/v3/apis/dashboard.grafana.app/v1" \ - -o src/gen/specs/grafana-dashboard-k8s.json - - curl -s -H "Authorization: Bearer $TOKEN" -H "Accept: application/json" \ - "$BASE/openapi/v3/apis/folder.grafana.app/v1" \ - -o src/gen/specs/grafana-folder-k8s.json - ``` - -## Why two clients? - -Grafana is migrating from the legacy HTTP API to a Kubernetes-style API incrementally. Dashboards and folders have stable K8s `v1` APIs; alerts and notifications are still alpha/beta and use the legacy client. See [src/gen/README.md](../README.md) for the full architecture doc. diff --git a/integrations/grafana/grafana-api/grafana-dashboard-k8s.json b/integrations/grafana/grafana-api/grafana-dashboard-k8s.json deleted file mode 100644 index 6b83c8fc7fb..00000000000 --- a/integrations/grafana/grafana-api/grafana-dashboard-k8s.json +++ /dev/null @@ -1,1154 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "description": "Grafana dashboards as resources", - "title": "dashboard.grafana.app/v1", - "version": "13.1.0-25461141735" - }, - "paths": { - "/apis/dashboard.grafana.app/v1/": { - "get": { - "tags": ["API Discovery"], - "description": "Describe the available kubernetes resources", - "operationId": "getAPIResources", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" } - }, - "application/yaml": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" } - } - } - } - } - } - }, - "/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards": { - "get": { - "tags": ["Dashboard"], - "description": "list objects of kind Dashboard", - "operationId": "listDashboard", - "parameters": [ - { - "name": "allowWatchBookmarks", - "in": "query", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "schema": { "type": "boolean", "uniqueItems": true } - }, - { - "name": "continue", - "in": "query", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "fieldSelector", - "in": "query", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "labelSelector", - "in": "query", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "limit", - "in": "query", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "schema": { "type": "integer", "uniqueItems": true } - }, - { - "name": "resourceVersion", - "in": "query", - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "resourceVersionMatch", - "in": "query", - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "sendInitialEvents", - "in": "query", - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "schema": { "type": "boolean", "uniqueItems": true } - }, - { - "name": "shardSelector", - "in": "query", - "description": "shardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges:\n\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000')\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n\nField paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths:\n - object.metadata.uid\n - object.metadata.namespace\n\nhexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64.\n\nExamples:\n 2-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n 4-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000')\n shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000')\n shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000')\n\nThis is an alpha field and requires enabling the ShardedListAndWatch feature gate.", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "timeoutSeconds", - "in": "query", - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "schema": { "type": "integer", "uniqueItems": true } - }, - { - "name": "watch", - "in": "query", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "schema": { "type": "boolean", "uniqueItems": true } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardList" - } - }, - "application/json;stream=watch": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardList" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardList" - } - } - } - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { "group": "dashboard.grafana.app", "version": "v1", "kind": "Dashboard" } - }, - "post": { - "tags": ["Dashboard"], - "description": "create a Dashboard", - "operationId": "createDashboard", - "parameters": [ - { - "name": "dryRun", - "in": "query", - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "fieldManager", - "in": "query", - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "fieldValidation", - "in": "query", - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "schema": { "type": "string", "uniqueItems": true } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - } - } - }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - } - } - }, - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - } - } - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { "group": "dashboard.grafana.app", "version": "v1", "kind": "Dashboard" } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "pretty", - "in": "query", - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "schema": { "type": "string", "uniqueItems": true } - } - ] - }, - "/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{name}": { - "get": { - "tags": ["Dashboard"], - "description": "read the specified Dashboard", - "operationId": "getDashboard", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - } - } - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { "group": "dashboard.grafana.app", "version": "v1", "kind": "Dashboard" } - }, - "put": { - "tags": ["Dashboard"], - "description": "replace the specified Dashboard", - "operationId": "replaceDashboard", - "parameters": [ - { - "name": "dryRun", - "in": "query", - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "fieldManager", - "in": "query", - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "fieldValidation", - "in": "query", - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "schema": { "type": "string", "uniqueItems": true } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - } - } - }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - } - } - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { "group": "dashboard.grafana.app", "version": "v1", "kind": "Dashboard" } - }, - "delete": { - "tags": ["Dashboard"], - "description": "delete a Dashboard", - "operationId": "deleteDashboard", - "parameters": [ - { - "name": "dryRun", - "in": "query", - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "gracePeriodSeconds", - "in": "query", - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "schema": { "type": "integer", "uniqueItems": true } - }, - { - "name": "ignoreStoreReadErrorWithClusterBreakingPotential", - "in": "query", - "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", - "schema": { "type": "boolean", "uniqueItems": true } - }, - { - "name": "orphanDependents", - "in": "query", - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "schema": { "type": "boolean", "uniqueItems": true } - }, - { - "name": "propagationPolicy", - "in": "query", - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "schema": { "type": "string", "uniqueItems": true } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } - }, - "application/yaml": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } - } - } - }, - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } - }, - "application/yaml": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } - } - } - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { "group": "dashboard.grafana.app", "version": "v1", "kind": "Dashboard" } - }, - "patch": { - "tags": ["Dashboard"], - "description": "partially update the specified Dashboard", - "operationId": "updateDashboard", - "parameters": [ - { - "name": "dryRun", - "in": "query", - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "fieldManager", - "in": "query", - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "fieldValidation", - "in": "query", - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "force", - "in": "query", - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "schema": { "type": "boolean", "uniqueItems": true } - } - ], - "requestBody": { - "content": { - "application/apply-patch+yaml": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } - }, - "application/json-patch+json": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } - }, - "application/merge-patch+json": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } - }, - "application/strategic-merge-patch+json": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - } - } - }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - } - } - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { "group": "dashboard.grafana.app", "version": "v1", "kind": "Dashboard" } - }, - "parameters": [ - { - "name": "name", - "in": "path", - "description": "name of the Dashboard", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "namespace", - "in": "path", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "pretty", - "in": "query", - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "schema": { "type": "string", "uniqueItems": true } - } - ] - }, - "/apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{name}/dto": { - "get": { - "tags": ["Dashboard"], - "description": "connect GET requests to dto of Dashboard", - "operationId": "getDashboardDto", - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardWithAccessInfo" - } - } - } - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "dashboard.grafana.app", - "version": "v1", - "kind": "DashboardWithAccessInfo" - } - }, - "parameters": [ - { - "name": "name", - "in": "path", - "description": "name of the DashboardWithAccessInfo", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "namespace", - "in": "path", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - } - ] - } - }, - "components": { - "schemas": { - "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.AnnotationActions": { - "type": "object", - "required": ["canAdd", "canEdit", "canDelete"], - "properties": { - "canAdd": { "type": "boolean", "default": false }, - "canDelete": { "type": "boolean", "default": false }, - "canEdit": { "type": "boolean", "default": false } - } - }, - "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.AnnotationPermission": { - "type": "object", - "required": ["dashboard"], - "properties": { - "dashboard": { - "default": {}, - "allOf": [ - { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.AnnotationActions" - } - ] - } - } - }, - "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard": { - "type": "object", - "required": ["metadata", "spec", "status"], - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" }] - }, - "spec": { - "description": "Spec is the spec of the Dashboard", - "allOf": [ - { - "$ref": "#/components/schemas/com.github.grafana.grafana.pkg.apimachinery.apis.common.v0alpha1.Unstructured" - } - ] - }, - "status": { - "default": {}, - "allOf": [ - { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardStatus" - } - ] - } - }, - "x-kubernetes-group-version-kind": [ - { "group": "dashboard.grafana.app", "kind": "Dashboard", "version": "v1" }, - { "group": "dashboard.grafana.app", "kind": "Dashboard", "version": "v1beta1" } - ] - }, - "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardAccess": { - "type": "object", - "required": ["isPublic", "canSave", "canEdit", "canAdmin", "canStar", "canDelete", "annotationsPermissions"], - "properties": { - "annotationsPermissions": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.AnnotationPermission" - }, - "canAdmin": { "type": "boolean", "default": false }, - "canDelete": { "type": "boolean", "default": false }, - "canEdit": { "type": "boolean", "default": false }, - "canSave": { "description": "The permissions part", "type": "boolean", "default": false }, - "canStar": { "type": "boolean", "default": false }, - "isPublic": { "type": "boolean", "default": false }, - "slug": { "description": "Metadata fields", "type": "string" }, - "url": { "type": "string" } - } - }, - "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardConversionStatus": { - "description": "ConversionStatus is the status of the conversion of the dashboard.", - "type": "object", - "required": ["failed"], - "properties": { - "error": { - "description": "The error message from the conversion. Empty if the conversion has not failed.", - "type": "string" - }, - "failed": { - "description": "Whether from another version has failed. If true, means that the dashboard is not valid, and the caller should instead fetch the stored version.", - "type": "boolean", - "default": false - }, - "source": { "description": "The original value map[string]any", "type": "object" }, - "storedVersion": { - "description": "The version which was stored when the dashboard was created / updated. Fetching this version should always succeed.", - "type": "string" - } - } - }, - "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardList": { - "type": "object", - "required": ["metadata", "items"], - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "items": { - "type": "array", - "items": { - "default": {}, - "allOf": [ - { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.Dashboard" - } - ] - } - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" }] - } - }, - "x-kubernetes-group-version-kind": [ - { "group": "dashboard.grafana.app", "kind": "DashboardList", "version": "v1" }, - { "group": "dashboard.grafana.app", "kind": "DashboardList", "version": "v1beta1" } - ] - }, - "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardStatus": { - "type": "object", - "properties": { - "conversion": { - "description": "Optional conversion status.", - "allOf": [ - { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardConversionStatus" - } - ] - } - } - }, - "com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardWithAccessInfo": { - "description": "This is like the legacy DTO where access and metadata are all returned in a single call", - "type": "object", - "required": ["metadata", "spec", "status", "access"], - "properties": { - "access": { - "default": {}, - "allOf": [ - { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardAccess" - } - ] - }, - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" }] - }, - "spec": { - "description": "Spec is the spec of the Dashboard", - "allOf": [ - { - "$ref": "#/components/schemas/com.github.grafana.grafana.pkg.apimachinery.apis.common.v0alpha1.Unstructured" - } - ] - }, - "status": { - "default": {}, - "allOf": [ - { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.dashboard.pkg.apis.dashboard.v1.DashboardStatus" - } - ] - } - }, - "x-kubernetes-group-version-kind": [ - { "group": "dashboard.grafana.app", "kind": "DashboardWithAccessInfo", "version": "v1" }, - { "group": "dashboard.grafana.app", "kind": "DashboardWithAccessInfo", "version": "v1beta1" } - ] - }, - "com.github.grafana.grafana.pkg.apimachinery.apis.common.v0alpha1.Unstructured": { - "type": "object", - "additionalProperties": true, - "x-kubernetes-preserve-unknown-fields": true - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.APIResource": { - "description": "APIResource specifies the name of a resource and whether it is namespaced.", - "type": "object", - "required": ["name", "singularName", "namespaced", "kind", "verbs"], - "properties": { - "categories": { - "description": "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", - "type": "array", - "items": { "type": "string", "default": "" }, - "x-kubernetes-list-type": "atomic" - }, - "group": { - "description": "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", - "type": "string" - }, - "kind": { - "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", - "type": "string", - "default": "" - }, - "name": { "description": "name is the plural name of the resource.", "type": "string", "default": "" }, - "namespaced": { - "description": "namespaced indicates if a resource is namespaced or not.", - "type": "boolean", - "default": false - }, - "shortNames": { - "description": "shortNames is a list of suggested short names of the resource.", - "type": "array", - "items": { "type": "string", "default": "" }, - "x-kubernetes-list-type": "atomic" - }, - "singularName": { - "description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", - "type": "string", - "default": "" - }, - "storageVersionHash": { - "description": "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", - "type": "string" - }, - "verbs": { - "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", - "type": "array", - "items": { "type": "string", "default": "" } - }, - "version": { - "description": "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList": { - "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", - "type": "object", - "required": ["groupVersion", "resources"], - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "groupVersion": { - "description": "groupVersion is the group and version this APIResourceList is for.", - "type": "string", - "default": "" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "resources": { - "description": "resources contains the name of the resources and if they are namespaced.", - "type": "array", - "items": { - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResource" }] - }, - "x-kubernetes-list-type": "atomic" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions": { - "description": "DeleteOptions may be provided when deleting an API object.", - "type": "object", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "dryRun": { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "type": "array", - "items": { "type": "string", "default": "" }, - "x-kubernetes-list-type": "atomic" - }, - "gracePeriodSeconds": { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "type": "integer", - "format": "int64" - }, - "ignoreStoreReadErrorWithClusterBreakingPotential": { - "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", - "type": "boolean" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "orphanDependents": { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "type": "boolean" - }, - "preconditions": { - "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions" }] - }, - "propagationPolicy": { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1": { - "description": "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:\u003cname\u003e', where \u003cname\u003e is the name of a field in a struct, or key in a map 'v:\u003cvalue\u003e', where \u003cvalue\u003e is the exact json formatted value of a list item 'i:\u003cindex\u003e', where \u003cindex\u003e is position of a item in a list 'k:\u003ckeys\u003e', where \u003ckeys\u003e is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", - "type": "object" - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta": { - "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", - "type": "object", - "properties": { - "continue": { - "description": "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", - "type": "string" - }, - "remainingItemCount": { - "description": "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", - "type": "integer", - "format": "int64" - }, - "resourceVersion": { - "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", - "type": "string" - }, - "selfLink": { - "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry": { - "description": "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.", - "type": "object", - "properties": { - "apiVersion": { - "description": "APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.", - "type": "string" - }, - "fieldsType": { - "description": "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", - "type": "string" - }, - "fieldsV1": { - "description": "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1" }] - }, - "manager": { - "description": "Manager is an identifier of the workflow managing these fields.", - "type": "string" - }, - "operation": { - "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.", - "type": "string" - }, - "subresource": { - "description": "Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.", - "type": "string" - }, - "time": { - "description": "Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.", - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time" }] - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta": { - "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", - "type": "object", - "properties": { - "annotations": { - "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations", - "type": "object", - "additionalProperties": { "type": "string", "default": "" } - }, - "creationTimestamp": { - "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time" }] - }, - "deletionGracePeriodSeconds": { - "description": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", - "type": "integer", - "format": "int64" - }, - "deletionTimestamp": { - "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time" }] - }, - "finalizers": { - "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", - "type": "array", - "items": { "type": "string", "default": "" }, - "x-kubernetes-list-type": "set", - "x-kubernetes-patch-strategy": "merge" - }, - "generateName": { - "description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will return a 409.\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", - "type": "string" - }, - "generation": { - "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", - "type": "integer", - "format": "int64" - }, - "labels": { - "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels", - "type": "object", - "additionalProperties": { "type": "string", "default": "" } - }, - "managedFields": { - "description": "ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.", - "type": "array", - "items": { - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry" }] - }, - "x-kubernetes-list-type": "atomic" - }, - "name": { - "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names", - "type": "string" - }, - "namespace": { - "description": "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces", - "type": "string" - }, - "ownerReferences": { - "description": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", - "type": "array", - "items": { - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference" }] - }, - "x-kubernetes-list-map-keys": ["uid"], - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "uid", - "x-kubernetes-patch-strategy": "merge" - }, - "resourceVersion": { - "description": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", - "type": "string" - }, - "selfLink": { - "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.", - "type": "string" - }, - "uid": { - "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference": { - "description": "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", - "type": "object", - "required": ["apiVersion", "kind", "name", "uid"], - "properties": { - "apiVersion": { "description": "API version of the referent.", "type": "string", "default": "" }, - "blockOwnerDeletion": { - "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", - "type": "boolean" - }, - "controller": { - "description": "If true, this reference points to the managing controller.", - "type": "boolean" - }, - "kind": { - "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string", - "default": "" - }, - "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names", - "type": "string", - "default": "" - }, - "uid": { - "description": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", - "type": "string", - "default": "" - } - }, - "x-kubernetes-map-type": "atomic" - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Patch": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - "type": "object" - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions": { - "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", - "type": "object", - "properties": { - "resourceVersion": { "description": "Specifies the target ResourceVersion", "type": "string" }, - "uid": { "description": "Specifies the target UID.", "type": "string" } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Status": { - "description": "Status is a return value for calls that don't return other objects.", - "type": "object", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "code": { - "description": "Suggested HTTP return code for this status, 0 if not set.", - "type": "integer", - "format": "int32" - }, - "details": { - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" }] - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "message": { - "description": "A human-readable description of the status of this operation.", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" }] - }, - "reason": { - "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", - "type": "string" - }, - "status": { - "description": "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause": { - "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", - "type": "object", - "properties": { - "field": { - "description": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", - "type": "string" - }, - "message": { - "description": "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", - "type": "string" - }, - "reason": { - "description": "A machine-readable description of the cause of the error. If this value is empty there is no information available.", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails": { - "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", - "type": "object", - "properties": { - "causes": { - "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", - "type": "array", - "items": { - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause" }] - }, - "x-kubernetes-list-type": "atomic" - }, - "group": { - "description": "The group attribute of the resource associated with the status StatusReason.", - "type": "string" - }, - "kind": { - "description": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "name": { - "description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", - "type": "string" - }, - "retryAfterSeconds": { - "description": "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", - "type": "integer", - "format": "int32" - }, - "uid": { - "description": "UID of the resource. (when there is a single resource which can be described). More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Time": { - "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", - "type": "string", - "format": "date-time" - } - } - } -} diff --git a/integrations/grafana/grafana-api/grafana-folder-k8s.json b/integrations/grafana/grafana-api/grafana-folder-k8s.json deleted file mode 100644 index 0c5ab00af6b..00000000000 --- a/integrations/grafana/grafana-api/grafana-folder-k8s.json +++ /dev/null @@ -1,1244 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { "description": "Grafana folders", "title": "folder.grafana.app/v1", "version": "13.1.0-25461141735" }, - "paths": { - "/apis/folder.grafana.app/v1/": { - "get": { - "tags": ["API Discovery"], - "description": "Describe the available kubernetes resources", - "operationId": "getAPIResources", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" } - }, - "application/yaml": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" } - } - } - } - } - } - }, - "/apis/folder.grafana.app/v1/namespaces/{namespace}/folders": { - "get": { - "tags": ["Folder"], - "description": "list objects of kind Folder", - "operationId": "listFolder", - "parameters": [ - { - "name": "allowWatchBookmarks", - "in": "query", - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "schema": { "type": "boolean", "uniqueItems": true } - }, - { - "name": "continue", - "in": "query", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "fieldSelector", - "in": "query", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "labelSelector", - "in": "query", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "limit", - "in": "query", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "schema": { "type": "integer", "uniqueItems": true } - }, - { - "name": "resourceVersion", - "in": "query", - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "resourceVersionMatch", - "in": "query", - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "sendInitialEvents", - "in": "query", - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "schema": { "type": "boolean", "uniqueItems": true } - }, - { - "name": "shardSelector", - "in": "query", - "description": "shardSelector restricts the list of returned objects using a CEL-based shard selector expression. The format uses the shardRange() function combined with || (logical OR) to specify one or more hash ranges:\n\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000')\n shardRange(object.metadata.uid, '0x0', '0x8000000000000000') || shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n\nField paths use CEL-style object-rooted syntax (e.g. \"object.metadata.uid\"), NOT the fieldSelector format (\"metadata.uid\"). Currently supported paths:\n - object.metadata.uid\n - object.metadata.namespace\n\nhexStart and hexEnd are single-quoted CEL string literals with a '0x' prefix, defining the inclusive lower and exclusive upper bounds over the 64-bit FNV-1a hash space. The full range is [0x0, 0x10000000000000000), where the exclusive upper bound equals 2^64.\n\nExamples:\n 2-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x8000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x8000000000000000', '0x10000000000000000')\n 4-shard split:\n shard 0: shardRange(object.metadata.uid, '0x0000000000000000', '0x4000000000000000')\n shard 1: shardRange(object.metadata.uid, '0x4000000000000000', '0x8000000000000000')\n shard 2: shardRange(object.metadata.uid, '0x8000000000000000', '0xc000000000000000')\n shard 3: shardRange(object.metadata.uid, '0xc000000000000000', '0x10000000000000000')\n\nThis is an alpha field and requires enabling the ShardedListAndWatch feature gate.", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "timeoutSeconds", - "in": "query", - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "schema": { "type": "integer", "uniqueItems": true } - }, - { - "name": "watch", - "in": "query", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "schema": { "type": "boolean", "uniqueItems": true } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderList" - } - }, - "application/json;stream=watch": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderList" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderList" - } - } - } - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "Folder" } - }, - "post": { - "tags": ["Folder"], - "description": "create a Folder", - "operationId": "createFolder", - "parameters": [ - { - "name": "dryRun", - "in": "query", - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "fieldManager", - "in": "query", - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "fieldValidation", - "in": "query", - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "schema": { "type": "string", "uniqueItems": true } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - } - } - }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - } - } - }, - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - } - } - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "Folder" } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "pretty", - "in": "query", - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "schema": { "type": "string", "uniqueItems": true } - } - ] - }, - "/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}": { - "get": { - "tags": ["Folder"], - "description": "read the specified Folder", - "operationId": "getFolder", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - } - } - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "Folder" } - }, - "put": { - "tags": ["Folder"], - "description": "replace the specified Folder", - "operationId": "replaceFolder", - "parameters": [ - { - "name": "dryRun", - "in": "query", - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "fieldManager", - "in": "query", - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "fieldValidation", - "in": "query", - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "schema": { "type": "string", "uniqueItems": true } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - } - } - }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - } - } - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "Folder" } - }, - "delete": { - "tags": ["Folder"], - "description": "delete a Folder", - "operationId": "deleteFolder", - "parameters": [ - { - "name": "dryRun", - "in": "query", - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "gracePeriodSeconds", - "in": "query", - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "schema": { "type": "integer", "uniqueItems": true } - }, - { - "name": "ignoreStoreReadErrorWithClusterBreakingPotential", - "in": "query", - "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", - "schema": { "type": "boolean", "uniqueItems": true } - }, - { - "name": "orphanDependents", - "in": "query", - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "schema": { "type": "boolean", "uniqueItems": true } - }, - { - "name": "propagationPolicy", - "in": "query", - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "schema": { "type": "string", "uniqueItems": true } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } - }, - "application/yaml": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } - } - } - }, - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } - }, - "application/yaml": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } - } - } - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "Folder" } - }, - "patch": { - "tags": ["Folder"], - "description": "partially update the specified Folder", - "operationId": "updateFolder", - "parameters": [ - { - "name": "dryRun", - "in": "query", - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "fieldManager", - "in": "query", - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "fieldValidation", - "in": "query", - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "force", - "in": "query", - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "schema": { "type": "boolean", "uniqueItems": true } - } - ], - "requestBody": { - "content": { - "application/apply-patch+yaml": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } - }, - "application/json-patch+json": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } - }, - "application/merge-patch+json": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } - }, - "application/strategic-merge-patch+json": { - "schema": { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - } - } - }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" - } - } - } - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "Folder" } - }, - "parameters": [ - { - "name": "name", - "in": "path", - "description": "name of the Folder", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "namespace", - "in": "path", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "pretty", - "in": "query", - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "schema": { "type": "string", "uniqueItems": true } - } - ] - }, - "/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/access": { - "get": { - "tags": ["Folder"], - "description": "connect GET requests to access of Folder", - "operationId": "getFolderAccess", - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderAccessInfo" - } - } - } - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "folder.grafana.app", - "version": "v1", - "kind": "FolderAccessInfo" - } - }, - "parameters": [ - { - "name": "name", - "in": "path", - "description": "name of the FolderAccessInfo", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "namespace", - "in": "path", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - } - ] - }, - "/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/children": { - "get": { - "tags": ["Folder"], - "description": "connect GET requests to children of Folder", - "operationId": "getFolderChildren", - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderList" - } - } - } - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "FolderList" } - }, - "parameters": [ - { - "name": "name", - "in": "path", - "description": "name of the FolderList", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "namespace", - "in": "path", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - } - ] - }, - "/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/counts": { - "get": { - "tags": ["Folder"], - "description": "connect GET requests to counts of Folder", - "operationId": "getFolderCounts", - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.DescendantCounts" - } - } - } - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "folder.grafana.app", - "version": "v1", - "kind": "DescendantCounts" - } - }, - "parameters": [ - { - "name": "name", - "in": "path", - "description": "name of the DescendantCounts", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "namespace", - "in": "path", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - } - ] - }, - "/apis/folder.grafana.app/v1/namespaces/{namespace}/folders/{name}/parents": { - "get": { - "tags": ["Folder"], - "description": "connect GET requests to parents of Folder", - "operationId": "getFolderParents", - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderInfoList" - } - } - } - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { "group": "folder.grafana.app", "version": "v1", "kind": "FolderInfoList" } - }, - "parameters": [ - { - "name": "name", - "in": "path", - "description": "name of the FolderInfoList", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - }, - { - "name": "namespace", - "in": "path", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "schema": { "type": "string", "uniqueItems": true } - } - ] - } - }, - "components": { - "schemas": { - "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.DescendantCounts": { - "type": "object", - "required": ["counts"], - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "counts": { - "type": "array", - "items": { - "default": {}, - "allOf": [ - { - "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.ResourceStats" - } - ] - } - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - } - }, - "x-kubernetes-group-version-kind": [ - { "group": "folder.grafana.app", "kind": "DescendantCounts", "version": "v1" }, - { "group": "folder.grafana.app", "kind": "DescendantCounts", "version": "v1beta1" } - ] - }, - "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder": { - "type": "object", - "required": ["metadata", "spec"], - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" }] - }, - "spec": { - "description": "Spec is the spec of the Folder", - "default": {}, - "allOf": [ - { "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderSpec" } - ] - } - }, - "x-kubernetes-group-version-kind": [ - { "group": "folder.grafana.app", "kind": "Folder", "version": "v1" }, - { "group": "folder.grafana.app", "kind": "Folder", "version": "v1beta1" } - ] - }, - "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderAccessInfo": { - "description": "Access control information for the current user", - "type": "object", - "required": ["canSave", "canEdit", "canAdmin", "canDelete"], - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "canAdmin": { "type": "boolean", "default": false }, - "canDelete": { "type": "boolean", "default": false }, - "canEdit": { "type": "boolean", "default": false }, - "canSave": { "type": "boolean", "default": false }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - } - }, - "x-kubernetes-group-version-kind": [ - { "group": "folder.grafana.app", "kind": "FolderAccessInfo", "version": "v1" }, - { "group": "folder.grafana.app", "kind": "FolderAccessInfo", "version": "v1beta1" } - ] - }, - "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderInfo": { - "description": "FolderInfo briefly describes a folder -- unlike a folder resource, this is a partial record of the folder metadata used for navigating parents and children", - "type": "object", - "required": ["name", "title"], - "properties": { - "description": { "description": "The folder description", "type": "string" }, - "detached": { "description": "This folder does not resolve", "type": "boolean" }, - "name": { - "description": "Name is the k8s name (eg, the unique identifier) for a folder", - "type": "string", - "default": "" - }, - "parent": { "description": "The parent folder UID", "type": "string" }, - "title": { "description": "Title is the display value", "type": "string", "default": "" } - } - }, - "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderInfoList": { - "description": "FolderInfoList returns a list of folder references (parents or children) Unlike FolderList, each item is not a full k8s object", - "type": "object", - "required": ["items"], - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "items": { - "type": "array", - "items": { - "default": {}, - "allOf": [ - { "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderInfo" } - ] - }, - "x-kubernetes-list-map-keys": ["uid"], - "x-kubernetes-list-type": "map" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" }] - } - }, - "x-kubernetes-group-version-kind": [ - { "group": "folder.grafana.app", "kind": "FolderInfoList", "version": "v1" }, - { "group": "folder.grafana.app", "kind": "FolderInfoList", "version": "v1beta1" } - ] - }, - "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderList": { - "type": "object", - "required": ["metadata", "items"], - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "items": { - "type": "array", - "items": { - "default": {}, - "allOf": [ - { "$ref": "#/components/schemas/com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.Folder" } - ] - } - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" }] - } - }, - "x-kubernetes-group-version-kind": [ - { "group": "folder.grafana.app", "kind": "FolderList", "version": "v1" }, - { "group": "folder.grafana.app", "kind": "FolderList", "version": "v1beta1" } - ] - }, - "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.FolderSpec": { - "type": "object", - "required": ["title"], - "properties": { "description": { "type": "string" }, "title": { "type": "string", "default": "" } } - }, - "com.github.grafana.grafana.apps.folder.pkg.apis.folder.v1.ResourceStats": { - "type": "object", - "required": ["group", "resource", "count"], - "properties": { - "count": { "type": "integer", "format": "int64", "default": 0 }, - "group": { "type": "string", "default": "" }, - "resource": { "type": "string", "default": "" } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.APIResource": { - "description": "APIResource specifies the name of a resource and whether it is namespaced.", - "type": "object", - "required": ["name", "singularName", "namespaced", "kind", "verbs"], - "properties": { - "categories": { - "description": "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", - "type": "array", - "items": { "type": "string", "default": "" }, - "x-kubernetes-list-type": "atomic" - }, - "group": { - "description": "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", - "type": "string" - }, - "kind": { - "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", - "type": "string", - "default": "" - }, - "name": { "description": "name is the plural name of the resource.", "type": "string", "default": "" }, - "namespaced": { - "description": "namespaced indicates if a resource is namespaced or not.", - "type": "boolean", - "default": false - }, - "shortNames": { - "description": "shortNames is a list of suggested short names of the resource.", - "type": "array", - "items": { "type": "string", "default": "" }, - "x-kubernetes-list-type": "atomic" - }, - "singularName": { - "description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", - "type": "string", - "default": "" - }, - "storageVersionHash": { - "description": "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", - "type": "string" - }, - "verbs": { - "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", - "type": "array", - "items": { "type": "string", "default": "" } - }, - "version": { - "description": "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList": { - "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", - "type": "object", - "required": ["groupVersion", "resources"], - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "groupVersion": { - "description": "groupVersion is the group and version this APIResourceList is for.", - "type": "string", - "default": "" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "resources": { - "description": "resources contains the name of the resources and if they are namespaced.", - "type": "array", - "items": { - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResource" }] - }, - "x-kubernetes-list-type": "atomic" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions": { - "description": "DeleteOptions may be provided when deleting an API object.", - "type": "object", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "dryRun": { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "type": "array", - "items": { "type": "string", "default": "" }, - "x-kubernetes-list-type": "atomic" - }, - "gracePeriodSeconds": { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "type": "integer", - "format": "int64" - }, - "ignoreStoreReadErrorWithClusterBreakingPotential": { - "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", - "type": "boolean" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "orphanDependents": { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "type": "boolean" - }, - "preconditions": { - "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions" }] - }, - "propagationPolicy": { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1": { - "description": "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:\u003cname\u003e', where \u003cname\u003e is the name of a field in a struct, or key in a map 'v:\u003cvalue\u003e', where \u003cvalue\u003e is the exact json formatted value of a list item 'i:\u003cindex\u003e', where \u003cindex\u003e is position of a item in a list 'k:\u003ckeys\u003e', where \u003ckeys\u003e is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", - "type": "object" - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta": { - "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", - "type": "object", - "properties": { - "continue": { - "description": "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", - "type": "string" - }, - "remainingItemCount": { - "description": "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", - "type": "integer", - "format": "int64" - }, - "resourceVersion": { - "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", - "type": "string" - }, - "selfLink": { - "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry": { - "description": "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.", - "type": "object", - "properties": { - "apiVersion": { - "description": "APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.", - "type": "string" - }, - "fieldsType": { - "description": "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", - "type": "string" - }, - "fieldsV1": { - "description": "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1" }] - }, - "manager": { - "description": "Manager is an identifier of the workflow managing these fields.", - "type": "string" - }, - "operation": { - "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.", - "type": "string" - }, - "subresource": { - "description": "Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.", - "type": "string" - }, - "time": { - "description": "Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.", - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time" }] - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta": { - "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", - "type": "object", - "properties": { - "annotations": { - "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations", - "type": "object", - "additionalProperties": { "type": "string", "default": "" } - }, - "creationTimestamp": { - "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time" }] - }, - "deletionGracePeriodSeconds": { - "description": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", - "type": "integer", - "format": "int64" - }, - "deletionTimestamp": { - "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time" }] - }, - "finalizers": { - "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", - "type": "array", - "items": { "type": "string", "default": "" }, - "x-kubernetes-list-type": "set", - "x-kubernetes-patch-strategy": "merge" - }, - "generateName": { - "description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will return a 409.\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", - "type": "string" - }, - "generation": { - "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", - "type": "integer", - "format": "int64" - }, - "labels": { - "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels", - "type": "object", - "additionalProperties": { "type": "string", "default": "" } - }, - "managedFields": { - "description": "ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.", - "type": "array", - "items": { - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry" }] - }, - "x-kubernetes-list-type": "atomic" - }, - "name": { - "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names", - "type": "string" - }, - "namespace": { - "description": "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces", - "type": "string" - }, - "ownerReferences": { - "description": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", - "type": "array", - "items": { - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference" }] - }, - "x-kubernetes-list-map-keys": ["uid"], - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "uid", - "x-kubernetes-patch-strategy": "merge" - }, - "resourceVersion": { - "description": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", - "type": "string" - }, - "selfLink": { - "description": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.", - "type": "string" - }, - "uid": { - "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference": { - "description": "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", - "type": "object", - "required": ["apiVersion", "kind", "name", "uid"], - "properties": { - "apiVersion": { "description": "API version of the referent.", "type": "string", "default": "" }, - "blockOwnerDeletion": { - "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", - "type": "boolean" - }, - "controller": { - "description": "If true, this reference points to the managing controller.", - "type": "boolean" - }, - "kind": { - "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string", - "default": "" - }, - "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names", - "type": "string", - "default": "" - }, - "uid": { - "description": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", - "type": "string", - "default": "" - } - }, - "x-kubernetes-map-type": "atomic" - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Patch": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - "type": "object" - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions": { - "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", - "type": "object", - "properties": { - "resourceVersion": { "description": "Specifies the target ResourceVersion", "type": "string" }, - "uid": { "description": "Specifies the target UID.", "type": "string" } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Status": { - "description": "Status is a return value for calls that don't return other objects.", - "type": "object", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "code": { - "description": "Suggested HTTP return code for this status, 0 if not set.", - "type": "integer", - "format": "int32" - }, - "details": { - "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" }] - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "message": { - "description": "A human-readable description of the status of this operation.", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" }] - }, - "reason": { - "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", - "type": "string" - }, - "status": { - "description": "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause": { - "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", - "type": "object", - "properties": { - "field": { - "description": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", - "type": "string" - }, - "message": { - "description": "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", - "type": "string" - }, - "reason": { - "description": "A machine-readable description of the cause of the error. If this value is empty there is no information available.", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails": { - "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", - "type": "object", - "properties": { - "causes": { - "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", - "type": "array", - "items": { - "default": {}, - "allOf": [{ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause" }] - }, - "x-kubernetes-list-type": "atomic" - }, - "group": { - "description": "The group attribute of the resource associated with the status StatusReason.", - "type": "string" - }, - "kind": { - "description": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "name": { - "description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", - "type": "string" - }, - "retryAfterSeconds": { - "description": "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", - "type": "integer", - "format": "int32" - }, - "uid": { - "description": "UID of the resource. (when there is a single resource which can be described). More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Time": { - "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", - "type": "string", - "format": "date-time" - } - } - } -} diff --git a/integrations/grafana/grafana-api/grafana-legacy.json b/integrations/grafana/grafana-api/grafana-legacy.json deleted file mode 100644 index 51d510e5636..00000000000 --- a/integrations/grafana/grafana-api/grafana-legacy.json +++ /dev/null @@ -1,24320 +0,0 @@ -{ - "consumes": ["application/json"], - "produces": ["application/json"], - "schemes": ["http", "https"], - "swagger": "2.0", - "info": { - "description": "The Grafana backend exposes an HTTP API, the same API is used by the frontend to do\neverything from saving dashboards, creating users and updating data sources.", - "title": "Grafana HTTP API.", - "contact": { - "name": "Grafana Labs", - "url": "https://grafana.com", - "email": "hello@grafana.com" - }, - "version": "0.0.1" - }, - "basePath": "/api", - "paths": { - "/access-control/roles": { - "get": { - "description": "Gets all existing roles. The response contains all global and organization local roles, for the organization which user is signed in.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.\n\nThe `delegatable` flag reduces the set of roles to only those for which the signed-in user has permissions to assign.", - "tags": ["access_control", "enterprise"], - "summary": "Get all roles.", - "operationId": "listRoles", - "parameters": [ - { - "type": "boolean", - "name": "delegatable", - "in": "query" - }, - { - "type": "boolean", - "name": "includeHidden", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "name": "targetOrgId", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/listRolesResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Creates a new custom role and maps given permissions to that role. Note that roles with the same prefix as Fixed Roles can’t be created.\n\nYou need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.\nFor example, if a user does not have required permissions for creating users, they won’t be able to create a custom role which allows to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], - "summary": "Create a new custom role.", - "operationId": "createRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateRoleForm" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/createRoleResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/roles/{roleUID}": { - "get": { - "description": "Get a role for the given UID.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.", - "tags": ["access_control", "enterprise"], - "summary": "Get a role.", - "operationId": "getRole", - "parameters": [ - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getRoleResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "You need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.", - "tags": ["access_control", "enterprise"], - "summary": "Update a custom role.", - "operationId": "updateRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateRoleCommand" - } - }, - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getRoleResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Delete a role with the given UID, and it’s permissions. If the role is assigned to a built-in role, the deletion operation will fail, unless force query param is set to true, and in that case all assignments will also be deleted.\n\nYou need to have a permission with action `roles:delete` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only delete a custom role with the same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to delete a custom role which allows to do that.", - "tags": ["access_control", "enterprise"], - "summary": "Delete a custom role.", - "operationId": "deleteRole", - "parameters": [ - { - "type": "boolean", - "name": "force", - "in": "query" - }, - { - "type": "boolean", - "name": "global", - "in": "query" - }, - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/roles/{roleUID}/assignments": { - "get": { - "description": "Get role assignments for the role with the given UID.\nDoes not include role assignments mapped through group attribute sync.\n\nYou need to have a permission with action `teams.roles:list` and scope `teams:id:*` and `users.roles:list` and scope `users:id:*`.", - "tags": ["access_control", "enterprise"], - "summary": "Get role assignments.", - "operationId": "getRoleAssignments", - "parameters": [ - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getRoleAssignmentsResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Set role assignments for the role with the given UID.\n\nYou need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate`, and `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate`.", - "tags": ["access_control", "enterprise"], - "summary": "Set role assignments.", - "operationId": "setRoleAssignments", - "parameters": [ - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SetRoleAssignmentsCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/setRoleAssignmentsResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/status": { - "get": { - "description": "Returns an indicator to check if fine-grained access control is enabled or not.\n\nYou need to have a permission with action `status:accesscontrol` and scope `services:accesscontrol`.", - "tags": ["access_control", "enterprise"], - "summary": "Get status.", - "operationId": "getAccessControlStatus", - "responses": { - "200": { - "$ref": "#/responses/getAccessControlStatusResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/teams/roles/search": { - "post": { - "description": "Lists the roles that have been directly assigned to the given teams.\n\nYou need to have a permission with action `teams.roles:read` and scope `teams:id:*`.", - "tags": ["access_control", "enterprise"], - "summary": "List roles assigned to multiple teams.", - "operationId": "listTeamsRoles", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RolesSearchQuery" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/listTeamsRolesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/teams/{teamId}/roles": { - "get": { - "description": "You need to have a permission with action `teams.roles:read` and scope `teams:id:\u003cteam ID\u003e`.", - "tags": ["access_control", "enterprise"], - "summary": "Get team roles.", - "operationId": "listTeamRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "targetOrgId", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "You need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:type:delegate` for each.", - "tags": ["access_control", "enterprise"], - "summary": "Update team role.", - "operationId": "setTeamRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SetTeamRolesCommand" - } - }, - { - "type": "integer", - "format": "int64", - "name": "targetOrgId", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "You need to have a permission with action `teams.roles:add` and scope `permissions:type:delegate`.", - "tags": ["access_control", "enterprise"], - "summary": "Add team role.", - "operationId": "addTeamRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddTeamRoleCommand" - } - }, - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/teams/{teamId}/roles/{roleUID}": { - "delete": { - "description": "You need to have a permission with action `teams.roles:remove` and scope `permissions:type:delegate`.", - "tags": ["access_control", "enterprise"], - "summary": "Remove team role.", - "operationId": "removeTeamRole", - "parameters": [ - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/users/roles/search": { - "post": { - "description": "Lists the roles that have been directly assigned to the given users. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:read` and scope `users:id:*`.", - "tags": ["access_control", "enterprise"], - "summary": "List roles assigned to multiple users.", - "operationId": "listUsersRoles", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RolesSearchQuery" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/listUsersRolesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/users/{userId}/roles": { - "get": { - "description": "Lists the roles that have been directly assigned to a given user. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:read` and scope `users:id:\u003cuser ID\u003e`.", - "tags": ["access_control", "enterprise"], - "summary": "List roles assigned to a user.", - "operationId": "listUserRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "userId", - "in": "path", - "required": true - }, - { - "type": "boolean", - "name": "includeHidden", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "name": "targetOrgId", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/getAllRolesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Update the user’s role assignments to match the provided set of UIDs. This will remove any assigned roles that aren’t in the request and add roles that are in the set but are not already assigned to the user.\nRoles mapped through group attribute sync are not impacted.\nIf you want to add or remove a single role, consider using Add a user role assignment or Remove a user role assignment instead.\n\nYou need to have a permission with action `users.roles:add` and `users.roles:remove` and scope `permissions:type:delegate` for each. `permissions:type:delegate` scope ensures that users can only assign or unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign or unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], - "summary": "Set user role assignments.", - "operationId": "setUserRoles", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SetUserRolesCommand" - } - }, - { - "type": "integer", - "format": "int64", - "name": "userId", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "targetOrgId", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Assign a role to a specific user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:add` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only assign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], - "summary": "Add a user role assignment.", - "operationId": "addUserRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddUserRoleCommand" - } - }, - { - "type": "integer", - "format": "int64", - "name": "userId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/users/{userId}/roles/{roleUID}": { - "delete": { - "description": "Revoke a role from a user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:remove` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], - "summary": "Remove a user role assignment.", - "operationId": "removeUserRole", - "parameters": [ - { - "type": "boolean", - "description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to remove assignment.", - "name": "global", - "in": "query" - }, - { - "type": "string", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "userId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/{resource}/description": { - "get": { - "tags": ["access_control"], - "summary": "Get a description of a resource's access control properties.", - "operationId": "getResourceDescription", - "parameters": [ - { - "type": "string", - "name": "resource", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/resourcePermissionsDescription" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/{resource}/{resourceID}": { - "get": { - "tags": ["access_control"], - "summary": "Get permissions for a resource.", - "operationId": "getResourcePermissions", - "parameters": [ - { - "type": "string", - "name": "resource", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "resourceID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getResourcePermissionsResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Assigns permissions for a resource by a given type (`:resource`) and `:resourceID` to one or many\nassignment types. Allowed resources are `datasources`, `teams`, `dashboards`, `folders`, and `serviceaccounts`.\nRefer to the `/access-control/{resource}/description` endpoint for allowed Permissions.", - "tags": ["access_control"], - "summary": "Set resource permissions.", - "operationId": "setResourcePermissions", - "parameters": [ - { - "type": "string", - "name": "resource", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "resourceID", - "in": "path", - "required": true - }, - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/setPermissionsCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/{resource}/{resourceID}/builtInRoles/{builtInRole}": { - "post": { - "description": "Assigns permissions for a resource by a given type (`:resource`) and `:resourceID` to a built-in role.\nAllowed resources are `datasources`, `teams`, `dashboards`, `folders`, and `serviceaccounts`.\nRefer to the `/access-control/{resource}/description` endpoint for allowed Permissions.", - "tags": ["access_control"], - "summary": "Set resource permissions for a built-in role.", - "operationId": "setResourcePermissionsForBuiltInRole", - "parameters": [ - { - "type": "string", - "name": "resource", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "resourceID", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "builtInRole", - "in": "path", - "required": true - }, - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/setPermissionCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/{resource}/{resourceID}/teams/{teamID}": { - "post": { - "description": "Assigns permissions for a resource by a given type (`:resource`) and `:resourceID` to a team.\nAllowed resources are `datasources`, `teams`, `dashboards`, `folders`, and `serviceaccounts`.\nRefer to the `/access-control/{resource}/description` endpoint for allowed Permissions.", - "tags": ["access_control"], - "summary": "Set resource permissions for a team.", - "operationId": "setResourcePermissionsForTeam", - "parameters": [ - { - "type": "string", - "name": "resource", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "resourceID", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "teamID", - "in": "path", - "required": true - }, - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/setPermissionCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/{resource}/{resourceID}/users/{userID}": { - "post": { - "description": "Assigns permissions for a resource by a given type (`:resource`) and `:resourceID` to a user or a service account.\nAllowed resources are `datasources`, `teams`, `dashboards`, `folders`, and `serviceaccounts`.\nRefer to the `/access-control/{resource}/description` endpoint for allowed Permissions.", - "tags": ["access_control"], - "summary": "Set resource permissions for a user.", - "operationId": "setResourcePermissionsForUser", - "parameters": [ - { - "type": "string", - "name": "resource", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "resourceID", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "userID", - "in": "path", - "required": true - }, - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/setPermissionCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/ldap-sync-status": { - "get": { - "description": "You need to have a permission with action `ldap.status:read`.", - "tags": ["admin_ldap", "enterprise"], - "summary": "Returns the current state of the LDAP background sync integration.", - "operationId": "getSyncStatus", - "responses": { - "200": { - "$ref": "#/responses/getSyncStatusResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/ldap/reload": { - "post": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.config:reload`.", - "tags": ["admin_ldap"], - "summary": "Reloads the LDAP configuration.", - "operationId": "reloadLDAPCfg", - "responses": { - "410": { - "$ref": "#/responses/goneError" - } - } - } - }, - "/admin/ldap/status": { - "get": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.status:read`.", - "tags": ["admin_ldap"], - "summary": "Attempts to connect to all the configured LDAP servers and returns information on whenever they're available or not.", - "operationId": "getLDAPStatus", - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/ldap/sync/{user_id}": { - "post": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.user:sync`.", - "tags": ["admin_ldap"], - "summary": "Enables a single Grafana user to be synchronized against LDAP.", - "operationId": "postSyncUserWithLDAP", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/ldap/{user_name}": { - "get": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `ldap.user:read`.", - "tags": ["admin_ldap"], - "summary": "Finds an user based on a username in LDAP. This helps illustrate how would the particular user be mapped in Grafana when synced.", - "operationId": "getUserFromLDAP", - "parameters": [ - { - "type": "string", - "name": "user_name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/provisioning/access-control/reload": { - "post": { - "tags": ["admin_provisioning", "access_control", "enterprise"], - "summary": "You need to have a permission with action `provisioning:reload` with scope `provisioners:accesscontrol`.", - "operationId": "adminProvisioningReloadAccessControl", - "responses": { - "202": { - "$ref": "#/responses/acceptedResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - } - } - } - }, - "/admin/provisioning/dashboards/reload": { - "post": { - "security": [ - { - "basic": [] - } - ], - "description": "Reloads the provisioning config files for dashboards again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:dashboards`.", - "tags": ["admin_provisioning"], - "summary": "Reload dashboard provisioning configurations.", - "operationId": "adminProvisioningReloadDashboards", - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/provisioning/datasources/reload": { - "post": { - "security": [ - { - "basic": [] - } - ], - "description": "Reloads the provisioning config files for datasources again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:datasources`.", - "tags": ["admin_provisioning"], - "summary": "Reload datasource provisioning configurations.", - "operationId": "adminProvisioningReloadDatasources", - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/provisioning/plugins/reload": { - "post": { - "security": [ - { - "basic": [] - } - ], - "description": "Reloads the provisioning config files for plugins again. It won’t return until the new provisioned entities are already stored in the database. In case of dashboards, it will stop polling for changes in dashboard files and then restart it with new configurations after returning.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `provisioning:reload` and scope `provisioners:plugin`.", - "tags": ["admin_provisioning"], - "summary": "Reload plugin provisioning configurations.", - "operationId": "adminProvisioningReloadPlugins", - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/settings": { - "get": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `settings:read` and scopes: `settings:*`, `settings:auth.saml:` and `settings:auth.saml:enabled` (property level).", - "tags": ["admin"], - "summary": "Fetch settings.", - "operationId": "adminGetSettings", - "responses": { - "200": { - "$ref": "#/responses/adminGetSettingsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - } - } - } - }, - "/admin/stats": { - "get": { - "description": "Only works with Basic Authentication (username and password). See introduction for an explanation.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `server:stats:read`.", - "tags": ["admin"], - "summary": "Fetch Grafana Stats.", - "operationId": "adminGetStats", - "responses": { - "200": { - "$ref": "#/responses/adminGetStatsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/users": { - "post": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:create`.\nNote that OrgId is an optional parameter that can be used to assign a new user to a different organization when `auto_assign_org` is set to `true`.", - "tags": ["admin_users"], - "summary": "Create new user.", - "operationId": "adminCreateUser", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AdminCreateUserForm" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/adminCreateUserResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "412": { - "$ref": "#/responses/preconditionFailedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/users/{user_id}": { - "delete": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:delete` and scope `global.users:*`.", - "tags": ["admin_users"], - "summary": "Delete global User.", - "operationId": "adminDeleteUser", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/users/{user_id}/auth-tokens": { - "get": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.authtoken:list` and scope `global.users:*`.", - "tags": ["admin_users"], - "summary": "Return a list of all auth tokens (devices) that the user currently have logged in from.", - "operationId": "adminGetUserAuthTokens", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/adminGetUserAuthTokensResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/users/{user_id}/disable": { - "post": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:disable` and scope `global.users:1` (userIDScope).", - "tags": ["admin_users"], - "summary": "Disable user.", - "operationId": "adminDisableUser", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/users/{user_id}/enable": { - "post": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users:enable` and scope `global.users:1` (userIDScope).", - "tags": ["admin_users"], - "summary": "Enable user.", - "operationId": "adminEnableUser", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/users/{user_id}/logout": { - "post": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.logout` and scope `global.users:*`.", - "tags": ["admin_users"], - "summary": "Logout user revokes all auth tokens (devices) for the user. User of issued auth tokens (devices) will no longer be logged in and will be required to authenticate again upon next activity.", - "operationId": "adminLogoutUser", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/users/{user_id}/password": { - "put": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.password:update` and scope `global.users:*`.", - "tags": ["admin_users"], - "summary": "Set password for user.", - "operationId": "adminUpdateUserPassword", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AdminUpdateUserPasswordForm" - } - }, - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/users/{user_id}/permissions": { - "put": { - "description": "Only works with Basic Authentication (username and password). See introduction for an explanation.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.permissions:update` and scope `global.users:*`.", - "tags": ["admin_users"], - "summary": "Set permissions for user.", - "operationId": "adminUpdateUserPermissions", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AdminUpdateUserPermissionsForm" - } - }, - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/users/{user_id}/quotas": { - "get": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.quotas:list` and scope `global.users:1` (userIDScope).", - "tags": ["quota", "admin_users"], - "summary": "Fetch user quota.", - "operationId": "getUserQuota", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getQuotaResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/users/{user_id}/quotas/{quota_target}": { - "put": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.quotas:update` and scope `global.users:1` (userIDScope).", - "tags": ["quota", "admin_users"], - "summary": "Update user quota.", - "operationId": "updateUserQuota", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateQuotaCmd" - } - }, - { - "type": "string", - "name": "quota_target", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/users/{user_id}/revoke-auth-token": { - "post": { - "security": [ - { - "basic": [] - } - ], - "description": "Revokes the given auth token (device) for the user. User of issued auth token (device) will no longer be logged in and will be required to authenticate again upon next activity.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `users.authtoken:update` and scope `global.users:*`.", - "tags": ["admin_users"], - "summary": "Revoke auth token for user.", - "operationId": "adminRevokeUserAuthToken", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RevokeAuthTokenCmd" - } - }, - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/annotations": { - "get": { - "description": "Starting in Grafana v6.4 regions annotations are now returned in one entity that now includes the timeEnd property.", - "tags": ["annotations"], - "summary": "Find Annotations.", - "operationId": "getAnnotations", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Find annotations created after specific epoch datetime in milliseconds.", - "name": "from", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "Find annotations created before specific epoch datetime in milliseconds.", - "name": "to", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "Limit response to annotations created by specific user.", - "name": "userId", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "Find annotations for a specified alert rule by its ID.\ndeprecated: AlertID is deprecated and will be removed in future versions. Please use AlertUID instead.", - "name": "alertId", - "in": "query" - }, - { - "type": "string", - "description": "Find annotations for a specified alert rule by its UID.", - "name": "alertUID", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "Find annotations that are scoped to a specific dashboard", - "name": "dashboardId", - "in": "query" - }, - { - "type": "string", - "description": "Find annotations that are scoped to a specific dashboard", - "name": "dashboardUID", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "Find annotations that are scoped to a specific panel", - "name": "panelId", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "Max limit for results returned.", - "name": "limit", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi", - "description": "Use this to filter organization annotations. Organization annotations are annotations from an annotation data source that are not connected specifically to a dashboard or panel. You can filter by multiple tags.", - "name": "tags", - "in": "query" - }, - { - "enum": ["alert", "annotation"], - "type": "string", - "description": "Return alerts or user created annotations", - "name": "type", - "in": "query" - }, - { - "type": "boolean", - "description": "Match any or all tags", - "name": "matchAny", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/getAnnotationsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Creates an annotation in the Grafana database. The dashboardId and panelId fields are optional. If they are not specified then an organization annotation is created and can be queried in any dashboard that adds the Grafana annotations data source. When creating a region annotation include the timeEnd property.\nThe format for `time` and `timeEnd` should be epoch numbers in millisecond resolution.\nThe response for this HTTP request is slightly different in versions prior to v6.4. In prior versions you would also get an endId if you where creating a region. But in 6.4 regions are represented using a single event with time and timeEnd properties.", - "tags": ["annotations"], - "summary": "Create Annotation.", - "operationId": "postAnnotation", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PostAnnotationsCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/postAnnotationResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/annotations/graphite": { - "post": { - "description": "Creates an annotation by using Graphite-compatible event format. The `when` and `data` fields are optional. If `when` is not specified then the current time will be used as annotation’s timestamp. The `tags` field can also be in prior to Graphite `0.10.0` format (string with multiple tags being separated by a space).", - "tags": ["annotations"], - "summary": "Create Annotation in Graphite format.", - "operationId": "postGraphiteAnnotation", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PostGraphiteAnnotationsCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/postAnnotationResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/annotations/mass-delete": { - "post": { - "tags": ["annotations"], - "summary": "Delete multiple annotations.", - "operationId": "massDeleteAnnotations", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MassDeleteAnnotationsCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/annotations/tags": { - "get": { - "description": "Find all the event tags created in the annotations.", - "tags": ["annotations"], - "summary": "Find Annotations Tags.", - "operationId": "getAnnotationTags", - "parameters": [ - { - "type": "string", - "description": "Tag is a string that you can use to filter tags.", - "name": "tag", - "in": "query" - }, - { - "type": "string", - "default": "100", - "description": "Max limit for results returned.", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/getAnnotationTagsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/annotations/{annotation_id}": { - "get": { - "tags": ["annotations"], - "summary": "Get Annotation by ID.", - "operationId": "getAnnotationByID", - "parameters": [ - { - "type": "string", - "name": "annotation_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getAnnotationByIDResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Updates all properties of an annotation that matches the specified id. To only update certain property, consider using the Patch Annotation operation.", - "tags": ["annotations"], - "summary": "Update Annotation.", - "operationId": "updateAnnotation", - "parameters": [ - { - "type": "string", - "name": "annotation_id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateAnnotationsCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Deletes the annotation that matches the specified ID.", - "tags": ["annotations"], - "summary": "Delete Annotation By ID.", - "operationId": "deleteAnnotationByID", - "parameters": [ - { - "type": "string", - "name": "annotation_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "patch": { - "description": "Updates one or more properties of an annotation that matches the specified ID.\nThis operation currently supports updating of the `text`, `tags`, `time` and `timeEnd` properties.\nThis is available in Grafana 6.0.0-beta2 and above.", - "tags": ["annotations"], - "summary": "Patch Annotation.", - "operationId": "patchAnnotation", - "parameters": [ - { - "type": "string", - "name": "annotation_id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PatchAnnotationsCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/anonymous/devices": { - "get": { - "produces": ["application/json"], - "tags": ["devices"], - "summary": "Lists all devices within the last 30 days", - "operationId": "listDevices", - "responses": { - "200": { - "$ref": "#/responses/devicesResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/anonymous/search": { - "get": { - "produces": ["application/json"], - "tags": ["devices"], - "summary": "Lists all devices within the last 30 days", - "operationId": "SearchDevices", - "responses": { - "200": { - "$ref": "#/responses/devicesSearchResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/cloudmigration/migration": { - "get": { - "tags": ["migrations"], - "summary": "Get a list of all cloud migration sessions that have been created.", - "operationId": "getSessionList", - "responses": { - "200": { - "$ref": "#/responses/cloudMigrationSessionListResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": ["migrations"], - "summary": "Create a migration session.", - "operationId": "createSession", - "parameters": [ - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CloudMigrationSessionRequestDTO" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/cloudMigrationSessionResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/cloudmigration/migration/{uid}": { - "get": { - "tags": ["migrations"], - "summary": "Get a cloud migration session by its uid.", - "operationId": "getSession", - "parameters": [ - { - "type": "string", - "description": "UID of a migration session", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/cloudMigrationSessionResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": ["migrations"], - "summary": "Delete a migration session by its uid.", - "operationId": "deleteSession", - "parameters": [ - { - "type": "string", - "description": "UID of a migration session", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/cloudmigration/migration/{uid}/snapshot": { - "post": { - "description": "If the snapshot initialization is successful, the snapshot uid is returned.", - "tags": ["migrations"], - "summary": "Trigger the creation of an instance snapshot associated with the provided session.", - "operationId": "createSnapshot", - "parameters": [ - { - "type": "string", - "description": "UID of a session", - "name": "uid", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateSnapshotRequestDTO" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/createSnapshotResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/cloudmigration/migration/{uid}/snapshot/{snapshotUid}": { - "get": { - "tags": ["migrations"], - "summary": "Get metadata about a snapshot, including where it is in its processing and final results.", - "operationId": "getSnapshot", - "parameters": [ - { - "type": "integer", - "format": "int64", - "default": 1, - "description": "ResultPage is used for pagination with ResultLimit", - "name": "resultPage", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "default": 100, - "description": "Max limit for snapshot results returned.", - "name": "resultLimit", - "in": "query" - }, - { - "type": "string", - "default": "default", - "description": "ResultSortColumn can be used to override the default system sort. Valid values are \"name\", \"resource_type\", and \"status\".", - "name": "resultSortColumn", - "in": "query" - }, - { - "type": "string", - "default": "ASC", - "description": "ResultSortOrder is used with ResultSortColumn. Valid values are ASC and DESC.", - "name": "resultSortOrder", - "in": "query" - }, - { - "type": "boolean", - "default": false, - "description": "ErrorsOnly is used to only return resources with error statuses", - "name": "errorsOnly", - "in": "query" - }, - { - "type": "string", - "description": "Session UID of a session", - "name": "uid", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "UID of a snapshot", - "name": "snapshotUid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getSnapshotResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/cloudmigration/migration/{uid}/snapshot/{snapshotUid}/cancel": { - "post": { - "description": "TODO: Implement", - "tags": ["migrations"], - "summary": "Cancel a snapshot, wherever it is in its processing chain.", - "operationId": "cancelSnapshot", - "parameters": [ - { - "type": "string", - "description": "Session UID of a session", - "name": "uid", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "UID of a snapshot", - "name": "snapshotUid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/cloudmigration/migration/{uid}/snapshot/{snapshotUid}/upload": { - "post": { - "tags": ["migrations"], - "summary": "Upload a snapshot to the Grafana Migration Service for processing.", - "operationId": "uploadSnapshot", - "parameters": [ - { - "type": "string", - "description": "Session UID of a session", - "name": "uid", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "UID of a snapshot", - "name": "snapshotUid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/cloudmigration/migration/{uid}/snapshots": { - "get": { - "tags": ["migrations"], - "summary": "Get a list of snapshots for a session.", - "operationId": "getShapshotList", - "parameters": [ - { - "type": "integer", - "format": "int64", - "default": 1, - "description": "Page is used for pagination with limit", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "default": 100, - "description": "Max limit for results returned.", - "name": "limit", - "in": "query" - }, - { - "type": "string", - "description": "Session UID of a session", - "name": "uid", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "Sort with value latest to return results sorted in descending order.", - "name": "sort", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/snapshotListResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/cloudmigration/resources/dependencies": { - "get": { - "tags": ["migrations"], - "summary": "Get the resource dependencies graph for the current set of migratable resources.", - "operationId": "getResourceDependencies", - "responses": { - "200": { - "$ref": "#/responses/resourceDependenciesResponse" - } - } - } - }, - "/cloudmigration/token": { - "get": { - "tags": ["migrations"], - "summary": "Fetch the cloud migration token if it exists.", - "operationId": "getCloudMigrationToken", - "responses": { - "200": { - "$ref": "#/responses/cloudMigrationGetTokenResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": ["migrations"], - "summary": "Create gcom access token.", - "operationId": "createCloudMigrationToken", - "responses": { - "200": { - "$ref": "#/responses/cloudMigrationCreateTokenResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/cloudmigration/token/{uid}": { - "delete": { - "tags": ["migrations"], - "summary": "Deletes a cloud migration token.", - "operationId": "deleteCloudMigrationToken", - "parameters": [ - { - "type": "string", - "description": "UID of a cloud migration token", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/cloudMigrationDeleteTokenResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/convert/api/prom/rules": { - "get": { - "produces": ["application/yaml"], - "tags": ["convert_prometheus"], - "summary": "Gets all Grafana-managed alert rules that were imported from Prometheus-compatible sources, grouped by namespace.", - "operationId": "RouteConvertPrometheusCortexGetRules", - "responses": { - "200": { - "description": "PrometheusNamespace", - "schema": { - "$ref": "#/definitions/PrometheusNamespace" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "404": { - "description": "NotFound", - "schema": { - "$ref": "#/definitions/NotFound" - } - } - } - }, - "post": { - "consumes": ["application/json", "application/yaml"], - "produces": ["application/json"], - "tags": ["convert_prometheus"], - "summary": "Converts the submitted rule groups into Grafana-Managed Rules.", - "operationId": "RouteConvertPrometheusCortexPostRuleGroups", - "responses": { - "202": { - "description": "ConvertPrometheusResponse", - "schema": { - "$ref": "#/definitions/ConvertPrometheusResponse" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - } - }, - "/convert/api/prom/rules/{NamespaceTitle}": { - "get": { - "produces": ["application/yaml"], - "tags": ["convert_prometheus"], - "summary": "Gets Grafana-managed alert rules that were imported from Prometheus-compatible sources for a specified namespace (folder).", - "operationId": "RouteConvertPrometheusCortexGetNamespace", - "parameters": [ - { - "type": "string", - "name": "NamespaceTitle", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "PrometheusNamespace", - "schema": { - "$ref": "#/definitions/PrometheusNamespace" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "404": { - "description": "NotFound", - "schema": { - "$ref": "#/definitions/NotFound" - } - } - } - }, - "post": { - "description": "If the group already exists and was not imported from a Prometheus-compatible source initially,\nit will not be replaced and an error will be returned.", - "consumes": ["application/yaml"], - "produces": ["application/json"], - "tags": ["convert_prometheus"], - "summary": "Converts a Prometheus rule group into a Grafana rule group and creates or updates it within the specified namespace.", - "operationId": "RouteConvertPrometheusCortexPostRuleGroup", - "parameters": [ - { - "type": "string", - "name": "NamespaceTitle", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "x-grafana-alerting-datasource-uid", - "in": "header" - }, - { - "type": "boolean", - "name": "x-grafana-alerting-recording-rules-paused", - "in": "header" - }, - { - "type": "boolean", - "name": "x-grafana-alerting-alert-rules-paused", - "in": "header" - }, - { - "type": "string", - "name": "x-grafana-alerting-target-datasource-uid", - "in": "header" - }, - { - "type": "string", - "name": "x-grafana-alerting-folder-uid", - "in": "header" - }, - { - "type": "string", - "name": "x-grafana-alerting-notification-settings", - "in": "header" - }, - { - "name": "Body", - "in": "body", - "schema": { - "$ref": "#/definitions/PrometheusRuleGroup" - } - } - ], - "responses": { - "202": { - "description": "ConvertPrometheusResponse", - "schema": { - "$ref": "#/definitions/ConvertPrometheusResponse" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - }, - "x-raw-request": "true" - }, - "delete": { - "produces": ["application/json"], - "tags": ["convert_prometheus"], - "summary": "Deletes all rule groups that were imported from Prometheus-compatible sources within the specified namespace.", - "operationId": "RouteConvertPrometheusCortexDeleteNamespace", - "parameters": [ - { - "type": "string", - "name": "NamespaceTitle", - "in": "path", - "required": true - } - ], - "responses": { - "202": { - "description": "ConvertPrometheusResponse", - "schema": { - "$ref": "#/definitions/ConvertPrometheusResponse" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - } - }, - "/convert/api/prom/rules/{NamespaceTitle}/{Group}": { - "get": { - "produces": ["application/yaml"], - "tags": ["convert_prometheus"], - "summary": "Gets a single rule group in Prometheus-compatible format if it was imported from a Prometheus-compatible source.", - "operationId": "RouteConvertPrometheusCortexGetRuleGroup", - "parameters": [ - { - "type": "string", - "name": "NamespaceTitle", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "Group", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "PrometheusRuleGroup", - "schema": { - "$ref": "#/definitions/PrometheusRuleGroup" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "404": { - "description": "NotFound", - "schema": { - "$ref": "#/definitions/NotFound" - } - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["convert_prometheus"], - "summary": "Deletes a specific rule group if it was imported from a Prometheus-compatible source.", - "operationId": "RouteConvertPrometheusCortexDeleteRuleGroup", - "parameters": [ - { - "type": "string", - "name": "NamespaceTitle", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "Group", - "in": "path", - "required": true - } - ], - "responses": { - "202": { - "description": "ConvertPrometheusResponse", - "schema": { - "$ref": "#/definitions/ConvertPrometheusResponse" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - } - }, - "/convert/prometheus/config/v1/rules": { - "get": { - "produces": ["application/yaml"], - "tags": ["convert_prometheus"], - "summary": "Gets all Grafana-managed alert rules that were imported from Prometheus-compatible sources, grouped by namespace.", - "operationId": "RouteConvertPrometheusGetRules", - "responses": { - "200": { - "description": "PrometheusNamespace", - "schema": { - "$ref": "#/definitions/PrometheusNamespace" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "404": { - "description": "NotFound", - "schema": { - "$ref": "#/definitions/NotFound" - } - } - } - }, - "post": { - "consumes": ["application/json", "application/yaml"], - "produces": ["application/json"], - "tags": ["convert_prometheus"], - "summary": "Converts the submitted rule groups into Grafana-Managed Rules.", - "operationId": "RouteConvertPrometheusPostRuleGroups", - "responses": { - "202": { - "description": "ConvertPrometheusResponse", - "schema": { - "$ref": "#/definitions/ConvertPrometheusResponse" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - } - }, - "/convert/prometheus/config/v1/rules/{NamespaceTitle}": { - "get": { - "produces": ["application/yaml"], - "tags": ["convert_prometheus"], - "summary": "Gets Grafana-managed alert rules that were imported from Prometheus-compatible sources for a specified namespace (folder).", - "operationId": "RouteConvertPrometheusGetNamespace", - "parameters": [ - { - "type": "string", - "name": "NamespaceTitle", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "PrometheusNamespace", - "schema": { - "$ref": "#/definitions/PrometheusNamespace" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "404": { - "description": "NotFound", - "schema": { - "$ref": "#/definitions/NotFound" - } - } - } - }, - "post": { - "description": "If the group already exists and was not imported from a Prometheus-compatible source initially,\nit will not be replaced and an error will be returned.", - "consumes": ["application/yaml"], - "produces": ["application/json"], - "tags": ["convert_prometheus"], - "summary": "Converts a Prometheus rule group into a Grafana rule group and creates or updates it within the specified namespace.", - "operationId": "RouteConvertPrometheusPostRuleGroup", - "parameters": [ - { - "type": "string", - "name": "NamespaceTitle", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "x-grafana-alerting-datasource-uid", - "in": "header" - }, - { - "type": "boolean", - "name": "x-grafana-alerting-recording-rules-paused", - "in": "header" - }, - { - "type": "boolean", - "name": "x-grafana-alerting-alert-rules-paused", - "in": "header" - }, - { - "type": "string", - "name": "x-grafana-alerting-target-datasource-uid", - "in": "header" - }, - { - "type": "string", - "name": "x-grafana-alerting-folder-uid", - "in": "header" - }, - { - "type": "string", - "name": "x-grafana-alerting-notification-settings", - "in": "header" - }, - { - "name": "Body", - "in": "body", - "schema": { - "$ref": "#/definitions/PrometheusRuleGroup" - } - } - ], - "responses": { - "202": { - "description": "ConvertPrometheusResponse", - "schema": { - "$ref": "#/definitions/ConvertPrometheusResponse" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - }, - "x-raw-request": "true" - }, - "delete": { - "produces": ["application/json"], - "tags": ["convert_prometheus"], - "summary": "Deletes all rule groups that were imported from Prometheus-compatible sources within the specified namespace.", - "operationId": "RouteConvertPrometheusDeleteNamespace", - "parameters": [ - { - "type": "string", - "name": "NamespaceTitle", - "in": "path", - "required": true - } - ], - "responses": { - "202": { - "description": "ConvertPrometheusResponse", - "schema": { - "$ref": "#/definitions/ConvertPrometheusResponse" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - } - }, - "/convert/prometheus/config/v1/rules/{NamespaceTitle}/{Group}": { - "get": { - "produces": ["application/yaml"], - "tags": ["convert_prometheus"], - "summary": "Gets a single rule group in Prometheus-compatible format if it was imported from a Prometheus-compatible source.", - "operationId": "RouteConvertPrometheusGetRuleGroup", - "parameters": [ - { - "type": "string", - "name": "NamespaceTitle", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "Group", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "PrometheusRuleGroup", - "schema": { - "$ref": "#/definitions/PrometheusRuleGroup" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "404": { - "description": "NotFound", - "schema": { - "$ref": "#/definitions/NotFound" - } - } - } - }, - "delete": { - "produces": ["application/json"], - "tags": ["convert_prometheus"], - "summary": "Deletes a specific rule group if it was imported from a Prometheus-compatible source.", - "operationId": "RouteConvertPrometheusDeleteRuleGroup", - "parameters": [ - { - "type": "string", - "name": "NamespaceTitle", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "Group", - "in": "path", - "required": true - } - ], - "responses": { - "202": { - "description": "ConvertPrometheusResponse", - "schema": { - "$ref": "#/definitions/ConvertPrometheusResponse" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - } - }, - "/dashboard/snapshots": { - "get": { - "tags": ["dashboards", "snapshots"], - "summary": "List snapshots.", - "operationId": "searchDashboardSnapshots", - "parameters": [ - { - "type": "string", - "description": "Search Query", - "name": "query", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "default": 1000, - "description": "Limit the number of returned results", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/searchDashboardSnapshotsResponse" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/dashboards/db": { - "post": { - "description": "Creates a new dashboard or updates an existing dashboard.\nNote: This endpoint is not intended for creating folders, use `POST /api/folders` for that.\n\nUse: /apis/dashboards.grafana.app/v1/namespaces/{ns}/dashboards", - "tags": ["dashboards"], - "summary": "Create / Update dashboard", - "operationId": "postDashboard", - "deprecated": true, - "parameters": [ - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SaveDashboardCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/postDashboardResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "412": { - "$ref": "#/responses/preconditionFailedError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/dashboards/home": { - "get": { - "description": "NOTE: the home dashboard is configured in preferences. This API will be removed in G13", - "tags": ["dashboards"], - "operationId": "getHomeDashboard", - "deprecated": true, - "responses": { - "200": { - "$ref": "#/responses/getHomeDashboardResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/dashboards/import": { - "post": { - "tags": ["dashboards"], - "summary": "Import dashboard.", - "operationId": "importDashboard", - "parameters": [ - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ImportDashboardRequest" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/importDashboardResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "412": { - "$ref": "#/responses/preconditionFailedError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/dashboards/interpolate": { - "post": { - "tags": ["dashboards"], - "summary": "Interpolate dashboard. This is an experimental endpoint under dashboardLibrary or suggestedDashboards feature flags and is subject to change.", - "operationId": "interpolateDashboard", - "responses": { - "200": { - "$ref": "#/responses/interpolateDashboardResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/dashboards/public-dashboards": { - "get": { - "description": "Get list of public dashboards", - "tags": ["dashboards", "dashboard_public"], - "operationId": "listPublicDashboards", - "responses": { - "200": { - "$ref": "#/responses/listPublicDashboardsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedPublicError" - }, - "403": { - "$ref": "#/responses/forbiddenPublicError" - }, - "500": { - "$ref": "#/responses/internalServerPublicError" - } - } - } - }, - "/dashboards/tags": { - "get": { - "tags": ["dashboards"], - "summary": "Get all dashboards tags of an organization.", - "operationId": "getDashboardTags", - "deprecated": true, - "responses": { - "200": { - "$ref": "#/responses/getDashboardsTagsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/dashboards/uid/{dashboardUid}/public-dashboards": { - "get": { - "description": "Get public dashboard by dashboardUid", - "tags": ["dashboards", "dashboard_public"], - "operationId": "getPublicDashboard", - "parameters": [ - { - "type": "string", - "name": "dashboardUid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getPublicDashboardResponse" - }, - "400": { - "$ref": "#/responses/badRequestPublicError" - }, - "401": { - "$ref": "#/responses/unauthorisedPublicError" - }, - "403": { - "$ref": "#/responses/forbiddenPublicError" - }, - "404": { - "$ref": "#/responses/notFoundPublicError" - }, - "500": { - "$ref": "#/responses/internalServerPublicError" - } - } - }, - "post": { - "description": "Create public dashboard for a dashboard", - "produces": ["application/json"], - "tags": ["dashboards", "dashboard_public"], - "operationId": "createPublicDashboard", - "parameters": [ - { - "type": "string", - "name": "dashboardUid", - "in": "path", - "required": true - }, - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PublicDashboardDTO" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/createPublicDashboardResponse" - }, - "400": { - "$ref": "#/responses/badRequestPublicError" - }, - "401": { - "$ref": "#/responses/unauthorisedPublicError" - }, - "403": { - "$ref": "#/responses/forbiddenPublicError" - }, - "500": { - "$ref": "#/responses/internalServerPublicError" - } - } - } - }, - "/dashboards/uid/{dashboardUid}/public-dashboards/{uid}": { - "delete": { - "description": "Delete public dashboard for a dashboard", - "tags": ["dashboards", "dashboard_public"], - "operationId": "deletePublicDashboard", - "parameters": [ - { - "type": "string", - "name": "dashboardUid", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestPublicError" - }, - "401": { - "$ref": "#/responses/unauthorisedPublicError" - }, - "403": { - "$ref": "#/responses/forbiddenPublicError" - }, - "500": { - "$ref": "#/responses/internalServerPublicError" - } - } - }, - "patch": { - "description": "Update public dashboard for a dashboard", - "produces": ["application/json"], - "tags": ["dashboards", "dashboard_public"], - "operationId": "updatePublicDashboard", - "parameters": [ - { - "type": "string", - "name": "dashboardUid", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - }, - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PublicDashboardDTO" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/updatePublicDashboardResponse" - }, - "400": { - "$ref": "#/responses/badRequestPublicError" - }, - "401": { - "$ref": "#/responses/unauthorisedPublicError" - }, - "403": { - "$ref": "#/responses/forbiddenPublicError" - }, - "500": { - "$ref": "#/responses/internalServerPublicError" - } - } - } - }, - "/dashboards/uid/{uid}": { - "get": { - "description": "Optional query parameter `apiVersion` selects the Kubernetes API version used to load the dashboard first\n(for example `v1beta1`). If that request fails, the default version is used instead. When omitted, only the default is used.\n\nWill return the dashboard given the dashboard unique identifier (uid).\n\nUse: /apis/dashboards.grafana.app/v1/namespaces/{ns}/dashboards/{uid}", - "tags": ["dashboards"], - "summary": "Get dashboard by uid.", - "operationId": "getDashboardByUID", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/dashboardResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "406": { - "$ref": "#/responses/notAcceptableError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Will delete the dashboard given the specified unique identifier (uid).\n\nUse: /apis/dashboards.grafana.app/v1/namespaces/{ns}/dashboards/{uid}", - "tags": ["dashboards"], - "summary": "Delete dashboard by uid.", - "operationId": "deleteDashboardByUID", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/deleteDashboardResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/dashboards/uid/{uid}/permissions": { - "get": { - "description": "Use: /apis/dashboards.grafana.app/v1/namespaces/{ns}/dashboards/{uid}/access", - "tags": ["dashboards", "permissions"], - "summary": "Gets all existing permissions for the given dashboard.", - "operationId": "getDashboardPermissionsListByUID", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getDashboardPermissionsListResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "This operation will remove existing permissions if they’re not included in the request.", - "tags": ["dashboards", "permissions"], - "summary": "Updates permissions for a dashboard.", - "operationId": "updateDashboardPermissionsByUID", - "deprecated": true, - "parameters": [ - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateDashboardACLCommand" - } - }, - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/dashboards/uid/{uid}/restore": { - "post": { - "description": "This API will be removed when /apis/dashboards.grafana.app/v1 is released.\nYou can restore a dashboard by reading it from history, then creating it again.", - "tags": ["dashboards", "versions"], - "summary": "Restore a dashboard to a given dashboard version using UID.", - "operationId": "restoreDashboardVersionByUID", - "deprecated": true, - "parameters": [ - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RestoreDashboardVersionCommand" - } - }, - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/postDashboardResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/dashboards/uid/{uid}/versions": { - "get": { - "tags": ["dashboards", "versions"], - "summary": "Gets all existing versions for the dashboard using UID.", - "operationId": "getDashboardVersionsByUID", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "default": 0, - "description": "Maximum number of results to return", - "name": "limit", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "default": 0, - "description": "Version to start from when returning queries", - "name": "start", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/dashboardVersionsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/dashboards/uid/{uid}/versions/{DashboardVersionID}": { - "get": { - "tags": ["dashboards", "versions"], - "summary": "Get a specific dashboard version using UID.", - "operationId": "getDashboardVersionByUID", - "deprecated": true, - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "DashboardVersionID", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/dashboardVersionResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources": { - "get": { - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scope: `datasources:*`.", - "tags": ["datasources"], - "summary": "Get all data sources.", - "operationId": "getDataSources", - "responses": { - "200": { - "$ref": "#/responses/getDataSourcesResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "By defining `password` and `basicAuthPassword` under secureJsonData property\nGrafana encrypts them securely as an encrypted blob in the database.\nThe response then lists the encrypted fields under secureJsonFields.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:create`", - "tags": ["datasources"], - "summary": "Create a data source.", - "operationId": "addDataSource", - "parameters": [ - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddDataSourceCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/createOrUpdateDatasourceResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "409": { - "$ref": "#/responses/conflictError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/correlations": { - "get": { - "tags": ["datasources", "correlations"], - "summary": "Gets all correlations.", - "operationId": "getCorrelations", - "parameters": [ - { - "maximum": 1000, - "type": "integer", - "format": "int64", - "default": 100, - "description": "Limit the maximum number of correlations to return per page", - "name": "limit", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "default": 1, - "description": "Page index for starting fetching correlations", - "name": "page", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi", - "description": "Source datasource UID filter to be applied to correlations", - "name": "sourceUID", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/getCorrelationsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/id/{name}": { - "get": { - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).", - "tags": ["datasources"], - "summary": "Get data source Id by Name. This function will be removed in the future.", - "operationId": "getDataSourceIdByName", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getDataSourceIDResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/name/{name}": { - "get": { - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).", - "tags": ["datasources"], - "summary": "Get a single data source by Name. This function will be removed in the future.", - "operationId": "getDataSourceByName", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getDataSourceResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).", - "tags": ["datasources"], - "summary": "Delete an existing data source by name. This function will be removed in the future.", - "operationId": "deleteDataSourceByName", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/deleteDataSourceByNameResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/proxy/uid/{uid}/{datasource_proxy_route}": { - "get": { - "description": "Proxies all calls to the actual data source.", - "tags": ["datasources"], - "summary": "Data source proxy GET calls.", - "operationId": "datasourceProxyGETByUIDcalls", - "parameters": [ - { - "type": "string", - "name": "datasource_proxy_route", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "(empty)" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Proxies all calls to the actual data source. The data source should support POST methods for the specific path and role as defined", - "tags": ["datasources"], - "summary": "Data source proxy POST calls.", - "operationId": "datasourceProxyPOSTByUIDcalls", - "parameters": [ - { - "name": "DatasourceProxyParam", - "in": "body", - "required": true, - "schema": {} - }, - { - "type": "string", - "name": "datasource_proxy_route", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "201": { - "description": "(empty)" - }, - "202": { - "description": "(empty)" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Proxies all calls to the actual data source.", - "tags": ["datasources"], - "summary": "Data source proxy DELETE calls.", - "operationId": "datasourceProxyDELETEByUIDcalls", - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "datasource_proxy_route", - "in": "path", - "required": true - } - ], - "responses": { - "202": { - "description": "(empty)" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/uid/{sourceUID}/correlations": { - "get": { - "tags": ["datasources", "correlations"], - "summary": "Gets all correlations originating from the given data source.", - "operationId": "getCorrelationsBySourceUID", - "parameters": [ - { - "type": "string", - "name": "sourceUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getCorrelationsBySourceUIDResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": ["datasources", "correlations"], - "summary": "Add correlation.", - "operationId": "createCorrelation", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateCorrelationCommand" - } - }, - { - "type": "string", - "name": "sourceUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/createCorrelationResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/uid/{sourceUID}/correlations/{correlationUID}": { - "get": { - "tags": ["datasources", "correlations"], - "summary": "Gets a correlation.", - "operationId": "getCorrelation", - "parameters": [ - { - "type": "string", - "name": "sourceUID", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "correlationUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getCorrelationResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "patch": { - "tags": ["datasources", "correlations"], - "summary": "Updates a correlation.", - "operationId": "updateCorrelation", - "parameters": [ - { - "type": "string", - "name": "sourceUID", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "correlationUID", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateCorrelationCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/updateCorrelationResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/uid/{uid}": { - "get": { - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source).", - "tags": ["datasources"], - "summary": "Get a single data source by UID.", - "operationId": "getDataSourceByUID", - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getDataSourceResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Similar to creating a data source, `password` and `basicAuthPassword` should be defined under\nsecureJsonData in order to be stored securely as an encrypted blob in the database. Then, the\nencrypted fields are listed under secureJsonFields section in the response.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:1` (single data source).", - "tags": ["datasources"], - "summary": "Update an existing data source.", - "operationId": "updateDataSourceByUID", - "parameters": [ - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateDataSourceCommand" - } - }, - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/createOrUpdateDatasourceResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "409": { - "$ref": "#/responses/conflictError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source).", - "tags": ["datasources"], - "summary": "Delete an existing data source by UID.", - "operationId": "deleteDataSourceByUID", - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/uid/{uid}/correlations/{correlationUID}": { - "delete": { - "tags": ["datasources", "correlations"], - "summary": "Delete a correlation.", - "operationId": "deleteCorrelation", - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "correlationUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/deleteCorrelationResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/uid/{uid}/health": { - "get": { - "tags": ["datasources", "health"], - "summary": "Sends a health check request to the plugin datasource identified by the UID.", - "operationId": "checkDatasourceHealthWithUID", - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/uid/{uid}/lbac/teams": { - "get": { - "tags": ["enterprise"], - "summary": "Retrieves LBAC rules for a team.", - "operationId": "getTeamLBACRulesApi", - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getTeamLBACRulesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "tags": ["enterprise"], - "summary": "Updates LBAC rules for a team.", - "operationId": "updateTeamLBACRulesApi", - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateTeamLBACCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/updateTeamLBACRulesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/uid/{uid}/resources/{datasource_proxy_route}": { - "get": { - "tags": ["datasources"], - "summary": "Fetch data source resources.", - "operationId": "callDatasourceResourceWithUID", - "parameters": [ - { - "type": "string", - "name": "datasource_proxy_route", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{dataSourceUID}/cache": { - "get": { - "description": "get cache config for a single data source", - "tags": ["enterprise"], - "operationId": "getDataSourceCacheConfig", - "parameters": [ - { - "type": "string", - "name": "dataSourceUID", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "dataSourceType", - "in": "query" - } - ], - "responses": { - "200": { - "description": "CacheConfigResponse", - "schema": { - "$ref": "#/definitions/CacheConfigResponse" - } - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "set cache config for a single data source", - "tags": ["enterprise"], - "operationId": "setDataSourceCacheConfig", - "parameters": [ - { - "type": "string", - "name": "dataSourceUID", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "dataSourceType", - "in": "query" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CacheConfigSetter" - } - } - ], - "responses": { - "200": { - "description": "CacheConfigResponse", - "schema": { - "$ref": "#/definitions/CacheConfigResponse" - } - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{dataSourceUID}/cache/clean": { - "post": { - "description": "clean cache for a single data source", - "tags": ["enterprise"], - "operationId": "cleanDataSourceCache", - "parameters": [ - { - "type": "string", - "name": "dataSourceUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "CacheConfigResponse", - "schema": { - "$ref": "#/definitions/CacheConfigResponse" - } - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{dataSourceUID}/cache/disable": { - "post": { - "description": "disable cache for a single data source", - "tags": ["enterprise"], - "operationId": "disableDataSourceCache", - "parameters": [ - { - "type": "string", - "name": "dataSourceUID", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "dataSourceType", - "in": "query" - } - ], - "responses": { - "200": { - "description": "CacheConfigResponse", - "schema": { - "$ref": "#/definitions/CacheConfigResponse" - } - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{dataSourceUID}/cache/enable": { - "post": { - "description": "enable cache for a single data source", - "tags": ["enterprise"], - "operationId": "enableDataSourceCache", - "parameters": [ - { - "type": "string", - "name": "dataSourceUID", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "dataSourceType", - "in": "query" - } - ], - "responses": { - "200": { - "description": "CacheConfigResponse", - "schema": { - "$ref": "#/definitions/CacheConfigResponse" - } - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/ds/query": { - "post": { - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:query`.", - "tags": ["datasources"], - "summary": "DataSource query metrics with expressions.", - "operationId": "queryMetricsWithExpressions", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MetricRequest" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/queryMetricsWithExpressionsRespons" - }, - "207": { - "$ref": "#/responses/queryMetricsWithExpressionsRespons" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/folders": { - "get": { - "description": "It returns all folders that the authenticated user has permission to view.\nIf nested folders are enabled, it expects an additional query parameter with the parent folder UID\nand returns the immediate subfolders that the authenticated user has permission to view.\nIf the parameter is not supplied then it returns immediate subfolders under the root\nthat the authenticated user has permission to view.\n\nUse: /apis/folder.grafana.app/v1/namespaces/{ns}/folders", - "tags": ["folders"], - "summary": "Get all folders.", - "operationId": "getFolders", - "deprecated": true, - "parameters": [ - { - "type": "integer", - "format": "int64", - "default": 1000, - "description": "Limit the maximum number of folders to return", - "name": "limit", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "default": 1, - "description": "Page index for starting fetching folders", - "name": "page", - "in": "query" - }, - { - "type": "string", - "description": "The parent folder UID", - "name": "parentUid", - "in": "query" - }, - { - "enum": ["Edit", "View"], - "type": "string", - "default": "View", - "description": "Set to `Edit` to return folders that the user can edit", - "name": "permission", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/getFoldersResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "If nested folders are enabled then it additionally expects the parent folder UID.\n\nUse: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}", - "tags": ["folders"], - "summary": "Create folder.", - "operationId": "createFolder", - "deprecated": true, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateFolderCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/folderResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "409": { - "$ref": "#/responses/conflictError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/folders/{folder_uid}": { - "get": { - "description": "Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}", - "tags": ["folders"], - "summary": "Get folder by uid.", - "operationId": "getFolderByUID", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "folder_uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/folderResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}", - "tags": ["folders"], - "summary": "Update folder.", - "operationId": "updateFolder", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "folder_uid", - "in": "path", - "required": true - }, - { - "description": "To change the unique identifier (uid), provide another one.\nTo overwrite an existing folder with newer version, set `overwrite` to `true`.\nProvide the current version to safelly update the folder: if the provided version differs from the stored one the request will fail, unless `overwrite` is `true`.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateFolderCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/folderResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "409": { - "$ref": "#/responses/conflictError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Deletes an existing folder identified by UID along with all dashboards (and their alerts) stored in the folder. This operation cannot be reverted.\nIf nested folders are enabled then it also deletes all the subfolders.\n\nUse: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}", - "tags": ["folders"], - "summary": "Delete folder.", - "operationId": "deleteFolder", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "folder_uid", - "in": "path", - "required": true - }, - { - "type": "boolean", - "default": false, - "description": "If `true` any Grafana 8 Alerts under this folder will be deleted.\nSet to `false` so that the request will fail if the folder contains any Grafana 8 Alerts.", - "name": "forceDeleteRules", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/deleteFolderResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/folders/{folder_uid}/counts": { - "get": { - "description": "Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid}", - "tags": ["folders"], - "summary": "Gets the count of each descendant of a folder by kind. The folder is identified by UID.", - "operationId": "getFolderDescendantCounts", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "folder_uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getFolderDescendantCountsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/folders/{folder_uid}/move": { - "post": { - "description": "Use: /apis/folder.grafana.app/v1/namespaces/{ns}/folders/{folder_uid},\nChanging the parent folder annotation", - "tags": ["folders"], - "summary": "Move folder.", - "operationId": "moveFolder", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "folder_uid", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MoveFolderCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/folderResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/folders/{folder_uid}/permissions": { - "get": { - "tags": ["folders", "permissions"], - "summary": "Gets all existing permissions for the folder with the given `uid`.", - "operationId": "getFolderPermissionList", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "folder_uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getFolderPermissionListResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": ["folders", "permissions"], - "summary": "Updates permissions for a folder. This operation will remove existing permissions if they’re not included in the request.", - "operationId": "updateFolderPermissions", - "parameters": [ - { - "type": "string", - "name": "folder_uid", - "in": "path", - "required": true - }, - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateDashboardACLCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/groupsync/groups": { - "get": { - "tags": ["group_attribute_sync", "enterprise"], - "summary": "List groups that have mappings set. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "operationId": "getMappedGroups", - "responses": { - "200": { - "$ref": "#/responses/getGroupsResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/groupsync/groups/{group_id}": { - "put": { - "tags": ["group_attribute_sync", "enterprise"], - "summary": "Update mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "operationId": "updateGroupMappings", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/GroupAttributes" - } - }, - { - "type": "string", - "name": "group_id", - "in": "path", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/apiResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": ["group_attribute_sync", "enterprise"], - "summary": "Create mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "operationId": "createGroupMappings", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/GroupAttributes" - } - }, - { - "type": "string", - "name": "group_id", - "in": "path", - "required": true - } - ], - "responses": { - "201": { - "$ref": "#/responses/apiResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": ["group_attribute_sync", "enterprise"], - "summary": "Delete mappings for a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "operationId": "deleteGroupMappings", - "parameters": [ - { - "type": "string", - "name": "group_id", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/groupsync/groups/{group_id}/roles": { - "get": { - "tags": ["group_attribute_sync", "enterprise"], - "summary": "Get roles mapped to a group. This endpoint is behind the feature flag `groupAttributeSync` and is considered experimental.", - "operationId": "getGroupRoles", - "parameters": [ - { - "type": "string", - "name": "group_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getGroupRolesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/health": { - "get": { - "description": "apiHealthHandler will return ok if Grafana's web server is running and it\ncan access the database. If the database cannot be accessed it will return\nhttp status code 503.", - "tags": ["health"], - "operationId": "getHealth", - "responses": { - "200": { - "description": "healthResponse", - "schema": { - "$ref": "#/definitions/healthResponse" - } - }, - "503": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/library-elements": { - "get": { - "description": "Returns a list of all library elements the authenticated user has permission to view.\nUse the `perPage` query parameter to control the maximum number of library elements returned; the default limit is `100`.\nYou can also use the `page` query parameter to fetch library elements from any page other than the first one.", - "tags": ["library_elements"], - "summary": "Get all library elements.", - "operationId": "getLibraryElements", - "parameters": [ - { - "type": "string", - "description": "Part of the name or description searched for.", - "name": "searchString", - "in": "query" - }, - { - "enum": [1], - "type": "integer", - "format": "int64", - "description": "Kind of element to search for.", - "name": "kind", - "in": "query" - }, - { - "enum": ["alpha-asc", "alpha-desc"], - "type": "string", - "description": "Sort order of elements.", - "name": "sortDirection", - "in": "query" - }, - { - "type": "string", - "description": "A comma separated list of types to filter the elements by", - "name": "typeFilter", - "in": "query" - }, - { - "type": "string", - "description": "Element UID to exclude from search results.", - "name": "excludeUid", - "in": "query" - }, - { - "type": "string", - "description": "A comma separated list of folder ID(s) to filter the elements by.\nDeprecated: Use FolderFilterUIDs instead.", - "name": "folderFilter", - "in": "query" - }, - { - "type": "string", - "description": "A comma separated list of folder UID(s) to filter the elements by.", - "name": "folderFilterUIDs", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "default": 100, - "description": "The number of results per page.", - "name": "perPage", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "default": 1, - "description": "The page for a set of records, given that only perPage records are returned at a time. Numbering starts at 1.", - "name": "page", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/getLibraryElementsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Creates a new library element.", - "tags": ["library_elements"], - "summary": "Create library element.", - "operationId": "createLibraryElement", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateLibraryElementCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/getLibraryElementResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/library-elements/name/{library_element_name}": { - "get": { - "description": "Returns a library element with the given name.", - "tags": ["library_elements"], - "summary": "Get library element by name.", - "operationId": "getLibraryElementByName", - "parameters": [ - { - "type": "string", - "name": "library_element_name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getLibraryElementArrayResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/library-elements/{library_element_uid}": { - "get": { - "description": "Returns a library element with the given UID.", - "tags": ["library_elements"], - "summary": "Get library element by UID.", - "operationId": "getLibraryElementByUID", - "parameters": [ - { - "type": "string", - "name": "library_element_uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getLibraryElementResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Deletes an existing library element as specified by the UID. This operation cannot be reverted.\nYou cannot delete a library element that is connected. This operation cannot be reverted.", - "tags": ["library_elements"], - "summary": "Delete library element.", - "operationId": "deleteLibraryElementByUID", - "parameters": [ - { - "type": "string", - "name": "library_element_uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "patch": { - "description": "Updates an existing library element identified by uid.", - "tags": ["library_elements"], - "summary": "Update library element.", - "operationId": "updateLibraryElement", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PatchLibraryElementCommand" - } - }, - { - "type": "string", - "name": "library_element_uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getLibraryElementResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "412": { - "$ref": "#/responses/preconditionFailedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/library-elements/{library_element_uid}/connections/": { - "get": { - "description": "Returns a list of connections for a library element based on the UID specified.", - "tags": ["library_elements"], - "summary": "Get library element connections.", - "operationId": "getLibraryElementConnections", - "parameters": [ - { - "type": "string", - "name": "library_element_uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getLibraryElementConnectionsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/check": { - "get": { - "tags": ["licensing", "enterprise"], - "summary": "Check license availability.", - "operationId": "getStatus", - "responses": { - "200": { - "$ref": "#/responses/getStatusResponse" - } - } - } - }, - "/licensing/custom-permissions": { - "get": { - "description": "You need to have a permission with action `licensing.reports:read`.", - "tags": ["licensing", "enterprise"], - "summary": "Get custom permissions report.", - "operationId": "getCustomPermissionsReport", - "deprecated": true, - "responses": { - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/custom-permissions-csv": { - "get": { - "description": "You need to have a permission with action `licensing.reports:read`.", - "produces": ["text/csv"], - "tags": ["licensing", "enterprise"], - "summary": "Get custom permissions report in CSV format.", - "operationId": "getCustomPermissionsCSV", - "deprecated": true, - "responses": { - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/refresh-stats": { - "get": { - "description": "You need to have a permission with action `licensing:read`.", - "tags": ["licensing", "enterprise"], - "summary": "Refresh license stats.", - "operationId": "refreshLicenseStats", - "responses": { - "200": { - "$ref": "#/responses/refreshLicenseStatsResponse" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/token": { - "get": { - "description": "You need to have a permission with action `licensing:read`.", - "tags": ["licensing", "enterprise"], - "summary": "Get license token.", - "operationId": "getLicenseToken", - "responses": { - "200": { - "$ref": "#/responses/getLicenseTokenResponse" - } - } - }, - "post": { - "description": "You need to have a permission with action `licensing:write`.", - "tags": ["licensing", "enterprise"], - "summary": "Create license token.", - "operationId": "postLicenseToken", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DeleteTokenCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/getLicenseTokenResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - } - } - }, - "delete": { - "description": "Removes the license stored in the Grafana database. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:delete`.", - "tags": ["licensing", "enterprise"], - "summary": "Remove license from database.", - "operationId": "deleteLicenseToken", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DeleteTokenCommand" - } - } - ], - "responses": { - "202": { - "$ref": "#/responses/acceptedResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/token/renew": { - "post": { - "description": "Manually ask license issuer for a new token. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:write`.", - "tags": ["licensing", "enterprise"], - "summary": "Manually force license refresh.", - "operationId": "postRenewLicenseToken", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/postRenewLicenseTokenResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "404": { - "$ref": "#/responses/notFoundError" - } - } - } - }, - "/logout/saml": { - "get": { - "tags": ["saml", "enterprise"], - "summary": "GetLogout initiates single logout process.", - "operationId": "getSAMLLogout", - "responses": { - "302": { - "description": "(empty)" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/org": { - "get": { - "tags": ["org"], - "summary": "Get current Organization.", - "operationId": "getCurrentOrg", - "responses": { - "200": { - "$ref": "#/responses/getCurrentOrgResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "tags": ["org"], - "summary": "Update current Organization.", - "operationId": "updateCurrentOrg", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateOrgForm" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/org/address": { - "put": { - "tags": ["org"], - "summary": "Update current Organization's address.", - "operationId": "updateCurrentOrgAddress", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateOrgAddressForm" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/org/invites": { - "get": { - "tags": ["org", "invites"], - "summary": "Get pending invites.", - "operationId": "getPendingOrgInvites", - "responses": { - "200": { - "$ref": "#/responses/getPendingOrgInvitesResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": ["org", "invites"], - "summary": "Add invite.", - "operationId": "addOrgInvite", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddInviteForm" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "412": { - "$ref": "#/responses/SMTPNotEnabledError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/org/invites/{invitation_code}/revoke": { - "delete": { - "tags": ["org", "invites"], - "summary": "Revoke invite.", - "operationId": "revokeInvite", - "parameters": [ - { - "type": "string", - "name": "invitation_code", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/org/preferences": { - "get": { - "tags": ["org", "preferences"], - "summary": "Get Current Org Prefs.", - "operationId": "getOrgPreferences", - "responses": { - "200": { - "$ref": "#/responses/getPreferencesResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "tags": ["org", "preferences"], - "summary": "Update Current Org Prefs.", - "operationId": "updateOrgPreferences", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdatePrefsCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "patch": { - "tags": ["org", "preferences"], - "summary": "Patch Current Org Prefs.", - "operationId": "patchOrgPreferences", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PatchPrefsCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/org/quotas": { - "get": { - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:read` and scope `org:id:1` (orgIDScope).", - "tags": ["quota", "org"], - "summary": "Fetch Organization quota.", - "operationId": "getCurrentOrgQuota", - "responses": { - "200": { - "$ref": "#/responses/getQuotaResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/org/users": { - "get": { - "description": "Returns all org users within the current organization. Accessible to users with org admin role.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:read` with scope `users:*`.", - "tags": ["org"], - "summary": "Get all users within the current organization.", - "operationId": "getOrgUsersForCurrentOrg", - "parameters": [ - { - "type": "string", - "name": "query", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/getOrgUsersForCurrentOrgResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Adds a global user to the current organization.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:add` with scope `users:*`.", - "tags": ["org"], - "summary": "Add a new user to the current organization.", - "operationId": "addOrgUserToCurrentOrg", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddOrgUserCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/org/users/lookup": { - "get": { - "description": "Returns all org users within the current organization, but with less detailed information.\nAccessible to users with org admin role, admin in any folder or admin of any team.\nMainly used by Grafana UI for providing list of users when adding team members and when editing folder/dashboard permissions.", - "tags": ["org"], - "summary": "Get all users within the current organization (lookup)", - "operationId": "getOrgUsersForCurrentOrgLookup", - "parameters": [ - { - "type": "string", - "name": "query", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/getOrgUsersForCurrentOrgLookupResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/org/users/{user_id}": { - "delete": { - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:remove` with scope `users:*`.", - "tags": ["org"], - "summary": "Delete user in current organization.", - "operationId": "removeOrgUserForCurrentOrg", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "patch": { - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users.role:update` with scope `users:*`.", - "tags": ["org"], - "summary": "Updates the given user.", - "operationId": "updateOrgUserForCurrentOrg", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateOrgUserCommand" - } - }, - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/orgs": { - "get": { - "security": [ - { - "basic": [] - } - ], - "tags": ["orgs"], - "summary": "Search all Organizations.", - "operationId": "searchOrgs", - "parameters": [ - { - "type": "integer", - "format": "int64", - "default": 1, - "name": "page", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "default": 1000, - "description": "Number of items per page\nThe totalCount field in the response can be used for pagination list E.g. if totalCount is equal to 100 teams and the perpage parameter is set to 10 then there are 10 pages of teams.", - "name": "perpage", - "in": "query" - }, - { - "type": "string", - "name": "name", - "in": "query" - }, - { - "type": "string", - "description": "If set it will return results where the query value is contained in the name field. Query values with spaces need to be URL encoded.", - "name": "query", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/searchOrgsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "409": { - "$ref": "#/responses/conflictError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Only works if [users.allow_org_create](https://grafana.com/docs/grafana/latest/administration/configuration/#allow_org_create) is set.", - "tags": ["orgs"], - "summary": "Create Organization.", - "operationId": "createOrg", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrgCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/createOrgResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "409": { - "$ref": "#/responses/conflictError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/orgs/name/{org_name}": { - "get": { - "security": [ - { - "basic": [] - } - ], - "tags": ["orgs"], - "summary": "Get Organization by Name.", - "operationId": "getOrgByName", - "parameters": [ - { - "type": "string", - "name": "org_name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getOrgByNameResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/orgs/{org_id}": { - "get": { - "security": [ - { - "basic": [] - } - ], - "tags": ["orgs"], - "summary": "Get Organization by ID.", - "operationId": "getOrgByID", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "org_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getOrgByIDResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "security": [ - { - "basic": [] - } - ], - "tags": ["orgs"], - "summary": "Update Organization.", - "operationId": "updateOrg", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateOrgForm" - } - }, - { - "type": "integer", - "format": "int64", - "name": "org_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "security": [ - { - "basic": [] - } - ], - "tags": ["orgs"], - "summary": "Delete Organization.", - "operationId": "deleteOrgByID", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "org_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/orgs/{org_id}/address": { - "put": { - "tags": ["orgs"], - "summary": "Update Organization's address.", - "operationId": "updateOrgAddress", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateOrgAddressForm" - } - }, - { - "type": "integer", - "format": "int64", - "name": "org_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/orgs/{org_id}/quotas": { - "get": { - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:read` and scope `org:id:1` (orgIDScope).", - "tags": ["quota", "orgs"], - "summary": "Fetch Organization quota.", - "operationId": "getOrgQuota", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "org_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getQuotaResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/orgs/{org_id}/quotas/{quota_target}": { - "put": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `orgs.quotas:write` and scope `org:id:1` (orgIDScope).", - "tags": ["quota", "orgs"], - "summary": "Update user quota.", - "operationId": "updateOrgQuota", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateQuotaCmd" - } - }, - { - "type": "string", - "name": "quota_target", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "org_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/orgs/{org_id}/users": { - "get": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:read` with scope `users:*`.", - "tags": ["orgs"], - "summary": "Get Users in Organization.", - "operationId": "getOrgUsers", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "org_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getOrgUsersResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Adds a global user to the current organization.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:add` with scope `users:*`.", - "tags": ["orgs"], - "summary": "Add a new user to the current organization.", - "operationId": "addOrgUser", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddOrgUserCommand" - } - }, - { - "type": "integer", - "format": "int64", - "name": "org_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/orgs/{org_id}/users/search": { - "get": { - "security": [ - { - "basic": [] - } - ], - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:read` with scope `users:*`.", - "tags": ["orgs"], - "summary": "Search Users in Organization.", - "operationId": "searchOrgUsers", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "org_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/searchOrgUsersResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/orgs/{org_id}/users/{user_id}": { - "delete": { - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users:remove` with scope `users:*`.", - "tags": ["orgs"], - "summary": "Delete user in current organization.", - "operationId": "removeOrgUser", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "org_id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "patch": { - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `org.users.role:update` with scope `users:*`.", - "tags": ["orgs"], - "summary": "Update Users in Organization.", - "operationId": "updateOrgUser", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateOrgUserCommand" - } - }, - { - "type": "integer", - "format": "int64", - "name": "org_id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/playlists": { - "get": { - "description": "Please refer to [new API](?api=playlist.grafana.app-v1).", - "tags": ["playlists"], - "summary": "Get playlists.", - "operationId": "searchPlaylists", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "query", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "in:limit", - "name": "limit", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/searchPlaylistsResponse" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Please refer to [new API](?api=playlist.grafana.app-v1).", - "tags": ["playlists"], - "summary": "Create playlist.", - "operationId": "createPlaylist", - "deprecated": true, - "parameters": [ - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreatePlaylistCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/createPlaylistResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/playlists/{uid}": { - "get": { - "description": "Please refer to [new API](?api=playlist.grafana.app-v1).", - "tags": ["playlists"], - "summary": "Get playlist.", - "operationId": "getPlaylist", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getPlaylistResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Please refer to [new API](?api=playlist.grafana.app-v1).", - "tags": ["playlists"], - "summary": "Update playlist.", - "operationId": "updatePlaylist", - "deprecated": true, - "parameters": [ - { - "name": "Body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdatePlaylistCommand" - } - }, - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/updatePlaylistResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Please refer to [new API](?api=playlist.grafana.app-v1).", - "tags": ["playlists"], - "summary": "Delete playlist.", - "operationId": "deletePlaylist", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/playlists/{uid}/items": { - "get": { - "description": "Please refer to [new API](?api=playlist.grafana.app-v1) instead (items are included in the playlist spec).", - "tags": ["playlists"], - "summary": "Get playlist items.", - "operationId": "getPlaylistItems", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getPlaylistItemsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/public/dashboards/{accessToken}": { - "get": { - "description": "Get public dashboard for view", - "tags": ["dashboards", "dashboard_public"], - "operationId": "viewPublicDashboard", - "parameters": [ - { - "type": "string", - "name": "accessToken", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/viewPublicDashboardResponse" - }, - "400": { - "$ref": "#/responses/badRequestPublicError" - }, - "401": { - "$ref": "#/responses/unauthorisedPublicError" - }, - "403": { - "$ref": "#/responses/forbiddenPublicError" - }, - "404": { - "$ref": "#/responses/notFoundPublicError" - }, - "500": { - "$ref": "#/responses/internalServerPublicError" - } - } - } - }, - "/public/dashboards/{accessToken}/annotations": { - "get": { - "description": "Get annotations for a public dashboard", - "tags": ["dashboards", "annotations", "dashboard_public"], - "operationId": "getPublicAnnotations", - "parameters": [ - { - "type": "string", - "name": "accessToken", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getPublicAnnotationsResponse" - }, - "400": { - "$ref": "#/responses/badRequestPublicError" - }, - "401": { - "$ref": "#/responses/unauthorisedPublicError" - }, - "403": { - "$ref": "#/responses/forbiddenPublicError" - }, - "404": { - "$ref": "#/responses/notFoundPublicError" - }, - "500": { - "$ref": "#/responses/internalServerPublicError" - } - } - } - }, - "/public/dashboards/{accessToken}/panels/{panelId}/query": { - "post": { - "description": "Get results for a given panel on a public dashboard", - "tags": ["dashboards", "dashboard_public"], - "operationId": "queryPublicDashboard", - "parameters": [ - { - "type": "string", - "name": "accessToken", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "panelId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/queryPublicDashboardResponse" - }, - "400": { - "$ref": "#/responses/badRequestPublicError" - }, - "401": { - "$ref": "#/responses/unauthorisedPublicError" - }, - "403": { - "$ref": "#/responses/forbiddenPublicError" - }, - "404": { - "$ref": "#/responses/notFoundPublicError" - }, - "500": { - "$ref": "#/responses/internalServerPublicError" - } - } - } - }, - "/query-history": { - "get": { - "description": "Returns a list of queries in the query history that matches the search criteria.\nQuery history search supports pagination. Use the `limit` parameter to control the maximum number of queries returned; the default limit is 100.\nYou can also use the `page` query parameter to fetch queries from any page other than the first one.", - "tags": ["query_history"], - "summary": "Query history search.", - "operationId": "searchQueries", - "parameters": [ - { - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi", - "description": "List of data source UIDs to search for", - "name": "datasourceUid", - "in": "query" - }, - { - "type": "string", - "description": "Text inside query or comments that is searched for", - "name": "searchString", - "in": "query" - }, - { - "type": "boolean", - "description": "Flag indicating if only starred queries should be returned", - "name": "onlyStarred", - "in": "query" - }, - { - "enum": ["time-desc", "time-asc"], - "type": "string", - "default": "time-desc", - "description": "Sort method", - "name": "sort", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "Use this parameter to access hits beyond limit. Numbering starts at 1. limit param acts as page size.", - "name": "page", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "Limit the number of returned results", - "name": "limit", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "From range for the query history search", - "name": "from", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "To range for the query history search", - "name": "to", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/getQueryHistorySearchResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Adds new query to query history.", - "tags": ["query_history"], - "summary": "Add query to query history.", - "operationId": "createQuery", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateQueryInQueryHistoryCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/getQueryHistoryResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/query-history/star/{query_history_uid}": { - "post": { - "description": "Adds star to query in query history as specified by the UID.", - "tags": ["query_history"], - "summary": "Add star to query in query history.", - "operationId": "starQuery", - "parameters": [ - { - "type": "string", - "name": "query_history_uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getQueryHistoryResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Removes star from query in query history as specified by the UID.", - "tags": ["query_history"], - "summary": "Remove star to query in query history.", - "operationId": "unstarQuery", - "parameters": [ - { - "type": "string", - "name": "query_history_uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getQueryHistoryResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/query-history/{query_history_uid}": { - "delete": { - "description": "Deletes an existing query in query history as specified by the UID. This operation cannot be reverted.", - "tags": ["query_history"], - "summary": "Delete query in query history.", - "operationId": "deleteQuery", - "parameters": [ - { - "type": "string", - "name": "query_history_uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getQueryHistoryDeleteQueryResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "patch": { - "description": "Updates comment for query in query history as specified by the UID.", - "tags": ["query_history"], - "summary": "Update comment for query in query history.", - "operationId": "patchQueryComment", - "parameters": [ - { - "type": "string", - "name": "query_history_uid", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PatchQueryCommentInQueryHistoryCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/getQueryHistoryResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules": { - "get": { - "tags": ["recording_rules", "enterprise"], - "summary": "Lists all rules in the database: active or deleted.", - "operationId": "listRecordingRules", - "responses": { - "200": { - "$ref": "#/responses/listRecordingRulesResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "tags": ["recording_rules", "enterprise"], - "summary": "Update the active status of a rule.", - "operationId": "updateRecordingRule", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/recordingRuleResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": ["recording_rules", "enterprise"], - "summary": "Create a recording rule that is then registered and started.", - "operationId": "createRecordingRule", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/recordingRuleResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules/test": { - "post": { - "tags": ["recording_rules", "enterprise"], - "summary": "Test a recording rule.", - "operationId": "testCreateRecordingRule", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules/writer": { - "get": { - "tags": ["recording_rules", "enterprise"], - "summary": "Return the prometheus remote write target.", - "operationId": "getRecordingRuleWriteTarget", - "responses": { - "200": { - "$ref": "#/responses/recordingRuleWriteTargetResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "It returns a 422 if there is not an existing prometheus data source configured.", - "tags": ["recording_rules", "enterprise"], - "summary": "Create a remote write target.", - "operationId": "createRecordingRuleWriteTarget", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PrometheusRemoteWriteTargetJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/recordingRuleWriteTargetResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": ["recording_rules", "enterprise"], - "summary": "Delete the remote write target.", - "operationId": "deleteRecordingRuleWriteTarget", - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules/{recordingRuleID}": { - "delete": { - "tags": ["recording_rules", "enterprise"], - "summary": "Delete removes the rule from the registry and stops it.", - "operationId": "deleteRecordingRule", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "recordingRuleID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports": { - "get": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports:read` with scope `reports:*`.", - "tags": ["reports", "enterprise"], - "summary": "List reports.", - "operationId": "getReports", - "responses": { - "200": { - "$ref": "#/responses/getReportsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports.admin:create`.", - "tags": ["reports", "enterprise"], - "summary": "Create a report.", - "operationId": "createReport", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrUpdateReport" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/createReportResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/dashboards/{uid}": { - "get": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports:read` with scope `reports:*`.", - "tags": ["reports", "enterprise"], - "summary": "List reports by dashboard uid.", - "operationId": "getReportsByDashboardUID", - "parameters": [ - { - "type": "string", - "name": "uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getReportsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/email": { - "post": { - "description": "Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client’s timeout to at least 60 seconds. Available to org admins only and with a valid license.\n\nOnly available in Grafana Enterprise v7.0+.\nThis API endpoint is experimental and may be deprecated in a future release. On deprecation, a migration strategy will be provided and the endpoint will remain functional until the next major release of Grafana.\n\nYou need to have a permission with action `reports:send`.", - "tags": ["reports", "enterprise"], - "summary": "Send a report.", - "operationId": "sendReport", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReportEmail" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/images/:image": { - "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`.", - "tags": ["reports", "enterprise"], - "summary": "Get custom branding report image.", - "operationId": "getSettingsImage", - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/render/csvs": { - "get": { - "description": "Available to all users and with a valid license.", - "produces": ["application/zip"], - "tags": ["reports", "enterprise"], - "summary": "Download a CSV report.", - "operationId": "renderReportCSVs", - "parameters": [ - { - "type": "string", - "name": "dashboards", - "in": "query" - }, - { - "type": "string", - "name": "title", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - }, - "204": { - "$ref": "#/responses/noContentResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/render/pdfs": { - "get": { - "description": "Available to all users and with a valid license.", - "produces": ["application/pdf"], - "tags": ["reports", "enterprise"], - "summary": "Render report for multiple dashboards.", - "operationId": "renderReportPDFs", - "parameters": [ - { - "type": "string", - "name": "dashboards", - "in": "query" - }, - { - "type": "string", - "name": "orientation", - "in": "query" - }, - { - "type": "string", - "name": "layout", - "in": "query" - }, - { - "type": "string", - "name": "title", - "in": "query" - }, - { - "type": "string", - "name": "scaleFactor", - "in": "query" - }, - { - "type": "string", - "name": "includeTables", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/settings": { - "get": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:read`x.", - "tags": ["reports", "enterprise"], - "summary": "Get report settings.", - "operationId": "getReportSettings", - "responses": { - "200": { - "$ref": "#/responses/getReportSettingsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.settings:write`xx.", - "tags": ["reports", "enterprise"], - "summary": "Save settings.", - "operationId": "saveReportSettings", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReportSettings" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/test-email": { - "post": { - "description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports:send`.", - "tags": ["reports", "enterprise"], - "summary": "Send test report via email.", - "operationId": "sendTestEmail", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrUpdateReport" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/{id}": { - "get": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports:read` with scope `reports:id:\u003creport ID\u003e`.\n\nRequesting reports using the internal id will stop workgin in the future\nUse the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/", - "tags": ["reports", "enterprise"], - "summary": "Get a report.", - "operationId": "getReport", - "deprecated": true, - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getReportResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.admin:write` with scope `reports:id:\u003creport ID\u003e`.\n\nRequesting reports using the internal id will stop workgin in the future\nUse the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/", - "tags": ["reports", "enterprise"], - "summary": "Update a report.", - "operationId": "updateReport", - "deprecated": true, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrUpdateReport" - } - }, - { - "type": "integer", - "format": "int64", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Available to org admins only and with a valid or expired license.\n\nYou need to have a permission with action `reports.delete` with scope `reports:id:\u003creport ID\u003e`.\n\nRequesting reports using the internal id will stop workgin in the future\nUse the reporting apiserver to manage reports. See: /apis/reporting.grafana.app/", - "tags": ["reports", "enterprise"], - "summary": "Delete a report.", - "operationId": "deleteReport", - "deprecated": true, - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/saml/acs": { - "post": { - "tags": ["saml", "enterprise"], - "summary": "It performs Assertion Consumer Service (ACS).", - "operationId": "postACS", - "parameters": [ - { - "type": "string", - "name": "RelayState", - "in": "query" - } - ], - "responses": { - "302": { - "description": "(empty)" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/saml/metadata": { - "get": { - "produces": ["application/xml;application/samlmetadata+xml"], - "tags": ["saml", "enterprise"], - "summary": "It exposes the SP (Grafana's) metadata for the IdP's consumption.", - "operationId": "getMetadata", - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - } - } - } - }, - "/saml/slo": { - "get": { - "description": "There might be two possible requests:\n1. Logout response (callback) when Grafana initiates single logout and IdP returns response to logout request.\n2. Logout request when another SP initiates single logout and IdP sends logout request to the Grafana,\nor in case of IdP-initiated logout.", - "tags": ["saml", "enterprise"], - "summary": "It performs Single Logout (SLO) callback.", - "operationId": "getSLO", - "responses": { - "302": { - "description": "(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"], - "summary": "It performs Single Logout (SLO) callback.", - "operationId": "postSLO", - "parameters": [ - { - "type": "string", - "name": "SAMLRequest", - "in": "query" - }, - { - "type": "string", - "name": "SAMLResponse", - "in": "query" - } - ], - "responses": { - "302": { - "description": "(empty)" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/search": { - "get": { - "tags": ["search"], - "operationId": "search", - "parameters": [ - { - "type": "string", - "description": "Search Query", - "name": "query", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi", - "description": "List of tags to search for", - "name": "tag", - "in": "query" - }, - { - "enum": ["dash-folder", "dash-db"], - "type": "string", - "description": "Type to search for, dash-folder or dash-db", - "name": "type", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "List of dashboard id’s to search for\nThis is deprecated: users should use the `dashboardUIDs` query parameter instead", - "name": "dashboardIds", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of dashboard uid’s to search for", - "name": "dashboardUIDs", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "List of folder id’s to search in for dashboards\nIf it's `0` then it will query for the top level folders\nThis is deprecated: users should use the `folderUIDs` query parameter instead", - "name": "folderIds", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of folder UID’s to search in for dashboards\nIf it's an empty string then it will query for the top level folders", - "name": "folderUIDs", - "in": "query" - }, - { - "type": "boolean", - "description": "Flag indicating if only starred Dashboards should be returned", - "name": "starred", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "Limit the number of returned results (max 5000)", - "name": "limit", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "Use this parameter to access hits beyond limit. Numbering starts at 1. limit param acts as page size. Only available in Grafana v6.2+.", - "name": "page", - "in": "query" - }, - { - "enum": ["Edit", "View"], - "type": "string", - "default": "View", - "description": "Set to `Edit` to return dashboards/folders that the user can edit", - "name": "permission", - "in": "query" - }, - { - "enum": ["alpha-asc", "alpha-desc"], - "type": "string", - "default": "alpha-asc", - "description": "Sort method; for listing all the possible sort methods use the search sorting endpoint.", - "name": "sort", - "in": "query" - }, - { - "type": "boolean", - "description": "Flag indicating if only soft deleted Dashboards should be returned", - "name": "deleted", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/searchResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/search/sorting": { - "get": { - "tags": ["search"], - "summary": "List search sorting options.", - "operationId": "listSortOptions", - "responses": { - "200": { - "$ref": "#/responses/listSortOptionsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - } - } - } - }, - "/serviceaccounts": { - "post": { - "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:*`\n\nRequires basic authentication and that the authenticated user is a Grafana Admin.", - "tags": ["service_accounts"], - "summary": "Create service account", - "operationId": "createServiceAccount", - "parameters": [ - { - "name": "Body", - "in": "body", - "schema": { - "$ref": "#/definitions/CreateServiceAccountForm" - } - } - ], - "responses": { - "201": { - "$ref": "#/responses/createServiceAccountResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/serviceaccounts/search": { - "get": { - "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:read` scope: `serviceaccounts:*`", - "tags": ["service_accounts"], - "summary": "Search service accounts with paging", - "operationId": "searchOrgServiceAccountsWithPaging", - "parameters": [ - { - "type": "boolean", - "name": "Disabled", - "in": "query" - }, - { - "type": "boolean", - "name": "expiredTokens", - "in": "query" - }, - { - "type": "string", - "description": "It will return results where the query value is contained in one of the name.\nQuery values with spaces need to be URL encoded.", - "name": "query", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "The default value is 1000.", - "name": "perpage", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "description": "The default value is 1.", - "name": "page", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/searchOrgServiceAccountsWithPagingResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/serviceaccounts/{serviceAccountId}": { - "get": { - "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:read` scope: `serviceaccounts:id:1` (single service account)", - "tags": ["service_accounts"], - "summary": "Get single serviceaccount by Id", - "operationId": "retrieveServiceAccount", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "serviceAccountId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/retrieveServiceAccountResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:delete` scope: `serviceaccounts:id:1` (single service account)", - "tags": ["service_accounts"], - "summary": "Delete service account", - "operationId": "deleteServiceAccount", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "serviceAccountId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "patch": { - "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account)", - "tags": ["service_accounts"], - "summary": "Update service account", - "operationId": "updateServiceAccount", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "serviceAccountId", - "in": "path", - "required": true - }, - { - "name": "Body", - "in": "body", - "schema": { - "$ref": "#/definitions/UpdateServiceAccountForm" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/updateServiceAccountResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/serviceaccounts/{serviceAccountId}/tokens": { - "get": { - "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:read` scope: `global:serviceaccounts:id:1` (single service account)\n\nRequires basic authentication and that the authenticated user is a Grafana Admin.", - "tags": ["service_accounts"], - "summary": "Get service account tokens", - "operationId": "listTokens", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "serviceAccountId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/listTokensResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account)", - "tags": ["service_accounts"], - "summary": "CreateNewToken adds a token to a service account", - "operationId": "createToken", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "serviceAccountId", - "in": "path", - "required": true - }, - { - "name": "Body", - "in": "body", - "schema": { - "$ref": "#/definitions/AddServiceAccountTokenCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/createTokenResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "409": { - "$ref": "#/responses/conflictError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/serviceaccounts/{serviceAccountId}/tokens/{tokenId}": { - "delete": { - "description": "Required permissions (See note in the [introduction](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api) for an explanation):\naction: `serviceaccounts:write` scope: `serviceaccounts:id:1` (single service account)\n\nRequires basic authentication and that the authenticated user is a Grafana Admin.", - "tags": ["service_accounts"], - "summary": "DeleteToken deletes service account tokens", - "operationId": "deleteToken", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "tokenId", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "serviceAccountId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/signing-keys/keys": { - "get": { - "description": "Required permissions\nNone", - "tags": ["signing_keys"], - "summary": "Get JSON Web Key Set (JWKS) with all the keys that can be used to verify tokens (public keys)", - "operationId": "retrieveJWKS", - "responses": { - "200": { - "$ref": "#/responses/jwksResponse" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/snapshot/shared-options": { - "get": { - "tags": ["snapshots"], - "summary": "Get snapshot sharing settings.", - "operationId": "getSharingOptions", - "responses": { - "200": { - "$ref": "#/responses/getSharingOptionsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - } - } - } - }, - "/snapshots": { - "post": { - "description": "Snapshot public mode should be enabled or authentication is required.", - "tags": ["dashboards", "snapshots"], - "summary": "When creating a snapshot using the API, you have to provide the full dashboard payload including the snapshot data. This endpoint is designed for the Grafana UI.", - "operationId": "createDashboardSnapshot", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateDashboardSnapshotCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/createDashboardSnapshotResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/snapshots-delete/{deleteKey}": { - "get": { - "description": "Snapshot public mode should be enabled or authentication is required.", - "tags": ["dashboards", "snapshots"], - "summary": "Delete Snapshot by deleteKey.", - "operationId": "deleteDashboardSnapshotByDeleteKey", - "parameters": [ - { - "type": "string", - "name": "deleteKey", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/snapshots/{key}": { - "get": { - "tags": ["dashboards", "snapshots"], - "summary": "Get Snapshot by Key.", - "operationId": "getDashboardSnapshot", - "parameters": [ - { - "type": "string", - "name": "key", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getDashboardSnapshotResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": ["dashboards", "snapshots"], - "summary": "Delete Snapshot by Key.", - "operationId": "deleteDashboardSnapshot", - "parameters": [ - { - "type": "string", - "name": "key", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/teams": { - "post": { - "tags": ["teams"], - "summary": "Add Team.", - "operationId": "createTeam", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateTeamCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/createTeamResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "409": { - "$ref": "#/responses/conflictError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/teams/search": { - "get": { - "tags": ["teams"], - "summary": "Team Search With Paging.", - "operationId": "searchTeams", - "parameters": [ - { - "type": "integer", - "format": "int64", - "default": 1, - "name": "page", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "default": 1000, - "description": "Number of items per page\nThe totalCount field in the response can be used for pagination list E.g. if totalCount is equal to 100 teams and the perpage parameter is set to 10 then there are 10 pages of teams.", - "name": "perpage", - "in": "query" - }, - { - "type": "string", - "name": "name", - "in": "query" - }, - { - "type": "string", - "description": "If set it will return results where the query value is contained in the name field. Query values with spaces need to be URL encoded.", - "name": "query", - "in": "query" - }, - { - "type": "boolean", - "default": false, - "name": "accesscontrol", - "in": "query" - }, - { - "type": "string", - "name": "sort", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/searchTeamsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/teams/{teamId}/groups": { - "get": { - "tags": ["sync_team_groups", "enterprise"], - "summary": "Get External Groups.", - "operationId": "getTeamGroupsApi", - "parameters": [ - { - "type": "string", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getTeamGroupsApiResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": ["sync_team_groups", "enterprise"], - "summary": "Add External Group.", - "operationId": "addTeamGroupApi", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/TeamGroupMapping" - } - }, - { - "type": "string", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": ["sync_team_groups", "enterprise"], - "summary": "Remove External Group.", - "operationId": "removeTeamGroupApiQuery", - "parameters": [ - { - "type": "string", - "name": "groupId", - "in": "query" - }, - { - "type": "string", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/teams/{teamId}/groups/search": { - "get": { - "tags": ["sync_team_groups", "enterprise"], - "summary": "Search for team groups with optional filtering and pagination.", - "operationId": "searchTeamGroups", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "teamId", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "default": 1, - "name": "page", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "default": 1000, - "description": "Number of items per page", - "name": "perpage", - "in": "query" - }, - { - "type": "string", - "description": "If set it will return results where the query value is contained in the name field. Query values with spaces need to be URL encoded.", - "name": "query", - "in": "query" - }, - { - "type": "string", - "description": "Filter by exact name match", - "name": "name", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/searchTeamGroupsResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/teams/{team_id}": { - "get": { - "tags": ["teams"], - "summary": "Get Team By ID.", - "operationId": "getTeamByID", - "parameters": [ - { - "type": "string", - "name": "team_id", - "in": "path", - "required": true - }, - { - "type": "boolean", - "default": false, - "name": "accesscontrol", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/getTeamByIDResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "tags": ["teams"], - "summary": "Update Team.", - "operationId": "updateTeam", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateTeamCommand" - } - }, - { - "type": "string", - "name": "team_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "409": { - "$ref": "#/responses/conflictError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": ["teams"], - "summary": "Delete Team By ID.", - "operationId": "deleteTeamByID", - "parameters": [ - { - "type": "string", - "name": "team_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/teams/{team_id}/members": { - "get": { - "tags": ["teams"], - "summary": "Get Team Members.", - "operationId": "getTeamMembers", - "parameters": [ - { - "type": "string", - "name": "team_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getTeamMembersResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Takes user emails, and updates team members and admins to the provided lists of users.\nAny current team members and admins not in the provided lists will be removed.", - "tags": ["teams"], - "summary": "Set team memberships.", - "operationId": "setTeamMemberships", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SetTeamMembershipsCommand" - } - }, - { - "type": "string", - "name": "team_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": ["teams"], - "summary": "Add Team Member.", - "operationId": "addTeamMember", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddTeamMemberCommand" - } - }, - { - "type": "string", - "name": "team_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/teams/{team_id}/members/{user_id}": { - "put": { - "tags": ["teams"], - "summary": "Update Team Member.", - "operationId": "updateTeamMember", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateTeamMemberCommand" - } - }, - { - "type": "string", - "name": "team_id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": ["teams"], - "summary": "Remove Member From Team.", - "operationId": "removeTeamMember", - "parameters": [ - { - "type": "string", - "name": "team_id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/teams/{team_id}/preferences": { - "get": { - "tags": ["teams", "preferences"], - "summary": "Get Team Preferences.", - "operationId": "getTeamPreferences", - "parameters": [ - { - "type": "string", - "name": "team_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getPreferencesResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "tags": ["teams", "preferences"], - "summary": "Update Team Preferences.", - "operationId": "updateTeamPreferences", - "parameters": [ - { - "type": "string", - "name": "team_id", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdatePrefsCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/user": { - "get": { - "description": "Get (current authenticated user)", - "tags": ["signed_in_user"], - "operationId": "getSignedInUser", - "responses": { - "200": { - "$ref": "#/responses/userResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "tags": ["signed_in_user"], - "summary": "Update signed in User.", - "operationId": "updateSignedInUser", - "parameters": [ - { - "description": "To change the email, name, login, theme, provide another one.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateUserCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "409": { - "$ref": "#/responses/conflictError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/user/auth-tokens": { - "get": { - "description": "Return a list of all auth tokens (devices) that the actual user currently have logged in from.", - "tags": ["signed_in_user"], - "summary": "Auth tokens of the actual User.", - "operationId": "getUserAuthTokens", - "responses": { - "200": { - "$ref": "#/responses/getUserAuthTokensResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/user/email/update": { - "get": { - "description": "Update the email of user given a verification code.", - "tags": ["user"], - "summary": "Update user email.", - "operationId": "updateUserEmail", - "responses": { - "302": { - "$ref": "#/responses/okResponse" - } - } - } - }, - "/user/helpflags/clear": { - "get": { - "tags": ["signed_in_user"], - "summary": "Clear user help flag.", - "operationId": "clearHelpFlags", - "responses": { - "200": { - "$ref": "#/responses/helpFlagResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/user/helpflags/{flag_id}": { - "put": { - "tags": ["signed_in_user"], - "summary": "Set user help flag.", - "operationId": "setHelpFlag", - "parameters": [ - { - "type": "string", - "name": "flag_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/helpFlagResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/user/orgs": { - "get": { - "security": [ - { - "basic": [] - } - ], - "description": "Return a list of all organizations of the current user.", - "tags": ["signed_in_user"], - "summary": "Organizations of the actual User.", - "operationId": "getSignedInUserOrgList", - "responses": { - "200": { - "$ref": "#/responses/getSignedInUserOrgListResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/user/password": { - "put": { - "security": [ - { - "basic": [] - } - ], - "description": "Changes the password for the user.", - "tags": ["signed_in_user"], - "summary": "Change Password.", - "operationId": "changeUserPassword", - "parameters": [ - { - "description": "To change the email, name, login, theme, provide another one.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ChangeUserPasswordCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/user/preferences": { - "get": { - "tags": ["signed_in_user", "preferences"], - "summary": "Get user preferences.", - "operationId": "getUserPreferences", - "responses": { - "200": { - "$ref": "#/responses/getPreferencesResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Omitting a key (`theme`, `homeDashboardUID`, `timezone`) will cause the current value to be replaced with the system default value.", - "tags": ["signed_in_user", "preferences"], - "summary": "Update user preferences.", - "operationId": "updateUserPreferences", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdatePrefsCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "patch": { - "tags": ["signed_in_user", "preferences"], - "summary": "Patch user preferences.", - "operationId": "patchUserPreferences", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PatchPrefsCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/user/quotas": { - "get": { - "tags": ["quota", "signed_in_user"], - "summary": "Fetch user quota.", - "operationId": "getUserQuotas", - "responses": { - "200": { - "$ref": "#/responses/getQuotaResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/user/revoke-auth-token": { - "post": { - "description": "Revokes the given auth token (device) for the actual user. User of issued auth token (device) will no longer be logged in and will be required to authenticate again upon next activity.", - "tags": ["signed_in_user"], - "summary": "Revoke an auth token of the actual User.", - "operationId": "revokeUserAuthToken", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RevokeAuthTokenCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/user/stars/dashboard/uid/{dashboard_uid}": { - "post": { - "description": "Stars the given Dashboard for the actual user.", - "tags": ["signed_in_user"], - "summary": "Star a dashboard.", - "operationId": "starDashboardByUID", - "parameters": [ - { - "type": "string", - "name": "dashboard_uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Deletes the starring of the given Dashboard for the actual user.", - "tags": ["signed_in_user"], - "summary": "Unstar a dashboard.", - "operationId": "unstarDashboardByUID", - "parameters": [ - { - "type": "string", - "name": "dashboard_uid", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/user/teams": { - "get": { - "description": "Return a list of all teams that the current user is member of.", - "tags": ["signed_in_user"], - "summary": "Teams that the actual User is member of.", - "operationId": "getSignedInUserTeamList", - "responses": { - "200": { - "$ref": "#/responses/getSignedInUserTeamListResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/user/using/{org_id}": { - "post": { - "description": "Switch user context to the given organization.", - "tags": ["signed_in_user"], - "summary": "Switch user context for signed in user.", - "operationId": "userSetUsingOrg", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "org_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/users": { - "get": { - "description": "Returns all users that the authenticated user has permission to view, admin permission required.", - "tags": ["users"], - "summary": "Get users.", - "operationId": "searchUsers", - "parameters": [ - { - "type": "integer", - "format": "int64", - "default": 1000, - "description": "Limit the maximum number of users to return per page", - "name": "perpage", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "default": 1, - "description": "Page index for starting fetching users", - "name": "page", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/searchUsersResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/users/lookup": { - "get": { - "tags": ["users"], - "summary": "Get user by login or email.", - "operationId": "getUserByLoginOrEmail", - "parameters": [ - { - "type": "string", - "description": "loginOrEmail of the user", - "name": "loginOrEmail", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/userResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/users/search": { - "get": { - "tags": ["users"], - "summary": "Get users with paging.", - "operationId": "searchUsersWithPaging", - "responses": { - "200": { - "$ref": "#/responses/searchUsersWithPagingResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/users/{user_id}": { - "get": { - "tags": ["users"], - "summary": "Get user by id.", - "operationId": "getUserByID", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/userResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Update the user identified by id.", - "tags": ["users"], - "summary": "Update user.", - "operationId": "updateUser", - "parameters": [ - { - "description": "To change the email, name, login, theme, provide another one.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateUserCommand" - } - }, - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "409": { - "$ref": "#/responses/conflictError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/users/{user_id}/orgs": { - "get": { - "description": "Get organizations for user identified by id.", - "tags": ["users"], - "summary": "Get organizations for user.", - "operationId": "getUserOrgList", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getUserOrgListResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/users/{user_id}/teams": { - "get": { - "description": "Get teams for user identified by id.", - "tags": ["users"], - "summary": "Get teams for user.", - "operationId": "getUserTeams", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getUserTeamsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/v1/provisioning/alert-rules": { - "get": { - "tags": ["provisioning"], - "summary": "Get all the alert rules.", - "operationId": "RouteGetAlertRules", - "deprecated": true, - "responses": { - "200": { - "description": "ProvisionedAlertRules", - "schema": { - "$ref": "#/definitions/ProvisionedAlertRules" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - }, - "post": { - "consumes": ["application/json"], - "tags": ["provisioning"], - "summary": "Create a new alert rule.", - "operationId": "RoutePostAlertRule", - "deprecated": true, - "parameters": [ - { - "name": "Body", - "in": "body", - "schema": { - "$ref": "#/definitions/ProvisionedAlertRule" - } - }, - { - "type": "string", - "name": "X-Disable-Provenance", - "in": "header" - } - ], - "responses": { - "201": { - "description": "ProvisionedAlertRule", - "schema": { - "$ref": "#/definitions/ProvisionedAlertRule" - } - }, - "400": { - "description": "ValidationError", - "schema": { - "$ref": "#/definitions/ValidationError" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - } - }, - "/v1/provisioning/alert-rules/export": { - "get": { - "produces": ["application/json", "application/yaml", "application/terraform+hcl", "text/yaml", "text/hcl"], - "tags": ["provisioning"], - "summary": "Export all alert rules in provisioning file format.", - "operationId": "RouteGetAlertRulesExport", - "parameters": [ - { - "type": "boolean", - "default": false, - "description": "Whether to initiate a download of the file or not.", - "name": "download", - "in": "query" - }, - { - "enum": ["yaml", "json", "hcl"], - "type": "string", - "default": "yaml", - "description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.", - "name": "format", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "description": "UIDs of folders from which to export rules", - "name": "folderUid", - "in": "query" - }, - { - "type": "string", - "description": "Name of group of rules to export. Must be specified only together with a single folder UID", - "name": "group", - "in": "query" - }, - { - "type": "string", - "description": "UID of alert rule to export. If specified, parameters folderUid and group must be empty.", - "name": "ruleUid", - "in": "query" - } - ], - "responses": { - "200": { - "description": "AlertingFileExport", - "schema": { - "$ref": "#/definitions/AlertingFileExport" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "404": { - "description": " Not found." - } - } - } - }, - "/v1/provisioning/alert-rules/{UID}": { - "get": { - "tags": ["provisioning"], - "summary": "Get a specific alert rule by UID.", - "operationId": "RouteGetAlertRule", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "Alert rule UID", - "name": "UID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ProvisionedAlertRule", - "schema": { - "$ref": "#/definitions/ProvisionedAlertRule" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "404": { - "description": " Not found." - } - } - }, - "put": { - "consumes": ["application/json"], - "tags": ["provisioning"], - "summary": "Update an existing alert rule.", - "operationId": "RoutePutAlertRule", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "Alert rule UID", - "name": "UID", - "in": "path", - "required": true - }, - { - "name": "Body", - "in": "body", - "schema": { - "$ref": "#/definitions/ProvisionedAlertRule" - } - }, - { - "type": "string", - "name": "X-Disable-Provenance", - "in": "header" - } - ], - "responses": { - "200": { - "description": "ProvisionedAlertRule", - "schema": { - "$ref": "#/definitions/ProvisionedAlertRule" - } - }, - "400": { - "description": "ValidationError", - "schema": { - "$ref": "#/definitions/ValidationError" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - }, - "delete": { - "tags": ["provisioning"], - "summary": "Delete a specific alert rule by UID.", - "operationId": "RouteDeleteAlertRule", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "Alert rule UID", - "name": "UID", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "X-Disable-Provenance", - "in": "header" - } - ], - "responses": { - "204": { - "description": " The alert rule was deleted successfully." - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - } - }, - "/v1/provisioning/alert-rules/{UID}/export": { - "get": { - "produces": ["application/json", "application/yaml", "application/terraform+hcl", "text/yaml", "text/hcl"], - "tags": ["provisioning"], - "summary": "Export an alert rule in provisioning file format.", - "operationId": "RouteGetAlertRuleExport", - "parameters": [ - { - "type": "boolean", - "default": false, - "description": "Whether to initiate a download of the file or not.", - "name": "download", - "in": "query" - }, - { - "enum": ["yaml", "json", "hcl"], - "type": "string", - "default": "yaml", - "description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.", - "name": "format", - "in": "query" - }, - { - "type": "string", - "description": "Alert rule UID", - "name": "UID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "AlertingFileExport", - "schema": { - "$ref": "#/definitions/AlertingFileExport" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "404": { - "description": " Not found." - } - } - } - }, - "/v1/provisioning/contact-points": { - "get": { - "tags": ["provisioning"], - "summary": "Get all the contact points.", - "operationId": "RouteGetContactpoints", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "Filter by name", - "name": "name", - "in": "query" - } - ], - "responses": { - "200": { - "description": "ContactPoints", - "schema": { - "$ref": "#/definitions/ContactPoints" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - }, - "post": { - "consumes": ["application/json"], - "tags": ["provisioning"], - "summary": "Create a contact point.", - "operationId": "RoutePostContactpoints", - "deprecated": true, - "parameters": [ - { - "name": "Body", - "in": "body", - "schema": { - "$ref": "#/definitions/EmbeddedContactPoint" - } - }, - { - "type": "string", - "name": "X-Disable-Provenance", - "in": "header" - } - ], - "responses": { - "202": { - "description": "EmbeddedContactPoint", - "schema": { - "$ref": "#/definitions/EmbeddedContactPoint" - } - }, - "400": { - "description": "ValidationError", - "schema": { - "$ref": "#/definitions/ValidationError" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - } - }, - "/v1/provisioning/contact-points/export": { - "get": { - "produces": ["application/json", "application/yaml", "application/terraform+hcl", "text/yaml", "text/hcl"], - "tags": ["provisioning"], - "summary": "Export all contact points in provisioning file format.", - "operationId": "RouteGetContactpointsExport", - "parameters": [ - { - "type": "boolean", - "default": false, - "description": "Whether to initiate a download of the file or not.", - "name": "download", - "in": "query" - }, - { - "enum": ["yaml", "json", "hcl"], - "type": "string", - "default": "yaml", - "description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.", - "name": "format", - "in": "query" - }, - { - "type": "boolean", - "default": false, - "description": "Whether any contained secure settings should be decrypted or left redacted. Redacted settings will contain RedactedValue instead. Currently, only org admin can view decrypted secure settings.", - "name": "decrypt", - "in": "query" - }, - { - "type": "string", - "description": "Filter by name", - "name": "name", - "in": "query" - } - ], - "responses": { - "200": { - "description": "AlertingFileExport", - "schema": { - "$ref": "#/definitions/AlertingFileExport" - } - }, - "403": { - "description": "PermissionDenied", - "schema": { - "$ref": "#/definitions/PermissionDenied" - } - } - } - } - }, - "/v1/provisioning/contact-points/{UID}": { - "put": { - "consumes": ["application/json"], - "tags": ["provisioning"], - "summary": "Update an existing contact point.", - "operationId": "RoutePutContactpoint", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "UID is the contact point unique identifier", - "name": "UID", - "in": "path", - "required": true - }, - { - "name": "Body", - "in": "body", - "schema": { - "$ref": "#/definitions/EmbeddedContactPoint" - } - }, - { - "type": "string", - "name": "X-Disable-Provenance", - "in": "header" - } - ], - "responses": { - "202": { - "description": "Ack", - "schema": { - "$ref": "#/definitions/Ack" - } - }, - "400": { - "description": "ValidationError", - "schema": { - "$ref": "#/definitions/ValidationError" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - }, - "delete": { - "consumes": ["application/json"], - "tags": ["provisioning"], - "summary": "Delete a contact point.", - "operationId": "RouteDeleteContactpoints", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "UID is the contact point unique identifier", - "name": "UID", - "in": "path", - "required": true - } - ], - "responses": { - "202": { - "description": " The contact point was deleted successfully." - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - } - }, - "/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}": { - "get": { - "tags": ["provisioning"], - "summary": "Get a rule group.", - "operationId": "RouteGetAlertRuleGroup", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "FolderUID", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "Group", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "AlertRuleGroup", - "schema": { - "$ref": "#/definitions/AlertRuleGroup" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "404": { - "description": " Not found." - } - } - }, - "put": { - "consumes": ["application/json"], - "tags": ["provisioning"], - "summary": "Create or update alert rule group.", - "operationId": "RoutePutAlertRuleGroup", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "X-Disable-Provenance", - "in": "header" - }, - { - "type": "string", - "name": "FolderUID", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "Group", - "in": "path", - "required": true - }, - { - "name": "Body", - "in": "body", - "schema": { - "$ref": "#/definitions/AlertRuleGroup" - } - } - ], - "responses": { - "200": { - "description": "AlertRuleGroup", - "schema": { - "$ref": "#/definitions/AlertRuleGroup" - } - }, - "400": { - "description": "ValidationError", - "schema": { - "$ref": "#/definitions/ValidationError" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - }, - "delete": { - "description": "Delete rule group", - "tags": ["provisioning"], - "operationId": "RouteDeleteAlertRuleGroup", - "deprecated": true, - "parameters": [ - { - "type": "string", - "name": "FolderUID", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "Group", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": " The alert rule group was deleted successfully." - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "404": { - "description": "NotFound", - "schema": { - "$ref": "#/definitions/NotFound" - } - } - } - } - }, - "/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}/export": { - "get": { - "produces": ["application/json", "application/yaml", "application/terraform+hcl", "text/yaml", "text/hcl"], - "tags": ["provisioning"], - "summary": "Export an alert rule group in provisioning file format.", - "operationId": "RouteGetAlertRuleGroupExport", - "parameters": [ - { - "type": "boolean", - "default": false, - "description": "Whether to initiate a download of the file or not.", - "name": "download", - "in": "query" - }, - { - "enum": ["yaml", "json", "hcl"], - "type": "string", - "default": "yaml", - "description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.", - "name": "format", - "in": "query" - }, - { - "type": "string", - "name": "FolderUID", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "Group", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "AlertingFileExport", - "schema": { - "$ref": "#/definitions/AlertingFileExport" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "404": { - "description": " Not found." - } - } - } - }, - "/v1/provisioning/mute-timings": { - "get": { - "tags": ["provisioning"], - "summary": "Get all the mute timings.", - "operationId": "RouteGetMuteTimings", - "deprecated": true, - "responses": { - "200": { - "description": "MuteTimings", - "schema": { - "$ref": "#/definitions/MuteTimings" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - }, - "post": { - "consumes": ["application/json"], - "tags": ["provisioning"], - "summary": "Create a new mute timing.", - "operationId": "RoutePostMuteTiming", - "deprecated": true, - "parameters": [ - { - "name": "Body", - "in": "body", - "schema": { - "$ref": "#/definitions/MuteTimeInterval" - } - }, - { - "type": "string", - "name": "X-Disable-Provenance", - "in": "header" - } - ], - "responses": { - "201": { - "description": "MuteTimeInterval", - "schema": { - "$ref": "#/definitions/MuteTimeInterval" - } - }, - "400": { - "description": "ValidationError", - "schema": { - "$ref": "#/definitions/ValidationError" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - } - }, - "/v1/provisioning/mute-timings/export": { - "get": { - "produces": ["application/json", "application/yaml", "application/terraform+hcl", "text/yaml", "text/hcl"], - "tags": ["provisioning"], - "summary": "Export all mute timings in provisioning format.", - "operationId": "RouteExportMuteTimings", - "parameters": [ - { - "type": "boolean", - "default": false, - "description": "Whether to initiate a download of the file or not.", - "name": "download", - "in": "query" - }, - { - "enum": ["yaml", "json", "hcl"], - "type": "string", - "default": "yaml", - "description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.", - "name": "format", - "in": "query" - } - ], - "responses": { - "200": { - "description": "AlertingFileExport", - "schema": { - "$ref": "#/definitions/AlertingFileExport" - } - }, - "403": { - "description": "PermissionDenied", - "schema": { - "$ref": "#/definitions/PermissionDenied" - } - } - } - } - }, - "/v1/provisioning/mute-timings/{name}": { - "get": { - "tags": ["provisioning"], - "summary": "Get a mute timing.", - "operationId": "RouteGetMuteTiming", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "Mute timing name", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "MuteTimeInterval", - "schema": { - "$ref": "#/definitions/MuteTimeInterval" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "404": { - "description": " Not found." - } - } - }, - "put": { - "consumes": ["application/json"], - "tags": ["provisioning"], - "summary": "Replace an existing mute timing.", - "operationId": "RoutePutMuteTiming", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "Mute timing name", - "name": "name", - "in": "path", - "required": true - }, - { - "name": "Body", - "in": "body", - "schema": { - "$ref": "#/definitions/MuteTimeInterval" - } - }, - { - "type": "string", - "name": "X-Disable-Provenance", - "in": "header" - } - ], - "responses": { - "202": { - "description": "MuteTimeInterval", - "schema": { - "$ref": "#/definitions/MuteTimeInterval" - } - }, - "400": { - "description": "ValidationError", - "schema": { - "$ref": "#/definitions/ValidationError" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "409": { - "description": "PublicError", - "schema": { - "$ref": "#/definitions/PublicError" - } - } - } - }, - "delete": { - "tags": ["provisioning"], - "summary": "Delete a mute timing.", - "operationId": "RouteDeleteMuteTiming", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "Mute timing name", - "name": "name", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "Version of mute timing to use for optimistic concurrency. Leave empty to disable validation", - "name": "version", - "in": "query" - }, - { - "type": "string", - "name": "X-Disable-Provenance", - "in": "header" - } - ], - "responses": { - "204": { - "description": " The mute timing was deleted successfully." - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "409": { - "description": "PublicError", - "schema": { - "$ref": "#/definitions/PublicError" - } - } - } - } - }, - "/v1/provisioning/mute-timings/{name}/export": { - "get": { - "produces": ["application/json", "application/yaml", "application/terraform+hcl", "text/yaml", "text/hcl"], - "tags": ["provisioning"], - "summary": "Export a mute timing in provisioning format.", - "operationId": "RouteExportMuteTiming", - "parameters": [ - { - "type": "boolean", - "default": false, - "description": "Whether to initiate a download of the file or not.", - "name": "download", - "in": "query" - }, - { - "enum": ["yaml", "json", "hcl"], - "type": "string", - "default": "yaml", - "description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.", - "name": "format", - "in": "query" - }, - { - "type": "string", - "description": "Mute timing name", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "AlertingFileExport", - "schema": { - "$ref": "#/definitions/AlertingFileExport" - } - }, - "403": { - "description": "PermissionDenied", - "schema": { - "$ref": "#/definitions/PermissionDenied" - } - } - } - } - }, - "/v1/provisioning/policies": { - "get": { - "tags": ["provisioning"], - "summary": "Get the notification policy tree.", - "operationId": "RouteGetPolicyTree", - "deprecated": true, - "responses": { - "200": { - "description": "Route", - "schema": { - "$ref": "#/definitions/Route" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - }, - "put": { - "consumes": ["application/json"], - "tags": ["provisioning"], - "summary": "Sets the notification policy tree.", - "operationId": "RoutePutPolicyTree", - "deprecated": true, - "parameters": [ - { - "description": "The new notification routing tree to use", - "name": "Body", - "in": "body", - "schema": { - "$ref": "#/definitions/Route" - } - }, - { - "type": "string", - "name": "X-Disable-Provenance", - "in": "header" - } - ], - "responses": { - "202": { - "description": "Ack", - "schema": { - "$ref": "#/definitions/Ack" - } - }, - "400": { - "description": "ValidationError", - "schema": { - "$ref": "#/definitions/ValidationError" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - }, - "delete": { - "consumes": ["application/json"], - "tags": ["provisioning"], - "summary": "Clears the notification policy tree.", - "operationId": "RouteResetPolicyTree", - "deprecated": true, - "responses": { - "202": { - "description": "Ack", - "schema": { - "$ref": "#/definitions/Ack" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - } - }, - "/v1/provisioning/policies/export": { - "get": { - "produces": ["application/json", "application/yaml", "application/terraform+hcl", "text/yaml", "text/hcl"], - "tags": ["provisioning"], - "summary": "Export the notification policy tree in provisioning file format.", - "operationId": "RouteGetPolicyTreeExport", - "responses": { - "200": { - "description": "AlertingFileExport", - "schema": { - "$ref": "#/definitions/AlertingFileExport" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "404": { - "description": "NotFound", - "schema": { - "$ref": "#/definitions/NotFound" - } - } - } - } - }, - "/v1/provisioning/templates": { - "get": { - "tags": ["provisioning"], - "summary": "Get all notification template groups.", - "operationId": "RouteGetTemplates", - "deprecated": true, - "responses": { - "200": { - "description": "NotificationTemplates", - "schema": { - "$ref": "#/definitions/NotificationTemplates" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - } - } - } - }, - "/v1/provisioning/templates/{name}": { - "get": { - "tags": ["provisioning"], - "summary": "Get a notification template group.", - "operationId": "RouteGetTemplate", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "Template group name", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "NotificationTemplate", - "schema": { - "$ref": "#/definitions/NotificationTemplate" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "404": { - "description": "PublicError", - "schema": { - "$ref": "#/definitions/PublicError" - } - } - } - }, - "put": { - "consumes": ["application/json"], - "tags": ["provisioning"], - "summary": "Updates an existing notification template group.", - "operationId": "RoutePutTemplate", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "Template group name", - "name": "name", - "in": "path", - "required": true - }, - { - "name": "Body", - "in": "body", - "schema": { - "$ref": "#/definitions/NotificationTemplateContent" - } - }, - { - "type": "string", - "name": "X-Disable-Provenance", - "in": "header" - } - ], - "responses": { - "202": { - "description": "NotificationTemplate", - "schema": { - "$ref": "#/definitions/NotificationTemplate" - } - }, - "400": { - "description": "PublicError", - "schema": { - "$ref": "#/definitions/PublicError" - } - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "409": { - "description": "PublicError", - "schema": { - "$ref": "#/definitions/PublicError" - } - } - } - }, - "delete": { - "tags": ["provisioning"], - "summary": "Delete a notification template group.", - "operationId": "RouteDeleteTemplate", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "Template group name", - "name": "name", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "Version of template to use for optimistic concurrency. Leave empty to disable validation", - "name": "version", - "in": "query" - } - ], - "responses": { - "204": { - "description": " The template was deleted successfully." - }, - "403": { - "description": "ForbiddenError", - "schema": { - "$ref": "#/definitions/ForbiddenError" - } - }, - "409": { - "description": "PublicError", - "schema": { - "$ref": "#/definitions/PublicError" - } - } - } - } - }, - "/v1/sso-settings": { - "get": { - "description": "You need to have a permission with action `settings:read` with scope `settings:auth.\u003cprovider\u003e:*`.", - "tags": ["sso_settings"], - "summary": "List all SSO Settings entries", - "operationId": "listAllProvidersSettings", - "responses": { - "200": { - "$ref": "#/responses/listSSOSettingsResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - } - } - } - }, - "/v1/sso-settings/{key}": { - "get": { - "description": "You need to have a permission with action `settings:read` with scope `settings:auth.\u003cprovider\u003e:*`.", - "tags": ["sso_settings"], - "summary": "Get an SSO Settings entry by Key", - "operationId": "getProviderSettings", - "parameters": [ - { - "type": "string", - "name": "key", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getSSOSettingsResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - } - } - }, - "put": { - "description": "Inserts or updates the SSO Settings for a provider.\n\nYou need to have a permission with action `settings:write` and scope `settings:auth.\u003cprovider\u003e:*`.", - "tags": ["sso_settings"], - "summary": "Update SSO Settings", - "operationId": "updateProviderSettings", - "parameters": [ - { - "type": "string", - "name": "key", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "settings": { - "type": "object", - "additionalProperties": {} - } - } - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Removes the SSO Settings for a provider.\n\nYou need to have a permission with action `settings:write` and scope `settings:auth.\u003cprovider\u003e:*`.", - "tags": ["sso_settings"], - "summary": "Remove SSO Settings", - "operationId": "removeProviderSettings", - "parameters": [ - { - "type": "string", - "name": "key", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "patch": { - "description": "Partially updates the SSO Settings for a provider. Only provided fields are updated.\n\nYou need to have a permission with action `settings:write` and scope `settings:auth.\u003cprovider\u003e:*`.", - "tags": ["sso_settings"], - "summary": "Patch SSO Settings", - "operationId": "patchProviderSettings", - "parameters": [ - { - "type": "string", - "name": "key", - "in": "path", - "required": true - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "settings": { - "type": "object", - "additionalProperties": {} - } - } - } - } - ], - "responses": { - "204": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - } - }, - "definitions": { - "Ack": { - "type": "object" - }, - "ActiveSyncStatusDTO": { - "description": "ActiveSyncStatusDTO holds the information for LDAP background Sync", - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "nextSync": { - "type": "string", - "format": "date-time" - }, - "prevSync": { - "$ref": "#/definitions/SyncResult" - }, - "schedule": { - "type": "string" - } - } - }, - "ActiveUserStats": { - "type": "object", - "properties": { - "active_admins_and_editors": { - "type": "integer", - "format": "int64" - }, - "active_anonymous_devices": { - "type": "integer", - "format": "int64" - }, - "active_users": { - "type": "integer", - "format": "int64" - }, - "active_viewers": { - "type": "integer", - "format": "int64" - } - } - }, - "AddDataSourceCommand": { - "description": "Also acts as api DTO", - "type": "object", - "properties": { - "access": { - "$ref": "#/definitions/DsAccess" - }, - "basicAuth": { - "type": "boolean" - }, - "basicAuthUser": { - "type": "string" - }, - "database": { - "type": "string" - }, - "isDefault": { - "type": "boolean" - }, - "jsonData": { - "$ref": "#/definitions/Json" - }, - "name": { - "type": "string" - }, - "secureJsonData": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "type": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "url": { - "type": "string" - }, - "user": { - "type": "string" - }, - "withCredentials": { - "type": "boolean" - } - } - }, - "AddInviteForm": { - "type": "object", - "properties": { - "loginOrEmail": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string", - "enum": ["None", "Viewer", "Editor", "Admin"] - }, - "sendEmail": { - "type": "boolean" - } - } - }, - "AddOrgUserCommand": { - "type": "object", - "properties": { - "loginOrEmail": { - "type": "string" - }, - "role": { - "type": "string", - "enum": ["None", "Viewer", "Editor", "Admin"] - } - } - }, - "AddServiceAccountTokenCommand": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "secondsToLive": { - "type": "integer", - "format": "int64" - } - } - }, - "AddTeamMemberCommand": { - "type": "object", - "required": ["userId"], - "properties": { - "userId": { - "type": "integer", - "format": "int64" - } - } - }, - "AddTeamRoleCommand": { - "type": "object", - "properties": { - "roleUid": { - "type": "string" - } - } - }, - "AddUserRoleCommand": { - "type": "object", - "properties": { - "global": { - "type": "boolean" - }, - "roleUid": { - "type": "string" - } - } - }, - "Address": { - "type": "object", - "properties": { - "address1": { - "type": "string" - }, - "address2": { - "type": "string" - }, - "city": { - "type": "string" - }, - "country": { - "type": "string" - }, - "state": { - "type": "string" - }, - "zipCode": { - "type": "string" - } - } - }, - "AdminCreateUserForm": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "password": { - "$ref": "#/definitions/Password" - } - } - }, - "AdminCreateUserResponse": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "AdminStats": { - "type": "object", - "properties": { - "activeAdmins": { - "type": "integer", - "format": "int64" - }, - "activeDevices": { - "type": "integer", - "format": "int64" - }, - "activeEditors": { - "type": "integer", - "format": "int64" - }, - "activeSessions": { - "type": "integer", - "format": "int64" - }, - "activeUsers": { - "type": "integer", - "format": "int64" - }, - "activeViewers": { - "type": "integer", - "format": "int64" - }, - "admins": { - "type": "integer", - "format": "int64" - }, - "alerts": { - "type": "integer", - "format": "int64" - }, - "dailyActiveAdmins": { - "type": "integer", - "format": "int64" - }, - "dailyActiveEditors": { - "type": "integer", - "format": "int64" - }, - "dailyActiveSessions": { - "type": "integer", - "format": "int64" - }, - "dailyActiveUsers": { - "type": "integer", - "format": "int64" - }, - "dailyActiveViewers": { - "type": "integer", - "format": "int64" - }, - "dashboards": { - "type": "integer", - "format": "int64" - }, - "datasources": { - "type": "integer", - "format": "int64" - }, - "editors": { - "type": "integer", - "format": "int64" - }, - "monthlyActiveUsers": { - "type": "integer", - "format": "int64" - }, - "orgs": { - "type": "integer", - "format": "int64" - }, - "playlists": { - "type": "integer", - "format": "int64" - }, - "snapshots": { - "type": "integer", - "format": "int64" - }, - "stars": { - "type": "integer", - "format": "int64" - }, - "tags": { - "type": "integer", - "format": "int64" - }, - "users": { - "type": "integer", - "format": "int64" - }, - "viewers": { - "type": "integer", - "format": "int64" - } - } - }, - "AdminUpdateUserPasswordForm": { - "type": "object", - "properties": { - "password": { - "$ref": "#/definitions/Password" - } - } - }, - "AdminUpdateUserPermissionsForm": { - "type": "object", - "properties": { - "isGrafanaAdmin": { - "type": "boolean" - } - } - }, - "Alert": { - "type": "object", - "title": "Alert has info for an alert.", - "required": ["labels", "annotations", "state", "value"], - "properties": { - "activeAt": { - "type": "string", - "format": "date-time" - }, - "annotations": { - "$ref": "#/definitions/Labels" - }, - "labels": { - "$ref": "#/definitions/Labels" - }, - "state": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "AlertDiscovery": { - "type": "object", - "title": "AlertDiscovery has info for all active alerts.", - "required": ["alerts"], - "properties": { - "alerts": { - "type": "array", - "items": { - "$ref": "#/definitions/Alert" - } - } - } - }, - "AlertInstancesResponse": { - "type": "object", - "properties": { - "instances": { - "description": "Instances is an array of arrow encoded dataframes\neach frame has a single row, and a column for each instance (alert identified by unique labels) with a boolean value (firing/not firing)", - "type": "array", - "items": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - } - } - } - }, - "AlertManager": { - "type": "object", - "title": "AlertManager models a configured Alert Manager.", - "properties": { - "url": { - "type": "string" - } - } - }, - "AlertManagerNotReady": { - "type": "object" - }, - "AlertManagersResult": { - "type": "object", - "title": "AlertManagersResult contains the result from querying the alertmanagers endpoint.", - "properties": { - "activeAlertManagers": { - "type": "array", - "items": { - "$ref": "#/definitions/AlertManager" - } - }, - "droppedAlertManagers": { - "type": "array", - "items": { - "$ref": "#/definitions/AlertManager" - } - } - } - }, - "AlertQuery": { - "type": "object", - "title": "AlertQuery represents a single query associated with an alert definition.", - "properties": { - "datasourceUid": { - "description": "Grafana data source unique identifier; it should be '__expr__' for a Server Side Expression operation.", - "type": "string" - }, - "model": { - "description": "JSON is the raw JSON query and includes the above properties as well as custom properties.", - "type": "object" - }, - "queryType": { - "description": "QueryType is an optional identifier for the type of query.\nIt can be used to distinguish different types of queries.", - "type": "string" - }, - "refId": { - "description": "RefID is the unique identifier of the query, set by the frontend call.", - "type": "string" - }, - "relativeTimeRange": { - "$ref": "#/definitions/RelativeTimeRange" - } - } - }, - "AlertQueryExport": { - "type": "object", - "title": "AlertQueryExport is the provisioned export of models.AlertQuery.", - "properties": { - "datasourceUid": { - "type": "string" - }, - "model": { - "type": "object", - "additionalProperties": {} - }, - "queryType": { - "type": "string" - }, - "refId": { - "type": "string" - }, - "relativeTimeRange": { - "$ref": "#/definitions/RelativeTimeRangeExport" - } - } - }, - "AlertResponse": { - "type": "object", - "required": ["status"], - "properties": { - "data": { - "$ref": "#/definitions/AlertDiscovery" - }, - "error": { - "type": "string" - }, - "errorType": { - "$ref": "#/definitions/ErrorType" - }, - "status": { - "type": "string" - } - } - }, - "AlertRuleEditorSettings": { - "type": "object", - "properties": { - "simplified_notifications_section": { - "type": "boolean" - }, - "simplified_query_and_expressions_section": { - "type": "boolean" - } - } - }, - "AlertRuleExport": { - "type": "object", - "title": "AlertRuleExport is the provisioned file export of models.AlertRule.", - "properties": { - "annotations": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "condition": { - "type": "string" - }, - "dashboardUid": { - "type": "string" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/AlertQueryExport" - } - }, - "execErrState": { - "type": "string", - "enum": ["OK", "Alerting", "Error"] - }, - "for": { - "$ref": "#/definitions/Duration" - }, - "isPaused": { - "type": "boolean" - }, - "keepFiringFor": { - "$ref": "#/definitions/Duration" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "missing_series_evals_to_resolve": { - "type": "integer", - "format": "int64" - }, - "noDataState": { - "type": "string", - "enum": ["Alerting", "NoData", "OK"] - }, - "notification_settings": { - "$ref": "#/definitions/AlertRuleNotificationSettingsExport" - }, - "panelId": { - "type": "integer", - "format": "int64" - }, - "record": { - "$ref": "#/definitions/AlertRuleRecordExport" - }, - "title": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "AlertRuleGroup": { - "type": "object", - "properties": { - "folderUid": { - "type": "string" - }, - "interval": { - "type": "integer", - "format": "int64" - }, - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/ProvisionedAlertRule" - } - }, - "title": { - "type": "string" - } - } - }, - "AlertRuleGroupExport": { - "type": "object", - "title": "AlertRuleGroupExport is the provisioned file export of AlertRuleGroupV1.", - "properties": { - "folder": { - "type": "string" - }, - "interval": { - "$ref": "#/definitions/Duration" - }, - "name": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/AlertRuleExport" - } - } - } - }, - "AlertRuleGroupMetadata": { - "type": "object", - "properties": { - "interval": { - "type": "integer", - "format": "int64" - } - } - }, - "AlertRuleMetadata": { - "type": "object", - "properties": { - "editor_settings": { - "$ref": "#/definitions/AlertRuleEditorSettings" - } - } - }, - "AlertRuleNotificationSettings": { - "type": "object", - "required": ["receiver"], - "properties": { - "active_time_intervals": { - "description": "Override the times when notifications should not be muted. These must match the name of a mute time interval defined\nin the alertmanager configuration time_intervals section. All notifications will be suppressed unless they are sent\nat the time that matches any interval.", - "type": "array", - "items": { - "type": "string" - }, - "example": ["maintenance"] - }, - "group_by": { - "description": "Override the labels by which incoming alerts are grouped together. For example, multiple alerts coming in for\ncluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels\nuse the special value '...' as the sole label name.\nThis effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what\nyou want, unless you have a very low alert volume or your upstream notification system performs its own grouping.\nMust include 'alertname' and 'grafana_folder' if not using '...'.", - "type": "array", - "default": ["alertname", "grafana_folder"], - "items": { - "type": "string" - }, - "example": ["alertname", "grafana_folder", "cluster"] - }, - "group_interval": { - "description": "Override how long to wait before sending a notification about new alerts that are added to a group of alerts for\nwhich an initial notification has already been sent. (Usually ~5m or more.)", - "type": "string", - "example": "5m" - }, - "group_wait": { - "description": "Override how long to initially wait to send a notification for a group of alerts. Allows to wait for an\ninhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)", - "type": "string", - "example": "30s" - }, - "mute_time_intervals": { - "description": "Override the times when notifications should be muted. These must match the name of a mute time interval defined\nin the alertmanager configuration time_intervals section. When muted it will not send any notifications, but\notherwise acts normally.", - "type": "array", - "items": { - "type": "string" - }, - "example": ["maintenance"] - }, - "receiver": { - "description": "Name of the receiver to send notifications to.", - "type": "string", - "example": "grafana-default-email" - }, - "repeat_interval": { - "description": "Override how long to wait before sending a notification again if it has already been sent successfully for an\nalert. (Usually ~3h or more).\nNote that this parameter is implicitly bound by Alertmanager's `--data.retention` configuration flag.\nNotifications will be resent after either repeat_interval or the data retention period have passed, whichever\noccurs first. `repeat_interval` should not be less than `group_interval`.", - "type": "string", - "example": "4h" - } - } - }, - "AlertRuleNotificationSettingsExport": { - "type": "object", - "title": "AlertRuleNotificationSettingsExport is the provisioned export of models.NotificationSettings.", - "properties": { - "active_time_intervals": { - "type": "array", - "items": { - "type": "string" - } - }, - "group_by": { - "type": "array", - "items": { - "type": "string" - } - }, - "group_interval": { - "type": "string" - }, - "group_wait": { - "type": "string" - }, - "mute_time_intervals": { - "type": "array", - "items": { - "type": "string" - } - }, - "receiver": { - "type": "string" - }, - "repeat_interval": { - "type": "string" - } - } - }, - "AlertRuleRecordExport": { - "type": "object", - "title": "Record is the provisioned export of models.Record.", - "properties": { - "from": { - "type": "string" - }, - "metric": { - "type": "string" - }, - "targetDatasourceUid": { - "type": "string" - } - } - }, - "AlertingFileExport": { - "type": "object", - "title": "AlertingFileExport is the full provisioned file export.", - "properties": { - "apiVersion": { - "type": "integer", - "format": "int64" - }, - "contactPoints": { - "type": "array", - "items": { - "$ref": "#/definitions/ContactPointExport" - } - }, - "groups": { - "type": "array", - "items": { - "$ref": "#/definitions/AlertRuleGroupExport" - } - }, - "muteTimes": { - "type": "array", - "items": { - "$ref": "#/definitions/MuteTimeIntervalExport" - } - }, - "policies": { - "type": "array", - "items": { - "$ref": "#/definitions/NotificationPolicyExport" - } - } - } - }, - "AlertingRule": { - "description": "adapted from cortex", - "type": "object", - "required": ["name", "query", "health", "type", "state", "annotations", "activeAt"], - "properties": { - "activeAt": { - "type": "string", - "format": "date-time" - }, - "alerts": { - "type": "array", - "items": { - "$ref": "#/definitions/Alert" - } - }, - "annotations": { - "$ref": "#/definitions/Labels" - }, - "duration": { - "type": "number", - "format": "double" - }, - "evaluationTime": { - "type": "number", - "format": "double" - }, - "folderUid": { - "type": "string" - }, - "health": { - "type": "string" - }, - "isPaused": { - "type": "boolean" - }, - "keepFiringFor": { - "type": "number", - "format": "double" - }, - "labels": { - "$ref": "#/definitions/Labels" - }, - "lastError": { - "type": "string" - }, - "lastEvaluation": { - "type": "string", - "format": "date-time" - }, - "name": { - "type": "string" - }, - "notificationSettings": { - "$ref": "#/definitions/AlertRuleNotificationSettings" - }, - "provenance": { - "$ref": "#/definitions/Provenance" - }, - "queriedDatasourceUIDs": { - "type": "array", - "items": { - "type": "string" - } - }, - "query": { - "type": "string" - }, - "state": { - "description": "State can be \"pending\", \"firing\", \"inactive\".", - "type": "string" - }, - "totals": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int64" - } - }, - "totalsFiltered": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int64" - } - }, - "type": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "AlertingStatus": { - "type": "object", - "properties": { - "alertmanagersChoice": { - "type": "string", - "enum": ["all", "internal", "external"] - }, - "numExternalAlertmanagers": { - "type": "integer", - "format": "int64" - } - } - }, - "AlertmanagerUserConfig": { - "type": "object", - "properties": { - "alertmanager_config": { - "description": "Configuration for Alertmanager in YAML format.\nin: body", - "type": "string" - }, - "template_files": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "Annotation": { - "type": "object", - "properties": { - "alertId": { - "type": "integer", - "format": "int64" - }, - "alertName": { - "type": "string" - }, - "avatarUrl": { - "type": "string" - }, - "created": { - "type": "integer", - "format": "int64" - }, - "dashboardId": { - "description": "Deprecated: Use DashboardUID and OrgID instead", - "type": "integer", - "format": "int64" - }, - "dashboardUID": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/Json" - }, - "email": { - "type": "string" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "login": { - "type": "string" - }, - "newState": { - "type": "string" - }, - "panelId": { - "type": "integer", - "format": "int64" - }, - "prevState": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "text": { - "type": "string" - }, - "time": { - "type": "integer", - "format": "int64" - }, - "timeEnd": { - "type": "integer", - "format": "int64" - }, - "updated": { - "type": "integer", - "format": "int64" - }, - "userId": { - "type": "integer", - "format": "int64" - }, - "userUID": { - "type": "string" - } - } - }, - "AnnotationActions": { - "description": "+k8s:deepcopy-gen=true", - "type": "object", - "properties": { - "canAdd": { - "type": "boolean" - }, - "canDelete": { - "type": "boolean" - }, - "canEdit": { - "type": "boolean" - } - } - }, - "AnnotationEvent": { - "type": "object", - "properties": { - "color": { - "type": "string" - }, - "dashboardId": { - "type": "integer", - "format": "int64" - }, - "dashboardUID": { - "type": "string" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "isRegion": { - "type": "boolean" - }, - "panelId": { - "type": "integer", - "format": "int64" - }, - "source": { - "$ref": "#/definitions/AnnotationQuery" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "text": { - "type": "string" - }, - "time": { - "type": "integer", - "format": "int64" - }, - "timeEnd": { - "type": "integer", - "format": "int64" - } - } - }, - "AnnotationPanelFilter": { - "type": "object", - "properties": { - "exclude": { - "description": "Should the specified panels be included or excluded", - "type": "boolean" - }, - "ids": { - "description": "Panel IDs that should be included or excluded", - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - } - } - }, - "AnnotationPermission": { - "description": "+k8s:deepcopy-gen=true", - "type": "object", - "properties": { - "dashboard": { - "$ref": "#/definitions/AnnotationActions" - } - } - }, - "AnnotationQuery": { - "description": "TODO docs\nFROM: AnnotationQuery in grafana-data/src/types/annotations.ts", - "type": "object", - "properties": { - "builtIn": { - "description": "Set to 1 for the standard annotation query all dashboards have by default.", - "type": "number", - "format": "double" - }, - "datasource": { - "$ref": "#/definitions/DataSourceRef" - }, - "enable": { - "description": "When enabled the annotation query is issued with every dashboard refresh", - "type": "boolean" - }, - "filter": { - "$ref": "#/definitions/AnnotationPanelFilter" - }, - "hide": { - "description": "Annotation queries can be toggled on or off at the top of the dashboard.\nWhen hide is true, the toggle is not shown in the dashboard.", - "type": "boolean" - }, - "iconColor": { - "description": "Color to use for the annotation event markers", - "type": "string" - }, - "name": { - "description": "Name of annotation.", - "type": "string" - }, - "placement": { - "description": "Placement can be used to display the annotation query somewhere else on the dashboard other than the default location.", - "type": "string" - }, - "target": { - "$ref": "#/definitions/AnnotationTarget" - }, - "type": { - "description": "TODO -- this should not exist here, it is based on the --grafana-- datasource", - "type": "string" - } - } - }, - "AnnotationTarget": { - "description": "TODO: this should be a regular DataQuery that depends on the selected dashboard\nthese match the properties of the \"grafana\" datasouce that is default in most dashboards", - "type": "object", - "properties": { - "limit": { - "description": "Only required/valid for the grafana datasource...\nbut code+tests is already depending on it so hard to change", - "type": "integer", - "format": "int64" - }, - "matchAny": { - "description": "Only required/valid for the grafana datasource...\nbut code+tests is already depending on it so hard to change", - "type": "boolean" - }, - "tags": { - "description": "Only required/valid for the grafana datasource...\nbut code+tests is already depending on it so hard to change", - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "description": "Only required/valid for the grafana datasource...\nbut code+tests is already depending on it so hard to change", - "type": "string" - } - } - }, - "ApiRuleNode": { - "type": "object", - "properties": { - "alert": { - "type": "string" - }, - "annotations": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "expr": { - "type": "string" - }, - "for": { - "type": "string" - }, - "keep_firing_for": { - "type": "string" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "record": { - "type": "string" - } - } - }, - "Assignments": { - "type": "object", - "properties": { - "builtInRoles": { - "type": "boolean" - }, - "serviceAccounts": { - "type": "boolean" - }, - "teams": { - "type": "boolean" - }, - "users": { - "type": "boolean" - } - } - }, - "AttributeTypeAndValue": { - "description": "AttributeTypeAndValue mirrors the ASN.1 structure of the same name in\nRFC 5280, Section 4.1.2.4.", - "type": "object", - "properties": { - "Type": { - "$ref": "#/definitions/ObjectIdentifier" - }, - "Value": {} - } - }, - "Authorization": { - "type": "object", - "title": "Authorization contains HTTP authorization credentials.", - "properties": { - "credentials": { - "$ref": "#/definitions/Secret" - }, - "credentials_file": { - "type": "string" - }, - "credentials_ref": { - "description": "CredentialsRef is the name of the secret within the secret manager to use as credentials.", - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "BacktestConfig": { - "type": "object", - "properties": { - "condition": { - "type": "string" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/AlertQuery" - } - }, - "exec_err_state": { - "type": "string", - "enum": ["OK", "Alerting", "Error"] - }, - "for": { - "type": "string" - }, - "from": { - "type": "string", - "format": "date-time" - }, - "interval": { - "$ref": "#/definitions/Duration" - }, - "keep_firing_for": { - "type": "string" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "missing_series_evals_to_resolve": { - "type": "integer", - "format": "int64" - }, - "namespace_uid": { - "type": "string" - }, - "no_data_state": { - "type": "string", - "enum": ["Alerting", "NoData", "OK"] - }, - "rule_group": { - "type": "string" - }, - "title": { - "type": "string" - }, - "to": { - "type": "string", - "format": "date-time" - }, - "uid": { - "type": "string" - } - } - }, - "BacktestResult": { - "$ref": "#/definitions/Frame" - }, - "BasicAuth": { - "type": "object", - "title": "BasicAuth contains basic HTTP authentication credentials.", - "properties": { - "password": { - "$ref": "#/definitions/Secret" - }, - "password_file": { - "type": "string" - }, - "password_ref": { - "description": "PasswordRef is the name of the secret within the secret manager to use as the password.", - "type": "string" - }, - "username": { - "type": "string" - }, - "username_file": { - "type": "string" - }, - "username_ref": { - "description": "UsernameRef is the name of the secret within the secret manager to use as the username.", - "type": "string" - } - } - }, - "CacheConfig": { - "description": "Config defines the internal representation of a cache configuration, including fields not set by the API caller", - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "dataSourceID": { - "description": "Fields that can be set by the API caller - read/write", - "type": "integer", - "format": "int64" - }, - "dataSourceUID": { - "type": "string" - }, - "defaultTTLMs": { - "description": "These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually", - "type": "integer", - "format": "int64" - }, - "enabled": { - "type": "boolean" - }, - "ttlQueriesMs": { - "description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)", - "type": "integer", - "format": "int64" - }, - "ttlResourcesMs": { - "type": "integer", - "format": "int64" - }, - "updated": { - "type": "string", - "format": "date-time" - }, - "useDefaultTTL": { - "description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini", - "type": "boolean" - } - } - }, - "CacheConfigResponse": { - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "dataSourceID": { - "description": "Fields that can be set by the API caller - read/write", - "type": "integer", - "format": "int64" - }, - "dataSourceUID": { - "type": "string" - }, - "defaultTTLMs": { - "description": "These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually", - "type": "integer", - "format": "int64" - }, - "enabled": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "ttlQueriesMs": { - "description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)", - "type": "integer", - "format": "int64" - }, - "ttlResourcesMs": { - "type": "integer", - "format": "int64" - }, - "updated": { - "type": "string", - "format": "date-time" - }, - "useDefaultTTL": { - "description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini", - "type": "boolean" - } - } - }, - "CacheConfigSetter": { - "description": "ConfigSetter defines the cache parameters that users can configure per datasource\nThis is only intended to be consumed by the SetCache HTTP Handler", - "type": "object", - "properties": { - "dataSourceID": { - "type": "integer", - "format": "int64" - }, - "dataSourceUID": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "ttlQueriesMs": { - "description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)", - "type": "integer", - "format": "int64" - }, - "ttlResourcesMs": { - "type": "integer", - "format": "int64" - }, - "useDefaultTTL": { - "description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini", - "type": "boolean" - } - } - }, - "CalculateDiffTarget": { - "type": "object", - "properties": { - "dashboardId": { - "type": "integer", - "format": "int64" - }, - "unsavedDashboard": { - "$ref": "#/definitions/Json" - }, - "version": { - "type": "integer", - "format": "int64" - } - } - }, - "Certificate": { - "type": "object", - "title": "A Certificate represents an X.509 certificate.", - "properties": { - "AuthorityKeyId": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - }, - "BasicConstraintsValid": { - "description": "BasicConstraintsValid indicates whether IsCA, MaxPathLen,\nand MaxPathLenZero are valid.", - "type": "boolean" - }, - "CRLDistributionPoints": { - "description": "CRL Distribution Points", - "type": "array", - "items": { - "type": "string" - } - }, - "DNSNames": { - "description": "Subject Alternate Name values. (Note that these values may not be valid\nif invalid values were contained within a parsed certificate. For\nexample, an element of DNSNames may not be a valid DNS domain name.)", - "type": "array", - "items": { - "type": "string" - } - }, - "EmailAddresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "ExcludedDNSDomains": { - "type": "array", - "items": { - "type": "string" - } - }, - "ExcludedEmailAddresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "ExcludedIPRanges": { - "type": "array", - "items": { - "$ref": "#/definitions/IPNet" - } - }, - "ExcludedURIDomains": { - "type": "array", - "items": { - "type": "string" - } - }, - "ExtKeyUsage": { - "type": "array", - "items": { - "$ref": "#/definitions/ExtKeyUsage" - } - }, - "Extensions": { - "description": "Extensions contains raw X.509 extensions. When parsing certificates,\nthis can be used to extract non-critical extensions that are not\nparsed by this package. When marshaling certificates, the Extensions\nfield is ignored, see ExtraExtensions.", - "type": "array", - "items": { - "$ref": "#/definitions/Extension" - } - }, - "ExtraExtensions": { - "description": "ExtraExtensions contains extensions to be copied, raw, into any\nmarshaled certificates. Values override any extensions that would\notherwise be produced based on the other fields. The ExtraExtensions\nfield is not populated when parsing certificates, see Extensions.", - "type": "array", - "items": { - "$ref": "#/definitions/Extension" - } - }, - "IPAddresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "InhibitAnyPolicy": { - "description": "InhibitAnyPolicy and InhibitAnyPolicyZero indicate the presence and value\nof the inhibitAnyPolicy extension.\n\nThe value of InhibitAnyPolicy indicates the number of additional\ncertificates in the path after this certificate that may use the\nanyPolicy policy OID to indicate a match with any other policy.\n\nWhen parsing a certificate, a positive non-zero InhibitAnyPolicy means\nthat the field was specified, -1 means it was unset, and\nInhibitAnyPolicyZero being true mean that the field was explicitly set to\nzero. The case of InhibitAnyPolicy==0 with InhibitAnyPolicyZero==false\nshould be treated equivalent to -1 (unset).", - "type": "integer", - "format": "int64" - }, - "InhibitAnyPolicyZero": { - "description": "InhibitAnyPolicyZero indicates that InhibitAnyPolicy==0 should be\ninterpreted as an actual maximum path length of zero. Otherwise, that\ncombination is interpreted as InhibitAnyPolicy not being set.", - "type": "boolean" - }, - "InhibitPolicyMapping": { - "description": "InhibitPolicyMapping and InhibitPolicyMappingZero indicate the presence\nand value of the inhibitPolicyMapping field of the policyConstraints\nextension.\n\nThe value of InhibitPolicyMapping indicates the number of additional\ncertificates in the path after this certificate that may use policy\nmapping.\n\nWhen parsing a certificate, a positive non-zero InhibitPolicyMapping\nmeans that the field was specified, -1 means it was unset, and\nInhibitPolicyMappingZero being true mean that the field was explicitly\nset to zero. The case of InhibitPolicyMapping==0 with\nInhibitPolicyMappingZero==false should be treated equivalent to -1\n(unset).", - "type": "integer", - "format": "int64" - }, - "InhibitPolicyMappingZero": { - "description": "InhibitPolicyMappingZero indicates that InhibitPolicyMapping==0 should be\ninterpreted as an actual maximum path length of zero. Otherwise, that\ncombination is interpreted as InhibitAnyPolicy not being set.", - "type": "boolean" - }, - "IsCA": { - "type": "boolean" - }, - "Issuer": { - "$ref": "#/definitions/Name" - }, - "IssuingCertificateURL": { - "type": "array", - "items": { - "type": "string" - } - }, - "KeyUsage": { - "$ref": "#/definitions/KeyUsage" - }, - "MaxPathLen": { - "description": "MaxPathLen and MaxPathLenZero indicate the presence and\nvalue of the BasicConstraints' \"pathLenConstraint\".\n\nWhen parsing a certificate, a positive non-zero MaxPathLen\nmeans that the field was specified, -1 means it was unset,\nand MaxPathLenZero being true mean that the field was\nexplicitly set to zero. The case of MaxPathLen==0 with MaxPathLenZero==false\nshould be treated equivalent to -1 (unset).\n\nWhen generating a certificate, an unset pathLenConstraint\ncan be requested with either MaxPathLen == -1 or using the\nzero value for both MaxPathLen and MaxPathLenZero.", - "type": "integer", - "format": "int64" - }, - "MaxPathLenZero": { - "description": "MaxPathLenZero indicates that BasicConstraintsValid==true\nand MaxPathLen==0 should be interpreted as an actual\nmaximum path length of zero. Otherwise, that combination is\ninterpreted as MaxPathLen not being set.", - "type": "boolean" - }, - "NotBefore": { - "type": "string", - "format": "date-time" - }, - "OCSPServer": { - "description": "RFC 5280, 4.2.2.1 (Authority Information Access)", - "type": "array", - "items": { - "type": "string" - } - }, - "PermittedDNSDomains": { - "type": "array", - "items": { - "type": "string" - } - }, - "PermittedDNSDomainsCritical": { - "description": "Name constraints", - "type": "boolean" - }, - "PermittedEmailAddresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "PermittedIPRanges": { - "type": "array", - "items": { - "$ref": "#/definitions/IPNet" - } - }, - "PermittedURIDomains": { - "type": "array", - "items": { - "type": "string" - } - }, - "Policies": { - "description": "Policies contains all policy identifiers included in the certificate.\nSee CreateCertificate for context about how this field and the PolicyIdentifiers field\ninteract.\nIn Go 1.22, encoding/gob cannot handle and ignores this field.", - "type": "array", - "items": { - "type": "string" - } - }, - "PolicyIdentifiers": { - "description": "PolicyIdentifiers contains asn1.ObjectIdentifiers, the components\nof which are limited to int32. If a certificate contains a policy which\ncannot be represented by asn1.ObjectIdentifier, it will not be included in\nPolicyIdentifiers, but will be present in Policies, which contains all parsed\npolicy OIDs.\nSee CreateCertificate for context about how this field and the Policies field\ninteract.", - "type": "array", - "items": { - "$ref": "#/definitions/ObjectIdentifier" - } - }, - "PolicyMappings": { - "description": "PolicyMappings contains a list of policy mappings included in the certificate.", - "type": "array", - "items": { - "$ref": "#/definitions/PolicyMapping" - } - }, - "PublicKey": {}, - "PublicKeyAlgorithm": { - "$ref": "#/definitions/PublicKeyAlgorithm" - }, - "Raw": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - }, - "RawIssuer": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - }, - "RawSubject": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - }, - "RawSubjectPublicKeyInfo": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - }, - "RawTBSCertificate": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - }, - "RequireExplicitPolicy": { - "description": "RequireExplicitPolicy and RequireExplicitPolicyZero indicate the presence\nand value of the requireExplicitPolicy field of the policyConstraints\nextension.\n\nThe value of RequireExplicitPolicy indicates the number of additional\ncertificates in the path after this certificate before an explicit policy\nis required for the rest of the path. When an explicit policy is required,\neach subsequent certificate in the path must contain a required policy OID,\nor a policy OID which has been declared as equivalent through the policy\nmapping extension.\n\nWhen parsing a certificate, a positive non-zero RequireExplicitPolicy\nmeans that the field was specified, -1 means it was unset, and\nRequireExplicitPolicyZero being true mean that the field was explicitly\nset to zero. The case of RequireExplicitPolicy==0 with\nRequireExplicitPolicyZero==false should be treated equivalent to -1\n(unset).", - "type": "integer", - "format": "int64" - }, - "RequireExplicitPolicyZero": { - "description": "RequireExplicitPolicyZero indicates that RequireExplicitPolicy==0 should be\ninterpreted as an actual maximum path length of zero. Otherwise, that\ncombination is interpreted as InhibitAnyPolicy not being set.", - "type": "boolean" - }, - "SerialNumber": { - "type": "string" - }, - "Signature": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - }, - "SignatureAlgorithm": { - "$ref": "#/definitions/SignatureAlgorithm" - }, - "Subject": { - "$ref": "#/definitions/Name" - }, - "SubjectKeyId": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - }, - "URIs": { - "type": "array", - "items": { - "$ref": "#/definitions/URL" - } - }, - "UnhandledCriticalExtensions": { - "description": "UnhandledCriticalExtensions contains a list of extension IDs that\nwere not (fully) processed when parsing. Verify will fail if this\nslice is non-empty, unless verification is delegated to an OS\nlibrary which understands all the critical extensions.\n\nUsers can access these extensions using Extensions and can remove\nelements from this slice if they believe that they have been\nhandled.", - "type": "array", - "items": { - "$ref": "#/definitions/ObjectIdentifier" - } - }, - "UnknownExtKeyUsage": { - "type": "array", - "items": { - "$ref": "#/definitions/ObjectIdentifier" - } - }, - "Version": { - "type": "integer", - "format": "int64" - } - } - }, - "ChangeUserPasswordCommand": { - "type": "object", - "properties": { - "newPassword": { - "$ref": "#/definitions/Password" - }, - "oldPassword": { - "$ref": "#/definitions/Password" - } - } - }, - "CloudMigrationRunListDTO": { - "type": "object", - "properties": { - "runs": { - "type": "array", - "items": { - "$ref": "#/definitions/MigrateDataResponseListDTO" - } - } - } - }, - "CloudMigrationSessionListResponseDTO": { - "type": "object", - "properties": { - "sessions": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudMigrationSessionResponseDTO" - } - } - } - }, - "CloudMigrationSessionRequestDTO": { - "type": "object", - "properties": { - "authToken": { - "type": "string" - } - } - }, - "CloudMigrationSessionResponseDTO": { - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "slug": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "updated": { - "type": "string", - "format": "date-time" - } - } - }, - "ConfFloat64": { - "description": "ConfFloat64 is a float64. It Marshals float64 values of NaN of Inf\nto null.", - "type": "number", - "format": "double" - }, - "Config": { - "type": "object", - "title": "Config is the top-level configuration for Alertmanager's config files.", - "properties": { - "global": { - "$ref": "#/definitions/GlobalConfig" - }, - "inhibit_rules": { - "type": "array", - "items": { - "$ref": "#/definitions/InhibitRule" - } - }, - "mute_time_intervals": { - "description": "MuteTimeIntervals is deprecated and will be removed before Alertmanager 1.0.", - "type": "array", - "items": { - "$ref": "#/definitions/MuteTimeInterval" - } - }, - "route": { - "$ref": "#/definitions/Route" - }, - "templates": { - "type": "array", - "items": { - "type": "string" - } - }, - "time_intervals": { - "type": "array", - "items": { - "$ref": "#/definitions/TimeInterval" - } - } - } - }, - "ContactPointExport": { - "type": "object", - "title": "ContactPointExport is the provisioned file export of alerting.ContactPointV1.", - "properties": { - "name": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "receivers": { - "type": "array", - "items": { - "$ref": "#/definitions/ReceiverExport" - } - } - } - }, - "ContactPoints": { - "type": "array", - "items": { - "$ref": "#/definitions/EmbeddedContactPoint" - } - }, - "ConvertPrometheusResponse": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "errorType": { - "type": "string" - }, - "status": { - "type": "string" - } - } - }, - "Correlation": { - "description": "Correlation is the model for correlations definitions", - "type": "object", - "properties": { - "config": { - "$ref": "#/definitions/CorrelationConfig" - }, - "description": { - "description": "Description of the correlation", - "type": "string", - "example": "Logs to Traces" - }, - "label": { - "description": "Label identifying the correlation", - "type": "string", - "example": "My Label" - }, - "orgId": { - "description": "OrgID of the data source the correlation originates from", - "type": "integer", - "format": "int64", - "example": 1 - }, - "provisioned": { - "description": "Provisioned True if the correlation was created during provisioning", - "type": "boolean" - }, - "sourceUID": { - "description": "UID of the data source the correlation originates from", - "type": "string", - "example": "d0oxYRg4z" - }, - "targetUID": { - "description": "UID of the data source the correlation points to", - "type": "string", - "example": "PE1C5CBDA0504A6A3" - }, - "type": { - "$ref": "#/definitions/CorrelationType" - }, - "uid": { - "description": "Unique identifier of the correlation", - "type": "string", - "example": "50xhMlg9k" - } - } - }, - "CorrelationConfig": { - "type": "object", - "required": ["field", "target"], - "properties": { - "field": { - "description": "Field used to attach the correlation link", - "type": "string", - "example": "message" - }, - "target": { - "description": "Target data query", - "type": "object", - "additionalProperties": {}, - "example": { - "prop1": "value1", - "prop2": "value" - } - }, - "transformations": { - "$ref": "#/definitions/Transformations" - }, - "type": { - "$ref": "#/definitions/CorrelationType" - } - } - }, - "CorrelationConfigUpdateDTO": { - "type": "object", - "properties": { - "field": { - "description": "Field used to attach the correlation link", - "type": "string", - "example": "message" - }, - "target": { - "description": "Target data query", - "type": "object", - "additionalProperties": {}, - "example": { - "prop1": "value1", - "prop2": "value" - } - }, - "transformations": { - "description": "Source data transformations", - "type": "array", - "items": { - "$ref": "#/definitions/Transformation" - }, - "example": [ - { - "type": "logfmt" - }, - { - "expression": "(Superman|Batman)", - "type": "regex", - "variable": "name" - } - ] - } - } - }, - "CorrelationType": { - "description": "the type of correlation, either query for containing query information, or external for containing an external URL\n+enum", - "type": "string" - }, - "CounterResetHint": { - "description": "or alternatively that we are dealing with a gauge histogram, where counter resets do not apply.", - "type": "integer", - "format": "uint8", - "title": "CounterResetHint contains the known information about a counter reset," - }, - "CreateAccessTokenResponseDTO": { - "type": "object", - "properties": { - "token": { - "type": "string" - } - } - }, - "CreateCorrelationCommand": { - "description": "CreateCorrelationCommand is the command for creating a correlation", - "type": "object", - "properties": { - "config": { - "$ref": "#/definitions/CorrelationConfig" - }, - "description": { - "description": "Optional description of the correlation", - "type": "string", - "example": "Logs to Traces" - }, - "label": { - "description": "Optional label identifying the correlation", - "type": "string", - "example": "My label" - }, - "provisioned": { - "description": "True if correlation was created with provisioning. This makes it read-only.", - "type": "boolean" - }, - "targetUID": { - "description": "Target data source UID to which the correlation is created. required if type = query", - "type": "string", - "example": "PE1C5CBDA0504A6A3" - }, - "type": { - "$ref": "#/definitions/CorrelationType" - } - } - }, - "CreateCorrelationResponseBody": { - "description": "CreateCorrelationResponse is the response struct for CreateCorrelationCommand", - "type": "object", - "properties": { - "message": { - "type": "string", - "example": "Correlation created" - }, - "result": { - "$ref": "#/definitions/Correlation" - } - } - }, - "CreateDashboardSnapshotCommand": { - "type": "object", - "required": ["dashboard"], - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional", - "type": "string" - }, - "dashboard": { - "$ref": "#/definitions/Unstructured" - }, - "deleteKey": { - "description": "Unique key used to delete the snapshot. It is different from the `key` so that only the creator can delete the snapshot. Required if `external` is `true`.", - "type": "string" - }, - "expires": { - "description": "When the snapshot should expire in seconds in seconds. Default is never to expire.", - "type": "integer", - "format": "int64", - "default": 0 - }, - "external": { - "description": "these are passed when storing an external snapshot ref\nSave the snapshot on an external server rather than locally.", - "type": "boolean", - "default": false - }, - "key": { - "description": "Define the unique key. Required if `external` is `true`.", - "type": "string" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional", - "type": "string" - }, - "name": { - "description": "Snapshot name", - "type": "string" - } - } - }, - "CreateFolderCommand": { - "description": "CreateFolderCommand captures the information required by the folder service\nto create a folder.", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "parentUid": { - "type": "string" - }, - "title": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "CreateLibraryElementCommand": { - "description": "CreateLibraryElementCommand is the command for adding a LibraryElement", - "type": "object", - "properties": { - "folderId": { - "description": "ID of the folder where the library element is stored.\n\nDeprecated: use FolderUID instead", - "type": "integer", - "format": "int64" - }, - "folderUid": { - "description": "UID of the folder where the library element is stored.", - "type": "string" - }, - "kind": { - "description": "Kind of element to create, Use 1 for library panels or 2 for c.\nDescription:\n1 - library panels", - "type": "integer", - "format": "int64", - "enum": [1] - }, - "model": { - "description": "The JSON model for the library element.", - "type": "object" - }, - "name": { - "description": "Name of the library element.", - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "CreateOrUpdateReport": { - "type": "object", - "properties": { - "dashboards": { - "type": "array", - "items": { - "$ref": "#/definitions/ReportDashboard" - } - }, - "enableCsv": { - "type": "boolean" - }, - "enableDashboardUrl": { - "type": "boolean" - }, - "formats": { - "type": "array", - "items": { - "$ref": "#/definitions/Type" - } - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "options": { - "$ref": "#/definitions/ReportOptions" - }, - "recipients": { - "type": "string" - }, - "replyTo": { - "type": "string" - }, - "scaleFactor": { - "type": "integer", - "format": "int64" - }, - "schedule": { - "$ref": "#/definitions/ReportSchedule" - }, - "state": { - "$ref": "#/definitions/State" - }, - "subject": { - "type": "string" - }, - "urls": { - "type": "array", - "items": { - "$ref": "#/definitions/ReportURLItem" - } - } - } - }, - "CreateOrgCommand": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - }, - "CreatePlaylistCommand": { - "type": "object", - "properties": { - "interval": { - "type": "string" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/PlaylistItem" - } - }, - "name": { - "type": "string" - } - } - }, - "CreateQueryInQueryHistoryCommand": { - "description": "CreateQueryInQueryHistoryCommand is the command for adding query history", - "type": "object", - "required": ["queries"], - "properties": { - "datasourceUid": { - "description": "UID of the data source for which are queries stored.", - "type": "string", - "example": "PE1C5CBDA0504A6A3" - }, - "queries": { - "$ref": "#/definitions/Json" - } - } - }, - "CreateRoleForm": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "global": { - "type": "boolean" - }, - "group": { - "type": "string" - }, - "hidden": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/Permission" - } - }, - "uid": { - "type": "string" - } - } - }, - "CreateServiceAccountForm": { - "type": "object", - "properties": { - "isDisabled": { - "type": "boolean", - "example": false - }, - "name": { - "type": "string", - "example": "grafana" - }, - "role": { - "type": "string", - "enum": ["None", "Viewer", "Editor", "Admin"], - "example": "Admin" - } - } - }, - "CreateSnapshotRequestDTO": { - "type": "object", - "properties": { - "resourceTypes": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "DASHBOARD", - "DATASOURCE", - "FOLDER", - "LIBRARY_ELEMENT", - "ALERT_RULE", - "ALERT_RULE_GROUP", - "CONTACT_POINT", - "NOTIFICATION_POLICY", - "NOTIFICATION_TEMPLATE", - "MUTE_TIMING", - "PLUGIN" - ] - } - } - } - }, - "CreateSnapshotResponseDTO": { - "type": "object", - "properties": { - "uid": { - "type": "string" - } - } - }, - "CreateTeamCommand": { - "type": "object", - "required": ["name"], - "properties": { - "email": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "DashboardACLInfoDTO": { - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "dashboardId": { - "type": "integer", - "format": "int64" - }, - "folderId": { - "description": "Deprecated: use FolderUID instead", - "type": "integer", - "format": "int64" - }, - "folderUid": { - "type": "string" - }, - "inherited": { - "type": "boolean" - }, - "isFolder": { - "type": "boolean" - }, - "permission": { - "$ref": "#/definitions/PermissionType" - }, - "permissionName": { - "type": "string" - }, - "role": { - "type": "string", - "enum": ["None", "Viewer", "Editor", "Admin"] - }, - "slug": { - "type": "string" - }, - "team": { - "type": "string" - }, - "teamAvatarUrl": { - "type": "string" - }, - "teamEmail": { - "type": "string" - }, - "teamId": { - "type": "integer", - "format": "int64" - }, - "teamUid": { - "type": "string" - }, - "title": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "updated": { - "type": "string", - "format": "date-time" - }, - "url": { - "type": "string" - }, - "userAvatarUrl": { - "type": "string" - }, - "userEmail": { - "type": "string" - }, - "userId": { - "type": "integer", - "format": "int64" - }, - "userLogin": { - "type": "string" - }, - "userUid": { - "type": "string" - } - } - }, - "DashboardACLUpdateItem": { - "type": "object", - "properties": { - "permission": { - "$ref": "#/definitions/PermissionType" - }, - "role": { - "type": "string", - "enum": ["None", "Viewer", "Editor", "Admin"] - }, - "teamId": { - "type": "integer", - "format": "int64" - }, - "userId": { - "type": "integer", - "format": "int64" - } - } - }, - "DashboardCreateCommand": { - "description": "These are the values expected to be sent from an end user\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", - "type": "object", - "required": ["dashboard"], - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional", - "type": "string" - }, - "dashboard": { - "$ref": "#/definitions/Unstructured" - }, - "expires": { - "description": "When the snapshot should expire in seconds in seconds. Default is never to expire.", - "type": "integer", - "format": "int64", - "default": 0 - }, - "external": { - "description": "these are passed when storing an external snapshot ref\nSave the snapshot on an external server rather than locally.", - "type": "boolean", - "default": false - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional", - "type": "string" - }, - "name": { - "description": "Snapshot name", - "type": "string" - } - } - }, - "DashboardFullWithMeta": { - "type": "object", - "properties": { - "dashboard": { - "$ref": "#/definitions/Json" - }, - "meta": { - "$ref": "#/definitions/DashboardMeta" - } - } - }, - "DashboardMeta": { - "type": "object", - "properties": { - "annotationsPermissions": { - "$ref": "#/definitions/AnnotationPermission" - }, - "apiVersion": { - "type": "string" - }, - "canAdmin": { - "type": "boolean" - }, - "canDelete": { - "type": "boolean" - }, - "canEdit": { - "type": "boolean" - }, - "canSave": { - "type": "boolean" - }, - "canStar": { - "type": "boolean" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "string" - }, - "expires": { - "type": "string", - "format": "date-time" - }, - "folderId": { - "description": "Deprecated: use FolderUID instead", - "type": "integer", - "format": "int64" - }, - "folderTitle": { - "type": "string" - }, - "folderUid": { - "type": "string" - }, - "folderUrl": { - "type": "string" - }, - "hasAcl": { - "type": "boolean" - }, - "isFolder": { - "type": "boolean" - }, - "isSnapshot": { - "type": "boolean" - }, - "provisioned": { - "type": "boolean" - }, - "provisionedExternalId": { - "type": "string" - }, - "publicDashboardEnabled": { - "type": "boolean" - }, - "slug": { - "type": "string" - }, - "type": { - "type": "string" - }, - "updated": { - "type": "string", - "format": "date-time" - }, - "updatedBy": { - "type": "string" - }, - "url": { - "type": "string" - }, - "version": { - "type": "integer", - "format": "int64" - } - } - }, - "DashboardRedirect": { - "type": "object", - "properties": { - "redirectUri": { - "type": "string" - } - } - }, - "DashboardSnapshotDTO": { - "description": "DashboardSnapshotDTO without dashboard map", - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "expires": { - "type": "string", - "format": "date-time" - }, - "external": { - "type": "boolean" - }, - "externalUrl": { - "type": "string" - }, - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "updated": { - "type": "string", - "format": "date-time" - } - } - }, - "DashboardTagCloudItem": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "format": "int64" - }, - "term": { - "type": "string" - } - } - }, - "DashboardVersionMeta": { - "description": "DashboardVersionMeta extends the DashboardVersionDTO with the names\nassociated with the UserIds, overriding the field with the same name from\nthe DashboardVersionDTO model.", - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "string" - }, - "dashboardId": { - "type": "integer", - "format": "int64" - }, - "data": { - "$ref": "#/definitions/Json" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - }, - "parentVersion": { - "type": "integer", - "format": "int64" - }, - "restoredFrom": { - "type": "integer", - "format": "int64" - }, - "uid": { - "type": "string" - }, - "version": { - "type": "integer", - "format": "int64" - } - } - }, - "DashboardVersionResponseMeta": { - "type": "object", - "properties": { - "continueToken": { - "type": "string" - }, - "versions": { - "type": "array", - "items": { - "$ref": "#/definitions/DashboardVersionMeta" - } - } - } - }, - "DataLink": { - "description": "DataLink define what", - "type": "object", - "properties": { - "internal": { - "$ref": "#/definitions/InternalDataLink" - }, - "targetBlank": { - "type": "boolean" - }, - "title": { - "type": "string" - }, - "url": { - "type": "string" - } - } - }, - "DataResponse": { - "description": "A map of RefIDs (unique query identifiers) to this type makes up the Responses property of a QueryDataResponse.\nThe Error property is used to allow for partial success responses from the containing QueryDataResponse.", - "type": "object", - "title": "DataResponse contains the results from a DataQuery.", - "properties": { - "Error": { - "description": "Error is a property to be set if the corresponding DataQuery has an error.", - "type": "string" - }, - "ErrorSource": { - "$ref": "#/definitions/Source" - }, - "Frames": { - "$ref": "#/definitions/Frames" - }, - "Status": { - "$ref": "#/definitions/Status" - } - } - }, - "DataSource": { - "type": "object", - "properties": { - "access": { - "$ref": "#/definitions/DsAccess" - }, - "accessControl": { - "$ref": "#/definitions/Metadata" - }, - "basicAuth": { - "type": "boolean" - }, - "basicAuthUser": { - "type": "string" - }, - "database": { - "type": "string" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "isDefault": { - "type": "boolean" - }, - "jsonData": { - "$ref": "#/definitions/Json" - }, - "name": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "readOnly": { - "type": "boolean" - }, - "secureJsonFields": { - "type": "object", - "additionalProperties": { - "type": "boolean" - } - }, - "type": { - "type": "string" - }, - "typeLogoUrl": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "url": { - "type": "string" - }, - "user": { - "type": "string" - }, - "version": { - "type": "integer", - "format": "int64" - }, - "withCredentials": { - "type": "boolean" - } - } - }, - "DataSourceList": { - "type": "array", - "items": { - "$ref": "#/definitions/DataSourceListItemDTO" - } - }, - "DataSourceListItemDTO": { - "type": "object", - "properties": { - "access": { - "$ref": "#/definitions/DsAccess" - }, - "basicAuth": { - "type": "boolean" - }, - "database": { - "type": "string" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "isDefault": { - "type": "boolean" - }, - "jsonData": { - "$ref": "#/definitions/Json" - }, - "name": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "readOnly": { - "type": "boolean" - }, - "type": { - "type": "string" - }, - "typeLogoUrl": { - "type": "string" - }, - "typeName": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "url": { - "type": "string" - }, - "user": { - "type": "string" - } - } - }, - "DataSourceRef": { - "description": "Ref to a DataSource instance", - "type": "object", - "properties": { - "type": { - "description": "The plugin type-id", - "type": "string" - }, - "uid": { - "description": "Specific datasource instance", - "type": "string" - } - } - }, - "DataTopic": { - "description": "nolint:revive", - "type": "string", - "title": "DataTopic is used to identify which topic the frame should be assigned to." - }, - "DeleteCorrelationResponseBody": { - "type": "object", - "properties": { - "message": { - "type": "string", - "example": "Correlation deleted" - } - } - }, - "DeleteTokenCommand": { - "type": "object", - "properties": { - "instance": { - "type": "string" - } - } - }, - "DescendantCounts": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int64" - } - }, - "Description": { - "type": "object", - "properties": { - "assignments": { - "$ref": "#/definitions/Assignments" - }, - "permissions": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "DeviceSearchHitDTO": { - "type": "object", - "properties": { - "clientIp": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "deviceId": { - "type": "string" - }, - "lastSeenAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "userAgent": { - "type": "string" - } - } - }, - "DiscordConfig": { - "type": "object", - "title": "DiscordConfig configures notifications via Discord.", - "properties": { - "http_config": { - "$ref": "#/definitions/HTTPClientConfig" - }, - "message": { - "type": "string" - }, - "send_resolved": { - "type": "boolean" - }, - "title": { - "type": "string" - }, - "webhook_url": { - "$ref": "#/definitions/SecretURL" - }, - "webhook_url_file": { - "type": "string" - } - } - }, - "DiscoveryBase": { - "type": "object", - "required": ["status"], - "properties": { - "error": { - "type": "string" - }, - "errorType": { - "$ref": "#/definitions/ErrorType" - }, - "status": { - "type": "string" - } - } - }, - "DsAccess": { - "type": "string" - }, - "DsPermissionType": { - "description": "Datasource permission\nDescription:\n`0` - No Access\n`1` - Query\n`2` - Edit\nEnum: 0,1,2", - "type": "integer", - "format": "int64" - }, - "Duration": { - "description": "A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.", - "type": "integer", - "format": "int64" - }, - "EmailConfig": { - "type": "object", - "title": "EmailConfig configures notifications via mail.", - "properties": { - "auth_identity": { - "type": "string" - }, - "auth_password": { - "$ref": "#/definitions/Secret" - }, - "auth_password_file": { - "type": "string" - }, - "auth_secret": { - "$ref": "#/definitions/Secret" - }, - "auth_username": { - "type": "string" - }, - "from": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "hello": { - "type": "string" - }, - "html": { - "type": "string" - }, - "require_tls": { - "type": "boolean" - }, - "send_resolved": { - "type": "boolean" - }, - "smarthost": { - "$ref": "#/definitions/HostPort" - }, - "text": { - "type": "string" - }, - "tls_config": { - "$ref": "#/definitions/TLSConfig" - }, - "to": { - "description": "Email address to notify.", - "type": "string" - } - } - }, - "EmailDTO": { - "type": "object", - "properties": { - "recipient": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "EmbeddedContactPoint": { - "description": "EmbeddedContactPoint is the contact point type that is used\nby grafanas embedded alertmanager implementation.", - "type": "object", - "required": ["type", "settings"], - "properties": { - "disableResolveMessage": { - "type": "boolean", - "example": false - }, - "name": { - "description": "Name is used as grouping key in the UI. Contact points with the\nsame name will be grouped in the UI.", - "type": "string", - "example": "webhook_1" - }, - "provenance": { - "type": "string", - "readOnly": true - }, - "settings": { - "$ref": "#/definitions/Json" - }, - "type": { - "type": "string", - "enum": [ - "alertmanager", - "dingding", - "discord", - "email", - "googlechat", - "kafka", - "line", - "opsgenie", - "pagerduty", - "pushover", - "sensugo", - "slack", - "teams", - "telegram", - "threema", - "victorops", - "webhook", - "wecom" - ], - "example": "webhook" - }, - "uid": { - "description": "UID is the unique identifier of the contact point. The UID can be\nset by the user.", - "type": "string", - "maxLength": 40, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-\\_]+$", - "example": "my_external_reference" - } - } - }, - "EnumFieldConfig": { - "description": "Enum field config\nVector values are used as lookup keys into the enum fields", - "type": "object", - "properties": { - "color": { - "description": "Color is the color value for a given index (empty is undefined)", - "type": "array", - "items": { - "type": "string" - } - }, - "description": { - "description": "Description of the enum state", - "type": "array", - "items": { - "type": "string" - } - }, - "icon": { - "description": "Icon supports setting an icon for a given index value", - "type": "array", - "items": { - "type": "string" - } - }, - "text": { - "description": "Value is the string display value for a given index", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "ErrorResponseBody": { - "type": "object", - "required": ["message"], - "properties": { - "error": { - "description": "Error An optional detailed description of the actual error. Only included if running in developer mode.", - "type": "string" - }, - "message": { - "description": "a human readable version of the error", - "type": "string" - }, - "status": { - "description": "Status An optional status to denote the cause of the error.\n\nFor example, a 412 Precondition Failed error may include additional information of why that error happened.", - "type": "string" - } - } - }, - "ErrorType": { - "type": "string", - "title": "ErrorType models the different API error types." - }, - "EvalAlertConditionCommand": { - "description": "EvalAlertConditionCommand is the command for evaluating a condition", - "type": "object", - "properties": { - "condition": { - "type": "string" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/AlertQuery" - } - }, - "now": { - "type": "string", - "format": "date-time" - } - } - }, - "EvalQueriesPayload": { - "type": "object", - "properties": { - "condition": { - "type": "string" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/AlertQuery" - } - }, - "now": { - "type": "string", - "format": "date-time" - } - } - }, - "EvalQueriesResponse": { - "type": "object" - }, - "ExplorePanelsState": { - "description": "This is an object constructed with the keys as the values of the enum VisType and the value being a bag of properties" - }, - "ExtKeyUsage": { - "description": "Each of the ExtKeyUsage* constants define a unique action.", - "type": "integer", - "format": "int64", - "title": "ExtKeyUsage represents an extended set of actions that are valid for a given key." - }, - "ExtendedReceiver": { - "type": "object", - "properties": { - "email_configs": { - "$ref": "#/definitions/EmailConfig" - }, - "grafana_managed_receiver": { - "$ref": "#/definitions/PostableGrafanaReceiver" - }, - "opsgenie_configs": { - "$ref": "#/definitions/OpsGenieConfig" - }, - "pagerduty_configs": { - "$ref": "#/definitions/PagerdutyConfig" - }, - "pushover_configs": { - "$ref": "#/definitions/PushoverConfig" - }, - "slack_configs": { - "$ref": "#/definitions/SlackConfig" - }, - "victorops_configs": { - "$ref": "#/definitions/VictorOpsConfig" - }, - "webhook_configs": { - "$ref": "#/definitions/WebhookConfig" - }, - "wechat_configs": { - "$ref": "#/definitions/WechatConfig" - } - } - }, - "Extension": { - "description": "Extension represents the ASN.1 structure of the same name. See RFC\n5280, section 4.2.", - "type": "object", - "properties": { - "Critical": { - "type": "boolean" - }, - "Id": { - "$ref": "#/definitions/ObjectIdentifier" - }, - "Value": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - } - } - }, - "ExternalAlertmanagerConfig": { - "type": "object", - "properties": { - "alertmanager_config": { - "$ref": "#/definitions/Config" - }, - "template_files": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "ExternalAlertmanagerStatus": { - "type": "object", - "required": ["cluster", "config", "uptime", "versionInfo"], - "properties": { - "cluster": { - "$ref": "#/definitions/clusterStatus" - }, - "config": { - "$ref": "#/definitions/Config" - }, - "uptime": { - "description": "uptime", - "type": "string", - "format": "date-time" - }, - "versionInfo": { - "$ref": "#/definitions/versionInfo" - } - } - }, - "ExtraConfiguration": { - "type": "object", - "properties": { - "alertmanager_config": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "merge_matchers": { - "$ref": "#/definitions/Matchers" - }, - "template_files": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "FailedUser": { - "description": "FailedUser holds the information of an user that failed", - "type": "object", - "properties": { - "Error": { - "type": "string" - }, - "Login": { - "type": "string" - } - } - }, - "Failure": { - "$ref": "#/definitions/ResponseDetails" - }, - "Field": { - "description": "A Field is essentially a slice of various types with extra properties and methods.\nSee NewField() for supported types.\n\nThe slice data in the Field is a not exported, so methods on the Field are used to to manipulate its data.", - "type": "object", - "title": "Field represents a typed column of data within a Frame.", - "properties": { - "config": { - "$ref": "#/definitions/FieldConfig" - }, - "labels": { - "$ref": "#/definitions/FrameLabels" - }, - "name": { - "description": "Name is default identifier of the field. The name does not have to be unique, but the combination\nof name and Labels should be unique for proper behavior in all situations.", - "type": "string" - } - } - }, - "FieldConfig": { - "type": "object", - "title": "FieldConfig represents the display properties for a Field.", - "properties": { - "color": { - "description": "Map values to a display color\nNOTE: this interface is under development in the frontend... so simple map for now", - "type": "object", - "additionalProperties": {} - }, - "custom": { - "description": "Panel Specific Values", - "type": "object", - "additionalProperties": {} - }, - "decimals": { - "type": "integer", - "format": "uint16" - }, - "description": { - "description": "Description is human readable field metadata", - "type": "string" - }, - "displayName": { - "description": "DisplayName overrides Grafana default naming, should not be used from a data source", - "type": "string" - }, - "displayNameFromDS": { - "description": "DisplayNameFromDS overrides Grafana default naming strategy.", - "type": "string" - }, - "filterable": { - "description": "Filterable indicates if the Field's data can be filtered by additional calls.", - "type": "boolean" - }, - "interval": { - "description": "Interval indicates the expected regular step between values in the series.\nWhen an interval exists, consumers can identify \"missing\" values when the expected value is not present.\nThe grafana timeseries visualization will render disconnected values when missing values are found it the time field.\nThe interval uses the same units as the values. For time.Time, this is defined in milliseconds.", - "type": "number", - "format": "double" - }, - "links": { - "description": "The behavior when clicking on a result", - "type": "array", - "items": { - "$ref": "#/definitions/DataLink" - } - }, - "mappings": { - "$ref": "#/definitions/ValueMappings" - }, - "max": { - "$ref": "#/definitions/ConfFloat64" - }, - "min": { - "$ref": "#/definitions/ConfFloat64" - }, - "noValue": { - "description": "Alternative to empty string", - "type": "string" - }, - "path": { - "description": "Path is an explicit path to the field in the datasource. When the frame meta includes a path,\nthis will default to `${frame.meta.path}/${field.name}\n\nWhen defined, this value can be used as an identifier within the datasource scope, and\nmay be used as an identifier to update values in a subsequent request", - "type": "string" - }, - "thresholds": { - "$ref": "#/definitions/ThresholdsConfig" - }, - "type": { - "$ref": "#/definitions/FieldTypeConfig" - }, - "unit": { - "description": "Numeric Options", - "type": "string" - }, - "writeable": { - "description": "Writeable indicates that the datasource knows how to update this value", - "type": "boolean" - } - } - }, - "FieldTypeConfig": { - "description": "FieldTypeConfig has type specific configs, only one should be active at a time", - "type": "object", - "properties": { - "enum": { - "$ref": "#/definitions/EnumFieldConfig" - } - } - }, - "FindTagsResult": { - "type": "object", - "title": "FindTagsResult is the result of a tags search.", - "properties": { - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/TagsDTO" - } - } - } - }, - "FloatHistogram": { - "description": "A FloatHistogram is needed by PromQL to handle operations that might result\nin fractional counts. Since the counts in a histogram are unlikely to be too\nlarge to be represented precisely by a float64, a FloatHistogram can also be\nused to represent a histogram with integer counts and thus serves as a more\ngeneralized representation.", - "type": "object", - "title": "FloatHistogram is similar to Histogram but uses float64 for all\ncounts. Additionally, bucket counts are absolute and not deltas.", - "properties": { - "Count": { - "description": "Total number of observations. Must be zero or positive.", - "type": "number", - "format": "double" - }, - "CounterResetHint": { - "$ref": "#/definitions/CounterResetHint" - }, - "CustomValues": { - "description": "Holds the custom (usually upper) bounds for bucket definitions, otherwise nil.\nThis slice is interned, to be treated as immutable and copied by reference.\nThese numbers should be strictly increasing. This field is only used when the\nschema is for custom buckets, and the ZeroThreshold, ZeroCount, NegativeSpans\nand NegativeBuckets fields are not used in that case.", - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, - "PositiveBuckets": { - "description": "Observation counts in buckets. Each represents an absolute count and\nmust be zero or positive.", - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, - "PositiveSpans": { - "description": "Spans for positive and negative buckets (see Span below).", - "type": "array", - "items": { - "$ref": "#/definitions/Span" - } - }, - "Schema": { - "description": "Currently valid schema numbers are -4 \u003c= n \u003c= 8 for exponential buckets.\nThey are all for base-2 bucket schemas, where 1 is a bucket boundary in\neach case, and then each power of two is divided into 2^n logarithmic buckets.\nOr in other words, each bucket boundary is the previous boundary times\n2^(2^-n). Another valid schema number is -53 for custom buckets, defined by\nthe CustomValues field.", - "type": "integer", - "format": "int32" - }, - "Sum": { - "description": "Sum of observations. This is also used as the stale marker.", - "type": "number", - "format": "double" - }, - "ZeroCount": { - "description": "Observations falling into the zero bucket. Must be zero or positive.", - "type": "number", - "format": "double" - }, - "ZeroThreshold": { - "description": "Width of the zero bucket.", - "type": "number", - "format": "double" - } - } - }, - "Folder": { - "type": "object", - "properties": { - "accessControl": { - "$ref": "#/definitions/Metadata" - }, - "canAdmin": { - "type": "boolean" - }, - "canDelete": { - "type": "boolean" - }, - "canEdit": { - "type": "boolean" - }, - "canSave": { - "type": "boolean" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "string" - }, - "hasAcl": { - "type": "boolean" - }, - "id": { - "description": "Deprecated: use UID instead", - "type": "integer", - "format": "int64" - }, - "managedBy": { - "$ref": "#/definitions/ManagerKind" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "parentUid": { - "description": "only used if nested folders are enabled", - "type": "string" - }, - "parents": { - "description": "the parent folders starting from the root going down", - "type": "array", - "items": { - "$ref": "#/definitions/Folder" - } - }, - "title": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "updated": { - "type": "string", - "format": "date-time" - }, - "updatedBy": { - "type": "string" - }, - "url": { - "type": "string" - }, - "version": { - "type": "integer", - "format": "int64" - } - } - }, - "FolderSearchHit": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "managedBy": { - "$ref": "#/definitions/ManagerKind" - }, - "parentUid": { - "type": "string" - }, - "title": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "FooterItem": { - "type": "object", - "properties": { - "color": { - "type": "string" - }, - "fontSize": { - "type": "string" - }, - "fontStyle": { - "type": "string" - }, - "fontWeight": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "ForbiddenError": { - "type": "object", - "properties": { - "body": { - "$ref": "#/definitions/PublicError" - } - } - }, - "Frame": { - "description": "Each Field is well typed by its FieldType and supports optional Labels.\n\nA Frame is a general data container for Grafana. A Frame can be table data\nor time series data depending on its content and field types.", - "type": "object", - "title": "Frame is a columnar data structure where each column is a Field.", - "properties": { - "Fields": { - "description": "Fields are the columns of a frame.\nAll Fields must be of the same the length when marshalling the Frame for transmission.\nThere should be no `nil` entries in the Fields slice (making them pointers was a mistake).", - "type": "array", - "items": { - "$ref": "#/definitions/Field" - } - }, - "Meta": { - "$ref": "#/definitions/FrameMeta" - }, - "Name": { - "description": "Name is used in some Grafana visualizations.", - "type": "string" - }, - "RefID": { - "description": "RefID is a property that can be set to match a Frame to its originating query.", - "type": "string" - } - } - }, - "FrameLabels": { - "description": "Labels are used to add metadata to an object. The JSON will always be sorted keys", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "FrameMeta": { - "description": "https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/types/data.ts#L11\nNOTE -- in javascript this can accept any `[key: string]: any;` however\nthis interface only exposes the values we want to be exposed", - "type": "object", - "title": "FrameMeta matches:", - "properties": { - "channel": { - "description": "Channel is the path to a stream in grafana live that has real-time updates for this data.", - "type": "string" - }, - "custom": { - "description": "Custom datasource specific values." - }, - "dataTopic": { - "$ref": "#/definitions/DataTopic" - }, - "executedQueryString": { - "description": "ExecutedQueryString is the raw query sent to the underlying system. All macros and templating\nhave been applied. When metadata contains this value, it will be shown in the query inspector.", - "type": "string" - }, - "notices": { - "description": "Notices provide additional information about the data in the Frame that\nGrafana can display to the user in the user interface.", - "type": "array", - "items": { - "$ref": "#/definitions/Notice" - } - }, - "path": { - "description": "Path is a browsable path on the datasource.", - "type": "string" - }, - "pathSeparator": { - "description": "PathSeparator defines the separator pattern to decode a hierarchy. The default separator is '/'.", - "type": "string" - }, - "preferredVisualisationPluginId": { - "description": "PreferredVisualizationPluginId sets the panel plugin id to use to render the data when using Explore. If\nthe plugin cannot be found will fall back to PreferredVisualization.", - "type": "string" - }, - "preferredVisualisationType": { - "$ref": "#/definitions/VisType" - }, - "stats": { - "description": "Stats is an array of query result statistics.", - "type": "array", - "items": { - "$ref": "#/definitions/QueryStat" - } - }, - "type": { - "$ref": "#/definitions/FrameType" - }, - "typeVersion": { - "$ref": "#/definitions/FrameTypeVersion" - }, - "uniqueRowIdFields": { - "description": "Array of field indices which values create a unique id for each row. Ideally this should be globally unique ID\nbut that isn't guarantied. Should help with keeping track and deduplicating rows in visualizations, especially\nwith streaming data with frequent updates.", - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "example": "TraceID in Tempo, table name + primary key in SQL" - } - } - }, - "FrameType": { - "description": "A FrameType string, when present in a frame's metadata, asserts that the\nframe's structure conforms to the FrameType's specification.\nThis property is currently optional, so FrameType may be FrameTypeUnknown even if the properties of\nthe Frame correspond to a defined FrameType.\n+enum", - "type": "string" - }, - "FrameTypeVersion": { - "type": "array", - "title": "FrameType is a 2 number version (Major / Minor).", - "items": { - "type": "integer", - "format": "uint64" - } - }, - "Frames": { - "description": "It is the main data container within a backend.DataResponse.\nThere should be no `nil` entries in the Frames slice (making them pointers was a mistake).", - "type": "array", - "title": "Frames is a slice of Frame pointers.", - "items": { - "$ref": "#/definitions/Frame" - } - }, - "GetAccessTokenResponseDTO": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "expiresAt": { - "type": "string" - }, - "firstUsedAt": { - "type": "string" - }, - "id": { - "type": "string" - }, - "lastUsedAt": { - "type": "string" - } - } - }, - "GetAnnotationTagsResponse": { - "type": "object", - "title": "GetAnnotationTagsResponse is a response struct for FindTagsResult.", - "properties": { - "result": { - "$ref": "#/definitions/FindTagsResult" - } - } - }, - "GetHomeDashboardResponse": { - "title": "Get home dashboard response.", - "allOf": [ - { - "type": "object", - "properties": { - "dashboard": { - "$ref": "#/definitions/Json" - }, - "meta": { - "$ref": "#/definitions/DashboardMeta" - } - } - }, - { - "type": "object", - "properties": { - "redirectUri": { - "type": "string" - } - } - } - ] - }, - "GetSnapshotResponseDTO": { - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "finished": { - "type": "string", - "format": "date-time" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/MigrateDataResponseItemDTO" - } - }, - "sessionUid": { - "type": "string" - }, - "stats": { - "$ref": "#/definitions/SnapshotResourceStats" - }, - "status": { - "type": "string", - "enum": [ - "INITIALIZING", - "CREATING", - "PENDING_UPLOAD", - "UPLOADING", - "PENDING_PROCESSING", - "PROCESSING", - "FINISHED", - "CANCELED", - "ERROR", - "UNKNOWN" - ] - }, - "uid": { - "type": "string" - } - } - }, - "GettableAlertmanagers": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/AlertManagersResult" - }, - "status": { - "type": "string" - } - } - }, - "GettableApiAlertingConfig": { - "type": "object", - "properties": { - "global": { - "$ref": "#/definitions/GlobalConfig" - }, - "inhibit_rules": { - "type": "array", - "items": { - "$ref": "#/definitions/InhibitRule" - } - }, - "muteTimeProvenances": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Provenance" - } - }, - "mute_time_intervals": { - "description": "MuteTimeIntervals is deprecated and will be removed before Alertmanager 1.0.", - "type": "array", - "items": { - "$ref": "#/definitions/MuteTimeInterval" - } - }, - "receivers": { - "description": "Override with our superset receiver type", - "type": "array", - "items": { - "$ref": "#/definitions/GettableApiReceiver" - } - }, - "route": { - "$ref": "#/definitions/Route" - }, - "templates": { - "type": "array", - "items": { - "type": "string" - } - }, - "time_intervals": { - "type": "array", - "items": { - "$ref": "#/definitions/TimeInterval" - } - } - } - }, - "GettableApiReceiver": { - "type": "object", - "properties": { - "discord_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/DiscordConfig" - } - }, - "email_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/EmailConfig" - } - }, - "grafana_managed_receiver_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/GettableGrafanaReceiver" - } - }, - "jira_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/JiraConfig" - } - }, - "msteams_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/MSTeamsConfig" - } - }, - "msteamsv2_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/MSTeamsV2Config" - } - }, - "name": { - "description": "A unique identifier for this receiver.", - "type": "string" - }, - "opsgenie_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/OpsGenieConfig" - } - }, - "pagerduty_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/PagerdutyConfig" - } - }, - "pushover_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/PushoverConfig" - } - }, - "slack_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/SlackConfig" - } - }, - "sns_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/SNSConfig" - } - }, - "telegram_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/TelegramConfig" - } - }, - "victorops_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/VictorOpsConfig" - } - }, - "webex_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/WebexConfig" - } - }, - "webhook_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/WebhookConfig" - } - }, - "wechat_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/WechatConfig" - } - } - } - }, - "GettableExtendedRuleNode": { - "type": "object", - "properties": { - "alert": { - "type": "string" - }, - "annotations": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "expr": { - "type": "string" - }, - "for": { - "type": "string" - }, - "grafana_alert": { - "$ref": "#/definitions/GettableGrafanaRule" - }, - "keep_firing_for": { - "type": "string" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "record": { - "type": "string" - } - } - }, - "GettableGrafanaReceiver": { - "type": "object", - "properties": { - "disableResolveMessage": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "provenance": { - "$ref": "#/definitions/Provenance" - }, - "secureFields": { - "type": "object", - "additionalProperties": { - "type": "boolean" - } - }, - "settings": { - "$ref": "#/definitions/RawMessage" - }, - "type": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "GettableGrafanaReceivers": { - "type": "object", - "properties": { - "grafana_managed_receiver_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/GettableGrafanaReceiver" - } - } - } - }, - "GettableGrafanaRule": { - "type": "object", - "properties": { - "condition": { - "type": "string" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/AlertQuery" - } - }, - "exec_err_state": { - "type": "string", - "enum": ["OK", "Alerting", "Error"] - }, - "guid": { - "type": "string" - }, - "intervalSeconds": { - "type": "integer", - "format": "int64" - }, - "is_paused": { - "type": "boolean" - }, - "message": { - "description": "Field is only populated when listing alert rule versions.", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/AlertRuleMetadata" - }, - "missing_series_evals_to_resolve": { - "type": "integer", - "format": "int64" - }, - "namespace_uid": { - "type": "string" - }, - "no_data_state": { - "type": "string", - "enum": ["Alerting", "NoData", "OK"] - }, - "notification_settings": { - "$ref": "#/definitions/AlertRuleNotificationSettings" - }, - "provenance": { - "$ref": "#/definitions/Provenance" - }, - "record": { - "$ref": "#/definitions/Record" - }, - "rule_group": { - "type": "string" - }, - "title": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "updated": { - "type": "string", - "format": "date-time" - }, - "updated_by": { - "$ref": "#/definitions/UserInfo" - }, - "version": { - "type": "integer", - "format": "int64" - } - } - }, - "GettableHistoricUserConfig": { - "type": "object", - "properties": { - "alertmanager_config": { - "$ref": "#/definitions/GettableApiAlertingConfig" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "last_applied": { - "type": "string", - "format": "date-time" - }, - "template_file_provenances": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Provenance" - } - }, - "template_files": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "GettableNGalertConfig": { - "type": "object", - "properties": { - "alertmanagersChoice": { - "type": "string", - "enum": ["all", "internal", "external"] - } - } - }, - "GettableRuleGroupConfig": { - "type": "object", - "properties": { - "align_evaluation_time_on_interval": { - "type": "boolean" - }, - "evaluation_delay": { - "type": "string" - }, - "interval": { - "$ref": "#/definitions/Duration" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "limit": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "query_offset": { - "type": "string" - }, - "remote_write": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteWriteConfig" - } - }, - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/GettableExtendedRuleNode" - } - }, - "source_tenants": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "GettableRuleVersions": { - "type": "array", - "items": { - "$ref": "#/definitions/GettableExtendedRuleNode" - } - }, - "GettableStatus": { - "type": "object", - "required": ["cluster", "config", "uptime", "versionInfo"], - "properties": { - "cluster": { - "$ref": "#/definitions/clusterStatus" - }, - "config": { - "$ref": "#/definitions/PostableApiAlertingConfig" - }, - "uptime": { - "description": "uptime", - "type": "string", - "format": "date-time" - }, - "versionInfo": { - "$ref": "#/definitions/versionInfo" - } - } - }, - "GettableUserConfig": { - "type": "object", - "properties": { - "alertmanager_config": { - "$ref": "#/definitions/GettableApiAlertingConfig" - }, - "extra_config": { - "type": "array", - "items": { - "$ref": "#/definitions/ExtraConfiguration" - } - }, - "template_file_provenances": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Provenance" - } - }, - "template_files": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "GlobalConfig": { - "description": "GlobalConfig defines configuration parameters that are valid globally\nunless overwritten.", - "type": "object", - "properties": { - "http_config": { - "$ref": "#/definitions/HTTPClientConfig" - }, - "jira_api_url": { - "$ref": "#/definitions/URL" - }, - "opsgenie_api_key": { - "$ref": "#/definitions/Secret" - }, - "opsgenie_api_key_file": { - "type": "string" - }, - "opsgenie_api_url": { - "$ref": "#/definitions/URL" - }, - "pagerduty_url": { - "$ref": "#/definitions/URL" - }, - "resolve_timeout": { - "$ref": "#/definitions/Duration" - }, - "slack_api_url": { - "$ref": "#/definitions/SecretURL" - }, - "slack_api_url_file": { - "type": "string" - }, - "smtp_auth_identity": { - "type": "string" - }, - "smtp_auth_password": { - "$ref": "#/definitions/Secret" - }, - "smtp_auth_password_file": { - "type": "string" - }, - "smtp_auth_secret": { - "$ref": "#/definitions/Secret" - }, - "smtp_auth_username": { - "type": "string" - }, - "smtp_from": { - "type": "string" - }, - "smtp_hello": { - "type": "string" - }, - "smtp_require_tls": { - "type": "boolean" - }, - "smtp_smarthost": { - "$ref": "#/definitions/HostPort" - }, - "smtp_tls_config": { - "$ref": "#/definitions/TLSConfig" - }, - "telegram_api_url": { - "$ref": "#/definitions/URL" - }, - "victorops_api_key": { - "$ref": "#/definitions/Secret" - }, - "victorops_api_key_file": { - "type": "string" - }, - "victorops_api_url": { - "$ref": "#/definitions/URL" - }, - "webex_api_url": { - "$ref": "#/definitions/URL" - }, - "wechat_api_corp_id": { - "type": "string" - }, - "wechat_api_secret": { - "$ref": "#/definitions/Secret" - }, - "wechat_api_url": { - "$ref": "#/definitions/URL" - } - } - }, - "Group": { - "type": "object", - "properties": { - "groupID": { - "type": "string" - }, - "mappings": {} - } - }, - "GroupAttributes": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "HTTPClientConfig": { - "type": "object", - "title": "HTTPClientConfig configures an HTTP client.", - "properties": { - "authorization": { - "$ref": "#/definitions/Authorization" - }, - "basic_auth": { - "$ref": "#/definitions/BasicAuth" - }, - "bearer_token": { - "$ref": "#/definitions/Secret" - }, - "bearer_token_file": { - "description": "The bearer token file for the targets. Deprecated in favour of\nAuthorization.CredentialsFile.", - "type": "string" - }, - "enable_http2": { - "description": "EnableHTTP2 specifies whether the client should configure HTTP2.\nThe omitempty flag is not set, because it would be hidden from the\nmarshalled configuration when set to false.", - "type": "boolean" - }, - "follow_redirects": { - "description": "FollowRedirects specifies whether the client should follow HTTP 3xx redirects.\nThe omitempty flag is not set, because it would be hidden from the\nmarshalled configuration when set to false.", - "type": "boolean" - }, - "http_headers": { - "$ref": "#/definitions/Headers" - }, - "no_proxy": { - "description": "NoProxy contains addresses that should not use a proxy.", - "type": "string" - }, - "oauth2": { - "$ref": "#/definitions/OAuth2" - }, - "proxy_connect_header": { - "$ref": "#/definitions/ProxyHeader" - }, - "proxy_from_environment": { - "description": "ProxyFromEnvironment makes use of net/http ProxyFromEnvironment function\nto determine proxies.", - "type": "boolean" - }, - "proxy_url": { - "$ref": "#/definitions/URL" - }, - "tls_config": { - "$ref": "#/definitions/TLSConfig" - } - } - }, - "Header": { - "type": "object", - "title": "Header represents the configuration for a single HTTP header.", - "properties": { - "files": { - "type": "array", - "items": { - "type": "string" - } - }, - "secrets": { - "type": "array", - "items": { - "$ref": "#/definitions/Secret" - } - }, - "values": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "Headers": { - "type": "object", - "title": "Headers represents the configuration for HTTP headers.", - "properties": { - "Headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Header" - } - } - } - }, - "Hit": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "folderId": { - "type": "integer", - "format": "int64" - }, - "folderTitle": { - "type": "string" - }, - "folderUid": { - "type": "string" - }, - "folderUrl": { - "type": "string" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "isDeleted": { - "type": "boolean" - }, - "isStarred": { - "type": "boolean" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "permanentlyDeleteDate": { - "type": "string", - "format": "date-time" - }, - "slug": { - "type": "string" - }, - "sortMeta": { - "type": "integer", - "format": "int64" - }, - "sortMetaName": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "title": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/HitType" - }, - "uid": { - "type": "string" - }, - "uri": { - "type": "string" - }, - "url": { - "type": "string" - } - } - }, - "HitList": { - "type": "array", - "items": { - "$ref": "#/definitions/Hit" - } - }, - "HitType": { - "type": "string" - }, - "HostPort": { - "type": "object", - "title": "HostPort represents a \"host:port\" network address.", - "properties": { - "Host": { - "type": "string" - }, - "Port": { - "type": "string" - } - } - }, - "IPMask": { - "description": "See type [IPNet] and func [ParseCIDR] for details.", - "type": "array", - "title": "An IPMask is a bitmask that can be used to manipulate\nIP addresses for IP addressing and routing.", - "items": { - "type": "integer", - "format": "uint8" - } - }, - "IPNet": { - "type": "object", - "title": "An IPNet represents an IP network.", - "properties": { - "IP": { - "type": "string" - }, - "Mask": { - "$ref": "#/definitions/IPMask" - } - } - }, - "ImportDashboardInput": { - "type": "object", - "title": "ImportDashboardInput definition of input parameters when importing a dashboard.", - "properties": { - "name": { - "type": "string" - }, - "pluginId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "ImportDashboardRequest": { - "type": "object", - "title": "ImportDashboardRequest request object for importing a dashboard.", - "properties": { - "dashboard": { - "$ref": "#/definitions/Json" - }, - "folderId": { - "description": "Deprecated: use FolderUID instead", - "type": "integer", - "format": "int64" - }, - "folderUid": { - "type": "string" - }, - "inputs": { - "type": "array", - "items": { - "$ref": "#/definitions/ImportDashboardInput" - } - }, - "overwrite": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "pluginId": { - "type": "string" - } - } - }, - "ImportDashboardResponse": { - "type": "object", - "title": "ImportDashboardResponse response object returned when importing a dashboard.", - "properties": { - "dashboardId": { - "type": "integer", - "format": "int64" - }, - "description": { - "type": "string" - }, - "folderId": { - "description": "Deprecated: use FolderUID instead", - "type": "integer", - "format": "int64" - }, - "folderUid": { - "type": "string" - }, - "imported": { - "type": "boolean" - }, - "importedRevision": { - "type": "integer", - "format": "int64" - }, - "importedUri": { - "type": "string" - }, - "importedUrl": { - "type": "string" - }, - "path": { - "type": "string" - }, - "pluginId": { - "type": "string" - }, - "removed": { - "type": "boolean" - }, - "revision": { - "type": "integer", - "format": "int64" - }, - "slug": { - "type": "string" - }, - "title": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "InhibitRule": { - "description": "InhibitRule defines an inhibition rule that mutes alerts that match the\ntarget labels if an alert matching the source labels exists.\nBoth alerts have to have a set of labels being equal.", - "type": "object", - "properties": { - "equal": { - "description": "A set of labels that must be equal between the source and target alert\nfor them to be a match.", - "type": "array", - "items": { - "type": "string" - } - }, - "source_match": { - "description": "SourceMatch defines a set of labels that have to equal the given\nvalue for source alerts. Deprecated. Remove before v1.0 release.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "source_match_re": { - "$ref": "#/definitions/MatchRegexps" - }, - "source_matchers": { - "$ref": "#/definitions/Matchers" - }, - "target_match": { - "description": "TargetMatch defines a set of labels that have to equal the given\nvalue for target alerts. Deprecated. Remove before v1.0 release.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "target_match_re": { - "$ref": "#/definitions/MatchRegexps" - }, - "target_matchers": { - "$ref": "#/definitions/Matchers" - } - } - }, - "InspectType": { - "type": "integer", - "format": "int64", - "title": "InspectType is a type for the Inspect property of a Notice." - }, - "IntegrationStatus": { - "type": "object", - "properties": { - "lastNotifyAttempt": { - "description": "A timestamp indicating the last attempt to deliver a notification regardless of the outcome.\nFormat: date-time", - "type": "string", - "format": "date-time" - }, - "lastNotifyAttemptDuration": { - "description": "Duration of the last attempt to deliver a notification in humanized format (`1s` or `15ms`, etc).", - "type": "string" - }, - "lastNotifyAttemptError": { - "description": "Error string for the last attempt to deliver a notification. Empty if the last attempt was successful.", - "type": "string" - }, - "name": { - "description": "Name of the integration.", - "type": "string" - }, - "sendResolved": { - "description": "Whether the integration is configured to send resolved notifications.", - "type": "boolean" - } - } - }, - "InternalDataLink": { - "description": "InternalDataLink definition to allow Explore links to be constructed in the backend", - "type": "object", - "properties": { - "datasourceName": { - "type": "string" - }, - "datasourceUid": { - "type": "string" - }, - "panelsState": { - "$ref": "#/definitions/ExplorePanelsState" - }, - "query": {}, - "timeRange": { - "$ref": "#/definitions/TimeRange" - }, - "transformations": { - "type": "array", - "items": { - "$ref": "#/definitions/LinkTransformationConfig" - } - } - } - }, - "JSONWebKey": { - "description": "JSONWebKey represents a public or private key in JWK format. It can be\nmarshaled into JSON and unmarshaled from JSON.", - "type": "object", - "properties": { - "Algorithm": { - "description": "Key algorithm, parsed from `alg` header.", - "type": "string" - }, - "CertificateThumbprintSHA1": { - "description": "X.509 certificate thumbprint (SHA-1), parsed from `x5t` header.", - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - }, - "CertificateThumbprintSHA256": { - "description": "X.509 certificate thumbprint (SHA-256), parsed from `x5t#S256` header.", - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - }, - "Certificates": { - "description": "X.509 certificate chain, parsed from `x5c` header.", - "type": "array", - "items": { - "$ref": "#/definitions/Certificate" - } - }, - "CertificatesURL": { - "$ref": "#/definitions/URL" - }, - "Key": { - "description": "Key is the Go in-memory representation of this key. It must have one\nof these types:\ned25519.PublicKey\ned25519.PrivateKey\necdsa.PublicKey\necdsa.PrivateKey\nrsa.PublicKey\nrsa.PrivateKey\n[]byte (a symmetric key)\n\nWhen marshaling this JSONWebKey into JSON, the \"kty\" header parameter\nwill be automatically set based on the type of this field." - }, - "KeyID": { - "description": "Key identifier, parsed from `kid` header.", - "type": "string" - }, - "Use": { - "description": "Key use, parsed from `use` header.", - "type": "string" - } - } - }, - "JiraConfig": { - "type": "object", - "properties": { - "api_url": { - "$ref": "#/definitions/URL" - }, - "custom_fields": { - "type": "object", - "additionalProperties": {} - }, - "description": { - "type": "string" - }, - "http_config": { - "$ref": "#/definitions/HTTPClientConfig" - }, - "issue_type": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "priority": { - "type": "string" - }, - "project": { - "type": "string" - }, - "reopen_duration": { - "$ref": "#/definitions/Duration" - }, - "reopen_transition": { - "type": "string" - }, - "resolve_transition": { - "type": "string" - }, - "send_resolved": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "wont_fix_resolution": { - "type": "string" - } - } - }, - "Json": { - "type": "object" - }, - "KeyUsage": { - "description": "KeyUsage represents the set of actions that are valid for a given key. It's\na bitmap of the KeyUsage* constants.", - "type": "integer", - "format": "int64" - }, - "Label": { - "type": "object", - "title": "Label is a key/value pair of strings.", - "properties": { - "Name": { - "type": "string" - } - } - }, - "Labels": { - "description": "Labels is a sorted set of labels. Order has to be guaranteed upon\ninstantiation.", - "type": "array", - "items": { - "$ref": "#/definitions/Label" - } - }, - "LibraryElementArrayResponse": { - "type": "object", - "title": "LibraryElementArrayResponse is a response struct for an array of LibraryElementDTO.", - "properties": { - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/LibraryElementDTO" - } - } - } - }, - "LibraryElementConnectionDTO": { - "type": "object", - "title": "LibraryElementConnectionDTO is the frontend DTO for element connections.", - "properties": { - "connectionId": { - "type": "integer", - "format": "int64" - }, - "connectionUid": { - "type": "string" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "$ref": "#/definitions/LibraryElementDTOMetaUser" - }, - "elementId": { - "type": "integer", - "format": "int64" - }, - "id": { - "description": "Deprecated: this field will be removed in the future", - "type": "integer", - "format": "int64" - }, - "kind": { - "type": "integer", - "format": "int64" - } - } - }, - "LibraryElementConnectionsResponse": { - "type": "object", - "title": "LibraryElementConnectionsResponse is a response struct for an array of LibraryElementConnectionDTO.", - "properties": { - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/LibraryElementConnectionDTO" - } - } - } - }, - "LibraryElementDTO": { - "type": "object", - "title": "LibraryElementDTO is the frontend DTO for entities.", - "properties": { - "description": { - "type": "string" - }, - "folderId": { - "description": "Deprecated: use FolderUID instead", - "type": "integer", - "format": "int64" - }, - "folderUid": { - "type": "string" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "kind": { - "type": "integer", - "format": "int64" - }, - "meta": { - "$ref": "#/definitions/LibraryElementDTOMeta" - }, - "model": { - "type": "object" - }, - "name": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "schemaVersion": { - "type": "integer", - "format": "int64" - }, - "type": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "version": { - "type": "integer", - "format": "int64" - } - } - }, - "LibraryElementDTOMeta": { - "type": "object", - "title": "LibraryElementDTOMeta is the meta information for LibraryElementDTO.", - "properties": { - "connectedDashboards": { - "type": "integer", - "format": "int64" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "$ref": "#/definitions/LibraryElementDTOMetaUser" - }, - "folderName": { - "type": "string" - }, - "folderUid": { - "type": "string" - }, - "updated": { - "type": "string", - "format": "date-time" - }, - "updatedBy": { - "$ref": "#/definitions/LibraryElementDTOMetaUser" - } - } - }, - "LibraryElementDTOMetaUser": { - "type": "object", - "properties": { - "avatarUrl": { - "type": "string" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - } - }, - "LibraryElementResponse": { - "type": "object", - "title": "LibraryElementResponse is a response struct for LibraryElementDTO.", - "properties": { - "result": { - "$ref": "#/definitions/LibraryElementDTO" - } - } - }, - "LibraryElementSearchResponse": { - "type": "object", - "title": "LibraryElementSearchResponse is a response struct for LibraryElementSearchResult.", - "properties": { - "result": { - "$ref": "#/definitions/LibraryElementSearchResult" - } - } - }, - "LibraryElementSearchResult": { - "type": "object", - "title": "LibraryElementSearchResult is the search result for entities.", - "properties": { - "elements": { - "type": "array", - "items": { - "$ref": "#/definitions/LibraryElementDTO" - } - }, - "page": { - "type": "integer", - "format": "int64" - }, - "perPage": { - "type": "integer", - "format": "int64" - }, - "totalCount": { - "type": "integer", - "format": "int64" - } - } - }, - "LinkTransformationConfig": { - "type": "object", - "properties": { - "expression": { - "type": "string" - }, - "field": { - "type": "string" - }, - "mapValue": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/SupportedTransformationTypes" - } - } - }, - "MSTeamsConfig": { - "type": "object", - "properties": { - "http_config": { - "$ref": "#/definitions/HTTPClientConfig" - }, - "send_resolved": { - "type": "boolean" - }, - "summary": { - "type": "string" - }, - "text": { - "type": "string" - }, - "title": { - "type": "string" - }, - "webhook_url": { - "$ref": "#/definitions/SecretURL" - }, - "webhook_url_file": { - "type": "string" - } - } - }, - "MSTeamsV2Config": { - "type": "object", - "properties": { - "http_config": { - "$ref": "#/definitions/HTTPClientConfig" - }, - "send_resolved": { - "type": "boolean" - }, - "text": { - "type": "string" - }, - "title": { - "type": "string" - }, - "webhook_url": { - "$ref": "#/definitions/SecretURL" - }, - "webhook_url_file": { - "type": "string" - } - } - }, - "ManagerKind": { - "description": "It can be a user or a tool or a generic API client.\n+enum", - "type": "string", - "title": "ManagerKind is the type of manager, which is responsible for managing the resource." - }, - "MassDeleteAnnotationsCmd": { - "type": "object", - "properties": { - "annotationId": { - "type": "integer", - "format": "int64" - }, - "dashboardId": { - "type": "integer", - "format": "int64" - }, - "dashboardUID": { - "type": "string" - }, - "panelId": { - "type": "integer", - "format": "int64" - } - } - }, - "MatchRegexps": { - "type": "object", - "title": "MatchRegexps represents a map of Regexp.", - "additionalProperties": { - "type": "string" - } - }, - "MatchType": { - "type": "integer", - "format": "int64", - "title": "MatchType is an enum for label matching types." - }, - "Matcher": { - "type": "object", - "title": "Matcher models the matching of a label.", - "properties": { - "Name": { - "type": "string" - }, - "Type": { - "$ref": "#/definitions/MatchType" - }, - "Value": { - "type": "string" - } - } - }, - "Matchers": { - "description": "Matchers is a slice of Matchers that is sortable, implements Stringer, and\nprovides a Matches method to match a LabelSet against all Matchers in the\nslice. Note that some users of Matchers might require it to be sorted.", - "type": "array", - "items": { - "$ref": "#/definitions/Matcher" - } - }, - "Metadata": { - "description": "Metadata contains user accesses for a given resource\nEx: map[string]bool{\"create\":true, \"delete\": true}", - "type": "object", - "additionalProperties": { - "type": "boolean" - } - }, - "MetricRequest": { - "type": "object", - "required": ["from", "to", "queries"], - "properties": { - "debug": { - "type": "boolean" - }, - "from": { - "description": "From Start time in epoch timestamps in milliseconds or relative using Grafana time units.", - "type": "string", - "example": "now-1h" - }, - "queries": { - "description": "queries.refId – Specifies an identifier of the query. Is optional and default to “A”.\nqueries.datasourceId – Specifies the data source to be queried. Each query in the request must have an unique datasourceId.\nqueries.maxDataPoints - Species maximum amount of data points that dashboard panel can render. Is optional and default to 100.\nqueries.intervalMs - Specifies the time interval in milliseconds of time series. Is optional and defaults to 1000.", - "type": "array", - "items": { - "$ref": "#/definitions/Json" - }, - "example": [ - { - "datasource": { - "uid": "PD8C576611E62080A" - }, - "format": "table", - "intervalMs": 86400000, - "maxDataPoints": 1092, - "rawSql": "SELECT 1 as valueOne, 2 as valueTwo", - "refId": "A" - } - ] - }, - "to": { - "description": "To End time in epoch timestamps in milliseconds or relative using Grafana time units.", - "type": "string", - "example": "now" - } - } - }, - "MigrateDataResponseDTO": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/MigrateDataResponseItemDTO" - } - }, - "uid": { - "type": "string" - } - } - }, - "MigrateDataResponseItemDTO": { - "type": "object", - "required": ["type", "refId", "status"], - "properties": { - "errorCode": { - "type": "string", - "enum": [ - "ALERT_RULES_QUOTA_REACHED", - "ALERT_RULES_GROUP_QUOTA_REACHED", - "DATASOURCE_NAME_CONFLICT", - "DATASOURCE_INVALID_URL", - "DATASOURCE_ALREADY_MANAGED", - "FOLDER_NAME_CONFLICT", - "DASHBOARD_ALREADY_MANAGED", - "LIBRARY_ELEMENT_NAME_CONFLICT", - "UNSUPPORTED_DATA_TYPE", - "RESOURCE_CONFLICT", - "UNEXPECTED_STATUS_CODE", - "INTERNAL_SERVICE_ERROR", - "GENERIC_ERROR" - ] - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parentName": { - "type": "string" - }, - "refId": { - "type": "string" - }, - "status": { - "type": "string", - "enum": ["OK", "WARNING", "ERROR", "PENDING", "UNKNOWN"] - }, - "type": { - "type": "string", - "enum": [ - "DASHBOARD", - "DATASOURCE", - "FOLDER", - "LIBRARY_ELEMENT", - "ALERT_RULE", - "ALERT_RULE_GROUP", - "CONTACT_POINT", - "NOTIFICATION_POLICY", - "NOTIFICATION_TEMPLATE", - "MUTE_TIMING", - "PLUGIN" - ] - } - } - }, - "MigrateDataResponseListDTO": { - "type": "object", - "properties": { - "uid": { - "type": "string" - } - } - }, - "MoveFolderCommand": { - "description": "MoveFolderCommand captures the information required by the folder service\nto move a folder.", - "type": "object", - "properties": { - "parentUid": { - "type": "string" - } - } - }, - "MultiStatus": { - "type": "object" - }, - "MuteTimeInterval": { - "type": "object", - "title": "MuteTimeInterval represents a named set of time intervals for which a route should be muted.", - "properties": { - "name": { - "type": "string" - }, - "time_intervals": { - "type": "array", - "items": { - "$ref": "#/definitions/TimeInterval" - } - } - } - }, - "MuteTimeIntervalExport": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "time_intervals": { - "type": "array", - "items": { - "$ref": "#/definitions/TimeInterval" - } - } - } - }, - "MuteTimings": { - "type": "array", - "items": { - "$ref": "#/definitions/MuteTimeInterval" - } - }, - "Name": { - "description": "Name represents an X.509 distinguished name. This only includes the common\nelements of a DN. Note that Name is only an approximation of the X.509\nstructure. If an accurate representation is needed, asn1.Unmarshal the raw\nsubject or issuer as an [RDNSequence].", - "type": "object", - "properties": { - "Country": { - "type": "array", - "items": { - "type": "string" - } - }, - "ExtraNames": { - "description": "ExtraNames contains attributes to be copied, raw, into any marshaled\ndistinguished names. Values override any attributes with the same OID.\nThe ExtraNames field is not populated when parsing, see Names.", - "type": "array", - "items": { - "$ref": "#/definitions/AttributeTypeAndValue" - } - }, - "Locality": { - "type": "array", - "items": { - "type": "string" - } - }, - "Names": { - "description": "Names contains all parsed attributes. When parsing distinguished names,\nthis can be used to extract non-standard attributes that are not parsed\nby this package. When marshaling to RDNSequences, the Names field is\nignored, see ExtraNames.", - "type": "array", - "items": { - "$ref": "#/definitions/AttributeTypeAndValue" - } - }, - "SerialNumber": { - "type": "string" - }, - "StreetAddress": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "NamespaceConfigResponse": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/GettableRuleGroupConfig" - } - } - }, - "NavbarPreference": { - "type": "object", - "properties": { - "bookmarkUrls": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "NewApiKeyResult": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64", - "example": 1 - }, - "key": { - "type": "string", - "example": "glsa_iNValIdinValiDinvalidinvalidinva_5b582697" - }, - "name": { - "type": "string", - "example": "grafana" - } - } - }, - "NotFound": { - "type": "object" - }, - "Notice": { - "type": "object", - "title": "Notice provides a structure for presenting notifications in Grafana's user interface.", - "properties": { - "inspect": { - "$ref": "#/definitions/InspectType" - }, - "link": { - "description": "Link is an optional link for display in the user interface and can be an\nabsolute URL or a path relative to Grafana's root url.", - "type": "string" - }, - "severity": { - "$ref": "#/definitions/NoticeSeverity" - }, - "text": { - "description": "Text is freeform descriptive text for the notice.", - "type": "string" - } - } - }, - "NoticeSeverity": { - "type": "integer", - "format": "int64", - "title": "NoticeSeverity is a type for the Severity property of a Notice." - }, - "NotificationPolicyExport": { - "type": "object", - "title": "NotificationPolicyExport is the provisioned file export of alerting.NotificiationPolicyV1.", - "properties": { - "active_time_intervals": { - "type": "array", - "items": { - "type": "string" - } - }, - "continue": { - "type": "boolean" - }, - "group_by": { - "type": "array", - "items": { - "type": "string" - } - }, - "group_interval": { - "type": "string" - }, - "group_wait": { - "type": "string" - }, - "match": { - "description": "Deprecated. Remove before v1.0 release.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "match_re": { - "$ref": "#/definitions/MatchRegexps" - }, - "matchers": { - "$ref": "#/definitions/Matchers" - }, - "mute_time_intervals": { - "type": "array", - "items": { - "type": "string" - } - }, - "object_matchers": { - "$ref": "#/definitions/ObjectMatchers" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "receiver": { - "type": "string" - }, - "repeat_interval": { - "type": "string" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/RouteExport" - } - } - } - }, - "NotificationTemplate": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "provenance": { - "$ref": "#/definitions/Provenance" - }, - "template": { - "type": "string" - }, - "version": { - "type": "string" - } - } - }, - "NotificationTemplateContent": { - "type": "object", - "properties": { - "template": { - "type": "string" - }, - "version": { - "type": "string" - } - } - }, - "NotificationTemplates": { - "type": "array", - "items": { - "$ref": "#/definitions/NotificationTemplate" - } - }, - "NotifierConfig": { - "type": "object", - "title": "NotifierConfig contains base options common across all notifier configurations.", - "properties": { - "send_resolved": { - "type": "boolean" - } - } - }, - "OAuth2": { - "type": "object", - "title": "OAuth2 is the oauth2 client configuration.", - "properties": { - "TLSConfig": { - "$ref": "#/definitions/TLSConfig" - }, - "audience": { - "description": "Audience optionally specifies the intended audience of the\nrequest. If empty, the value of TokenURL is used as the\nintended audience. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".", - "type": "string" - }, - "claims": { - "description": "Claims is a map of claims to be added to the JWT token. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".", - "type": "object", - "additionalProperties": {} - }, - "client_certificate_key": { - "$ref": "#/definitions/Secret" - }, - "client_certificate_key_file": { - "type": "string" - }, - "client_certificate_key_id": { - "type": "string" - }, - "client_certificate_key_ref": { - "description": "ClientCertificateKeyRef is the name of the secret within the secret manager to use as the client\nsecret.", - "type": "string" - }, - "client_id": { - "type": "string" - }, - "client_secret": { - "$ref": "#/definitions/Secret" - }, - "client_secret_file": { - "type": "string" - }, - "client_secret_ref": { - "description": "ClientSecretRef is the name of the secret within the secret manager to use as the client\nsecret.", - "type": "string" - }, - "endpoint_params": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "grant_type": { - "description": "GrantType is the OAuth2 grant type to use. It can be one of\n\"client_credentials\" or \"urn:ietf:params:oauth:grant-type:jwt-bearer\" (RFC 7523).\nDefault value is \"client_credentials\"", - "type": "string" - }, - "iss": { - "description": "Iss is the OAuth client identifier used when communicating with\nthe configured OAuth provider. Default value is client_id. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".", - "type": "string" - }, - "no_proxy": { - "description": "NoProxy contains addresses that should not use a proxy.", - "type": "string" - }, - "proxy_connect_header": { - "$ref": "#/definitions/ProxyHeader" - }, - "proxy_from_environment": { - "description": "ProxyFromEnvironment makes use of net/http ProxyFromEnvironment function\nto determine proxies.", - "type": "boolean" - }, - "proxy_url": { - "$ref": "#/definitions/URL" - }, - "scopes": { - "type": "array", - "items": { - "type": "string" - } - }, - "signature_algorithm": { - "description": "SignatureAlgorithm is the RSA algorithm used to sign JWT token. Only used if\nGrantType is set to \"urn:ietf:params:oauth:grant-type:jwt-bearer\".\nDefault value is RS256 and valid values RS256, RS384, RS512", - "type": "string" - }, - "token_url": { - "type": "string" - } - } - }, - "ObjectIdentifier": { - "type": "array", - "title": "An ObjectIdentifier represents an ASN.1 OBJECT IDENTIFIER.", - "items": { - "type": "integer", - "format": "int64" - } - }, - "ObjectMatcher": { - "type": "array", - "title": "ObjectMatcher is a matcher that can be used to filter alerts.", - "items": { - "type": "string" - } - }, - "ObjectMatchers": { - "type": "array", - "title": "ObjectMatchers is a list of matchers that can be used to filter alerts.", - "items": { - "$ref": "#/definitions/ObjectMatcher" - } - }, - "OpsGenieConfig": { - "type": "object", - "title": "OpsGenieConfig configures notifications via OpsGenie.", - "properties": { - "actions": { - "type": "string" - }, - "api_key": { - "$ref": "#/definitions/Secret" - }, - "api_key_file": { - "type": "string" - }, - "api_url": { - "$ref": "#/definitions/URL" - }, - "description": { - "type": "string" - }, - "details": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "entity": { - "type": "string" - }, - "http_config": { - "$ref": "#/definitions/HTTPClientConfig" - }, - "message": { - "type": "string" - }, - "note": { - "type": "string" - }, - "priority": { - "type": "string" - }, - "responders": { - "type": "array", - "items": { - "$ref": "#/definitions/OpsGenieConfigResponder" - } - }, - "send_resolved": { - "type": "boolean" - }, - "source": { - "type": "string" - }, - "tags": { - "type": "string" - }, - "update_alerts": { - "type": "boolean" - } - } - }, - "OpsGenieConfigResponder": { - "type": "object", - "properties": { - "id": { - "description": "One of those 3 should be filled.", - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "description": "team, user, escalation, schedule etc.", - "type": "string" - }, - "username": { - "type": "string" - } - } - }, - "OrgDTO": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - } - }, - "OrgDetailsDTO": { - "type": "object", - "properties": { - "address": { - "$ref": "#/definitions/Address" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - } - }, - "OrgUserDTO": { - "type": "object", - "properties": { - "accessControl": { - "type": "object", - "additionalProperties": { - "type": "boolean" - } - }, - "authLabels": { - "type": "array", - "items": { - "type": "string" - } - }, - "avatarUrl": { - "type": "string" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "email": { - "type": "string" - }, - "isDisabled": { - "type": "boolean" - }, - "isExternallySynced": { - "type": "boolean" - }, - "isProvisioned": { - "type": "boolean" - }, - "lastSeenAt": { - "type": "string", - "format": "date-time" - }, - "lastSeenAtAge": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "role": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "userId": { - "type": "integer", - "format": "int64" - } - } - }, - "PagerdutyConfig": { - "type": "object", - "title": "PagerdutyConfig configures notifications via PagerDuty.", - "properties": { - "class": { - "type": "string" - }, - "client": { - "type": "string" - }, - "client_url": { - "type": "string" - }, - "component": { - "type": "string" - }, - "description": { - "type": "string" - }, - "details": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "group": { - "type": "string" - }, - "http_config": { - "$ref": "#/definitions/HTTPClientConfig" - }, - "images": { - "type": "array", - "items": { - "$ref": "#/definitions/PagerdutyImage" - } - }, - "links": { - "type": "array", - "items": { - "$ref": "#/definitions/PagerdutyLink" - } - }, - "routing_key": { - "$ref": "#/definitions/Secret" - }, - "routing_key_file": { - "type": "string" - }, - "send_resolved": { - "type": "boolean" - }, - "service_key": { - "$ref": "#/definitions/Secret" - }, - "service_key_file": { - "type": "string" - }, - "severity": { - "type": "string" - }, - "source": { - "type": "string" - }, - "url": { - "$ref": "#/definitions/URL" - } - } - }, - "PagerdutyImage": { - "type": "object", - "title": "PagerdutyImage is an image.", - "properties": { - "alt": { - "type": "string" - }, - "href": { - "type": "string" - }, - "src": { - "type": "string" - } - } - }, - "PagerdutyLink": { - "type": "object", - "title": "PagerdutyLink is a link.", - "properties": { - "href": { - "type": "string" - }, - "text": { - "type": "string" - } - } - }, - "Password": { - "type": "string" - }, - "PatchAnnotationsCmd": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/Json" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "text": { - "type": "string" - }, - "time": { - "type": "integer", - "format": "int64" - }, - "timeEnd": { - "type": "integer", - "format": "int64" - } - } - }, - "PatchLibraryElementCommand": { - "description": "PatchLibraryElementCommand is the command for patching a LibraryElement", - "type": "object", - "properties": { - "folderId": { - "description": "ID of the folder where the library element is stored.\n\nDeprecated: use FolderUID instead", - "type": "integer", - "format": "int64" - }, - "folderUid": { - "description": "UID of the folder where the library element is stored.", - "type": "string" - }, - "kind": { - "description": "Kind of element to create, Use 1 for library panels or 2 for c.\nDescription:\n1 - library panels", - "type": "integer", - "format": "int64", - "enum": [1] - }, - "model": { - "description": "The JSON model for the library element.", - "type": "object" - }, - "name": { - "description": "Name of the library element.", - "type": "string" - }, - "uid": { - "type": "string" - }, - "version": { - "description": "Version of the library element you are updating.", - "type": "integer", - "format": "int64" - } - } - }, - "PatchPrefsCmd": { - "type": "object", - "properties": { - "homeDashboardId": { - "description": "The numerical :id of a favorited dashboard", - "type": "integer", - "format": "int64", - "default": 0 - }, - "homeDashboardUID": { - "type": "string" - }, - "language": { - "type": "string" - }, - "navbar": { - "$ref": "#/definitions/NavbarPreference" - }, - "queryHistory": { - "$ref": "#/definitions/QueryHistoryPreference" - }, - "regionalFormat": { - "type": "string" - }, - "theme": { - "type": "string", - "enum": ["light", "dark"] - }, - "timezone": { - "description": "Any IANA timezone string (e.g. America/New_York), 'utc', 'browser', or empty string", - "type": "string" - }, - "weekStart": { - "type": "string" - } - } - }, - "PatchQueryCommentInQueryHistoryCommand": { - "description": "PatchQueryCommentInQueryHistoryCommand is the command for updating comment for query in query history", - "type": "object", - "properties": { - "comment": { - "description": "Updated comment", - "type": "string" - } - } - }, - "Permission": { - "description": "Permission is the model for access control permissions", - "type": "object", - "properties": { - "action": { - "type": "string" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "scope": { - "type": "string" - }, - "updated": { - "type": "string", - "format": "date-time" - } - } - }, - "PermissionDenied": { - "type": "object" - }, - "PermissionType": { - "type": "integer", - "format": "int64" - }, - "Playlist": { - "description": "Playlist model", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "interval": { - "type": "string" - }, - "name": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "PlaylistDTO": { - "type": "object", - "properties": { - "interval": { - "description": "Interval sets the time between switching views in a playlist.", - "type": "string" - }, - "items": { - "description": "The ordered list of items that the playlist will iterate over.", - "type": "array", - "items": { - "$ref": "#/definitions/PlaylistItemDTO" - } - }, - "name": { - "description": "Name of the playlist.", - "type": "string" - }, - "uid": { - "description": "Unique playlist identifier. Generated on creation, either by the\ncreator of the playlist of by the application.", - "type": "string" - } - } - }, - "PlaylistDashboard": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "order": { - "type": "integer", - "format": "int64" - }, - "slug": { - "type": "string" - }, - "title": { - "type": "string" - }, - "uri": { - "type": "string" - }, - "url": { - "type": "string" - } - } - }, - "PlaylistDashboardsSlice": { - "type": "array", - "items": { - "$ref": "#/definitions/PlaylistDashboard" - } - }, - "PlaylistItem": { - "type": "object", - "properties": { - "Id": { - "type": "integer", - "format": "int64" - }, - "PlaylistId": { - "type": "integer", - "format": "int64" - }, - "order": { - "type": "integer", - "format": "int64" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "PlaylistItemDTO": { - "type": "object", - "properties": { - "title": { - "description": "Title is an unused property -- it will be removed in the future", - "type": "string" - }, - "type": { - "description": "Type of the item.", - "type": "string" - }, - "value": { - "description": "Value depends on type and describes the playlist item.\n\ndashboard_by_id: The value is an internal numerical identifier set by Grafana. This\nis not portable as the numerical identifier is non-deterministic between different instances.\nWill be replaced by dashboard_by_uid in the future. (deprecated)\ndashboard_by_tag: The value is a tag which is set on any number of dashboards. All\ndashboards behind the tag will be added to the playlist.\ndashboard_by_uid: The value is the dashboard UID", - "type": "string" - } - } - }, - "Playlists": { - "type": "array", - "items": { - "$ref": "#/definitions/Playlist" - } - }, - "PolicyMapping": { - "type": "object", - "title": "PolicyMapping represents a policy mapping entry in the policyMappings extension.", - "properties": { - "IssuerDomainPolicy": { - "description": "IssuerDomainPolicy contains a policy OID the issuing certificate considers\nequivalent to SubjectDomainPolicy in the subject certificate.", - "type": "string" - }, - "SubjectDomainPolicy": { - "description": "SubjectDomainPolicy contains a OID the issuing certificate considers\nequivalent to IssuerDomainPolicy in the subject certificate.", - "type": "string" - } - } - }, - "PostAnnotationsCmd": { - "type": "object", - "required": ["text"], - "properties": { - "dashboardId": { - "type": "integer", - "format": "int64" - }, - "dashboardUID": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/Json" - }, - "panelId": { - "type": "integer", - "format": "int64" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "text": { - "type": "string" - }, - "time": { - "type": "integer", - "format": "int64" - }, - "timeEnd": { - "type": "integer", - "format": "int64" - } - } - }, - "PostGraphiteAnnotationsCmd": { - "type": "object", - "properties": { - "data": { - "type": "string" - }, - "tags": {}, - "what": { - "type": "string" - }, - "when": { - "type": "integer", - "format": "int64" - } - } - }, - "PostableApiAlertingConfig": { - "description": "nolint:revive", - "type": "object", - "properties": { - "global": { - "$ref": "#/definitions/GlobalConfig" - }, - "inhibit_rules": { - "type": "array", - "items": { - "$ref": "#/definitions/InhibitRule" - } - }, - "mute_time_intervals": { - "description": "MuteTimeIntervals is deprecated and will be removed before Alertmanager 1.0.", - "type": "array", - "items": { - "$ref": "#/definitions/MuteTimeInterval" - } - }, - "receivers": { - "description": "Override with our superset receiver type", - "type": "array", - "items": { - "$ref": "#/definitions/PostableApiReceiver" - } - }, - "route": { - "$ref": "#/definitions/Route" - }, - "templates": { - "type": "array", - "items": { - "type": "string" - } - }, - "time_intervals": { - "type": "array", - "items": { - "$ref": "#/definitions/TimeInterval" - } - } - } - }, - "PostableApiReceiver": { - "description": "nolint:revive", - "type": "object", - "properties": { - "discord_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/DiscordConfig" - } - }, - "email_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/EmailConfig" - } - }, - "grafana_managed_receiver_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/PostableGrafanaReceiver" - } - }, - "jira_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/JiraConfig" - } - }, - "msteams_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/MSTeamsConfig" - } - }, - "msteamsv2_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/MSTeamsV2Config" - } - }, - "name": { - "description": "A unique identifier for this receiver.", - "type": "string" - }, - "opsgenie_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/OpsGenieConfig" - } - }, - "pagerduty_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/PagerdutyConfig" - } - }, - "pushover_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/PushoverConfig" - } - }, - "slack_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/SlackConfig" - } - }, - "sns_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/SNSConfig" - } - }, - "telegram_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/TelegramConfig" - } - }, - "victorops_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/VictorOpsConfig" - } - }, - "webex_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/WebexConfig" - } - }, - "webhook_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/WebhookConfig" - } - }, - "wechat_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/WechatConfig" - } - } - } - }, - "PostableExtendedRuleNode": { - "type": "object", - "properties": { - "alert": { - "type": "string" - }, - "annotations": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "expr": { - "type": "string" - }, - "for": { - "type": "string" - }, - "grafana_alert": { - "$ref": "#/definitions/PostableGrafanaRule" - }, - "keep_firing_for": { - "type": "string" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "record": { - "type": "string" - } - } - }, - "PostableExtendedRuleNodeExtended": { - "type": "object", - "required": ["rule"], - "properties": { - "folderTitle": { - "type": "string", - "example": "project_x" - }, - "folderUid": { - "type": "string", - "example": "okrd3I0Vz" - }, - "rule": { - "$ref": "#/definitions/PostableExtendedRuleNode" - }, - "ruleGroup": { - "type": "string", - "example": "eval_group_1" - } - } - }, - "PostableGrafanaReceiver": { - "type": "object", - "properties": { - "disableResolveMessage": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "secureSettings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "settings": { - "$ref": "#/definitions/RawMessage" - }, - "type": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "PostableGrafanaReceivers": { - "type": "object", - "properties": { - "grafana_managed_receiver_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/PostableGrafanaReceiver" - } - } - } - }, - "PostableGrafanaRule": { - "type": "object", - "properties": { - "condition": { - "type": "string" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/AlertQuery" - } - }, - "exec_err_state": { - "type": "string", - "enum": ["OK", "Alerting", "Error"] - }, - "is_paused": { - "type": "boolean" - }, - "metadata": { - "$ref": "#/definitions/AlertRuleMetadata" - }, - "missing_series_evals_to_resolve": { - "description": "Number of consecutive evaluation intervals with no data for a dimension must pass\nbefore the alert state is considered stale and automatically resolved.\nIf set to 0, the value is reset to the default.", - "type": "integer", - "format": "int64", - "example": 3 - }, - "no_data_state": { - "type": "string", - "enum": ["Alerting", "NoData", "OK"] - }, - "notification_settings": { - "$ref": "#/definitions/AlertRuleNotificationSettings" - }, - "record": { - "$ref": "#/definitions/Record" - }, - "title": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "PostableNGalertConfig": { - "type": "object", - "properties": { - "alertmanagersChoice": { - "type": "string", - "enum": ["all", "internal", "external"] - } - } - }, - "PostableRuleGroupConfig": { - "type": "object", - "properties": { - "align_evaluation_time_on_interval": { - "type": "boolean" - }, - "evaluation_delay": { - "type": "string" - }, - "interval": { - "$ref": "#/definitions/Duration" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "limit": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "query_offset": { - "type": "string" - }, - "remote_write": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteWriteConfig" - } - }, - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/PostableExtendedRuleNode" - } - }, - "source_tenants": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "PostableUserConfig": { - "type": "object", - "properties": { - "alertmanager_config": { - "$ref": "#/definitions/PostableApiAlertingConfig" - }, - "extra_config": { - "type": "array", - "items": { - "$ref": "#/definitions/ExtraConfiguration" - } - }, - "template_files": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "PreferencesNavbarPreference": { - "description": "+k8s:openapi-gen=true", - "type": "object", - "properties": { - "bookmarkUrls": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "PreferencesQueryHistoryPreference": { - "description": "+k8s:openapi-gen=true", - "type": "object", - "properties": { - "homeTab": { - "description": "one of: '' | 'query' | 'starred';", - "type": "string" - } - } - }, - "PreferencesSpec": { - "description": "+k8s:openapi-gen=true", - "type": "object", - "properties": { - "homeDashboardUID": { - "description": "UID for the home dashboard", - "type": "string" - }, - "language": { - "description": "Selected language", - "type": "string" - }, - "navbar": { - "$ref": "#/definitions/PreferencesNavbarPreference" - }, - "queryHistory": { - "$ref": "#/definitions/PreferencesQueryHistoryPreference" - }, - "regionalFormat": { - "description": "Selected locale (beta)\nTODO: Will be removed", - "type": "string" - }, - "theme": { - "description": "user interface theme", - "type": "string" - }, - "timezone": { - "description": "The timezone selection", - "type": "string" - }, - "weekStart": { - "description": "day of the week (sunday, monday, etc)", - "type": "string" - } - } - }, - "PrometheusNamespace": { - "type": "object", - "properties": { - "Body": { - "description": "in: body", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/PrometheusRuleGroup" - } - } - } - } - }, - "PrometheusRemoteWriteTargetJSON": { - "type": "object", - "properties": { - "data_source_uid": { - "type": "string" - }, - "id": { - "type": "string" - }, - "remote_write_path": { - "type": "string" - } - } - }, - "PrometheusRule": { - "type": "object", - "properties": { - "alert": { - "type": "string" - }, - "annotations": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "expr": { - "type": "string" - }, - "for": { - "type": "string" - }, - "keep_firing_for": { - "type": "string" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "record": { - "type": "string" - } - } - }, - "PrometheusRuleGroup": { - "type": "object", - "properties": { - "interval": { - "$ref": "#/definitions/Duration" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "limit": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "query_offset": { - "type": "string" - }, - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/PrometheusRule" - } - } - } - }, - "Provenance": { - "type": "string" - }, - "ProvisionedAlertRule": { - "type": "object", - "required": [ - "orgID", - "folderUID", - "ruleGroup", - "title", - "condition", - "data", - "noDataState", - "execErrState", - "for" - ], - "properties": { - "annotations": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "example": { - "runbook_url": "https://supercoolrunbook.com/page/13" - } - }, - "condition": { - "type": "string", - "example": "A" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/AlertQuery" - }, - "example": [ - { - "datasourceUid": "__expr__", - "model": { - "conditions": [ - { - "evaluator": { - "params": [0, 0], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [] - }, - "reducer": { - "params": [], - "type": "avg" - }, - "type": "query" - } - ], - "datasource": { - "type": "__expr__", - "uid": "__expr__" - }, - "expression": "1 == 1", - "hide": false, - "intervalMs": 1000, - "maxDataPoints": 43200, - "refId": "A", - "type": "math" - }, - "queryType": "", - "refId": "A", - "relativeTimeRange": { - "from": 0, - "to": 0 - } - } - ] - }, - "execErrState": { - "type": "string", - "enum": ["OK", "Alerting", "Error"] - }, - "folderUID": { - "type": "string", - "example": "project_x" - }, - "for": { - "type": "string", - "format": "duration" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "isPaused": { - "type": "boolean", - "example": false - }, - "keep_firing_for": { - "type": "string", - "format": "duration" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "example": { - "team": "sre-team-1" - } - }, - "missingSeriesEvalsToResolve": { - "type": "integer", - "format": "int64", - "example": 2 - }, - "noDataState": { - "type": "string", - "enum": ["Alerting", "NoData", "OK"] - }, - "notification_settings": { - "$ref": "#/definitions/AlertRuleNotificationSettings" - }, - "orgID": { - "type": "integer", - "format": "int64" - }, - "provenance": { - "$ref": "#/definitions/Provenance" - }, - "record": { - "$ref": "#/definitions/Record" - }, - "ruleGroup": { - "type": "string", - "maxLength": 190, - "minLength": 1, - "example": "eval_group_1" - }, - "title": { - "type": "string", - "maxLength": 190, - "minLength": 1, - "example": "Always firing" - }, - "uid": { - "type": "string", - "maxLength": 40, - "minLength": 1, - "pattern": "^[a-zA-Z0-9-_]+$" - }, - "updated": { - "type": "string", - "format": "date-time", - "readOnly": true - } - } - }, - "ProvisionedAlertRules": { - "type": "array", - "items": { - "$ref": "#/definitions/ProvisionedAlertRule" - } - }, - "ProxyConfig": { - "type": "object", - "properties": { - "no_proxy": { - "description": "NoProxy contains addresses that should not use a proxy.", - "type": "string" - }, - "proxy_connect_header": { - "$ref": "#/definitions/ProxyHeader" - }, - "proxy_from_environment": { - "description": "ProxyFromEnvironment makes use of net/http ProxyFromEnvironment function\nto determine proxies.", - "type": "boolean" - }, - "proxy_url": { - "$ref": "#/definitions/URL" - } - } - }, - "ProxyHeader": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/Secret" - } - } - }, - "PublicDashboard": { - "type": "object", - "properties": { - "accessToken": { - "type": "string" - }, - "annotationsEnabled": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "integer", - "format": "int64" - }, - "dashboardUid": { - "type": "string" - }, - "isEnabled": { - "type": "boolean" - }, - "recipients": { - "type": "array", - "items": { - "$ref": "#/definitions/EmailDTO" - } - }, - "share": { - "$ref": "#/definitions/ShareType" - }, - "timeSelectionEnabled": { - "type": "boolean" - }, - "uid": { - "type": "string" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "updatedBy": { - "type": "integer", - "format": "int64" - } - } - }, - "PublicDashboardDTO": { - "type": "object", - "properties": { - "accessToken": { - "type": "string" - }, - "annotationsEnabled": { - "type": "boolean" - }, - "isEnabled": { - "type": "boolean" - }, - "share": { - "$ref": "#/definitions/ShareType" - }, - "timeSelectionEnabled": { - "type": "boolean" - }, - "uid": { - "type": "string" - } - } - }, - "PublicDashboardListResponse": { - "type": "object", - "properties": { - "accessToken": { - "type": "string" - }, - "dashboardUid": { - "type": "string" - }, - "isEnabled": { - "type": "boolean" - }, - "slug": { - "type": "string" - }, - "title": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "PublicDashboardListResponseWithPagination": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int64" - }, - "perPage": { - "type": "integer", - "format": "int64" - }, - "publicDashboards": { - "type": "array", - "items": { - "$ref": "#/definitions/PublicDashboardListResponse" - } - }, - "totalCount": { - "type": "integer", - "format": "int64" - } - } - }, - "PublicError": { - "description": "PublicError is derived from Error and only contains information\navailable to the end user.", - "type": "object", - "properties": { - "extra": { - "type": "object", - "additionalProperties": {} - }, - "message": { - "type": "string" - }, - "messageId": { - "type": "string" - }, - "statusCode": { - "type": "integer", - "format": "int64" - } - } - }, - "PublicKeyAlgorithm": { - "type": "integer", - "format": "int64" - }, - "PushoverConfig": { - "type": "object", - "properties": { - "device": { - "type": "string" - }, - "expire": { - "type": "string" - }, - "html": { - "type": "boolean" - }, - "http_config": { - "$ref": "#/definitions/HTTPClientConfig" - }, - "message": { - "type": "string" - }, - "priority": { - "type": "string" - }, - "retry": { - "type": "string" - }, - "send_resolved": { - "type": "boolean" - }, - "sound": { - "type": "string" - }, - "title": { - "type": "string" - }, - "token": { - "$ref": "#/definitions/Secret" - }, - "token_file": { - "type": "string" - }, - "ttl": { - "type": "string" - }, - "url": { - "type": "string" - }, - "url_title": { - "type": "string" - }, - "user_key": { - "$ref": "#/definitions/Secret" - }, - "user_key_file": { - "type": "string" - } - } - }, - "QueryDataResponse": { - "description": "It is the return type of a QueryData call.", - "type": "object", - "title": "QueryDataResponse contains the results from a QueryDataRequest.", - "properties": { - "results": { - "$ref": "#/definitions/Responses" - } - } - }, - "QueryHistoryDTO": { - "type": "object", - "properties": { - "comment": { - "type": "string" - }, - "createdAt": { - "type": "integer", - "format": "int64" - }, - "createdBy": { - "type": "integer", - "format": "int64" - }, - "datasourceUid": { - "type": "string" - }, - "queries": { - "$ref": "#/definitions/Json" - }, - "starred": { - "type": "boolean" - }, - "uid": { - "type": "string" - } - } - }, - "QueryHistoryDeleteQueryResponse": { - "description": "QueryHistoryDeleteQueryResponse is the response struct for deleting a query from query history", - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - } - } - }, - "QueryHistoryPreference": { - "type": "object", - "properties": { - "homeTab": { - "type": "string" - } - } - }, - "QueryHistoryResponse": { - "description": "QueryHistoryResponse is a response struct for QueryHistoryDTO", - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/QueryHistoryDTO" - } - } - }, - "QueryHistorySearchResponse": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/QueryHistorySearchResult" - } - } - }, - "QueryHistorySearchResult": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int64" - }, - "perPage": { - "type": "integer", - "format": "int64" - }, - "queryHistory": { - "type": "array", - "items": { - "$ref": "#/definitions/QueryHistoryDTO" - } - }, - "totalCount": { - "type": "integer", - "format": "int64" - } - } - }, - "QueryStat": { - "description": "The embedded FieldConfig's display name must be set.\nIt corresponds to the QueryResultMetaStat on the frontend (https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/types/data.ts#L53).", - "type": "object", - "title": "QueryStat is used for storing arbitrary statistics metadata related to a query and its result, e.g. total request time, data processing time.", - "properties": { - "color": { - "description": "Map values to a display color\nNOTE: this interface is under development in the frontend... so simple map for now", - "type": "object", - "additionalProperties": {} - }, - "custom": { - "description": "Panel Specific Values", - "type": "object", - "additionalProperties": {} - }, - "decimals": { - "type": "integer", - "format": "uint16" - }, - "description": { - "description": "Description is human readable field metadata", - "type": "string" - }, - "displayName": { - "description": "DisplayName overrides Grafana default naming, should not be used from a data source", - "type": "string" - }, - "displayNameFromDS": { - "description": "DisplayNameFromDS overrides Grafana default naming strategy.", - "type": "string" - }, - "filterable": { - "description": "Filterable indicates if the Field's data can be filtered by additional calls.", - "type": "boolean" - }, - "interval": { - "description": "Interval indicates the expected regular step between values in the series.\nWhen an interval exists, consumers can identify \"missing\" values when the expected value is not present.\nThe grafana timeseries visualization will render disconnected values when missing values are found it the time field.\nThe interval uses the same units as the values. For time.Time, this is defined in milliseconds.", - "type": "number", - "format": "double" - }, - "links": { - "description": "The behavior when clicking on a result", - "type": "array", - "items": { - "$ref": "#/definitions/DataLink" - } - }, - "mappings": { - "$ref": "#/definitions/ValueMappings" - }, - "max": { - "$ref": "#/definitions/ConfFloat64" - }, - "min": { - "$ref": "#/definitions/ConfFloat64" - }, - "noValue": { - "description": "Alternative to empty string", - "type": "string" - }, - "path": { - "description": "Path is an explicit path to the field in the datasource. When the frame meta includes a path,\nthis will default to `${frame.meta.path}/${field.name}\n\nWhen defined, this value can be used as an identifier within the datasource scope, and\nmay be used as an identifier to update values in a subsequent request", - "type": "string" - }, - "thresholds": { - "$ref": "#/definitions/ThresholdsConfig" - }, - "type": { - "$ref": "#/definitions/FieldTypeConfig" - }, - "unit": { - "description": "Numeric Options", - "type": "string" - }, - "value": { - "type": "number", - "format": "double" - }, - "writeable": { - "description": "Writeable indicates that the datasource knows how to update this value", - "type": "boolean" - } - } - }, - "QuotaDTO": { - "type": "object", - "properties": { - "limit": { - "type": "integer", - "format": "int64" - }, - "org_id": { - "type": "integer", - "format": "int64" - }, - "target": { - "type": "string" - }, - "used": { - "type": "integer", - "format": "int64" - }, - "user_id": { - "type": "integer", - "format": "int64" - } - } - }, - "RawMessage": { - "type": "object" - }, - "Receiver": { - "type": "object", - "title": "Receiver configuration provides configuration on how to contact a receiver.", - "properties": { - "discord_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/DiscordConfig" - } - }, - "email_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/EmailConfig" - } - }, - "jira_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/JiraConfig" - } - }, - "msteams_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/MSTeamsConfig" - } - }, - "msteamsv2_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/MSTeamsV2Config" - } - }, - "name": { - "description": "A unique identifier for this receiver.", - "type": "string" - }, - "opsgenie_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/OpsGenieConfig" - } - }, - "pagerduty_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/PagerdutyConfig" - } - }, - "pushover_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/PushoverConfig" - } - }, - "slack_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/SlackConfig" - } - }, - "sns_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/SNSConfig" - } - }, - "telegram_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/TelegramConfig" - } - }, - "victorops_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/VictorOpsConfig" - } - }, - "webex_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/WebexConfig" - } - }, - "webhook_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/WebhookConfig" - } - }, - "wechat_configs": { - "type": "array", - "items": { - "$ref": "#/definitions/WechatConfig" - } - } - } - }, - "ReceiverExport": { - "type": "object", - "title": "ReceiverExport is the provisioned file export of alerting.ReceiverV1.", - "properties": { - "disableResolveMessage": { - "type": "boolean" - }, - "settings": { - "$ref": "#/definitions/RawMessage" - }, - "type": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "ReceiverStatus": { - "type": "object", - "properties": { - "active": { - "description": "Whether the receiver is used in a route or not.", - "type": "boolean" - }, - "integrations": { - "description": "Integrations configured for this receiver.", - "type": "array", - "items": { - "$ref": "#/definitions/IntegrationStatus" - } - }, - "name": { - "description": "Name of the receiver.", - "type": "string" - } - } - }, - "Record": { - "type": "object", - "required": ["metric", "from"], - "properties": { - "from": { - "description": "Which expression node should be used as the input for the recorded metric.", - "type": "string", - "example": "A" - }, - "metric": { - "description": "Name of the recorded metric.", - "type": "string", - "example": "grafana_alerts_ratio" - }, - "target_datasource_uid": { - "description": "Which data source should be used to write the output of the recording rule, specified by UID.", - "type": "string", - "example": "my-prom" - } - } - }, - "RecordingRuleJSON": { - "description": "RecordingRuleJSON is the external representation of a recording rule", - "type": "object", - "properties": { - "active": { - "type": "boolean" - }, - "count": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "dest_data_source_uid": { - "type": "string" - }, - "id": { - "type": "string" - }, - "interval": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "prom_name": { - "type": "string" - }, - "queries": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {} - } - }, - "range": { - "type": "integer", - "format": "int64" - }, - "target_ref_id": { - "type": "string" - } - } - }, - "RelativeTimeRange": { - "description": "RelativeTimeRange is the per query start and end time\nfor requests.", - "type": "object", - "properties": { - "from": { - "$ref": "#/definitions/Duration" - }, - "to": { - "$ref": "#/definitions/Duration" - } - } - }, - "RelativeTimeRangeExport": { - "type": "object", - "properties": { - "from": { - "type": "integer", - "format": "int64" - }, - "to": { - "type": "integer", - "format": "int64" - } - } - }, - "RemoteWriteConfig": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - } - }, - "Report": { - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "dashboards": { - "type": "array", - "items": { - "$ref": "#/definitions/ReportDashboard" - } - }, - "enableCsv": { - "type": "boolean" - }, - "enableDashboardUrl": { - "type": "boolean" - }, - "formats": { - "type": "array", - "items": { - "$ref": "#/definitions/Type" - } - }, - "id": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "options": { - "$ref": "#/definitions/ReportOptions" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "recipients": { - "type": "string" - }, - "replyTo": { - "type": "string" - }, - "scaleFactor": { - "type": "integer", - "format": "int64" - }, - "schedule": { - "$ref": "#/definitions/ReportSchedule" - }, - "state": { - "$ref": "#/definitions/State" - }, - "subject": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "updated": { - "type": "string", - "format": "date-time" - }, - "urls": { - "type": "array", - "items": { - "$ref": "#/definitions/ReportURLItem" - } - }, - "userId": { - "type": "integer", - "format": "int64" - } - } - }, - "ReportBrandingOptions": { - "type": "object", - "properties": { - "emailFooterLink": { - "type": "string" - }, - "emailFooterMode": { - "type": "string" - }, - "emailFooterText": { - "type": "string" - }, - "emailLogoUrl": { - "type": "string" - }, - "reportLogoUrl": { - "type": "string" - } - } - }, - "ReportDashboard": { - "type": "object", - "properties": { - "dashboard": { - "$ref": "#/definitions/ReportDashboardID" - }, - "reportVariables": { - "type": "object" - }, - "timeRange": { - "$ref": "#/definitions/ReportTimeRange" - } - } - }, - "ReportDashboardID": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "ReportEmail": { - "type": "object", - "properties": { - "emails": { - "description": "Comma-separated list of emails to which to send the report to.", - "type": "string" - }, - "id": { - "description": "Send the report to the emails specified in the report. Required if emails is not present.", - "type": "string", - "format": "int64" - }, - "useEmailsFromReport": { - "description": "Send the report to the emails specified in the report. Required if emails is not present.", - "type": "boolean" - } - } - }, - "ReportOptions": { - "type": "object", - "properties": { - "csvEncoding": { - "type": "string" - }, - "layout": { - "type": "string" - }, - "orientation": { - "type": "string" - }, - "pdfCombineOneFile": { - "type": "boolean" - }, - "pdfShowTemplateVariables": { - "type": "boolean" - }, - "timeRange": { - "$ref": "#/definitions/ReportTimeRange" - } - } - }, - "ReportSchedule": { - "type": "object", - "properties": { - "dayOfMonth": { - "type": "string" - }, - "endDate": { - "type": "string", - "format": "date-time" - }, - "frequency": { - "type": "string" - }, - "intervalAmount": { - "type": "integer", - "format": "int64" - }, - "intervalFrequency": { - "type": "string" - }, - "startDate": { - "type": "string", - "format": "date-time" - }, - "timeZone": { - "type": "string" - }, - "workdaysOnly": { - "type": "boolean" - } - } - }, - "ReportSettings": { - "type": "object", - "properties": { - "branding": { - "$ref": "#/definitions/ReportBrandingOptions" - }, - "embeddedImageTheme": { - "type": "string" - }, - "footerFontFamily": { - "type": "string" - }, - "footerItems": { - "type": "array", - "items": { - "$ref": "#/definitions/FooterItem" - } - }, - "id": { - "type": "integer", - "format": "int64" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "pdfDashboardTitleEnabled": { - "type": "boolean" - }, - "pdfHeaderEnabled": { - "type": "boolean" - }, - "pdfTheme": { - "type": "string" - }, - "pdfTimeRangeEnabled": { - "type": "boolean" - }, - "userId": { - "type": "integer", - "format": "int64" - } - } - }, - "ReportTimeRange": { - "type": "object", - "properties": { - "from": { - "type": "string" - }, - "to": { - "type": "string" - } - } - }, - "ReportURLItem": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "url": { - "type": "string" - } - } - }, - "ResourceDependenciesResponseDTO": { - "type": "object", - "properties": { - "resourceDependencies": { - "type": "array", - "items": { - "$ref": "#/definitions/ResourceDependencyDTO" - } - } - } - }, - "ResourceDependencyDTO": { - "type": "object", - "properties": { - "dependencies": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "DASHBOARD", - "DATASOURCE", - "FOLDER", - "LIBRARY_ELEMENT", - "ALERT_RULE", - "ALERT_RULE_GROUP", - "CONTACT_POINT", - "NOTIFICATION_POLICY", - "NOTIFICATION_TEMPLATE", - "MUTE_TIMING", - "PLUGIN" - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DASHBOARD", - "DATASOURCE", - "FOLDER", - "LIBRARY_ELEMENT", - "ALERT_RULE", - "ALERT_RULE_GROUP", - "CONTACT_POINT", - "NOTIFICATION_POLICY", - "NOTIFICATION_TEMPLATE", - "MUTE_TIMING", - "PLUGIN" - ] - } - } - }, - "ResponseDetails": { - "type": "object", - "properties": { - "msg": { - "type": "string" - } - } - }, - "Responses": { - "description": "The QueryData method the QueryDataHandler method will set the RefId\nproperty on the DataResponses' frames based on these RefIDs.", - "type": "object", - "title": "Responses is a map of RefIDs (Unique Query ID) to DataResponses.", - "additionalProperties": { - "$ref": "#/definitions/DataResponse" - } - }, - "RestoreDashboardVersionCommand": { - "type": "object", - "properties": { - "version": { - "type": "integer", - "format": "int64" - } - } - }, - "RestoreDeletedDashboardCommand": { - "type": "object", - "properties": { - "folderUid": { - "type": "string" - } - } - }, - "RevokeAuthTokenCmd": { - "type": "object", - "properties": { - "authTokenId": { - "type": "integer", - "format": "int64" - } - } - }, - "RoleAssignmentsDTO": { - "type": "object", - "properties": { - "role_uid": { - "type": "string" - }, - "service_accounts": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "teams": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "users": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - }, - "RoleDTO": { - "type": "object", - "required": ["version", "uid", "name", "displayName", "description", "group", "updated", "created"], - "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "delegatable": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "global": { - "type": "boolean" - }, - "group": { - "type": "string" - }, - "hidden": { - "type": "boolean" - }, - "mapped": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/Permission" - } - }, - "uid": { - "type": "string" - }, - "updated": { - "type": "string", - "format": "date-time" - }, - "version": { - "type": "integer", - "format": "int64" - } - } - }, - "RolesSearchQuery": { - "type": "object", - "properties": { - "includeHidden": { - "type": "boolean" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "teamIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "userIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - }, - "Route": { - "description": "A Route is a node that contains definitions of how to handle alerts. This is modified\nfrom the upstream alertmanager in that it adds the ObjectMatchers property.", - "type": "object", - "properties": { - "active_time_intervals": { - "type": "array", - "items": { - "type": "string" - } - }, - "continue": { - "type": "boolean" - }, - "group_by": { - "type": "array", - "items": { - "type": "string" - } - }, - "group_interval": { - "type": "string" - }, - "group_wait": { - "type": "string" - }, - "match": { - "description": "Deprecated. Remove before v1.0 release.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "match_re": { - "$ref": "#/definitions/MatchRegexps" - }, - "matchers": { - "$ref": "#/definitions/Matchers" - }, - "mute_time_intervals": { - "type": "array", - "items": { - "type": "string" - } - }, - "object_matchers": { - "$ref": "#/definitions/ObjectMatchers" - }, - "provenance": { - "$ref": "#/definitions/Provenance" - }, - "receiver": { - "type": "string" - }, - "repeat_interval": { - "type": "string" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/Route" - } - } - } - }, - "RouteExport": { - "description": "RouteExport is the provisioned file export of definitions.Route. This is needed to hide fields that aren't useable in\nprovisioning file format. An alternative would be to define a custom MarshalJSON and MarshalYAML that excludes them.", - "type": "object", - "properties": { - "active_time_intervals": { - "type": "array", - "items": { - "type": "string" - } - }, - "continue": { - "type": "boolean" - }, - "group_by": { - "type": "array", - "items": { - "type": "string" - } - }, - "group_interval": { - "type": "string" - }, - "group_wait": { - "type": "string" - }, - "match": { - "description": "Deprecated. Remove before v1.0 release.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "match_re": { - "$ref": "#/definitions/MatchRegexps" - }, - "matchers": { - "$ref": "#/definitions/Matchers" - }, - "mute_time_intervals": { - "type": "array", - "items": { - "type": "string" - } - }, - "object_matchers": { - "$ref": "#/definitions/ObjectMatchers" - }, - "receiver": { - "type": "string" - }, - "repeat_interval": { - "type": "string" - }, - "routes": { - "type": "array", - "items": { - "$ref": "#/definitions/RouteExport" - } - } - } - }, - "Rule": { - "description": "adapted from cortex", - "type": "object", - "required": ["name", "query", "health", "type"], - "properties": { - "evaluationTime": { - "type": "number", - "format": "double" - }, - "folderUid": { - "type": "string" - }, - "health": { - "type": "string" - }, - "isPaused": { - "type": "boolean" - }, - "labels": { - "$ref": "#/definitions/Labels" - }, - "lastError": { - "type": "string" - }, - "lastEvaluation": { - "type": "string", - "format": "date-time" - }, - "name": { - "type": "string" - }, - "notificationSettings": { - "$ref": "#/definitions/AlertRuleNotificationSettings" - }, - "provenance": { - "$ref": "#/definitions/Provenance" - }, - "query": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "RuleDiscovery": { - "type": "object", - "required": ["groups"], - "properties": { - "groupNextToken": { - "type": "string" - }, - "groups": { - "type": "array", - "items": { - "$ref": "#/definitions/RuleGroup" - } - }, - "totals": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int64" - } - } - } - }, - "RuleGroup": { - "type": "object", - "required": ["name", "file", "folderUid", "rules", "interval"], - "properties": { - "evaluationTime": { - "type": "number", - "format": "double" - }, - "file": { - "type": "string" - }, - "folderUid": { - "type": "string" - }, - "interval": { - "type": "number", - "format": "double" - }, - "lastEvaluation": { - "type": "string", - "format": "date-time" - }, - "name": { - "type": "string" - }, - "rules": { - "description": "In order to preserve rule ordering, while exposing type (alerting or recording)\nspecific properties, both alerting and recording rules are exposed in the\nsame array.", - "type": "array", - "items": { - "$ref": "#/definitions/AlertingRule" - } - }, - "totals": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int64" - } - } - } - }, - "RuleGroupConfigResponse": { - "type": "object", - "properties": { - "align_evaluation_time_on_interval": { - "type": "boolean" - }, - "evaluation_delay": { - "type": "string" - }, - "interval": { - "$ref": "#/definitions/Duration" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "limit": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "query_offset": { - "type": "string" - }, - "remote_write": { - "type": "array", - "items": { - "$ref": "#/definitions/RemoteWriteConfig" - } - }, - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/GettableExtendedRuleNode" - } - }, - "source_tenants": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "RuleResponse": { - "type": "object", - "required": ["status"], - "properties": { - "data": { - "$ref": "#/definitions/RuleDiscovery" - }, - "error": { - "type": "string" - }, - "errorType": { - "$ref": "#/definitions/ErrorType" - }, - "status": { - "type": "string" - } - } - }, - "SNSConfig": { - "type": "object", - "properties": { - "api_url": { - "type": "string" - }, - "attributes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "http_config": { - "$ref": "#/definitions/HTTPClientConfig" - }, - "message": { - "type": "string" - }, - "phone_number": { - "type": "string" - }, - "send_resolved": { - "type": "boolean" - }, - "sigv4": { - "$ref": "#/definitions/SigV4Config" - }, - "subject": { - "type": "string" - }, - "target_arn": { - "type": "string" - }, - "topic_arn": { - "type": "string" - } - } - }, - "Sample": { - "description": "Sample is a single sample belonging to a metric. It represents either a float\nsample or a histogram sample. If H is nil, it is a float sample. Otherwise,\nit is a histogram sample.", - "type": "object", - "properties": { - "DropName": { - "description": "DropName is used to indicate whether the __name__ label should be dropped\nas part of the query evaluation.", - "type": "boolean" - }, - "F": { - "type": "number", - "format": "double" - }, - "H": { - "$ref": "#/definitions/FloatHistogram" - }, - "Metric": { - "$ref": "#/definitions/Labels" - }, - "T": { - "type": "integer", - "format": "int64" - } - } - }, - "SaveDashboardCommand": { - "type": "object", - "properties": { - "UpdatedAt": { - "type": "string", - "format": "date-time" - }, - "dashboard": { - "$ref": "#/definitions/Json" - }, - "folderId": { - "description": "Deprecated: use FolderUID instead", - "type": "integer", - "format": "int64" - }, - "folderUid": { - "type": "string" - }, - "isFolder": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "overwrite": { - "type": "boolean" - }, - "userId": { - "type": "integer", - "format": "int64" - } - } - }, - "SearchDeviceQueryResult": { - "type": "object", - "properties": { - "devices": { - "type": "array", - "items": { - "$ref": "#/definitions/DeviceSearchHitDTO" - } - }, - "page": { - "type": "integer", - "format": "int64" - }, - "perPage": { - "type": "integer", - "format": "int64" - }, - "totalCount": { - "type": "integer", - "format": "int64" - } - } - }, - "SearchOrgServiceAccountsResult": { - "description": "swagger: model", - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int64" - }, - "perPage": { - "type": "integer", - "format": "int64" - }, - "serviceAccounts": { - "type": "array", - "items": { - "$ref": "#/definitions/ServiceAccountDTO" - } - }, - "totalCount": { - "description": "It can be used for pagination of the user list\nE.g. if totalCount is equal to 100 users and\nthe perpage parameter is set to 10 then there are 10 pages of users.", - "type": "integer", - "format": "int64" - } - } - }, - "SearchOrgUsersQueryResult": { - "type": "object", - "properties": { - "orgUsers": { - "type": "array", - "items": { - "$ref": "#/definitions/OrgUserDTO" - } - }, - "page": { - "type": "integer", - "format": "int64" - }, - "perPage": { - "type": "integer", - "format": "int64" - }, - "totalCount": { - "type": "integer", - "format": "int64" - } - } - }, - "SearchTeamGroupsQueryResult": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int64" - }, - "perPage": { - "type": "integer", - "format": "int64" - }, - "teamGroups": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamGroupDTO" - } - }, - "totalCount": { - "type": "integer", - "format": "int64" - } - } - }, - "SearchTeamQueryResult": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int64" - }, - "perPage": { - "type": "integer", - "format": "int64" - }, - "teams": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamDTO" - } - }, - "totalCount": { - "type": "integer", - "format": "int64" - } - } - }, - "SearchUserQueryResult": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int64" - }, - "perPage": { - "type": "integer", - "format": "int64" - }, - "totalCount": { - "type": "integer", - "format": "int64" - }, - "users": { - "type": "array", - "items": { - "$ref": "#/definitions/UserSearchHitDTO" - } - } - } - }, - "Secret": { - "type": "string", - "title": "Secret special type for storing secrets." - }, - "SecretURL": { - "title": "SecretURL is a URL that must not be revealed on marshaling.", - "$ref": "#/definitions/URL" - }, - "ServiceAccountDTO": { - "description": "swagger: model", - "type": "object", - "properties": { - "accessControl": { - "type": "object", - "additionalProperties": { - "type": "boolean" - }, - "example": { - "serviceaccounts:delete": true, - "serviceaccounts:read": true, - "serviceaccounts:write": true - } - }, - "avatarUrl": { - "type": "string", - "example": "/avatar/85ec38023d90823d3e5b43ef35646af9" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "isDisabled": { - "type": "boolean", - "example": false - }, - "isExternal": { - "type": "boolean", - "example": false - }, - "login": { - "type": "string", - "example": "sa-grafana" - }, - "name": { - "type": "string", - "example": "grafana" - }, - "orgId": { - "type": "integer", - "format": "int64", - "example": 1 - }, - "role": { - "type": "string", - "example": "Viewer" - }, - "tokens": { - "type": "integer", - "format": "int64", - "example": 0 - }, - "uid": { - "type": "string", - "example": "fe1xejlha91xce" - } - } - }, - "ServiceAccountProfileDTO": { - "type": "object", - "properties": { - "accessControl": { - "type": "object", - "additionalProperties": { - "type": "boolean" - } - }, - "avatarUrl": { - "type": "string", - "example": "/avatar/8ea890a677d6a223c591a1beea6ea9d2" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "example": "2022-03-21T14:35:33Z" - }, - "id": { - "type": "integer", - "format": "int64", - "example": 2 - }, - "isDisabled": { - "type": "boolean", - "example": false - }, - "isExternal": { - "type": "boolean", - "example": false - }, - "login": { - "type": "string", - "example": "sa-grafana" - }, - "name": { - "type": "string", - "example": "test" - }, - "orgId": { - "type": "integer", - "format": "int64", - "example": 1 - }, - "requiredBy": { - "type": "string", - "example": "grafana-app" - }, - "role": { - "type": "string", - "example": "Editor" - }, - "teams": { - "type": "array", - "items": { - "type": "string" - }, - "example": [] - }, - "tokens": { - "type": "integer", - "format": "int64" - }, - "uid": { - "type": "string", - "example": "fe1xejlha91xce" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "example": "2022-03-21T14:35:33Z" - } - } - }, - "SetResourcePermissionCommand": { - "type": "object", - "properties": { - "builtInRole": { - "type": "string" - }, - "permission": { - "type": "string" - }, - "teamId": { - "type": "integer", - "format": "int64" - }, - "userId": { - "type": "integer", - "format": "int64" - } - } - }, - "SetRoleAssignmentsCommand": { - "type": "object", - "properties": { - "service_accounts": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "teams": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "users": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - }, - "SetTeamMembershipsCommand": { - "type": "object", - "properties": { - "admins": { - "type": "array", - "items": { - "type": "string" - } - }, - "members": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "SetTeamRolesCommand": { - "type": "object", - "properties": { - "includeHidden": { - "type": "boolean" - }, - "roleUids": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "SetUserRolesCommand": { - "type": "object", - "properties": { - "global": { - "type": "boolean" - }, - "includeHidden": { - "type": "boolean" - }, - "roleUids": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "SettingsBag": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "ShareType": { - "type": "string" - }, - "SigV4Config": { - "description": "SigV4Config is the configuration for signing remote write requests with\nAWS's SigV4 verification process. Empty values will be retrieved using the\nAWS default credentials chain.", - "type": "object", - "properties": { - "AccessKey": { - "type": "string" - }, - "Profile": { - "type": "string" - }, - "Region": { - "type": "string" - }, - "RoleARN": { - "type": "string" - }, - "SecretKey": { - "$ref": "#/definitions/Secret" - } - } - }, - "SignatureAlgorithm": { - "type": "integer", - "format": "int64" - }, - "SilenceMetadata": { - "type": "object", - "properties": { - "folder_uid": { - "type": "string" - }, - "rule_title": { - "type": "string" - }, - "rule_uid": { - "type": "string" - } - } - }, - "SlackAction": { - "description": "See https://api.slack.com/docs/message-attachments#action_fields and https://api.slack.com/docs/message-buttons\nfor more information.", - "type": "object", - "title": "SlackAction configures a single Slack action that is sent with each notification.", - "properties": { - "confirm": { - "$ref": "#/definitions/SlackConfirmationField" - }, - "name": { - "type": "string" - }, - "style": { - "type": "string" - }, - "text": { - "type": "string" - }, - "type": { - "type": "string" - }, - "url": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "SlackConfig": { - "type": "object", - "title": "SlackConfig configures notifications via Slack.", - "properties": { - "actions": { - "type": "array", - "items": { - "$ref": "#/definitions/SlackAction" - } - }, - "api_url": { - "$ref": "#/definitions/SecretURL" - }, - "api_url_file": { - "type": "string" - }, - "callback_id": { - "type": "string" - }, - "channel": { - "description": "Slack channel override, (like #other-channel or @username).", - "type": "string" - }, - "color": { - "type": "string" - }, - "fallback": { - "type": "string" - }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/SlackField" - } - }, - "footer": { - "type": "string" - }, - "http_config": { - "$ref": "#/definitions/HTTPClientConfig" - }, - "icon_emoji": { - "type": "string" - }, - "icon_url": { - "type": "string" - }, - "image_url": { - "type": "string" - }, - "link_names": { - "type": "boolean" - }, - "mrkdwn_in": { - "type": "array", - "items": { - "type": "string" - } - }, - "pretext": { - "type": "string" - }, - "send_resolved": { - "type": "boolean" - }, - "short_fields": { - "type": "boolean" - }, - "text": { - "type": "string" - }, - "thumb_url": { - "type": "string" - }, - "title": { - "type": "string" - }, - "title_link": { - "type": "string" - }, - "username": { - "type": "string" - } - } - }, - "SlackConfirmationField": { - "description": "SlackConfirmationField protect users from destructive actions or particularly distinguished decisions\nby asking them to confirm their button click one more time.\nSee https://api.slack.com/docs/interactive-message-field-guide#confirmation_fields for more information.", - "type": "object", - "properties": { - "dismiss_text": { - "type": "string" - }, - "ok_text": { - "type": "string" - }, - "text": { - "type": "string" - }, - "title": { - "type": "string" - } - } - }, - "SlackField": { - "description": "Each field must contain a title, value, and optionally, a boolean value to indicate if the field\nis short enough to be displayed next to other fields designated as short.\nSee https://api.slack.com/docs/message-attachments#fields for more information.", - "type": "object", - "title": "SlackField configures a single Slack field that is sent with each notification.", - "properties": { - "short": { - "type": "boolean" - }, - "title": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "SmtpNotEnabled": { - "$ref": "#/definitions/ResponseDetails" - }, - "SnapshotDTO": { - "description": "Base snapshot without results", - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time" - }, - "finished": { - "type": "string", - "format": "date-time" - }, - "sessionUid": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "INITIALIZING", - "CREATING", - "PENDING_UPLOAD", - "UPLOADING", - "PENDING_PROCESSING", - "PROCESSING", - "FINISHED", - "CANCELED", - "ERROR", - "UNKNOWN" - ] - }, - "uid": { - "type": "string" - } - } - }, - "SnapshotListResponseDTO": { - "type": "object", - "properties": { - "snapshots": { - "type": "array", - "items": { - "$ref": "#/definitions/SnapshotDTO" - } - } - } - }, - "SnapshotResourceStats": { - "type": "object", - "properties": { - "statuses": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int64" - } - }, - "total": { - "type": "integer", - "format": "int64" - }, - "types": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int64" - } - } - } - }, - "Source": { - "type": "string", - "title": "Source type defines the status source." - }, - "Span": { - "type": "object", - "title": "A Span defines a continuous sequence of buckets.", - "properties": { - "Length": { - "description": "Length of the span.", - "type": "integer", - "format": "uint32" - }, - "Offset": { - "description": "Gap to previous span (always positive), or starting index for the 1st\nspan (which can be negative).", - "type": "integer", - "format": "int32" - } - } - }, - "State": { - "description": "+enum", - "type": "string" - }, - "Status": { - "type": "integer", - "format": "int64" - }, - "Success": { - "$ref": "#/definitions/ResponseDetails" - }, - "SuccessResponseBody": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - }, - "SupportedTransformationTypes": { - "type": "string" - }, - "SyncResult": { - "type": "object", - "title": "SyncResult holds the result of a sync with LDAP. This gives us information on which users were updated and how.", - "properties": { - "Elapsed": { - "$ref": "#/definitions/Duration" - }, - "FailedUsers": { - "type": "array", - "items": { - "$ref": "#/definitions/FailedUser" - } - }, - "MissingUserIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "Started": { - "type": "string", - "format": "date-time" - }, - "UpdatedUserIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - }, - "TLSConfig": { - "type": "object", - "title": "TLSConfig configures the options for TLS connections.", - "properties": { - "ca": { - "description": "Text of the CA cert to use for the targets.", - "type": "string" - }, - "ca_file": { - "description": "The CA cert to use for the targets.", - "type": "string" - }, - "ca_ref": { - "description": "CARef is the name of the secret within the secret manager to use as the CA cert for the\ntargets.", - "type": "string" - }, - "cert": { - "description": "Text of the client cert file for the targets.", - "type": "string" - }, - "cert_file": { - "description": "The client cert file for the targets.", - "type": "string" - }, - "cert_ref": { - "description": "CertRef is the name of the secret within the secret manager to use as the client cert for\nthe targets.", - "type": "string" - }, - "insecure_skip_verify": { - "description": "Disable target certificate validation.", - "type": "boolean" - }, - "key": { - "$ref": "#/definitions/Secret" - }, - "key_file": { - "description": "The client key file for the targets.", - "type": "string" - }, - "key_ref": { - "description": "KeyRef is the name of the secret within the secret manager to use as the client key for\nthe targets.", - "type": "string" - }, - "max_version": { - "$ref": "#/definitions/TLSVersion" - }, - "min_version": { - "$ref": "#/definitions/TLSVersion" - }, - "server_name": { - "description": "Used to verify the hostname for the targets.", - "type": "string" - } - } - }, - "TLSVersion": { - "type": "integer", - "format": "uint16" - }, - "TagsDTO": { - "type": "object", - "title": "TagsDTO is the frontend DTO for Tag.", - "properties": { - "count": { - "type": "integer", - "format": "int64" - }, - "tag": { - "type": "string" - } - } - }, - "TeamDTO": { - "type": "object", - "required": ["id", "uid", "orgId", "name", "isProvisioned", "memberCount"], - "properties": { - "accessControl": { - "type": "object", - "additionalProperties": { - "type": "boolean" - } - }, - "avatarUrl": { - "type": "string" - }, - "email": { - "type": "string" - }, - "externalUID": { - "type": "string" - }, - "id": { - "description": "@deprecated Use UID instead", - "type": "integer", - "format": "int64" - }, - "isProvisioned": { - "type": "boolean" - }, - "memberCount": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "permission": { - "$ref": "#/definitions/PermissionType" - }, - "uid": { - "type": "string" - } - } - }, - "TeamGroupDTO": { - "type": "object", - "properties": { - "groupId": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "teamId": { - "type": "integer", - "format": "int64" - }, - "teamUid": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "TeamGroupMapping": { - "type": "object", - "properties": { - "groupId": { - "type": "string" - } - } - }, - "TeamLBACRule": { - "type": "object", - "properties": { - "rules": { - "type": "array", - "items": { - "type": "string" - } - }, - "teamId": { - "type": "string" - }, - "teamUid": { - "type": "string" - } - } - }, - "TeamLBACRules": { - "type": "object", - "properties": { - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamLBACRule" - } - } - } - }, - "TeamMemberDTO": { - "type": "object", - "properties": { - "auth_module": { - "type": "string" - }, - "avatarUrl": { - "type": "string" - }, - "email": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "string" - } - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "permission": { - "$ref": "#/definitions/PermissionType" - }, - "teamId": { - "type": "integer", - "format": "int64" - }, - "teamUID": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "userId": { - "type": "integer", - "format": "int64" - }, - "userUID": { - "type": "string" - } - } - }, - "TelegramConfig": { - "type": "object", - "title": "TelegramConfig configures notifications via Telegram.", - "properties": { - "api_url": { - "$ref": "#/definitions/URL" - }, - "chat": { - "type": "integer", - "format": "int64" - }, - "disable_notifications": { - "type": "boolean" - }, - "http_config": { - "$ref": "#/definitions/HTTPClientConfig" - }, - "message": { - "type": "string" - }, - "parse_mode": { - "type": "string" - }, - "send_resolved": { - "type": "boolean" - }, - "token": { - "$ref": "#/definitions/Secret" - }, - "token_file": { - "type": "string" - } - } - }, - "TempUserDTO": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "createdOn": { - "type": "string", - "format": "date-time" - }, - "email": { - "type": "string" - }, - "emailSent": { - "type": "boolean" - }, - "emailSentOn": { - "type": "string", - "format": "date-time" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "invitedByEmail": { - "type": "string" - }, - "invitedByLogin": { - "type": "string" - }, - "invitedByName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "role": { - "type": "string", - "enum": ["None", "Viewer", "Editor", "Admin"] - }, - "status": { - "$ref": "#/definitions/TempUserStatus" - }, - "url": { - "type": "string" - } - } - }, - "TempUserStatus": { - "type": "string" - }, - "TestRulePayload": { - "type": "object", - "properties": { - "expr": { - "type": "string", - "example": "(node_filesystem_avail_bytes{fstype!=\"\",job=\"integrations/node_exporter\"} node_filesystem_size_bytes{fstype!=\"\",job=\"integrations/node_exporter\"} * 100 \u003c 5 and node_filesystem_readonly{fstype!=\"\",job=\"integrations/node_exporter\"} == 0)" - }, - "grafana_condition": { - "$ref": "#/definitions/EvalAlertConditionCommand" - } - } - }, - "TestRuleResponse": { - "type": "object", - "properties": { - "alerts": { - "$ref": "#/definitions/Vector" - }, - "grafana_alert_instances": { - "$ref": "#/definitions/AlertInstancesResponse" - } - } - }, - "TestTemplatesConfigBodyParams": { - "type": "object", - "properties": { - "alerts": { - "description": "Alerts to use as data when testing the template.", - "type": "array", - "items": { - "$ref": "#/definitions/postableAlert" - } - }, - "name": { - "description": "Name of the template file.", - "type": "string" - }, - "template": { - "description": "Template string to test.", - "type": "string" - } - } - }, - "TestTemplatesErrorResult": { - "type": "object", - "properties": { - "kind": { - "description": "Kind of template error that occurred.", - "type": "string", - "enum": ["invalid_template", "execution_error"] - }, - "message": { - "description": "Error message.", - "type": "string" - }, - "name": { - "description": "Name of the associated template for this error. Will be empty if the Kind is \"invalid_template\".", - "type": "string" - } - } - }, - "TestTemplatesResult": { - "type": "object", - "properties": { - "name": { - "description": "Name of the associated template definition for this result.", - "type": "string" - }, - "scope": { - "description": "Scope that was successfully used to interpolate the template. If the root scope \".\" fails, more specific\nscopes will be tried, such as \".Alerts', or \".Alert\".", - "type": "string", - "enum": [".", ".Alerts", ".Alert"] - }, - "text": { - "description": "Interpolated value of the template.", - "type": "string" - } - } - }, - "TestTemplatesResults": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/definitions/TestTemplatesErrorResult" - } - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/TestTemplatesResult" - } - } - } - }, - "Threshold": { - "description": "Threshold a single step on the threshold list", - "type": "object", - "properties": { - "color": { - "type": "string" - }, - "state": { - "type": "string" - }, - "value": { - "$ref": "#/definitions/ConfFloat64" - } - } - }, - "ThresholdsConfig": { - "description": "ThresholdsConfig setup thresholds", - "type": "object", - "properties": { - "mode": { - "$ref": "#/definitions/ThresholdsMode" - }, - "steps": { - "description": "Must be sorted by 'value', first value is always -Infinity", - "type": "array", - "items": { - "$ref": "#/definitions/Threshold" - } - } - } - }, - "ThresholdsMode": { - "description": "ThresholdsMode absolute or percentage", - "type": "string" - }, - "TimeInterval": { - "type": "object", - "title": "TimeInterval represents a named set of time intervals for which a route should be muted.", - "properties": { - "name": { - "type": "string" - }, - "time_intervals": { - "type": "array", - "items": { - "$ref": "#/definitions/TimeInterval" - } - } - } - }, - "TimeIntervalItem": { - "type": "object", - "properties": { - "days_of_month": { - "type": "array", - "items": { - "type": "string" - } - }, - "location": { - "type": "string" - }, - "months": { - "type": "array", - "items": { - "type": "string" - } - }, - "times": { - "type": "array", - "items": { - "$ref": "#/definitions/TimeIntervalTimeRange" - } - }, - "weekdays": { - "type": "array", - "items": { - "type": "string" - } - }, - "years": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "TimeIntervalTimeRange": { - "type": "object", - "properties": { - "end_time": { - "type": "string" - }, - "start_time": { - "type": "string" - } - } - }, - "TimeRange": { - "description": "Redefining this to avoid an import cycle", - "type": "object", - "properties": { - "from": { - "type": "string", - "format": "date-time" - }, - "to": { - "type": "string", - "format": "date-time" - } - } - }, - "Token": { - "type": "object", - "properties": { - "account": { - "type": "string" - }, - "anonymousRatio": { - "type": "integer", - "format": "int64" - }, - "company": { - "type": "string" - }, - "details_url": { - "type": "string" - }, - "exp": { - "type": "integer", - "format": "int64" - }, - "iat": { - "type": "integer", - "format": "int64" - }, - "included_users": { - "type": "integer", - "format": "int64" - }, - "iss": { - "type": "string" - }, - "jti": { - "type": "string" - }, - "lexp": { - "type": "integer", - "format": "int64" - }, - "lic_exp_warn_days": { - "type": "integer", - "format": "int64" - }, - "lid": { - "type": "string" - }, - "limit_by": { - "type": "string" - }, - "max_concurrent_user_sessions": { - "type": "integer", - "format": "int64" - }, - "nbf": { - "type": "integer", - "format": "int64" - }, - "prod": { - "type": "array", - "items": { - "type": "string" - } - }, - "slug": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/TokenStatus" - }, - "sub": { - "type": "string" - }, - "tok_exp_warn_days": { - "type": "integer", - "format": "int64" - }, - "trial": { - "type": "boolean" - }, - "trial_exp": { - "type": "integer", - "format": "int64" - }, - "update_days": { - "type": "integer", - "format": "int64" - }, - "usage_billing": { - "type": "boolean" - } - } - }, - "TokenDTO": { - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time", - "example": "2022-03-23T10:31:02Z" - }, - "expiration": { - "type": "string", - "format": "date-time", - "example": "2022-03-23T10:31:02Z" - }, - "hasExpired": { - "type": "boolean", - "example": false - }, - "id": { - "type": "integer", - "format": "int64", - "example": 1 - }, - "isRevoked": { - "type": "boolean", - "example": false - }, - "lastUsedAt": { - "type": "string", - "format": "date-time", - "example": "2022-03-23T10:31:02Z" - }, - "name": { - "type": "string", - "example": "grafana" - }, - "secondsUntilExpiration": { - "type": "number", - "format": "double", - "example": 0 - } - } - }, - "TokenStatus": { - "type": "integer", - "format": "int64" - }, - "Transformation": { - "type": "object", - "properties": { - "expression": { - "type": "string" - }, - "field": { - "type": "string" - }, - "mapValue": { - "type": "string" - }, - "type": { - "type": "string", - "enum": ["regex", "logfmt"] - } - } - }, - "Transformations": { - "type": "array", - "items": { - "$ref": "#/definitions/Transformation" - } - }, - "Type": { - "description": "+enum", - "type": "string" - }, - "TypeMeta": { - "description": "+k8s:deepcopy-gen=false", - "type": "object", - "title": "TypeMeta describes an individual object in an API response or request\nwith strings representing the type of the object and its API schema version.\nStructures that are versioned or persisted should inline TypeMeta.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional", - "type": "string" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional", - "type": "string" - } - } - }, - "URL": { - "type": "string", - "format": "url" - }, - "Unstructured": { - "description": "Unstructured allows objects that do not have Golang structs registered to be manipulated\ngenerically.", - "type": "object", - "properties": { - "Object": { - "description": "Object is a JSON compatible map with string, float, int, bool, []any,\nor map[string]any children.", - "type": "object", - "additionalProperties": {} - } - } - }, - "UpdateAnnotationsCmd": { - "type": "object", - "properties": { - "data": { - "$ref": "#/definitions/Json" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "text": { - "type": "string" - }, - "time": { - "type": "integer", - "format": "int64" - }, - "timeEnd": { - "type": "integer", - "format": "int64" - } - } - }, - "UpdateCorrelationCommand": { - "description": "UpdateCorrelationCommand is the command for updating a correlation", - "type": "object", - "properties": { - "config": { - "$ref": "#/definitions/CorrelationConfigUpdateDTO" - }, - "description": { - "description": "Optional description of the correlation", - "type": "string", - "example": "Logs to Traces" - }, - "label": { - "description": "Optional label identifying the correlation", - "type": "string", - "example": "My label" - }, - "type": { - "$ref": "#/definitions/CorrelationType" - } - } - }, - "UpdateCorrelationResponseBody": { - "type": "object", - "properties": { - "message": { - "type": "string", - "example": "Correlation updated" - }, - "result": { - "$ref": "#/definitions/Correlation" - } - } - }, - "UpdateDashboardACLCommand": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/DashboardACLUpdateItem" - } - } - } - }, - "UpdateDataSourceCommand": { - "description": "Also acts as api DTO", - "type": "object", - "properties": { - "access": { - "$ref": "#/definitions/DsAccess" - }, - "basicAuth": { - "type": "boolean" - }, - "basicAuthUser": { - "type": "string" - }, - "database": { - "type": "string" - }, - "isDefault": { - "type": "boolean" - }, - "jsonData": { - "$ref": "#/definitions/Json" - }, - "name": { - "type": "string" - }, - "secureJsonData": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "type": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "url": { - "type": "string" - }, - "user": { - "type": "string" - }, - "version": { - "description": "The previous version -- used for optimistic locking", - "type": "integer", - "format": "int64" - }, - "withCredentials": { - "type": "boolean" - } - } - }, - "UpdateFolderCommand": { - "description": "UpdateFolderCommand captures the information required by the folder service\nto update a folder. Use Move to update a folder's parent folder.", - "type": "object", - "properties": { - "description": { - "description": "NewDescription it's an optional parameter used for overriding the existing folder description", - "type": "string" - }, - "overwrite": { - "description": "Overwrite only used by the legacy folder implementation", - "type": "boolean" - }, - "title": { - "description": "NewTitle it's an optional parameter used for overriding the existing folder title", - "type": "string" - }, - "version": { - "description": "Version only used by the legacy folder implementation", - "type": "integer", - "format": "int64" - } - } - }, - "UpdateNamespaceRulesRequest": { - "type": "object", - "properties": { - "is_paused": { - "type": "boolean" - } - } - }, - "UpdateNamespaceRulesResponse": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - }, - "UpdateOrgAddressForm": { - "type": "object", - "properties": { - "address1": { - "type": "string" - }, - "address2": { - "type": "string" - }, - "city": { - "type": "string" - }, - "country": { - "type": "string" - }, - "state": { - "type": "string" - }, - "zipcode": { - "type": "string" - } - } - }, - "UpdateOrgForm": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - }, - "UpdateOrgUserCommand": { - "type": "object", - "properties": { - "role": { - "type": "string", - "enum": ["None", "Viewer", "Editor", "Admin"] - } - } - }, - "UpdatePlaylistCommand": { - "type": "object", - "properties": { - "interval": { - "type": "string" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/PlaylistItem" - } - }, - "name": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "UpdatePrefsCmd": { - "type": "object", - "properties": { - "homeDashboardId": { - "description": "The numerical :id of a favorited dashboard", - "type": "integer", - "format": "int64", - "default": 0 - }, - "homeDashboardUID": { - "type": "string" - }, - "language": { - "type": "string" - }, - "navbar": { - "$ref": "#/definitions/NavbarPreference" - }, - "queryHistory": { - "$ref": "#/definitions/QueryHistoryPreference" - }, - "regionalFormat": { - "type": "string" - }, - "theme": { - "type": "string", - "enum": ["light", "dark", "system"] - }, - "timezone": { - "description": "Any IANA timezone string (e.g. America/New_York), 'utc', 'browser', or empty string", - "type": "string" - }, - "weekStart": { - "type": "string" - } - } - }, - "UpdateQuotaCmd": { - "type": "object", - "properties": { - "limit": { - "type": "integer", - "format": "int64" - }, - "target": { - "type": "string" - } - } - }, - "UpdateRoleCommand": { - "type": "object", - "required": ["displayName", "description", "group"], - "properties": { - "description": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "global": { - "type": "boolean" - }, - "group": { - "type": "string" - }, - "hidden": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/Permission" - } - } - } - }, - "UpdateRuleGroupResponse": { - "type": "object", - "properties": { - "created": { - "type": "array", - "items": { - "type": "string" - } - }, - "deleted": { - "type": "array", - "items": { - "type": "string" - } - }, - "message": { - "type": "string" - }, - "updated": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "UpdateServiceAccountForm": { - "type": "object", - "properties": { - "isDisabled": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string", - "enum": ["None", "Viewer", "Editor", "Admin"] - }, - "serviceAccountId": { - "type": "integer", - "format": "int64" - } - } - }, - "UpdateTeamCommand": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "UpdateTeamLBACCommand": { - "type": "object", - "properties": { - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamLBACRule" - } - } - } - }, - "UpdateTeamMemberCommand": { - "type": "object", - "properties": { - "permission": { - "$ref": "#/definitions/PermissionType" - } - } - }, - "UpdateUserCommand": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "theme": { - "type": "string" - } - } - }, - "UserInfo": { - "type": "object", - "title": "UserInfo represents user-related information, including a unique identifier and a name.", - "properties": { - "name": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "UserLookupDTO": { - "type": "object", - "properties": { - "avatarUrl": { - "type": "string" - }, - "login": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "userId": { - "type": "integer", - "format": "int64" - } - } - }, - "UserOrgDTO": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "role": { - "type": "string", - "enum": ["None", "Viewer", "Editor", "Admin"] - } - } - }, - "UserProfileDTO": { - "type": "object", - "properties": { - "accessControl": { - "type": "object", - "additionalProperties": { - "type": "boolean" - } - }, - "authLabels": { - "type": "array", - "items": { - "type": "string" - } - }, - "avatarUrl": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "email": { - "type": "string" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "isDisabled": { - "type": "boolean" - }, - "isExternal": { - "type": "boolean" - }, - "isExternallySynced": { - "type": "boolean" - }, - "isGrafanaAdmin": { - "type": "boolean" - }, - "isGrafanaAdminExternallySynced": { - "type": "boolean" - }, - "isProvisioned": { - "type": "boolean" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "orgId": { - "type": "integer", - "format": "int64" - }, - "theme": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - } - } - }, - "UserSearchHitDTO": { - "type": "object", - "properties": { - "authLabels": { - "type": "array", - "items": { - "type": "string" - } - }, - "avatarUrl": { - "type": "string" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "email": { - "type": "string" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "isAdmin": { - "type": "boolean" - }, - "isDisabled": { - "type": "boolean" - }, - "isProvisioned": { - "type": "boolean" - }, - "lastSeenAt": { - "type": "string", - "format": "date-time" - }, - "lastSeenAtAge": { - "type": "string" - }, - "login": { - "type": "string" - }, - "name": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, - "UserToken": { - "description": "UserToken represents a user token", - "type": "object", - "properties": { - "AuthToken": { - "type": "string" - }, - "AuthTokenSeen": { - "type": "boolean" - }, - "ClientIp": { - "type": "string" - }, - "CreatedAt": { - "type": "integer", - "format": "int64" - }, - "ExternalSessionId": { - "type": "integer", - "format": "int64" - }, - "Id": { - "type": "integer", - "format": "int64" - }, - "PrevAuthToken": { - "type": "string" - }, - "RevokedAt": { - "type": "integer", - "format": "int64" - }, - "RotatedAt": { - "type": "integer", - "format": "int64" - }, - "SeenAt": { - "type": "integer", - "format": "int64" - }, - "UnhashedToken": { - "type": "string" - }, - "UpdatedAt": { - "type": "integer", - "format": "int64" - }, - "UserAgent": { - "type": "string" - }, - "UserId": { - "type": "integer", - "format": "int64" - } - } - }, - "Userinfo": { - "description": "The Userinfo type is an immutable encapsulation of username and\npassword details for a [URL]. An existing Userinfo value is guaranteed\nto have a username set (potentially empty, as allowed by RFC 2396),\nand optionally a password.", - "type": "object" - }, - "ValidationError": { - "type": "object", - "properties": { - "message": { - "type": "string", - "example": "error message" - } - } - }, - "ValueMapping": { - "description": "ValueMapping allows mapping input values to text and color", - "type": "object" - }, - "ValueMappings": { - "type": "array", - "items": { - "$ref": "#/definitions/ValueMapping" - } - }, - "Vector": { - "description": "Vector is basically only an alias for []Sample, but the contract is that\nin a Vector, all Samples have the same timestamp.", - "type": "array", - "items": { - "$ref": "#/definitions/Sample" - } - }, - "VictorOpsConfig": { - "type": "object", - "title": "VictorOpsConfig configures notifications via VictorOps.", - "properties": { - "api_key": { - "$ref": "#/definitions/Secret" - }, - "api_key_file": { - "type": "string" - }, - "api_url": { - "$ref": "#/definitions/URL" - }, - "custom_fields": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "entity_display_name": { - "type": "string" - }, - "http_config": { - "$ref": "#/definitions/HTTPClientConfig" - }, - "message_type": { - "type": "string" - }, - "monitoring_tool": { - "type": "string" - }, - "routing_key": { - "type": "string" - }, - "send_resolved": { - "type": "boolean" - }, - "state_message": { - "type": "string" - } - } - }, - "VisType": { - "type": "string", - "title": "VisType is used to indicate how the data should be visualized in explore." - }, - "WebexConfig": { - "type": "object", - "title": "WebexConfig configures notifications via Webex.", - "properties": { - "api_url": { - "$ref": "#/definitions/URL" - }, - "http_config": { - "$ref": "#/definitions/HTTPClientConfig" - }, - "message": { - "type": "string" - }, - "room_id": { - "type": "string" - }, - "send_resolved": { - "type": "boolean" - } - } - }, - "WebhookConfig": { - "type": "object", - "title": "WebhookConfig configures notifications via a generic webhook.", - "properties": { - "http_config": { - "$ref": "#/definitions/HTTPClientConfig" - }, - "max_alerts": { - "description": "MaxAlerts is the maximum number of alerts to be sent per webhook message.\nAlerts exceeding this threshold will be truncated. Setting this to 0\nallows an unlimited number of alerts.", - "type": "integer", - "format": "uint64" - }, - "send_resolved": { - "type": "boolean" - }, - "timeout": { - "$ref": "#/definitions/Duration" - }, - "url": { - "$ref": "#/definitions/SecretURL" - }, - "url_file": { - "type": "string" - } - } - }, - "WechatConfig": { - "type": "object", - "title": "WechatConfig configures notifications via Wechat.", - "properties": { - "agent_id": { - "type": "string" - }, - "api_secret": { - "$ref": "#/definitions/Secret" - }, - "api_url": { - "$ref": "#/definitions/URL" - }, - "corp_id": { - "type": "string" - }, - "http_config": { - "$ref": "#/definitions/HTTPClientConfig" - }, - "message": { - "type": "string" - }, - "message_type": { - "type": "string" - }, - "send_resolved": { - "type": "boolean" - }, - "to_party": { - "type": "string" - }, - "to_tag": { - "type": "string" - }, - "to_user": { - "type": "string" - } - } - }, - "alert": { - "description": "Alert alert", - "type": "object", - "required": ["labels"], - "properties": { - "generatorURL": { - "description": "generator URL\nFormat: uri", - "type": "string", - "format": "uri" - }, - "labels": { - "$ref": "#/definitions/labelSet" - } - } - }, - "alertGroup": { - "description": "AlertGroup alert group", - "type": "object", - "required": ["alerts", "labels", "receiver"], - "properties": { - "alerts": { - "description": "alerts", - "type": "array", - "items": { - "$ref": "#/definitions/gettableAlert" - } - }, - "labels": { - "$ref": "#/definitions/labelSet" - }, - "receiver": { - "$ref": "#/definitions/receiver" - } - } - }, - "alertGroups": { - "description": "AlertGroups alert groups", - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/alertGroup" - } - }, - "alertStatus": { - "description": "AlertStatus alert status", - "type": "object", - "required": ["inhibitedBy", "silencedBy", "state"], - "properties": { - "inhibitedBy": { - "description": "inhibited by", - "type": "array", - "items": { - "type": "string" - } - }, - "silencedBy": { - "description": "silenced by", - "type": "array", - "items": { - "type": "string" - } - }, - "state": { - "description": "state", - "type": "string", - "enum": ["[unprocessed active suppressed]"] - } - } - }, - "alertmanagerConfig": { - "description": "AlertmanagerConfig alertmanager config", - "type": "object", - "required": ["original"], - "properties": { - "original": { - "description": "original", - "type": "string" - } - } - }, - "alertmanagerStatus": { - "description": "AlertmanagerStatus alertmanager status", - "type": "object", - "required": ["cluster", "config", "uptime", "versionInfo"], - "properties": { - "cluster": { - "$ref": "#/definitions/clusterStatus" - }, - "config": { - "$ref": "#/definitions/alertmanagerConfig" - }, - "uptime": { - "description": "uptime", - "type": "string", - "format": "date-time" - }, - "versionInfo": { - "$ref": "#/definitions/versionInfo" - } - } - }, - "clusterStatus": { - "description": "ClusterStatus cluster status", - "type": "object", - "required": ["status"], - "properties": { - "name": { - "description": "name", - "type": "string" - }, - "peers": { - "description": "peers", - "type": "array", - "items": { - "$ref": "#/definitions/peerStatus" - } - }, - "status": { - "description": "status", - "type": "string", - "enum": ["[ready settling disabled]"] - } - } - }, - "deviceDTO": { - "type": "object", - "properties": { - "avatarUrl": { - "type": "string" - }, - "clientIp": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "deviceId": { - "type": "string" - }, - "lastSeenAt": { - "type": "string" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "userAgent": { - "type": "string" - } - } - }, - "getGroupsResponse": { - "type": "object", - "properties": { - "groups": { - "type": "array", - "items": { - "$ref": "#/definitions/Group" - } - }, - "total": { - "type": "integer", - "format": "int64" - } - } - }, - "gettableAlert": { - "description": "GettableAlert gettable alert", - "type": "object", - "required": ["labels", "annotations", "endsAt", "fingerprint", "receivers", "startsAt", "status", "updatedAt"], - "properties": { - "annotations": { - "$ref": "#/definitions/labelSet" - }, - "endsAt": { - "description": "ends at", - "type": "string", - "format": "date-time" - }, - "fingerprint": { - "description": "fingerprint", - "type": "string" - }, - "generatorURL": { - "description": "generator URL\nFormat: uri", - "type": "string", - "format": "uri" - }, - "labels": { - "$ref": "#/definitions/labelSet" - }, - "receivers": { - "description": "receivers", - "type": "array", - "items": { - "$ref": "#/definitions/receiver" - } - }, - "startsAt": { - "description": "starts at", - "type": "string", - "format": "date-time" - }, - "status": { - "$ref": "#/definitions/alertStatus" - }, - "updatedAt": { - "description": "updated at", - "type": "string", - "format": "date-time" - } - } - }, - "gettableAlerts": { - "description": "GettableAlerts gettable alerts", - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/gettableAlert" - } - }, - "gettableGrafanaSilence": { - "type": "object", - "required": ["comment", "createdBy", "endsAt", "matchers", "startsAt", "id", "status", "updatedAt"], - "properties": { - "accessControl": { - "type": "object", - "additionalProperties": { - "type": "boolean" - }, - "example": { - "create": false, - "read": true, - "write": false - } - }, - "comment": { - "description": "comment", - "type": "string" - }, - "createdBy": { - "description": "created by", - "type": "string" - }, - "endsAt": { - "description": "ends at", - "type": "string", - "format": "date-time" - }, - "id": { - "description": "id", - "type": "string" - }, - "matchers": { - "$ref": "#/definitions/matchers" - }, - "metadata": { - "$ref": "#/definitions/SilenceMetadata" - }, - "startsAt": { - "description": "starts at", - "type": "string", - "format": "date-time" - }, - "status": { - "$ref": "#/definitions/silenceStatus" - }, - "updatedAt": { - "description": "updated at", - "type": "string", - "format": "date-time" - } - } - }, - "gettableGrafanaSilences": { - "type": "array", - "items": { - "$ref": "#/definitions/gettableGrafanaSilence" - } - }, - "gettableSilence": { - "description": "GettableSilence gettable silence", - "type": "object", - "required": ["comment", "createdBy", "endsAt", "matchers", "startsAt", "id", "status", "updatedAt"], - "properties": { - "comment": { - "description": "comment", - "type": "string" - }, - "createdBy": { - "description": "created by", - "type": "string" - }, - "endsAt": { - "description": "ends at", - "type": "string", - "format": "date-time" - }, - "id": { - "description": "id", - "type": "string" - }, - "matchers": { - "$ref": "#/definitions/matchers" - }, - "startsAt": { - "description": "starts at", - "type": "string", - "format": "date-time" - }, - "status": { - "$ref": "#/definitions/silenceStatus" - }, - "updatedAt": { - "description": "updated at", - "type": "string", - "format": "date-time" - } - } - }, - "gettableSilences": { - "description": "GettableSilences gettable silences", - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/gettableSilence" - } - }, - "healthResponse": { - "type": "object", - "properties": { - "apiserver": { - "type": "string" - }, - "commit": { - "type": "string" - }, - "database": { - "type": "string" - }, - "enterpriseCommit": { - "type": "string" - }, - "version": { - "type": "string" - } - } - }, - "labelSet": { - "description": "LabelSet label set", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "matcher": { - "description": "Matcher matcher", - "type": "object", - "required": ["isRegex", "name", "value"], - "properties": { - "isEqual": { - "description": "is equal", - "type": "boolean" - }, - "isRegex": { - "description": "is regex", - "type": "boolean" - }, - "name": { - "description": "name", - "type": "string" - }, - "value": { - "description": "value", - "type": "string" - } - } - }, - "matchers": { - "description": "Matchers matchers", - "type": "array", - "items": { - "$ref": "#/definitions/matcher" - } - }, - "messageResponse": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - }, - "peerStatus": { - "description": "PeerStatus peer status", - "type": "object", - "required": ["address", "name"], - "properties": { - "address": { - "description": "address", - "type": "string" - }, - "name": { - "description": "name", - "type": "string" - } - } - }, - "postSilencesOKBody": { - "type": "object", - "properties": { - "silenceID": { - "description": "silence ID", - "type": "string" - } - } - }, - "postableAlert": { - "description": "PostableAlert postable alert", - "type": "object", - "required": ["labels"], - "properties": { - "annotations": { - "$ref": "#/definitions/labelSet" - }, - "endsAt": { - "description": "ends at\nFormat: date-time", - "type": "string", - "format": "date-time" - }, - "generatorURL": { - "description": "generator URL\nFormat: uri", - "type": "string", - "format": "uri" - }, - "labels": { - "$ref": "#/definitions/labelSet" - }, - "startsAt": { - "description": "starts at\nFormat: date-time", - "type": "string", - "format": "date-time" - } - } - }, - "postableAlerts": { - "description": "PostableAlerts postable alerts", - "type": "array", - "items": { - "$ref": "#/definitions/postableAlert" - } - }, - "postableSilence": { - "description": "PostableSilence postable silence", - "type": "object", - "required": ["comment", "createdBy", "endsAt", "matchers", "startsAt"], - "properties": { - "comment": { - "description": "comment", - "type": "string" - }, - "createdBy": { - "description": "created by", - "type": "string" - }, - "endsAt": { - "description": "ends at", - "type": "string", - "format": "date-time" - }, - "id": { - "description": "id", - "type": "string" - }, - "matchers": { - "$ref": "#/definitions/matchers" - }, - "startsAt": { - "description": "starts at", - "type": "string", - "format": "date-time" - } - } - }, - "publicError": { - "description": "PublicError is derived from Error and only contains information\navailable to the end user.", - "type": "object", - "required": ["statusCode", "messageId"], - "properties": { - "extra": { - "description": "Extra Additional information about the error", - "type": "object", - "additionalProperties": {} - }, - "message": { - "description": "Message A human readable message", - "type": "string" - }, - "messageId": { - "description": "MessageID A unique identifier for the error", - "type": "string" - }, - "statusCode": { - "description": "StatusCode The HTTP status code returned", - "type": "integer", - "format": "int64" - } - } - }, - "receiver": { - "description": "Receiver receiver", - "type": "object", - "required": ["name"], - "properties": { - "name": { - "description": "name", - "type": "string" - } - } - }, - "resourcePermissionDTO": { - "type": "object", - "properties": { - "actions": { - "type": "array", - "items": { - "type": "string" - } - }, - "builtInRole": { - "type": "string" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "isInherited": { - "type": "boolean" - }, - "isManaged": { - "type": "boolean" - }, - "isServiceAccount": { - "type": "boolean" - }, - "permission": { - "type": "string" - }, - "roleName": { - "type": "string" - }, - "team": { - "type": "string" - }, - "teamAvatarUrl": { - "type": "string" - }, - "teamId": { - "type": "integer", - "format": "int64" - }, - "teamUid": { - "type": "string" - }, - "userAvatarUrl": { - "type": "string" - }, - "userId": { - "type": "integer", - "format": "int64" - }, - "userLogin": { - "type": "string" - }, - "userUid": { - "type": "string" - } - } - }, - "setPermissionCommand": { - "type": "object", - "properties": { - "permission": { - "type": "string" - } - } - }, - "setPermissionsCommand": { - "type": "object", - "properties": { - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/SetResourcePermissionCommand" - } - } - } - }, - "silence": { - "description": "Silence silence", - "type": "object", - "required": ["comment", "createdBy", "endsAt", "matchers", "startsAt"], - "properties": { - "comment": { - "description": "comment", - "type": "string" - }, - "createdBy": { - "description": "created by", - "type": "string" - }, - "endsAt": { - "description": "ends at", - "type": "string", - "format": "date-time" - }, - "matchers": { - "$ref": "#/definitions/matchers" - }, - "startsAt": { - "description": "starts at", - "type": "string", - "format": "date-time" - } - } - }, - "silenceStatus": { - "description": "SilenceStatus silence status", - "type": "object", - "required": ["state"], - "properties": { - "state": { - "description": "state", - "type": "string", - "enum": ["[expired active pending]"] - } - } - }, - "versionInfo": { - "description": "VersionInfo version info", - "type": "object", - "required": ["branch", "buildDate", "buildUser", "goVersion", "revision", "version"], - "properties": { - "branch": { - "description": "branch", - "type": "string" - }, - "buildDate": { - "description": "build date", - "type": "string" - }, - "buildUser": { - "description": "build user", - "type": "string" - }, - "goVersion": { - "description": "go version", - "type": "string" - }, - "revision": { - "description": "revision", - "type": "string" - }, - "version": { - "description": "version", - "type": "string" - } - } - } - }, - "responses": { - "GettableHistoricUserConfigs": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/GettableHistoricUserConfig" - } - } - }, - "SMTPNotEnabledError": { - "description": "(empty)" - }, - "StateHistory": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/Frame" - } - }, - "TestGrafanaRuleResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/postableAlert" - } - } - }, - "acceptedResponse": { - "description": "AcceptedResponse", - "schema": { - "$ref": "#/definitions/ErrorResponseBody" - } - }, - "adminCreateUserResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/AdminCreateUserResponse" - } - }, - "adminGetSettingsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/SettingsBag" - } - }, - "adminGetStatsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/AdminStats" - } - }, - "adminGetUserAuthTokensResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/UserToken" - } - } - }, - "apiResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/messageResponse" - } - }, - "badRequestError": { - "description": "BadRequestError is returned when the request is invalid and it cannot be processed.", - "schema": { - "$ref": "#/definitions/ErrorResponseBody" - } - }, - "badRequestPublicError": { - "description": "BadRequestPublicError is returned when the request is invalid and it cannot be processed.", - "schema": { - "$ref": "#/definitions/publicError" - } - }, - "calculateDashboardDiffResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - } - }, - "cloudMigrationCreateTokenResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/CreateAccessTokenResponseDTO" - } - }, - "cloudMigrationDeleteTokenResponse": { - "description": "(empty)" - }, - "cloudMigrationGetTokenResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/GetAccessTokenResponseDTO" - } - }, - "cloudMigrationRunListResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/CloudMigrationRunListDTO" - } - }, - "cloudMigrationRunResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/MigrateDataResponseDTO" - } - }, - "cloudMigrationSessionListResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/CloudMigrationSessionListResponseDTO" - } - }, - "cloudMigrationSessionResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/CloudMigrationSessionResponseDTO" - } - }, - "conflictError": { - "description": "ConflictError", - "schema": { - "$ref": "#/definitions/ErrorResponseBody" - } - }, - "contentResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - } - }, - "createCorrelationResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/CreateCorrelationResponseBody" - } - }, - "createDashboardSnapshotResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "properties": { - "deleteKey": { - "description": "Unique key used to delete the snapshot. It is different from the key so that only the creator can delete the snapshot.", - "type": "string" - }, - "deleteUrl": { - "type": "string" - }, - "id": { - "description": "Snapshot id", - "type": "integer", - "format": "int64" - }, - "key": { - "description": "Unique key", - "type": "string" - }, - "url": { - "type": "string" - } - } - } - }, - "createOrUpdateDatasourceResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "required": ["id", "name", "message", "datasource"], - "properties": { - "datasource": { - "$ref": "#/definitions/DataSource" - }, - "id": { - "description": "ID Identifier of the new data source.", - "type": "integer", - "format": "int64", - "example": 65 - }, - "message": { - "description": "Message Message of the deleted dashboard.", - "type": "string", - "example": "Data source added" - }, - "name": { - "description": "Name of the new data source.", - "type": "string", - "example": "My Data source" - } - } - } - }, - "createOrgResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "required": ["orgId", "message"], - "properties": { - "message": { - "description": "Message Message of the created org.", - "type": "string", - "example": "Data source added" - }, - "orgId": { - "description": "ID Identifier of the created org.", - "type": "integer", - "format": "int64", - "example": 65 - } - } - } - }, - "createPlaylistResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/Playlist" - } - }, - "createPublicDashboardResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/PublicDashboard" - } - }, - "createReportResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - } - } - } - }, - "createRoleResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/RoleDTO" - } - }, - "createServiceAccountResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/ServiceAccountDTO" - } - }, - "createSnapshotResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/CreateSnapshotResponseDTO" - } - }, - "createTeamResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "teamId": { - "type": "integer", - "format": "int64" - }, - "uid": { - "type": "string" - } - } - } - }, - "createTokenResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/NewApiKeyResult" - } - }, - "dashboardResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/DashboardFullWithMeta" - } - }, - "dashboardVersionResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/DashboardVersionMeta" - } - }, - "dashboardVersionsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/DashboardVersionResponseMeta" - } - }, - "deleteCorrelationResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/DeleteCorrelationResponseBody" - } - }, - "deleteDashboardResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "required": ["uid", "title", "message"], - "properties": { - "message": { - "description": "Message Message of the deleted dashboard.", - "type": "string", - "example": "Dashboard My Dashboard deleted" - }, - "title": { - "description": "Title Title of the deleted dashboard.", - "type": "string", - "example": "My Dashboard" - }, - "uid": { - "description": "UID Identifier of the deleted dashboard.", - "type": "string", - "example": "65" - } - } - } - }, - "deleteDataSourceByNameResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "required": ["id", "message"], - "properties": { - "id": { - "description": "ID Identifier of the deleted data source.", - "type": "integer", - "format": "int64", - "example": 65 - }, - "message": { - "description": "Message Message of the deleted dashboard.", - "type": "string", - "example": "Dashboard My Dashboard deleted" - } - } - } - }, - "deleteFolderResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "required": ["id", "title", "message"], - "properties": { - "id": { - "description": "ID Identifier of the deleted folder.", - "type": "integer", - "format": "int64", - "example": 65 - }, - "message": { - "description": "Message Message of the deleted folder.", - "type": "string", - "example": "Folder My Folder deleted" - }, - "title": { - "description": "Title of the deleted folder.", - "type": "string", - "example": "My Folder" - } - } - } - }, - "devicesResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/deviceDTO" - } - } - }, - "devicesSearchResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/SearchDeviceQueryResult" - } - }, - "folderResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/Folder" - } - }, - "forbiddenError": { - "description": "ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.", - "schema": { - "$ref": "#/definitions/ErrorResponseBody" - } - }, - "forbiddenPublicError": { - "description": "ForbiddenPublicError is returned if the user/token has insufficient permissions to access the requested resource.", - "schema": { - "$ref": "#/definitions/publicError" - } - }, - "genericError": { - "description": "A GenericError is the default error message that is generated.\nFor certain status codes there are more appropriate error structures.", - "schema": { - "$ref": "#/definitions/ErrorResponseBody" - } - }, - "getAccessControlStatusResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/Status" - } - }, - "getAllRolesResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - }, - "getAnnotationByIDResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/Annotation" - } - }, - "getAnnotationTagsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/GetAnnotationTagsResponse" - } - }, - "getAnnotationsResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Annotation" - } - } - }, - "getCorrelationResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/Correlation" - } - }, - "getCorrelationsBySourceUIDResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Correlation" - } - } - }, - "getCorrelationsResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Correlation" - } - } - }, - "getCurrentOrgResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/OrgDetailsDTO" - } - }, - "getDashboardPermissionsListResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/DashboardACLInfoDTO" - } - } - }, - "getDashboardSnapshotResponse": { - "description": "(empty)" - }, - "getDashboardsTagsResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/DashboardTagCloudItem" - } - } - }, - "getDataSourceIDResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "required": ["id"], - "properties": { - "id": { - "description": "ID Identifier of the data source.", - "type": "integer", - "format": "int64", - "example": 65 - } - } - } - }, - "getDataSourceResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/DataSource" - } - }, - "getDataSourcesResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/DataSourceList" - } - }, - "getFolderDescendantCountsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/DescendantCounts" - } - }, - "getFolderPermissionListResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/DashboardACLInfoDTO" - } - } - }, - "getFoldersResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/FolderSearchHit" - } - } - }, - "getGroupRolesResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - }, - "getGroupsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/getGroupsResponse" - } - }, - "getHomeDashboardResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/GetHomeDashboardResponse" - } - }, - "getLibraryElementArrayResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/LibraryElementArrayResponse" - } - }, - "getLibraryElementConnectionsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/LibraryElementConnectionsResponse" - } - }, - "getLibraryElementResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/LibraryElementResponse" - } - }, - "getLibraryElementsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/LibraryElementSearchResponse" - } - }, - "getLicenseTokenResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/Token" - } - }, - "getOrgByIDResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/OrgDetailsDTO" - } - }, - "getOrgByNameResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/OrgDetailsDTO" - } - }, - "getOrgUsersForCurrentOrgLookupResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/UserLookupDTO" - } - } - }, - "getOrgUsersForCurrentOrgResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/OrgUserDTO" - } - } - }, - "getOrgUsersResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/OrgUserDTO" - } - } - }, - "getPendingOrgInvitesResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/TempUserDTO" - } - } - }, - "getPlaylistDashboardsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/PlaylistDashboardsSlice" - } - }, - "getPlaylistItemsResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/PlaylistItemDTO" - } - } - }, - "getPlaylistResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/PlaylistDTO" - } - }, - "getPreferencesResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/PreferencesSpec" - } - }, - "getPublicAnnotationsResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/AnnotationEvent" - } - } - }, - "getPublicDashboardResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/PublicDashboard" - } - }, - "getQueryHistoryDeleteQueryResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/QueryHistoryDeleteQueryResponse" - } - }, - "getQueryHistoryResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/QueryHistoryResponse" - } - }, - "getQueryHistorySearchResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/QueryHistorySearchResponse" - } - }, - "getQuotaResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/QuotaDTO" - } - } - }, - "getReportResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/Report" - } - }, - "getReportSettingsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/ReportSettings" - } - }, - "getReportsResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Report" - } - } - }, - "getResourcePermissionsResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/resourcePermissionDTO" - } - } - }, - "getRoleAssignmentsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/RoleAssignmentsDTO" - } - }, - "getRoleResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/RoleDTO" - } - }, - "getSSOSettingsResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "settings": { - "type": "object", - "additionalProperties": {} - }, - "source": { - "type": "string" - } - } - } - }, - "getSharingOptionsResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "properties": { - "externalEnabled": { - "type": "boolean" - }, - "externalSnapshotName": { - "type": "string" - }, - "externalSnapshotURL": { - "type": "string" - } - } - } - }, - "getSignedInUserOrgListResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/UserOrgDTO" - } - } - }, - "getSignedInUserTeamListResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamDTO" - } - } - }, - "getSnapshotResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/GetSnapshotResponseDTO" - } - }, - "getStatusResponse": { - "description": "(empty)" - }, - "getSyncStatusResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/ActiveSyncStatusDTO" - } - }, - "getTeamByIDResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/TeamDTO" - } - }, - "getTeamGroupsApiResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamGroupDTO" - } - } - }, - "getTeamLBACRulesResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/TeamLBACRules" - } - }, - "getTeamMembersResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamMemberDTO" - } - } - }, - "getUserAuthTokensResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/UserToken" - } - } - }, - "getUserOrgListResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/UserOrgDTO" - } - } - }, - "getUserTeamsResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamDTO" - } - } - }, - "goneError": { - "description": "GoneError is returned when the requested endpoint was removed.", - "schema": { - "$ref": "#/definitions/ErrorResponseBody" - } - }, - "helpFlagResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "properties": { - "helpFlags1": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - } - } - } - }, - "importDashboardResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/ImportDashboardResponse" - } - }, - "internalServerError": { - "description": "InternalServerError is a general error indicating something went wrong internally.", - "schema": { - "$ref": "#/definitions/ErrorResponseBody" - } - }, - "internalServerPublicError": { - "description": "InternalServerPublicError is a general error indicating something went wrong internally.", - "schema": { - "$ref": "#/definitions/publicError" - } - }, - "interpolateDashboardResponse": { - "description": "(empty)", - "schema": {} - }, - "jwksResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/JSONWebKey" - } - } - } - } - }, - "listBuiltinRolesResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - } - }, - "listPublicDashboardsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/PublicDashboardListResponseWithPagination" - } - }, - "listRecordingRulesResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - }, - "listRolesResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - }, - "listSSOSettingsResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "settings": { - "type": "object", - "additionalProperties": {} - }, - "source": { - "type": "string" - } - } - } - } - }, - "listSortOptionsResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "meta": { - "type": "string" - }, - "name": { - "type": "string" - } - } - } - }, - "listTeamsRolesResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - } - }, - "listTokensResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/TokenDTO" - } - } - }, - "listUsersRolesResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - } - }, - "noContentResponse": { - "description": "(empty)", - "schema": { - "type": "object" - } - }, - "notAcceptableError": { - "description": "NotAcceptableError is returned when the server cannot produce a response matching the accepted formats.", - "schema": { - "$ref": "#/definitions/ErrorResponseBody" - } - }, - "notFoundError": { - "description": "NotFoundError is returned when the requested resource was not found.", - "schema": { - "$ref": "#/definitions/ErrorResponseBody" - } - }, - "notFoundPublicError": { - "description": "NotFoundPublicError is returned when the requested resource was not found.", - "schema": { - "$ref": "#/definitions/publicError" - } - }, - "okResponse": { - "description": "An OKResponse is returned if the request was successful.", - "schema": { - "$ref": "#/definitions/SuccessResponseBody" - } - }, - "postAnnotationResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "required": ["id", "message"], - "properties": { - "id": { - "description": "ID Identifier of the created annotation.", - "type": "integer", - "format": "int64", - "example": 65 - }, - "message": { - "description": "Message Message of the created annotation.", - "type": "string" - } - } - } - }, - "postDashboardResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "required": ["status", "title", "version", "id", "uid", "url"], - "properties": { - "folderUid": { - "description": "FolderUID The unique identifier (uid) of the folder the dashboard belongs to.", - "type": "string" - }, - "id": { - "description": "ID The unique identifier (id) of the created/updated dashboard.", - "type": "integer", - "format": "int64", - "example": 1 - }, - "status": { - "description": "Status status of the response.", - "type": "string", - "example": "success" - }, - "title": { - "description": "Slug The slug of the dashboard.", - "type": "string", - "example": "my-dashboard" - }, - "uid": { - "description": "UID The unique identifier (uid) of the created/updated dashboard.", - "type": "string", - "example": "nHz3SXiiz" - }, - "url": { - "description": "URL The relative URL for accessing the created/updated dashboard.", - "type": "string", - "example": "/d/nHz3SXiiz/my-dashboard" - }, - "version": { - "description": "Version The version of the dashboard.", - "type": "integer", - "format": "int64", - "example": 2 - } - } - } - }, - "postRenewLicenseTokenResponse": { - "description": "(empty)" - }, - "preconditionFailedError": { - "description": "PreconditionFailedError", - "schema": { - "$ref": "#/definitions/ErrorResponseBody" - } - }, - "publicErrorResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/publicError" - } - }, - "queryMetricsWithExpressionsRespons": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/QueryDataResponse" - } - }, - "queryPublicDashboardResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/QueryDataResponse" - } - }, - "receiversResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ReceiverStatus" - } - } - }, - "recordingRuleResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - }, - "recordingRuleWriteTargetResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/PrometheusRemoteWriteTargetJSON" - } - }, - "refreshLicenseStatsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/ActiveUserStats" - } - }, - "resourceDependenciesResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/ResourceDependenciesResponseDTO" - } - }, - "resourcePermissionsDescription": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/Description" - } - }, - "retrieveServiceAccountResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/ServiceAccountDTO" - } - }, - "searchDashboardSnapshotsResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/DashboardSnapshotDTO" - } - } - }, - "searchOrgServiceAccountsWithPagingResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/SearchOrgServiceAccountsResult" - } - }, - "searchOrgUsersResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/SearchOrgUsersQueryResult" - } - }, - "searchOrgsResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/OrgDTO" - } - } - }, - "searchPlaylistsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/Playlists" - } - }, - "searchResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/HitList" - } - }, - "searchTeamGroupsResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/SearchTeamGroupsQueryResult" - } - } - }, - "searchTeamsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/SearchTeamQueryResult" - } - }, - "searchUsersResponse": { - "description": "(empty)", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/UserSearchHitDTO" - } - } - }, - "searchUsersWithPagingResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/SearchUserQueryResult" - } - }, - "setRoleAssignmentsResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/RoleAssignmentsDTO" - } - }, - "snapshotListResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/SnapshotListResponseDTO" - } - }, - "statusMovedPermanently": { - "description": "StatusMovedPermanently", - "schema": { - "$ref": "#/definitions/ErrorResponseBody" - } - }, - "unauthorisedError": { - "description": "UnauthorizedError is returned when the request is not authenticated.", - "schema": { - "$ref": "#/definitions/ErrorResponseBody" - } - }, - "unauthorisedPublicError": { - "description": "UnauthorisedPublicError is returned when the request is not authenticated.", - "schema": { - "$ref": "#/definitions/publicError" - } - }, - "unprocessableEntityError": { - "description": "UnprocessableEntityError", - "schema": { - "$ref": "#/definitions/ErrorResponseBody" - } - }, - "updateCorrelationResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/UpdateCorrelationResponseBody" - } - }, - "updatePlaylistResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/PlaylistDTO" - } - }, - "updatePublicDashboardResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/PublicDashboard" - } - }, - "updateServiceAccountResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "serviceaccount": { - "$ref": "#/definitions/ServiceAccountProfileDTO" - } - } - } - }, - "updateTeamLBACRulesResponse": { - "description": "(empty)", - "schema": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "rules": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamLBACRule" - } - }, - "uid": { - "type": "string" - } - } - } - }, - "userResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/UserProfileDTO" - } - }, - "viewPublicDashboardResponse": { - "description": "(empty)", - "schema": { - "$ref": "#/definitions/DashboardFullWithMeta" - } - } - }, - "securityDefinitions": { - "api_key": { - "type": "apiKey", - "name": "Authorization", - "in": "header" - }, - "basic": { - "type": "basic" - } - }, - "security": [ - { - "basic": [] - }, - { - "api_key": [] - } - ], - "tags": [ - { - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.", - "name": "datasources" - }, - { - "description": "Folders are identified by the identifier (id) and the unique identifier (uid).\nThe identifier (id) of a folder is an auto-incrementing numeric value and is only unique per Grafana install.\nThe unique identifier (uid) of a folder can be used for uniquely identify folders between multiple Grafana installs. It’s automatically generated if not provided when creating a folder. The uid allows having consistent URLs for accessing folders and when syncing folders between multiple Grafana installs. This means that changing the title of a folder will not break any bookmarked links to that folder.\nThe uid can have a maximum length of 40 characters.", - "name": "folders" - }, - { - "description": "Permissions with `folderId=-1` are the default permissions for users with the Viewer and Editor roles. Permissions can be set for a user, a team or a role (Viewer or Editor). Permissions cannot be set for Admins - they always have access to everything.", - "name": "permissions" - }, - { - "description": "The Admin HTTP API does not currently work with an API Token. API Tokens are currently only linked to an organization and an organization role. They cannot be given the permission of server admin, only users can be given that permission. So in order to use these API calls you will have to use Basic Auth and the Grafana user must have the Grafana Admin permission. (The default admin user is called admin and has permission to use this API.)", - "name": "admin" - }, - { - "description": "Grafana Annotations feature released in Grafana 4.6. Annotations are saved in the Grafana database (sqlite, mysql or postgres). Annotations can be organization annotations that can be shown on any dashboard by configuring an annotation data source - they are filtered by tags. Or they can be tied to a panel on a dashboard and are then only shown on that panel.", - "name": "annotations" - }, - { - "description": "The identifier (ID) of a library element is an auto-incrementing numeric value that is unique per Grafana install.\nThe unique identifier (UID) of a library element uniquely identifies library elements between multiple Grafana installs. It’s automatically generated unless you specify it during library element creation. The UID provides consistent URLs for accessing library elements and when syncing library elements between multiple Grafana installs.\nThe maximum length of a UID is 40 characters.", - "name": "library_elements" - }, - { - "description": "The identifier (ID) of a query in query history is an auto-incrementing numeric value that is unique per Grafana install.\nThe unique identifier (UID) of a query history uniquely identifies queries in query history between multiple Grafana installs. It’s automatically generated. The UID provides consistent URLs for accessing queries in query history.", - "name": "query_history" - }, - { - "description": "The Admin Organizations HTTP API does not currently work with an API Token. API Tokens are currently only linked to an organization and an organization role. They cannot be given the permission of server admin, only users can be given that permission. So in order to use these API calls you will have to use Basic Auth and the Grafana user must have the Grafana Admin permission (The default admin user is called `admin` and has permission to use this API).", - "name": "orgs" - }, - { - "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.", - "name": "org" - }, - { - "description": "This API can be used to create/update/delete Teams and to add/remove users to Teams. All actions require that the user has the Admin role for the organization.", - "name": "teams" - }, - { - "description": "These are only available in Grafana Enterprise", - "name": "enterprise" - }, - { - "description": "The API can be used to create, update, get and list roles, and create or remove built-in role assignments. To use the API, you would need to enable fine-grained access control.\nThis only available in Grafana Enterprise.\nThe API does not currently work with an API Token. So in order to use these API endpoints you will have to use Basic auth.", - "name": "access_control" - }, - { - "description": "Licensing is only available in Grafana Enterprise. Read more about Grafana Enterprise.\nIf you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.", - "name": "licensing" - }, - { - "description": "This API allows you to interact programmatically with the Reporting feature.\nReporting is only available in Grafana Enterprise. Read more about Grafana Enterprise.\nIf you have Fine-grained access Control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.", - "name": "reports" - }, - { - "description": "If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.", - "name": "service_accounts" - } - ] -} diff --git a/integrations/grafana/hub.md b/integrations/grafana/hub.md deleted file mode 100644 index 8fa8bb32038..00000000000 --- a/integrations/grafana/hub.md +++ /dev/null @@ -1,21 +0,0 @@ -# Botpress Grafana Integration - -Monitor and manage your Grafana instance from a Botpress chatbot. Query metrics, manage dashboards, alert rules, folders, contact points, and notification policies through conversational actions. - -## Setup - -You will need a **Grafana username** and a **Service Account Token**. - -### Prerequisites - -- A Botpress cloud account -- A running Grafana instance -- A Grafana Service Account Token with sufficient permissions - -### Enable Integration - -1. In Grafana, go to **Administration → Service Accounts** and create a service account with the `Editor` role (or narrower scopes as needed). -2. Generate a token for that service account and copy it. -3. In Botpress, navigate to **Integrations** and find Grafana. -4. Enter your **Grafana username** and the **Service Account Token**. -5. Save the configuration. diff --git a/integrations/grafana/icon.svg b/integrations/grafana/icon.svg deleted file mode 100644 index e91f3abdb41..00000000000 --- a/integrations/grafana/icon.svg +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - diff --git a/integrations/grafana/integration.definition.ts b/integrations/grafana/integration.definition.ts deleted file mode 100644 index ca5a3d678f9..00000000000 --- a/integrations/grafana/integration.definition.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { IntegrationDefinition } from '@botpress/sdk' -import { configuration, states, events, actions } from './definitions' - -export default new IntegrationDefinition({ - name: 'grafana', - version: '0.1.1', - title: 'Grafana', - description: 'Interact with Grafana dashboards, alerts, folders, datasources, and notification policies', - readme: 'hub.md', - icon: 'icon.svg', - configuration, - states, - events, - actions, - attributes: { - category: 'Developer Tools', - repo: 'botpress', - }, -}) diff --git a/integrations/grafana/package.json b/integrations/grafana/package.json deleted file mode 100644 index 6d7c12f6274..00000000000 --- a/integrations/grafana/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@botpresshub/grafana", - "scripts": { - "build": "bp add -y && bp build", - "check:type": "tsc --noEmit", - "check:bplint": "bp lint", - "test": "vitest --run", - "generate:k8s": "openapi-ts -i ./grafana-api/grafana-dashboard-k8s.json ./grafana-api/grafana-folder-k8s.json -o ./src/gen/grafana-k8s-client -c @hey-api/client-fetch", - "generate:legacy": "openapi-ts -i ./grafana-api/grafana-legacy.json -o ./src/gen/grafana-legacy-client -c @hey-api/client-fetch", - "generate": "pnpm run generate:k8s && pnpm run generate:legacy" - }, - "private": true, - "dependencies": { - "@botpress/sdk": "workspace:*" - }, - "devDependencies": { - "@botpress/cli": "workspace:*", - "@hey-api/client-fetch": "^0.13.1", - "@hey-api/openapi-ts": "^0.97.1" - } -} diff --git a/integrations/grafana/src/actions/alerts.ts b/integrations/grafana/src/actions/alerts.ts deleted file mode 100644 index ac084761824..00000000000 --- a/integrations/grafana/src/actions/alerts.ts +++ /dev/null @@ -1,41 +0,0 @@ -import * as sdk from '@botpress/sdk' -import * as bp from '../../.botpress' -import { alertRuleSchema } from '../../definitions/actions/create-alert-rule' -import { GrafanaClient } from '../client' - -export const createAlertRuleAction: bp.IntegrationProps['actions']['createAlertRule'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - return await client.createAlertRule(alertRuleSchema.parse(props.input)) - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const getAlertRuleAction: bp.IntegrationProps['actions']['getAlertRule'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - return await client.getAlertRule(props.input.uid) - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const listAlertRulesAction: bp.IntegrationProps['actions']['listAlertRules'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - return { alertRules: await client.listAlertRules() } - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const deleteAlertRuleAction: bp.IntegrationProps['actions']['deleteAlertRule'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - await client.deleteAlertRule(props.input.uid) - return {} - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} diff --git a/integrations/grafana/src/actions/contactPoints.ts b/integrations/grafana/src/actions/contactPoints.ts deleted file mode 100644 index 727d24c76c2..00000000000 --- a/integrations/grafana/src/actions/contactPoints.ts +++ /dev/null @@ -1,47 +0,0 @@ -import * as sdk from '@botpress/sdk' -import * as bp from '../../.botpress' -import { GrafanaClient } from '../client' - -export const listContactPointsAction: bp.IntegrationProps['actions']['listContactPoints'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - return { contactPoints: await client.listContactPoints() } - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const createContactPointAction: bp.IntegrationProps['actions']['createContactPoint'] = async (props) => { - let webhookUrl: string - let secret: string - try { - const { state } = await props.client.getState({ - type: 'integration', - name: 'webhookConfig', - id: props.ctx.integrationId, - }) - webhookUrl = props.input.webhookUrl ?? state.payload.webhookUrl - secret = state.payload.webhookSecret - } catch (error_: unknown) { - throw new sdk.RuntimeError( - `Failed to load integration state: ${error_ instanceof Error ? error_.message : String(error_)}` - ) - } - - const client = new GrafanaClient(props.ctx.configuration) - try { - return await client.createContactPoint({ ...props.input, webhookUrl, secret }) - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const deleteContactPointAction: bp.IntegrationProps['actions']['deleteContactPoint'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - await client.deleteContactPoint(props.input.uid) - return {} - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} diff --git a/integrations/grafana/src/actions/dashboards.ts b/integrations/grafana/src/actions/dashboards.ts deleted file mode 100644 index 4168e679631..00000000000 --- a/integrations/grafana/src/actions/dashboards.ts +++ /dev/null @@ -1,63 +0,0 @@ -import * as sdk from '@botpress/sdk' -import * as bp from '../../.botpress' -import { GrafanaClient } from '../client' - -export const createDashboardAction: bp.IntegrationProps['actions']['createDashboard'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - await client.createDashboard(props.input) - return {} - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const editDashboardAction: bp.IntegrationProps['actions']['editDashboard'] = async (props) => { - const { dashboardUid, ...updates } = props.input - const client = new GrafanaClient(props.ctx.configuration) - try { - await client.editDashboard(dashboardUid, updates) - return {} - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const editDashboardPanelAction: bp.IntegrationProps['actions']['editDashboardPanel'] = async (props) => { - const { dashboardUid, panelId, panel } = props.input - const client = new GrafanaClient(props.ctx.configuration) - try { - await client.editDashboardPanel(dashboardUid, panelId, panel) - return {} - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const getDashboardAction: bp.IntegrationProps['actions']['getDashboard'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - return await client.getDashboard(props.input.dashboardUid) - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const listDashboardsAction: bp.IntegrationProps['actions']['listDashboards'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - return { dashboards: await client.listDashboards() } - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const deleteDashboardAction: bp.IntegrationProps['actions']['deleteDashboard'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - await client.deleteDashboard(props.input.dashboardName) - return {} - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} diff --git a/integrations/grafana/src/actions/datasources.ts b/integrations/grafana/src/actions/datasources.ts deleted file mode 100644 index f415cb8109b..00000000000 --- a/integrations/grafana/src/actions/datasources.ts +++ /dev/null @@ -1,50 +0,0 @@ -import * as sdk from '@botpress/sdk' -import * as bp from '../../.botpress' -import { GrafanaClient } from '../client' - -export const listDatasourcesAction: bp.IntegrationProps['actions']['listDatasources'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - return { datasources: await client.listDatasources() } - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const queryMetricsAction: bp.IntegrationProps['actions']['queryMetrics'] = async (props) => { - const { datasourceUid, query, start, end, step } = props.input - const client = new GrafanaClient(props.ctx.configuration) - try { - return await client.queryMetrics(datasourceUid, query, start, end, step) - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const listMetricNamesAction: bp.IntegrationProps['actions']['listMetricNames'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - return { metricNames: await client.listMetricNames(props.input.datasourceUid) } - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const listLabelNamesAction: bp.IntegrationProps['actions']['listLabelNames'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - return { labelNames: await client.listLabelNames(props.input.datasourceUid) } - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const listLabelValuesAction: bp.IntegrationProps['actions']['listLabelValues'] = async (props) => { - const { datasourceUid, labelName } = props.input - const client = new GrafanaClient(props.ctx.configuration) - try { - return { labelValues: await client.listLabelValues(datasourceUid, labelName) } - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} diff --git a/integrations/grafana/src/actions/folders.ts b/integrations/grafana/src/actions/folders.ts deleted file mode 100644 index 328e597df63..00000000000 --- a/integrations/grafana/src/actions/folders.ts +++ /dev/null @@ -1,31 +0,0 @@ -import * as sdk from '@botpress/sdk' -import * as bp from '../../.botpress' -import { GrafanaClient } from '../client' - -export const createFolderAction: bp.IntegrationProps['actions']['createFolder'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - return await client.createFolder(props.input) - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const listFoldersAction: bp.IntegrationProps['actions']['listFolders'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - return { folders: await client.listFolders() } - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const deleteFolderAction: bp.IntegrationProps['actions']['deleteFolder'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - await client.deleteFolder(props.input.folderUid) - return {} - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} diff --git a/integrations/grafana/src/actions/notifications.ts b/integrations/grafana/src/actions/notifications.ts deleted file mode 100644 index 2e9574b0f2d..00000000000 --- a/integrations/grafana/src/actions/notifications.ts +++ /dev/null @@ -1,60 +0,0 @@ -import * as sdk from '@botpress/sdk' -import * as bp from '../../.botpress' -import { notificationPolicySchema } from '../../definitions/notification-schemas' -import { GrafanaClient } from '../client' - -export const createNotificationPolicyAction: bp.IntegrationProps['actions']['createNotificationPolicy'] = async ( - props -) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - await client.createNotificationPolicy(notificationPolicySchema.parse(props.input)) - return {} - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const listNotificationPoliciesAction: bp.IntegrationProps['actions']['listNotificationPolicies'] = async ( - props -) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - return { policies: await client.listNotificationPolicies() } - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const editNotificationPolicyAction: bp.IntegrationProps['actions']['editNotificationPolicy'] = async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - await client.editNotificationPolicy(props.input) - return {} - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const deleteNotificationPolicyAction: bp.IntegrationProps['actions']['deleteNotificationPolicy'] = async ( - props -) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - await client.deleteNotificationPolicy(props.input) - return {} - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } -} - -export const editDefaultNotificationPolicyAction: bp.IntegrationProps['actions']['editDefaultNotificationPolicy'] = - async (props) => { - const client = new GrafanaClient(props.ctx.configuration) - try { - await client.editDefaultNotificationPolicy(props.input) - return {} - } catch (error_: unknown) { - throw new sdk.RuntimeError(error_ instanceof Error ? error_.message : String(error_)) - } - } diff --git a/integrations/grafana/src/client.ts b/integrations/grafana/src/client.ts deleted file mode 100644 index 5fb51431979..00000000000 --- a/integrations/grafana/src/client.ts +++ /dev/null @@ -1,626 +0,0 @@ -import { z } from '@botpress/sdk' -import { alertRuleSchema } from '../definitions/actions/create-alert-rule' -import { createFolderSchema } from '../definitions/actions/create-folder' -import { matcherSchema, notificationPolicySchema } from '../definitions/notification-schemas' -import { - grafanaDashboardK8sCreateDashboard, - grafanaDashboardK8sDeleteDashboard, - grafanaDashboardK8sGetDashboard, - grafanaDashboardK8sListDashboard, - grafanaDashboardK8sReplaceDashboard, - grafanaFolderK8sCreateFolder, - grafanaFolderK8sDeleteFolder, - grafanaFolderK8sListFolder, - type GrafanaDashboardK8sComGithubGrafanaGrafanaAppsDashboardPkgApisDashboardV1Dashboard as K8sDashboard, -} from './gen/grafana-k8s-client' -import { createClient as createK8sClient, createConfig as createK8sConfig } from './gen/grafana-k8s-client/client' -import { - getDataSources, - routeDeleteAlertRule, - routeGetAlertRule, - routeGetAlertRules, - routeGetContactpoints, - routeDeleteContactpoints, - routePostContactpoints, - routeGetPolicyTree, - routePutPolicyTree, - routePostAlertRule, - type Route, -} from './gen/grafana-legacy-client' -import { - createClient as createLegacyClient, - createConfig as createLegacyConfig, -} from './gen/grafana-legacy-client/client' - -export type GrafanaConfig = { - grafanaUsername: string - grafanaServiceAccountToken: string -} - -type AlertRuleInput = z.infer -type CreateFolderInput = z.infer -type PolicyMatcher = z.infer -type NotificationPolicyInput = z.infer - -type Datasource = { - type: string - uid: string -} - -type Target = { - refId: string - datasource?: Datasource - expr?: string -} - -type GridPos = { - h?: number - w?: number - x?: number - y?: number -} - -type TextPanel = { - type: 'text' - title: string - description?: string - content?: string - mode?: 'markdown' | 'html' | 'code' - gridPos?: GridPos - id?: number -} - -type TimeSeriesPanel = { - type: 'timeseries' - title: string - description?: string - datasource?: Datasource - gridPos?: GridPos - id?: number - targets?: Target[] - fieldConfig?: any - options?: any -} - -type Panel = TextPanel | TimeSeriesPanel - -type CreateDashboardInput = { - uid: string - title: string - tags?: string[] - timezone?: string - editable?: boolean - graphTooltip?: number - time?: { from: string; to: string } - timepicker?: unknown - templating?: unknown - annotations?: unknown - refresh?: string - schemaVersion?: number - version?: number - panels?: Partial[] - folderUid?: string -} - -function errorMessage(error: unknown): string { - if (error instanceof Error) return error.message - if (typeof error === 'object' && error !== null) return JSON.stringify(error) - return String(error) -} - -function buildK8sBody( - uid: string, - ns: string, - spec: Record, - folderUid?: string, - existingMeta?: K8sDashboard['metadata'] -): K8sDashboard { - return { - apiVersion: 'dashboard.grafana.app/v1', - kind: 'Dashboard', - metadata: { - ...existingMeta, - name: uid, - namespace: ns, - annotations: { - ...existingMeta?.annotations, - ...(folderUid ? { 'grafana.app/folder': folderUid } : {}), - }, - }, - spec, - status: {}, - } -} - -function buildQueryData( - datasourceUid: string, - query: string, - reducer: string, - thresholdType: string, - thresholdValue: number -): Record[] { - return [ - { - refId: 'A', - datasourceUid, - queryType: '', - relativeTimeRange: { from: 600, to: 0 }, - model: { expr: query, legendFormat: '', refId: 'A' }, - }, - { - refId: 'B', - datasourceUid: '__expr__', - model: { type: 'reduce', refId: 'B', expression: 'A', reducer }, - }, - { - refId: 'C', - datasourceUid: '__expr__', - model: { - type: 'threshold', - refId: 'C', - expression: 'B', - conditions: [{ evaluator: { type: thresholdType, params: [thresholdValue] } }], - }, - }, - ] -} - -function toObjectMatchers(matchers: PolicyMatcher[]): [string, string, string][] { - return matchers.map((m) => [m.name, m.operator, m.value]) -} - -export class GrafanaClient { - private readonly _k8s: ReturnType - private readonly _legacy: ReturnType - private _namespace: string | undefined - - public constructor(private readonly _config: GrafanaConfig) { - const baseUrl = `https://${_config.grafanaUsername}.grafana.net` - const headers = { Authorization: `Bearer ${_config.grafanaServiceAccountToken}` } - this._k8s = createK8sClient(createK8sConfig({ baseUrl, headers })) - this._legacy = createLegacyClient(createLegacyConfig({ baseUrl: `${baseUrl}/api`, headers })) - } - - public async namespace(): Promise { - if (this._namespace) return this._namespace - const res = await fetch(`https://${this._config.grafanaUsername}.grafana.net/api/frontend/settings`, { - headers: { Authorization: `Bearer ${this._config.grafanaServiceAccountToken}` }, - }) - if (!res.ok) throw new Error(`Failed to fetch Grafana namespace: ${res.status}`) - const data = (await res.json()) as { namespace?: string } - if (!data.namespace) throw new Error('Grafana did not return a namespace in /api/frontend/settings') - this._namespace = data.namespace - return this._namespace - } - - // --- Dashboards --- - - public async createDashboard(request: CreateDashboardInput): Promise { - const ns = await this.namespace() - const { folderUid, uid, ...rest } = request - const spec = { - uid, - title: rest.title, - tags: rest.tags ?? [], - timezone: rest.timezone ?? 'browser', - editable: rest.editable ?? true, - graphTooltip: rest.graphTooltip ?? 0, - time: rest.time ?? { from: 'now-6h', to: 'now' }, - timepicker: rest.timepicker ?? {}, - templating: rest.templating ?? { list: [] }, - annotations: rest.annotations ?? { list: [] }, - refresh: rest.refresh ?? '5s', - schemaVersion: rest.schemaVersion ?? 41, - version: rest.version ?? 1, - panels: rest.panels ?? [], - } - const { error } = await grafanaDashboardK8sCreateDashboard({ - client: this._k8s, - path: { namespace: ns }, - body: buildK8sBody(uid, ns, spec, folderUid), - }) - if (error) throw new Error(errorMessage(error)) - } - - public async editDashboard(dashboardUid: string, updates: Partial): Promise { - const ns = await this.namespace() - const { data: existing, error: getError } = await grafanaDashboardK8sGetDashboard({ - client: this._k8s, - path: { namespace: ns, name: dashboardUid }, - }) - if (getError || !existing) throw new Error(errorMessage(getError)) - - const { folderUid, ...specUpdates } = updates - const folderUidToUse = folderUid ?? existing.metadata.annotations?.['grafana.app/folder'] - const { error } = await grafanaDashboardK8sReplaceDashboard({ - client: this._k8s, - path: { namespace: ns, name: dashboardUid }, - body: buildK8sBody(dashboardUid, ns, { ...existing.spec, ...specUpdates }, folderUidToUse, existing.metadata), - }) - if (error) throw new Error(errorMessage(error)) - } - - public async editDashboardPanel(dashboardUid: string, panelId: number, panel: Partial): Promise { - const ns = await this.namespace() - const { data: existing, error: getError } = await grafanaDashboardK8sGetDashboard({ - client: this._k8s, - path: { namespace: ns, name: dashboardUid }, - }) - if (getError || !existing) throw new Error(errorMessage(getError)) - - const existingPanels: Partial[] = (existing.spec as any)?.panels ?? [] - const panelIndex = existingPanels.findIndex((p) => p.id === panelId) - if (panelIndex === -1) throw new Error(`Panel with id ${panelId} not found in dashboard "${dashboardUid}"`) - - const updatedPanels = existingPanels.map((p, i) => (i === panelIndex ? { ...p, ...panel, id: panelId } : p)) - const folderUid = existing.metadata.annotations?.['grafana.app/folder'] - const { error } = await grafanaDashboardK8sReplaceDashboard({ - client: this._k8s, - path: { namespace: ns, name: dashboardUid }, - body: buildK8sBody(dashboardUid, ns, { ...existing.spec, panels: updatedPanels }, folderUid, existing.metadata), - }) - if (error) throw new Error(errorMessage(error)) - } - - public async getDashboard(dashboardUid: string): Promise<{ dashboard: unknown; meta: unknown }> { - const ns = await this.namespace() - const { data, error } = await grafanaDashboardK8sGetDashboard({ - client: this._k8s, - path: { namespace: ns, name: dashboardUid }, - }) - if (error || !data) throw new Error(errorMessage(error)) - return { - dashboard: data.spec, - meta: { folderUid: data.metadata.annotations?.['grafana.app/folder'] }, - } - } - - public async listDashboards(): Promise<{ name: string; title: string }[]> { - const ns = await this.namespace() - const { data, error } = await grafanaDashboardK8sListDashboard({ - client: this._k8s, - path: { namespace: ns }, - }) - if (error || !data) throw new Error(errorMessage(error)) - return data.items.map((d) => ({ - name: d.metadata.name ?? '', - title: String((d.spec as any)?.title ?? d.metadata.name ?? ''), - })) - } - - public async deleteDashboard(dashboardUid: string): Promise { - const ns = await this.namespace() - const { error } = await grafanaDashboardK8sDeleteDashboard({ - client: this._k8s, - path: { namespace: ns, name: dashboardUid }, - }) - if (error) throw new Error(errorMessage(error)) - } - - // --- Folders --- - - public async createFolder(input: CreateFolderInput): Promise<{ uid: string }> { - const ns = await this.namespace() - const { data, error } = await grafanaFolderK8sCreateFolder({ - client: this._k8s, - path: { namespace: ns }, - body: { - metadata: { - namespace: ns, - ...(input.uid ? { name: input.uid } : { generateName: 'f-' }), - ...(input.parentUid ? { labels: { 'grafana.app/folder': input.parentUid } } : {}), - }, - spec: { - title: input.title, - ...(input.description ? { description: input.description } : {}), - }, - }, - }) - if (error || !data) throw new Error(errorMessage(error)) - return { uid: data.metadata.name ?? '' } - } - - public async listFolders(): Promise<{ uid?: string; title?: string; parentUid?: string }[]> { - const ns = await this.namespace() - const { data, error } = await grafanaFolderK8sListFolder({ - client: this._k8s, - path: { namespace: ns }, - }) - if (error || !data) throw new Error(errorMessage(error)) - return data.items.map((f) => ({ - uid: f.metadata.name, - title: f.spec.title, - parentUid: f.metadata.labels?.['grafana.app/folder'], - })) - } - - public async deleteFolder(folderUid: string): Promise { - const ns = await this.namespace() - const { error } = await grafanaFolderK8sDeleteFolder({ - client: this._k8s, - path: { namespace: ns, name: folderUid }, - }) - if (error) throw new Error(errorMessage(error)) - } - - // --- Alert Rules --- - - public async createAlertRule(input: AlertRuleInput): Promise<{ uid: string }> { - const { data, error } = await routePostAlertRule({ - client: this._legacy, - body: { - title: input.title, - folderUID: input.folderUID, - ruleGroup: input.ruleGroup, - condition: 'C', - data: buildQueryData( - input.dataArray.datasourceUid, - input.dataArray.query, - input.dataArray.reducer, - input.dataArray.thresholdType, - input.dataArray.thresholdValue - ) as any, - for: input.forDuration, - labels: { ...(input.botpressId ? { botpress_id: input.botpressId } : {}), ...input.labels }, - annotations: - input.dashboardUid && input.panelId - ? { __dashboardUid__: input.dashboardUid, __panelId__: input.panelId } - : undefined, - noDataState: input.noDataState, - execErrState: input.execErrState, - orgID: 1, - isPaused: input.isPaused, - keep_firing_for: input.keep_firing_for, - missingSeriesEvalsToResolve: input.missingSeriesEvalsToResolve, - uid: input.uid, - notification_settings: input.notification_settings, - }, - }) - if (error || !data) throw new Error(errorMessage(error)) - return { uid: data.uid ?? '' } - } - - public async listAlertRules(): Promise< - { uid?: string; title?: string; ruleGroup?: string; folderUID?: string; labels?: Record }[] - > { - const { data, error } = await routeGetAlertRules({ client: this._legacy }) - if (error || !data) throw new Error(errorMessage(error)) - return data.map((r) => ({ - uid: r.uid, - title: r.title, - ruleGroup: r.ruleGroup, - folderUID: r.folderUID, - labels: r.labels, - })) - } - - public async getAlertRule(uid: string): Promise<{ - uid?: string - title?: string - ruleGroup?: string - folderUID?: string - labels?: Record - }> { - const { data, error } = await routeGetAlertRule({ client: this._legacy, path: { UID: uid } }) - if (error || !data) throw new Error(errorMessage(error)) - return { - uid: data.uid, - title: data.title, - ruleGroup: data.ruleGroup, - folderUID: data.folderUID, - labels: data.labels, - } - } - - public async deleteAlertRule(uid: string): Promise { - const { error } = await routeDeleteAlertRule({ client: this._legacy, path: { UID: uid } }) - if (error) throw new Error(errorMessage(error)) - } - - // --- Notification Policies --- - - public async createNotificationPolicy(input: NotificationPolicyInput): Promise { - const { data: tree, error: getError } = await routeGetPolicyTree({ client: this._legacy }) - if (getError || !tree) throw new Error(errorMessage(getError)) - - const { error } = await routePutPolicyTree({ - client: this._legacy, - body: { - ...tree, - routes: [ - ...(tree.routes ?? []), - { - receiver: input.receiver, - continue: input.continue, - group_by: input.group_by, - group_wait: input.group_wait, - group_interval: input.group_interval, - repeat_interval: input.repeat_interval, - mute_time_intervals: input.mute_time_intervals, - active_time_intervals: input.active_time_intervals, - object_matchers: input.matchers ? toObjectMatchers(input.matchers) : undefined, - }, - ], - }, - }) - if (error) throw new Error(errorMessage(error)) - } - - public async listNotificationPolicies(): Promise< - { receiver?: string; matchers?: unknown; object_matchers?: unknown; group_by?: string[]; continue?: boolean }[] - > { - const { data: tree, error } = await routeGetPolicyTree({ client: this._legacy }) - if (error || !tree) throw new Error(errorMessage(error)) - return (tree.routes ?? []).map((r) => ({ - receiver: r.receiver, - matchers: r.matchers, - object_matchers: r.object_matchers, - group_by: r.group_by, - continue: r.continue, - })) - } - - public async editNotificationPolicy(input: { - receiver: string - matchers: PolicyMatcher[] - updates: Partial - }): Promise { - const { data: tree, error: getError } = await routeGetPolicyTree({ client: this._legacy }) - if (getError || !tree) throw new Error(errorMessage(getError)) - - const inputTuples = JSON.stringify(toObjectMatchers(input.matchers)) - const isMatch = (r: Route) => r.receiver === input.receiver && JSON.stringify(r.object_matchers) === inputTuples - - const routes = tree.routes ?? [] - if (!routes.some(isMatch)) { - throw new Error(`No notification policy found for receiver "${input.receiver}" with the given matchers`) - } - - const { error } = await routePutPolicyTree({ - client: this._legacy, - body: { - ...tree, - routes: routes.map((r) => - isMatch(r) - ? { - ...r, - receiver: input.updates.receiver ?? r.receiver, - object_matchers: input.updates.matchers ? toObjectMatchers(input.updates.matchers) : r.object_matchers, - continue: input.updates.continue ?? r.continue, - group_by: input.updates.group_by ?? r.group_by, - group_wait: input.updates.group_wait ?? r.group_wait, - group_interval: input.updates.group_interval ?? r.group_interval, - repeat_interval: input.updates.repeat_interval ?? r.repeat_interval, - mute_time_intervals: input.updates.mute_time_intervals ?? r.mute_time_intervals, - active_time_intervals: input.updates.active_time_intervals ?? r.active_time_intervals, - } - : r - ), - }, - }) - if (error) throw new Error(errorMessage(error)) - } - - public async editDefaultNotificationPolicy(input: Partial>): Promise { - const { data: tree, error: getError } = await routeGetPolicyTree({ client: this._legacy }) - if (getError || !tree) throw new Error(errorMessage(getError)) - - const { error } = await routePutPolicyTree({ - client: this._legacy, - body: { - ...tree, - ...(input.receiver !== undefined && { receiver: input.receiver }), - ...(input.group_by !== undefined && { group_by: input.group_by }), - ...(input.group_wait !== undefined && { group_wait: input.group_wait }), - ...(input.group_interval !== undefined && { group_interval: input.group_interval }), - ...(input.repeat_interval !== undefined && { repeat_interval: input.repeat_interval }), - ...(input.mute_time_intervals !== undefined && { mute_time_intervals: input.mute_time_intervals }), - ...(input.active_time_intervals !== undefined && { active_time_intervals: input.active_time_intervals }), - }, - }) - if (error) throw new Error(errorMessage(error)) - } - - public async deleteNotificationPolicy(input: { receiver: string; matchers: PolicyMatcher[] }): Promise { - const { data: tree, error: getError } = await routeGetPolicyTree({ client: this._legacy }) - if (getError || !tree) throw new Error(errorMessage(getError)) - - const inputTuples = JSON.stringify(toObjectMatchers(input.matchers)) - const isMatch = (r: Route) => r.receiver === input.receiver && JSON.stringify(r.object_matchers) === inputTuples - - const routes = tree.routes ?? [] - if (!routes.some(isMatch)) { - throw new Error(`No notification policy found for receiver "${input.receiver}" with the given matchers`) - } - - const { error } = await routePutPolicyTree({ - client: this._legacy, - body: { ...tree, routes: routes.filter((r) => !isMatch(r)) }, - }) - if (error) throw new Error(errorMessage(error)) - } - - // --- Contact Points --- - - public async listContactPoints(): Promise<{ uid?: string; name?: string; type: string }[]> { - const { data, error } = await routeGetContactpoints({ client: this._legacy }) - if (error || !data) throw new Error(errorMessage(error)) - return data.map((cp) => ({ uid: cp.uid, name: cp.name, type: cp.type })) - } - - public async createContactPoint(input: { webhookUrl: string; secret: string; name?: string }): Promise<{ - uid: string - }> { - const { data, error } = await routePostContactpoints({ - client: this._legacy, - body: { - name: input.name, - type: 'webhook', - settings: { - url: input.webhookUrl, - authorization_scheme: 'Bearer', - authorization_credentials: input.secret, - }, - }, - }) - if (error || !data) throw new Error(errorMessage(error)) - return { uid: data.uid ?? '' } - } - - public async deleteContactPoint(uid: string): Promise { - const { error } = await routeDeleteContactpoints({ client: this._legacy, path: { UID: uid } }) - if (error) throw new Error(errorMessage(error)) - } - - // --- Datasources --- - - public async listDatasources(): Promise<{ uid?: string; name?: string; type?: string; isDefault?: boolean }[]> { - const { data, error } = await getDataSources({ client: this._legacy }) - if (error || !data) throw new Error(errorMessage(error)) - return data.map((ds) => ({ uid: ds.uid, name: ds.name, type: ds.type, isDefault: ds.isDefault })) - } - - private async _prometheusProxy(datasourceUid: string, path: string, params?: Record): Promise { - const url = new URL( - `https://${this._config.grafanaUsername}.grafana.net/api/datasources/proxy/uid/${datasourceUid}/${path}` - ) - if (params) { - for (const [key, value] of Object.entries(params)) { - url.searchParams.set(key, value) - } - } - const response = await fetch(url.toString(), { - headers: { Authorization: `Bearer ${this._config.grafanaServiceAccountToken}` }, - }) - if (!response.ok) throw new Error(`Prometheus proxy error ${response.status}: ${await response.text()}`) - const json = (await response.json()) as { data?: unknown } - return json.data - } - - public async queryMetrics( - datasourceUid: string, - query: string, - start: string, - end: string, - step?: string - ): Promise { - return this._prometheusProxy(datasourceUid, 'api/v1/query_range', { - query, - start, - end, - ...(step ? { step } : {}), - }) - } - - public async listMetricNames(datasourceUid: string): Promise { - return this._prometheusProxy(datasourceUid, 'api/v1/label/__name__/values') - } - - public async listLabelNames(datasourceUid: string): Promise { - return this._prometheusProxy(datasourceUid, 'api/v1/labels') - } - - public async listLabelValues(datasourceUid: string, labelName: string): Promise { - return this._prometheusProxy(datasourceUid, `api/v1/label/${encodeURIComponent(labelName)}/values`) - } -} diff --git a/integrations/grafana/src/handler.ts b/integrations/grafana/src/handler.ts deleted file mode 100644 index 98540c3ebf8..00000000000 --- a/integrations/grafana/src/handler.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { z } from '@botpress/sdk' -import * as bp from '../.botpress' - -export const handler: bp.IntegrationProps['handler'] = async ({ req, client, ctx, logger }) => { - let webhookSecret: string - try { - const { state } = await client.getState({ - type: 'integration', - name: 'webhookConfig', - id: ctx.integrationId, - }) - webhookSecret = state.payload.webhookSecret - } catch (e) { - logger.forBot().error(`Failed to load integration state: ${e instanceof Error ? e.message : String(e)}`) - return { status: 200 } - } - - if (req.headers['authorization'] !== `Bearer ${webhookSecret}`) { - logger.forBot().warn('Rejected webhook request: invalid or missing Authorization header') - return { status: 200 } - } - - logger.forBot().debug('Webhook request authorized') - - if (!req.body) { - logger.forBot().debug('Request is missing a body') - return { status: 200 } - } - - let jsonPayload: unknown - try { - jsonPayload = JSON.parse(req.body) - } catch { - logger.forBot().debug('Invalid JSON Body') - return { status: 200 } - } - - const parseResult = z - .object({ - alerts: z - .array( - z.object({ - labels: z.record(z.string()).optional(), - status: z.string().optional(), - startsAt: z.string().optional(), - }) - ) - .optional(), - }) - .safeParse(jsonPayload) - - if (!parseResult.success) { - logger.forBot().debug('Invalid body schema') - return { status: 200 } - } - - for (const alert of parseResult.data.alerts ?? []) { - const a = alert - await client.createEvent({ - type: 'alertFired', - payload: { - alertName: a.labels?.alertname ?? 'unknown', - status: a.status ?? 'unknown', - ruleUid: a.labels?.__alert_rule_uid__ ?? '', - botpressId: a.labels?.botpress_id, - labels: a.labels, - startsAt: a.startsAt, - }, - }) - } - - return { status: 200 } -} diff --git a/integrations/grafana/src/index.ts b/integrations/grafana/src/index.ts deleted file mode 100644 index d50d0fe367e..00000000000 --- a/integrations/grafana/src/index.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { - createAlertRuleAction, - getAlertRuleAction, - listAlertRulesAction, - deleteAlertRuleAction, -} from './actions/alerts' -import { listContactPointsAction, createContactPointAction, deleteContactPointAction } from './actions/contactPoints' -import { - createDashboardAction, - editDashboardAction, - editDashboardPanelAction, - getDashboardAction, - listDashboardsAction, - deleteDashboardAction, -} from './actions/dashboards' -import { - listDatasourcesAction, - queryMetricsAction, - listMetricNamesAction, - listLabelNamesAction, - listLabelValuesAction, -} from './actions/datasources' -import { createFolderAction, listFoldersAction, deleteFolderAction } from './actions/folders' -import { - createNotificationPolicyAction, - listNotificationPoliciesAction, - editNotificationPolicyAction, - deleteNotificationPolicyAction, - editDefaultNotificationPolicyAction, -} from './actions/notifications' -import { handler } from './handler' -import { register } from './register' -import * as bp from '.botpress' - -export default new bp.Integration({ - register, - unregister: async () => {}, - actions: { - createDashboard: createDashboardAction, - editDashboard: editDashboardAction, - editDashboardPanel: editDashboardPanelAction, - getDashboard: getDashboardAction, - listDashboards: listDashboardsAction, - deleteDashboard: deleteDashboardAction, - createAlertRule: createAlertRuleAction, - getAlertRule: getAlertRuleAction, - listAlertRules: listAlertRulesAction, - deleteAlertRule: deleteAlertRuleAction, - createFolder: createFolderAction, - listFolders: listFoldersAction, - deleteFolder: deleteFolderAction, - createNotificationPolicy: createNotificationPolicyAction, - listNotificationPolicies: listNotificationPoliciesAction, - editNotificationPolicy: editNotificationPolicyAction, - deleteNotificationPolicy: deleteNotificationPolicyAction, - editDefaultNotificationPolicy: editDefaultNotificationPolicyAction, - listDatasources: listDatasourcesAction, - listContactPoints: listContactPointsAction, - createContactPoint: createContactPointAction, - deleteContactPoint: deleteContactPointAction, - queryMetrics: queryMetricsAction, - listMetricNames: listMetricNamesAction, - listLabelNames: listLabelNamesAction, - listLabelValues: listLabelValuesAction, - }, - channels: {}, - handler, -}) diff --git a/integrations/grafana/src/register.ts b/integrations/grafana/src/register.ts deleted file mode 100644 index 7da83673f6e..00000000000 --- a/integrations/grafana/src/register.ts +++ /dev/null @@ -1,31 +0,0 @@ -import * as sdk from '@botpress/sdk' -import * as bp from '../.botpress' -import { GrafanaClient } from './client' - -export const register: bp.IntegrationProps['register'] = async ({ ctx, client, webhookUrl }) => { - const grafana = new GrafanaClient(ctx.configuration) - - try { - await grafana.listFolders() - } catch (error_: unknown) { - const e = error_ instanceof Error ? error_ : new Error(String(error_)) - throw new sdk.RuntimeError(`Could not reach Grafana — check your username and token. ${e.message}`) - } - - let existingState: Awaited> - try { - existingState = await client.getState({ type: 'integration', name: 'webhookConfig', id: ctx.integrationId }) - } catch (e) { - throw new sdk.RuntimeError(`Failed to read integration state: ${e instanceof Error ? e.message : String(e)}`) - } - const webhookSecret = existingState.state.payload.webhookSecret || crypto.randomUUID() - - const k8sNamespace = await grafana.namespace() - - await client.setState({ - type: 'integration', - name: 'webhookConfig', - id: ctx.integrationId, - payload: { webhookUrl, k8sNamespace, webhookSecret }, - }) -} diff --git a/integrations/grafana/tsconfig.json b/integrations/grafana/tsconfig.json deleted file mode 100644 index 6bfa67e1b49..00000000000 --- a/integrations/grafana/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "paths": { "*": ["./*"] }, - "outDir": "dist" - }, - "include": [".botpress/**/*", "definitions/**/*", "src/**/*", "*.ts", "grafana-api/*.ts"] -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8765e802ce0..da2294c4dcd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1244,22 +1244,6 @@ importers: specifier: ^10.26.6 version: 10.26.6 - integrations/grafana: - dependencies: - '@botpress/sdk': - specifier: workspace:* - version: link:../../packages/sdk - devDependencies: - '@botpress/cli': - specifier: workspace:* - version: link:../../packages/cli - '@hey-api/client-fetch': - specifier: ^0.13.1 - version: 0.13.1(@hey-api/openapi-ts@0.97.2(typescript@5.9.3)) - '@hey-api/openapi-ts': - specifier: ^0.97.1 - version: 0.97.2(typescript@5.9.3) - integrations/groq: dependencies: '@botpress/client': @@ -5357,37 +5341,6 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - '@hey-api/client-fetch@0.13.1': - resolution: {integrity: sha512-29jBRYNdxVGlx5oewFgOrkulZckpIpBIRHth3uHFn1PrL2ucMy52FvWOY3U3dVx2go1Z3kUmMi6lr07iOpUqqA==} - deprecated: Starting with v0.73.0, this package is bundled directly inside @hey-api/openapi-ts. - peerDependencies: - '@hey-api/openapi-ts': < 2 - - '@hey-api/codegen-core@0.8.1': - resolution: {integrity: sha512-Iciv2vUCJTW9lWM/ROvyZLblmcbYJHPuXfzb1SzeDVVn4xEXu2ilLU1pq3fn+09FZ/Y0P7VyvRE47UDU6om8xA==} - engines: {node: '>=22.13.0'} - - '@hey-api/json-schema-ref-parser@1.4.2': - resolution: {integrity: sha512-ZhCFSKI2ipZHEbgmtUHdyddvRU3wJ4elgCfYUC7T7hZa4EivSrVflTQf2w+v3TuaYxR1Y2V2kq3otqTttrrK8Q==} - engines: {node: '>=22.13.0'} - - '@hey-api/openapi-ts@0.97.2': - resolution: {integrity: sha512-nA+y0/I5O9loQMeJKumi6BQ40/Y71N0hIMmXZ/I7rh8jEOzYxSxmf5a4TBEI2Ap4RAfZyh7RJzJfVzT98KUYQQ==} - engines: {node: '>=22.13.0'} - hasBin: true - peerDependencies: - typescript: '>=5.5.3 || >=6.0.0 || 6.0.1-rc' - - '@hey-api/shared@0.4.4': - resolution: {integrity: sha512-UZgaQNEdo/OSGLeNXhSv0VQTHQQm5Q2mHOuoYhFPJkNvLVrz7KZtGdKR8O4QPrhyblshxY+caJli08WKM0gREg==} - engines: {node: '>=22.13.0'} - - '@hey-api/spec-types@0.2.0': - resolution: {integrity: sha512-ibQ8Is7evMavzr8GNyJCcTg975d8DpaMUyLmOrQ85UBdy1l6t1KuRAwgChAbesJsIlNV6gjmlXruWyegDX18Fg==} - - '@hey-api/types@0.1.4': - resolution: {integrity: sha512-thWfawrDIP7wSI9ioT13I5soaaqB5vAPIiZmgD8PbeEVKNrkonc0N/Sjj97ezl7oQgusZmaNphGdMKipPO6IBg==} - '@hono/node-server@1.19.12': resolution: {integrity: sha512-txsUW4SQ1iilgE0l9/e9VQWmELXifEFvmdA1j6WFh/aFPj99hIntrSsq/if0UWyGVkmrRPKA1wCeP+UCr1B9Uw==} engines: {node: '>=18.14.1'} @@ -5619,10 +5572,6 @@ packages: resolution: {integrity: sha512-HnvQm31aiTLwJh0k4fB1FweXPfNFtwG8QcjUclAL/O92s+62t5izyFk7S2aTulAVj8fu4XqCmVt2k2DFf2+vSw==} engines: {node: '>=18.x'} - '@lukeed/ms@2.0.2': - resolution: {integrity: sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA==} - engines: {node: '>=8'} - '@mailchimp/mailchimp_marketing@3.0.80': resolution: {integrity: sha512-Cgz0xPb+1DUjmrl5whAsmqfAChBko+Wf4/PLQE4RvwfPlcq2agfHr1QFiXEhZ8e+GQwQ3hZQn9iLGXwIXwxUCg==} engines: {node: '>=10.0.0'} @@ -8068,14 +8017,6 @@ packages: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} - c12@3.3.4: - resolution: {integrity: sha512-cM0ApFQSBXuourJejzwv/AuPRvAxordTyParRVcHjjtXirtkzM0uK2L9TTn9s0cXZbG7E55jCivRQzoxYmRAlA==} - peerDependencies: - magicast: '*' - peerDependenciesMeta: - magicast: - optional: true - cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -8196,10 +8137,6 @@ packages: resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} engines: {node: '>= 14.16.0'} - chokidar@5.0.0: - resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} - engines: {node: '>= 20.19.0'} - ci-info@3.8.0: resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} engines: {node: '>=8'} @@ -8277,10 +8214,6 @@ packages: color-string@1.9.1: resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} - color-support@1.1.3: - resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} - hasBin: true - color@3.2.1: resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==} @@ -8309,10 +8242,6 @@ packages: resolution: {integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==} engines: {node: '>=18'} - commander@14.0.3: - resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==} - engines: {node: '>=20'} - commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} @@ -8330,9 +8259,6 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - confbox@0.2.4: - resolution: {integrity: sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==} - config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} @@ -8567,10 +8493,6 @@ packages: resolution: {integrity: sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==} engines: {node: '>=18'} - default-browser@5.5.0: - resolution: {integrity: sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==} - engines: {node: '>=18'} - defer-to-connect@1.1.3: resolution: {integrity: sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==} @@ -8616,9 +8538,6 @@ packages: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} - destr@2.0.5: - resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==} - destroy@1.2.0: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} @@ -8680,10 +8599,6 @@ packages: resolution: {integrity: sha512-XvPXc8XAQThSjAbY6cQ/9PcBXmFoWuw1sQ3b8HqUCR6ziGXjkTi//kB9SWa2UwqlgdAIuRqAa/9hVljzPehbYg==} engines: {node: '>=12'} - dotenv@17.4.2: - resolution: {integrity: sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==} - engines: {node: '>=12'} - dotenv@8.6.0: resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==} engines: {node: '>=10'} @@ -9084,9 +8999,6 @@ packages: resolution: {integrity: sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==} engines: {node: '>= 18'} - exsolve@1.0.8: - resolution: {integrity: sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA==} - ext@1.7.0: resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==} @@ -9487,9 +9399,6 @@ packages: get-tsconfig@4.10.1: resolution: {integrity: sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==} - get-tsconfig@4.14.0: - resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==} - get-tsconfig@5.0.0-beta.5: resolution: {integrity: sha512-/6gFNr0N04nob252sTQxyFLi3eKFRqIg1I87YcqAMT1i6SQrSF6KujUEQrtrjMV0H/eejTCltLdDSTEMzHbnsQ==} engines: {node: '>=20.20.0'} @@ -9497,10 +9406,6 @@ packages: getpass@0.1.7: resolution: {integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==} - giget@3.2.0: - resolution: {integrity: sha512-GvHTWcykIR/fP8cj8dMpuMMkvaeJfPvYnhq0oW+chSeIr+ldX21ifU2Ms6KBoyKZQZmVaUAAhQ2EZ68KJF8a7A==} - hasBin: true - glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -9980,10 +9885,6 @@ packages: is-hexadecimal@1.0.4: resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} - is-in-ssh@1.0.0: - resolution: {integrity: sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==} - engines: {node: '>=20'} - is-inside-container@1.0.0: resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} engines: {node: '>=14.16'} @@ -10326,10 +10227,6 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true - js-yaml@4.1.1: - resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} - hasBin: true - jsbn@0.1.1: resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==} @@ -11256,9 +11153,6 @@ packages: resolution: {integrity: sha512-hSloK4MK78QGbAuBrtIir0bsxMoRVZE5CkwKSbSRH9lqv2hx9EwhCxtPqEF+BtHqLXkXdfUaGkJMyMBotYno+A==} engines: {node: '>= 14'} - ohash@2.0.11: - resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==} - on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} engines: {node: '>= 0.8'} @@ -11285,10 +11179,6 @@ packages: resolution: {integrity: sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==} engines: {node: '>=18'} - open@11.0.0: - resolution: {integrity: sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw==} - engines: {node: '>=20'} - openai@5.12.1: resolution: {integrity: sha512-26s536j4Fi7P3iUma1S9H33WRrw0Qu8pJ2nYJHffrlKHPU0JK4d0r3NcMgqEcAeTdNLGYNyoFsqN4g4YE9vutg==} hasBin: true @@ -11505,9 +11395,6 @@ packages: pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} - perfect-debounce@2.1.0: - resolution: {integrity: sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==} - performance-now@2.1.0: resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} @@ -11601,9 +11488,6 @@ packages: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} - pkg-types@2.3.1: - resolution: {integrity: sha512-y+ichcgc2LrADuhLNAx8DFjVfgz91pRxfZdI3UDhxHvcVEZsenLO+7XaU5vOp0u/7V/wZ+plyuQxtrDlZJ+yeg==} - pony-cause@1.1.1: resolution: {integrity: sha512-PxkIc/2ZpLiEzQXu5YRDOUgBlfGYBY8156HY5ZcRAwwonMk5W/MrJP2LLkG/hF7GEQzaHo2aS7ho6ZLCOvf+6g==} engines: {node: '>=12.0.0'} @@ -11651,10 +11535,6 @@ packages: postmark@4.0.7: resolution: {integrity: sha512-DjNniUl1XNCGUKhCR98ePd5gv16rlUAVKKaU9TUqnE3hDSqfT9XDulu1idjagQmdyGscqnRtXk/puAEiYMeevg==} - powershell-utils@0.1.0: - resolution: {integrity: sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A==} - engines: {node: '>=20'} - preact-render-to-string@6.5.13: resolution: {integrity: sha512-iGPd+hKPMFKsfpR2vL4kJ6ZPcFIoWZEcBf0Dpm3zOpdVvj77aY8RlLiQji5OMrngEyaxGogeakTb54uS2FvA6w==} peerDependencies: @@ -11804,9 +11684,6 @@ packages: resolution: {integrity: sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==} engines: {node: '>= 0.10'} - rc9@3.0.1: - resolution: {integrity: sha512-gMDyleLWVE+i6Sgtc0QbbY6pEKqYs97NGi6isHQPqYlLemPoO8dxQ3uGi0f4NiP98c+jMW6cG1Kx9dDwfvqARQ==} - rc@1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true @@ -11848,10 +11725,6 @@ packages: resolution: {integrity: sha512-h80JrZu/MHUZCyHu5ciuoI0+WxsCxzxJTILn6Fs8rxSnFPh+UVHYfeIxK1nVGugMqkfC4vJcBOYbkfkwYK0+gw==} engines: {node: '>= 14.18.0'} - readdirp@5.0.0: - resolution: {integrity: sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==} - engines: {node: '>= 20.19.0'} - readline@1.3.0: resolution: {integrity: sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==} @@ -13419,10 +13292,6 @@ packages: resolution: {integrity: sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==} engines: {node: '>=18'} - wsl-utils@0.3.1: - resolution: {integrity: sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg==} - engines: {node: '>=20'} - xml-name-validator@5.0.0: resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} engines: {node: '>=18'} @@ -15608,60 +15477,6 @@ snapshots: dependencies: graphql: 15.8.0 - '@hey-api/client-fetch@0.13.1(@hey-api/openapi-ts@0.97.2(typescript@5.9.3))': - dependencies: - '@hey-api/openapi-ts': 0.97.2(typescript@5.9.3) - - '@hey-api/codegen-core@0.8.1': - dependencies: - '@hey-api/types': 0.1.4 - ansi-colors: 4.1.3 - c12: 3.3.4 - color-support: 1.1.3 - transitivePeerDependencies: - - magicast - - '@hey-api/json-schema-ref-parser@1.4.2': - dependencies: - '@jsdevtools/ono': 7.1.3 - '@types/json-schema': 7.0.15 - js-yaml: 4.1.1 - - '@hey-api/openapi-ts@0.97.2(typescript@5.9.3)': - dependencies: - '@hey-api/codegen-core': 0.8.1 - '@hey-api/json-schema-ref-parser': 1.4.2 - '@hey-api/shared': 0.4.4 - '@hey-api/spec-types': 0.2.0 - '@hey-api/types': 0.1.4 - '@lukeed/ms': 2.0.2 - ansi-colors: 4.1.3 - color-support: 1.1.3 - commander: 14.0.3 - get-tsconfig: 4.14.0 - typescript: 5.9.3 - transitivePeerDependencies: - - magicast - - '@hey-api/shared@0.4.4': - dependencies: - '@hey-api/codegen-core': 0.8.1 - '@hey-api/json-schema-ref-parser': 1.4.2 - '@hey-api/spec-types': 0.2.0 - '@hey-api/types': 0.1.4 - ansi-colors: 4.1.3 - cross-spawn: 7.0.6 - open: 11.0.0 - semver: 7.7.4 - transitivePeerDependencies: - - magicast - - '@hey-api/spec-types@0.2.0': - dependencies: - '@hey-api/types': 0.1.4 - - '@hey-api/types@0.1.4': {} - '@hono/node-server@1.19.12(hono@4.12.11)': dependencies: hono: 4.12.11 @@ -15996,8 +15811,6 @@ snapshots: transitivePeerDependencies: - encoding - '@lukeed/ms@2.0.2': {} - '@mailchimp/mailchimp_marketing@3.0.80': dependencies: dotenv: 8.6.0 @@ -19006,21 +18819,6 @@ snapshots: bytes@3.1.2: {} - c12@3.3.4: - dependencies: - chokidar: 5.0.0 - confbox: 0.2.4 - defu: 6.1.7 - dotenv: 17.4.2 - exsolve: 1.0.8 - giget: 3.2.0 - jiti: 2.7.0 - ohash: 2.0.11 - pathe: 2.0.3 - perfect-debounce: 2.1.0 - pkg-types: 2.3.1 - rc9: 3.0.1 - cac@6.7.14: {} cac@7.0.0: {} @@ -19161,10 +18959,6 @@ snapshots: dependencies: readdirp: 4.1.1 - chokidar@5.0.0: - dependencies: - readdirp: 5.0.0 - ci-info@3.8.0: {} cjs-module-lexer@1.2.2: {} @@ -19233,8 +19027,6 @@ snapshots: color-name: 1.1.4 simple-swizzle: 0.2.2 - color-support@1.1.3: {} - color@3.2.1: dependencies: color-convert: 1.9.3 @@ -19259,8 +19051,6 @@ snapshots: commander@13.1.0: {} - commander@14.0.3: {} - commander@2.20.3: {} commander@4.1.1: {} @@ -19271,8 +19061,6 @@ snapshots: concat-map@0.0.1: {} - confbox@0.2.4: {} - config-chain@1.1.13: dependencies: ini: 1.3.8 @@ -19486,11 +19274,6 @@ snapshots: bundle-name: 4.1.0 default-browser-id: 5.0.0 - default-browser@5.5.0: - dependencies: - bundle-name: 4.1.0 - default-browser-id: 5.0.0 - defer-to-connect@1.1.3: {} define-data-property@1.1.4: @@ -19523,8 +19306,6 @@ snapshots: dequal@2.0.3: {} - destr@2.0.5: {} - destroy@1.2.0: {} detect-newline@3.1.0: {} @@ -19590,8 +19371,6 @@ snapshots: dotenv@16.4.4: {} - dotenv@17.4.2: {} - dotenv@8.6.0: {} dropbox@10.34.0(@types/node-fetch@2.6.12): @@ -20309,8 +20088,6 @@ snapshots: - supports-color optional: true - exsolve@1.0.8: {} - ext@1.7.0: dependencies: type: 2.7.2 @@ -20733,10 +20510,6 @@ snapshots: dependencies: resolve-pkg-maps: 1.0.0 - get-tsconfig@4.14.0: - dependencies: - resolve-pkg-maps: 1.0.0 - get-tsconfig@5.0.0-beta.5: dependencies: resolve-pkg-maps: 1.0.0 @@ -20745,8 +20518,6 @@ snapshots: dependencies: assert-plus: 1.0.0 - giget@3.2.0: {} - glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -21342,8 +21113,6 @@ snapshots: is-hexadecimal@1.0.4: {} - is-in-ssh@1.0.0: {} - is-inside-container@1.0.0: dependencies: is-docker: 3.0.0 @@ -21818,7 +21587,8 @@ snapshots: jiti@2.4.2: {} - jiti@2.7.0: {} + jiti@2.7.0: + optional: true jju@1.4.0: {} @@ -21852,10 +21622,6 @@ snapshots: dependencies: argparse: 2.0.1 - js-yaml@4.1.1: - dependencies: - argparse: 2.0.1 - jsbn@0.1.1: {} jsdoc-type-pratt-parser@4.8.0: {} @@ -23105,8 +22871,6 @@ snapshots: transitivePeerDependencies: - encoding - ohash@2.0.11: {} - on-finished@2.4.1: dependencies: ee-first: 1.1.1 @@ -23138,15 +22902,6 @@ snapshots: is-inside-container: 1.0.0 wsl-utils: 0.1.0 - open@11.0.0: - dependencies: - default-browser: 5.5.0 - define-lazy-prop: 3.0.0 - is-in-ssh: 1.0.0 - is-inside-container: 1.0.0 - powershell-utils: 0.1.0 - wsl-utils: 0.3.1 - openai@5.12.1(ws@8.20.0)(zod@3.25.76): optionalDependencies: ws: 8.20.0 @@ -23370,8 +23125,6 @@ snapshots: pend@1.2.0: {} - perfect-debounce@2.1.0: {} - performance-now@2.1.0: {} pg-cloudflare@1.2.7: @@ -23442,12 +23195,6 @@ snapshots: dependencies: find-up: 4.1.0 - pkg-types@2.3.1: - dependencies: - confbox: 0.2.4 - exsolve: 1.0.8 - pathe: 2.0.3 - pony-cause@1.1.1: {} possible-typed-array-names@1.0.0: {} @@ -23486,8 +23233,6 @@ snapshots: transitivePeerDependencies: - debug - powershell-utils@0.1.0: {} - preact-render-to-string@6.5.13(preact@10.26.6): dependencies: preact: 10.26.6 @@ -23630,11 +23375,6 @@ snapshots: unpipe: 1.0.0 optional: true - rc9@3.0.1: - dependencies: - defu: 6.1.7 - destr: 2.0.5 - rc@1.2.8: dependencies: deep-extend: 0.6.0 @@ -23695,8 +23435,6 @@ snapshots: readdirp@4.1.1: {} - readdirp@5.0.0: {} - readline@1.3.0: {} redis-errors@1.2.0: {} @@ -25520,11 +25258,6 @@ snapshots: dependencies: is-wsl: 3.1.0 - wsl-utils@0.3.1: - dependencies: - is-wsl: 3.1.0 - powershell-utils: 0.1.0 - xml-name-validator@5.0.0: optional: true