diff --git a/api-docs/v2.0/swagger.yml b/api-docs/v2.0/swagger.yml index 926b2e4a9..4212ce71e 100644 --- a/api-docs/v2.0/swagger.yml +++ b/api-docs/v2.0/swagger.yml @@ -1283,47 +1283,6 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - patch: - operationId: PatchScrapersIDLabelsID - tags: - - ScraperTargets - summary: Update a label on a scraper target - parameters: - - $ref: "#/components/parameters/TraceSpan" - - in: path - name: scraperTargetID - schema: - type: string - required: true - description: The scraper target ID. - - in: path - name: labelID - schema: - type: string - required: true - description: The label ID. - requestBody: - description: Label update to apply - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/Label" - responses: - "200": - description: Updated successfully - "404": - description: Scraper target not found - content: - application/json: - schema: - $ref: "#/components/schemas/Error" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" "/scrapers/{scraperTargetID}/members": get: operationId: GetScrapersIDMembers @@ -2433,6 +2392,9 @@ paths: summary: Get all dashboards parameters: - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Descending" - in: query name: owner description: The owner ID. @@ -3504,6 +3466,7 @@ paths: - $ref: "#/components/parameters/TraceSpan" - $ref: "#/components/parameters/Offset" - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/After" - in: query name: org description: The organization name. @@ -3940,6 +3903,9 @@ paths: summary: List all organizations parameters: - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" + - $ref: "#/components/parameters/Descending" - in: query name: org schema: @@ -4338,6 +4304,36 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" + "/orgs/{orgID}/owners/{userID}": + delete: + operationId: DeleteOrgsIDOwnersID + tags: + - Users + - Organizations + summary: Remove an owner from an organization + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: path + name: userID + schema: + type: string + required: true + description: The ID of the owner to remove. + - in: path + name: orgID + schema: + type: string + required: true + description: The organization ID. + responses: + "204": + description: Owner removed + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /stacks: get: operationId: ListStacks @@ -4483,7 +4479,7 @@ paths: type: string templateMetaName: type: string - required: ["kind","resourceID"] + required: ["kind", "resourceID"] responses: "200": description: Influx stack updated @@ -4606,7 +4602,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/TemplateExport" + oneOf: + - $ref: "#/components/schemas/TemplateExportByID" + - $ref: "#/components/schemas/TemplateExportByName" responses: "200": description: InfluxDB template created @@ -6520,6 +6518,15 @@ components: required: false schema: type: string + After: + in: query + name: after + required: false + schema: + type: string + description: > + The last resource ID from which to seek from (but not including). + This is to be used instead of `offset`. schemas: LanguageRequest: description: Flux query to be analyzed. @@ -7017,15 +7024,15 @@ components: maxLength: 1 minLength: 1 annotations: - description: Https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns + description: https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns type: array + uniqueItems: true items: type: string enum: - "group" - "datatype" - "default" - uniqueItems: true commentPrefix: description: Character prefixed to comment strings type: string @@ -7121,7 +7128,7 @@ components: description: ID of org that authorization is scoped to. permissions: type: array - minLength: 1 + minItems: 1 description: List of permissions for an auth. An auth must have at least one Permission. items: $ref: "#/components/schemas/Permission" @@ -7470,7 +7477,7 @@ components: - Task - Telegraf - Variable - TemplateExport: + TemplateExportByID: type: object properties: stackID: @@ -7502,7 +7509,39 @@ components: $ref: "#/components/schemas/TemplateKind" name: type: string + description: "if defined with id, name is used for resource exported by id. if defined independently, resources strictly matching name are exported" required: [id, kind] + TemplateExportByName: + type: object + properties: + stackID: + type: string + orgIDs: + type: array + items: + type: object + properties: + orgID: + type: string + resourceFilters: + type: object + properties: + byLabel: + type: array + items: + type: string + byResourceKind: + type: array + items: + $ref: "#/components/schemas/TemplateKind" + resources: + type: object + properties: + kind: + $ref: "#/components/schemas/TemplateKind" + name: + type: string + required: [name, kind] Template: type: array items: @@ -8951,9 +8990,73 @@ components: enum: [overlaid, stacked] geom: $ref: "#/components/schemas/XYGeom" + legendOpacity: + type: number + format: float + legendOrientationThreshold: + type: integer XYGeom: type: string enum: [line, step, stacked, bar, monotoneX] + BandViewProperties: + type: object + required: + - type + - geom + - queries + - shape + - axes + - colors + - legend + - note + - showNoteWhenEmpty + properties: + timeFormat: + type: string + type: + type: string + enum: [band] + queries: + type: array + items: + $ref: "#/components/schemas/DashboardQuery" + colors: + description: Colors define color encoding of data into a visualization + type: array + items: + $ref: "#/components/schemas/DashboardColor" + shape: + type: string + enum: ["chronograf-v2"] + note: + type: string + showNoteWhenEmpty: + description: If true, will display note when empty + type: boolean + axes: + $ref: "#/components/schemas/Axes" + legend: + $ref: "#/components/schemas/Legend" + xColumn: + type: string + yColumn: + type: string + upperColumn: + type: string + mainColumn: + type: string + lowerColumn: + type: string + hoverDimension: + type: string + enum: [auto, x, y, xy] + geom: + $ref: "#/components/schemas/XYGeom" + legendOpacity: + type: number + format: float + legendOrientationThreshold: + type: integer LinePlusSingleStatProperties: type: object required: @@ -9014,6 +9117,11 @@ components: type: string decimalPlaces: $ref: "#/components/schemas/DecimalPlaces" + legendOpacity: + type: number + format: float + legendOrientationThreshold: + type: integer MosaicViewProperties: type: object required: @@ -9089,6 +9197,11 @@ components: type: string ySuffix: type: string + legendOpacity: + type: number + format: float + legendOrientationThreshold: + type: integer ScatterViewProperties: type: object required: @@ -9167,6 +9280,11 @@ components: type: string ySuffix: type: string + legendOpacity: + type: number + format: float + legendOrientationThreshold: + type: integer HeatmapViewProperties: type: object required: @@ -9238,6 +9356,11 @@ components: type: string binSize: type: number + legendOpacity: + type: number + format: float + legendOrientationThreshold: + type: integer SingleStatViewProperties: type: object required: @@ -9286,6 +9409,11 @@ components: $ref: "#/components/schemas/Legend" decimalPlaces: $ref: "#/components/schemas/DecimalPlaces" + legendOpacity: + type: number + format: float + legendOrientationThreshold: + type: integer HistogramViewProperties: type: object required: @@ -9340,6 +9468,11 @@ components: enum: [overlaid, stacked] binCount: type: integer + legendOpacity: + type: number + format: float + legendOrientationThreshold: + type: integer GaugeViewProperties: type: object required: @@ -9502,6 +9635,11 @@ components: type: array items: $ref: "#/components/schemas/DashboardColor" + legendOpacity: + type: number + format: float + legendOrientationThreshold: + type: integer Axes: description: The viewport for a View's visualizations type: object @@ -9672,6 +9810,7 @@ components: - $ref: "#/components/schemas/ScatterViewProperties" - $ref: "#/components/schemas/HeatmapViewProperties" - $ref: "#/components/schemas/MosaicViewProperties" + - $ref: "#/components/schemas/BandViewProperties" View: required: - name @@ -10794,7 +10933,7 @@ components: example: { "color": "ffb3b3", "description": "this is a description" } LabelCreateRequest: type: object - required: [orgID] + required: [orgID, name] properties: orgID: type: string @@ -11169,6 +11308,7 @@ components: - $ref: "#/components/schemas/SMTPNotificationRule" - $ref: "#/components/schemas/PagerDutyNotificationRule" - $ref: "#/components/schemas/HTTPNotificationRule" + - $ref: "#/components/schemas/TelegramNotificationRule" discriminator: propertyName: type mapping: @@ -11176,6 +11316,7 @@ components: smtp: "#/components/schemas/SMTPNotificationRule" pagerduty: "#/components/schemas/PagerDutyNotificationRule" http: "#/components/schemas/HTTPNotificationRule" + telegram: "#/components/schemas/TelegramNotificationRule" NotificationRule: allOf: - $ref: "#/components/schemas/NotificationRuleDiscriminator" @@ -11377,6 +11518,31 @@ components: enum: [pagerduty] messageTemplate: type: string + TelegramNotificationRule: + allOf: + - $ref: "#/components/schemas/NotificationRuleBase" + - $ref: "#/components/schemas/TelegramNotificationRuleBase" + TelegramNotificationRuleBase: + type: object + required: [type, messageTemplate, channel] + properties: + type: + description: The discriminator between other types of notification rules is "telegram". + type: string + enum: [telegram] + messageTemplate: + description: The message template as a flux interpolated string. + type: string + parseMode: + description: Parse mode of the message text per https://core.telegram.org/bots/api#formatting-options . Defaults to "MarkdownV2" . + type: string + enum: + - MarkdownV2 + - HTML + - Markdown + disableWebPagePreview: + description: Disables preview of web links in the sent messages when "true". Defaults to "false" . + type: boolean NotificationEndpointUpdate: type: object @@ -11395,12 +11561,14 @@ components: - $ref: "#/components/schemas/SlackNotificationEndpoint" - $ref: "#/components/schemas/PagerDutyNotificationEndpoint" - $ref: "#/components/schemas/HTTPNotificationEndpoint" + - $ref: "#/components/schemas/TelegramNotificationEndpoint" discriminator: propertyName: type mapping: slack: "#/components/schemas/SlackNotificationEndpoint" pagerduty: "#/components/schemas/PagerDutyNotificationEndpoint" http: "#/components/schemas/HTTPNotificationEndpoint" + telegram: "#/components/schemas/TelegramNotificationEndpoint" NotificationEndpoint: allOf: - $ref: "#/components/schemas/NotificationEndpointDiscrimator" @@ -11519,9 +11687,22 @@ components: description: Customized headers. additionalProperties: type: string + TelegramNotificationEndpoint: + type: object + allOf: + - $ref: "#/components/schemas/NotificationEndpointBase" + - type: object + required: [token, channel] + properties: + token: + description: Specifies the Telegram bot token. See https://core.telegram.org/bots#creating-a-new-bot . + type: string + channel: + description: ID of the telegram channel, a chat_id in https://core.telegram.org/bots/api#sendmessage . + type: string NotificationEndpointType: type: string - enum: ["slack", "pagerduty", "http"] + enum: ["slack", "pagerduty", "http", "telegram"] DBRP: required: - orgID