update swagger for RC

pull/1572/head
Kelly 2020-09-30 12:43:20 -07:00
parent eb700250a1
commit 93947b0f87
1 changed files with 230 additions and 49 deletions

View File

@ -1283,47 +1283,6 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/Error" $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": "/scrapers/{scraperTargetID}/members":
get: get:
operationId: GetScrapersIDMembers operationId: GetScrapersIDMembers
@ -2433,6 +2392,9 @@ paths:
summary: Get all dashboards summary: Get all dashboards
parameters: parameters:
- $ref: "#/components/parameters/TraceSpan" - $ref: "#/components/parameters/TraceSpan"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Descending"
- in: query - in: query
name: owner name: owner
description: The owner ID. description: The owner ID.
@ -3504,6 +3466,7 @@ paths:
- $ref: "#/components/parameters/TraceSpan" - $ref: "#/components/parameters/TraceSpan"
- $ref: "#/components/parameters/Offset" - $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/Limit" - $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/After"
- in: query - in: query
name: org name: org
description: The organization name. description: The organization name.
@ -3940,6 +3903,9 @@ paths:
summary: List all organizations summary: List all organizations
parameters: parameters:
- $ref: "#/components/parameters/TraceSpan" - $ref: "#/components/parameters/TraceSpan"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Descending"
- in: query - in: query
name: org name: org
schema: schema:
@ -4338,6 +4304,36 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/Error" $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: /stacks:
get: get:
operationId: ListStacks operationId: ListStacks
@ -4483,7 +4479,7 @@ paths:
type: string type: string
templateMetaName: templateMetaName:
type: string type: string
required: ["kind","resourceID"] required: ["kind", "resourceID"]
responses: responses:
"200": "200":
description: Influx stack updated description: Influx stack updated
@ -4606,7 +4602,9 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/TemplateExport" oneOf:
- $ref: "#/components/schemas/TemplateExportByID"
- $ref: "#/components/schemas/TemplateExportByName"
responses: responses:
"200": "200":
description: InfluxDB template created description: InfluxDB template created
@ -6520,6 +6518,15 @@ components:
required: false required: false
schema: schema:
type: string 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: schemas:
LanguageRequest: LanguageRequest:
description: Flux query to be analyzed. description: Flux query to be analyzed.
@ -7017,15 +7024,15 @@ components:
maxLength: 1 maxLength: 1
minLength: 1 minLength: 1
annotations: 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 type: array
uniqueItems: true
items: items:
type: string type: string
enum: enum:
- "group" - "group"
- "datatype" - "datatype"
- "default" - "default"
uniqueItems: true
commentPrefix: commentPrefix:
description: Character prefixed to comment strings description: Character prefixed to comment strings
type: string type: string
@ -7121,7 +7128,7 @@ components:
description: ID of org that authorization is scoped to. description: ID of org that authorization is scoped to.
permissions: permissions:
type: array type: array
minLength: 1 minItems: 1
description: List of permissions for an auth. An auth must have at least one Permission. description: List of permissions for an auth. An auth must have at least one Permission.
items: items:
$ref: "#/components/schemas/Permission" $ref: "#/components/schemas/Permission"
@ -7470,7 +7477,7 @@ components:
- Task - Task
- Telegraf - Telegraf
- Variable - Variable
TemplateExport: TemplateExportByID:
type: object type: object
properties: properties:
stackID: stackID:
@ -7502,7 +7509,39 @@ components:
$ref: "#/components/schemas/TemplateKind" $ref: "#/components/schemas/TemplateKind"
name: name:
type: string 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] 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: Template:
type: array type: array
items: items:
@ -8951,9 +8990,73 @@ components:
enum: [overlaid, stacked] enum: [overlaid, stacked]
geom: geom:
$ref: "#/components/schemas/XYGeom" $ref: "#/components/schemas/XYGeom"
legendOpacity:
type: number
format: float
legendOrientationThreshold:
type: integer
XYGeom: XYGeom:
type: string type: string
enum: [line, step, stacked, bar, monotoneX] 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: LinePlusSingleStatProperties:
type: object type: object
required: required:
@ -9014,6 +9117,11 @@ components:
type: string type: string
decimalPlaces: decimalPlaces:
$ref: "#/components/schemas/DecimalPlaces" $ref: "#/components/schemas/DecimalPlaces"
legendOpacity:
type: number
format: float
legendOrientationThreshold:
type: integer
MosaicViewProperties: MosaicViewProperties:
type: object type: object
required: required:
@ -9089,6 +9197,11 @@ components:
type: string type: string
ySuffix: ySuffix:
type: string type: string
legendOpacity:
type: number
format: float
legendOrientationThreshold:
type: integer
ScatterViewProperties: ScatterViewProperties:
type: object type: object
required: required:
@ -9167,6 +9280,11 @@ components:
type: string type: string
ySuffix: ySuffix:
type: string type: string
legendOpacity:
type: number
format: float
legendOrientationThreshold:
type: integer
HeatmapViewProperties: HeatmapViewProperties:
type: object type: object
required: required:
@ -9238,6 +9356,11 @@ components:
type: string type: string
binSize: binSize:
type: number type: number
legendOpacity:
type: number
format: float
legendOrientationThreshold:
type: integer
SingleStatViewProperties: SingleStatViewProperties:
type: object type: object
required: required:
@ -9286,6 +9409,11 @@ components:
$ref: "#/components/schemas/Legend" $ref: "#/components/schemas/Legend"
decimalPlaces: decimalPlaces:
$ref: "#/components/schemas/DecimalPlaces" $ref: "#/components/schemas/DecimalPlaces"
legendOpacity:
type: number
format: float
legendOrientationThreshold:
type: integer
HistogramViewProperties: HistogramViewProperties:
type: object type: object
required: required:
@ -9340,6 +9468,11 @@ components:
enum: [overlaid, stacked] enum: [overlaid, stacked]
binCount: binCount:
type: integer type: integer
legendOpacity:
type: number
format: float
legendOrientationThreshold:
type: integer
GaugeViewProperties: GaugeViewProperties:
type: object type: object
required: required:
@ -9502,6 +9635,11 @@ components:
type: array type: array
items: items:
$ref: "#/components/schemas/DashboardColor" $ref: "#/components/schemas/DashboardColor"
legendOpacity:
type: number
format: float
legendOrientationThreshold:
type: integer
Axes: Axes:
description: The viewport for a View's visualizations description: The viewport for a View's visualizations
type: object type: object
@ -9672,6 +9810,7 @@ components:
- $ref: "#/components/schemas/ScatterViewProperties" - $ref: "#/components/schemas/ScatterViewProperties"
- $ref: "#/components/schemas/HeatmapViewProperties" - $ref: "#/components/schemas/HeatmapViewProperties"
- $ref: "#/components/schemas/MosaicViewProperties" - $ref: "#/components/schemas/MosaicViewProperties"
- $ref: "#/components/schemas/BandViewProperties"
View: View:
required: required:
- name - name
@ -10794,7 +10933,7 @@ components:
example: { "color": "ffb3b3", "description": "this is a description" } example: { "color": "ffb3b3", "description": "this is a description" }
LabelCreateRequest: LabelCreateRequest:
type: object type: object
required: [orgID] required: [orgID, name]
properties: properties:
orgID: orgID:
type: string type: string
@ -11169,6 +11308,7 @@ components:
- $ref: "#/components/schemas/SMTPNotificationRule" - $ref: "#/components/schemas/SMTPNotificationRule"
- $ref: "#/components/schemas/PagerDutyNotificationRule" - $ref: "#/components/schemas/PagerDutyNotificationRule"
- $ref: "#/components/schemas/HTTPNotificationRule" - $ref: "#/components/schemas/HTTPNotificationRule"
- $ref: "#/components/schemas/TelegramNotificationRule"
discriminator: discriminator:
propertyName: type propertyName: type
mapping: mapping:
@ -11176,6 +11316,7 @@ components:
smtp: "#/components/schemas/SMTPNotificationRule" smtp: "#/components/schemas/SMTPNotificationRule"
pagerduty: "#/components/schemas/PagerDutyNotificationRule" pagerduty: "#/components/schemas/PagerDutyNotificationRule"
http: "#/components/schemas/HTTPNotificationRule" http: "#/components/schemas/HTTPNotificationRule"
telegram: "#/components/schemas/TelegramNotificationRule"
NotificationRule: NotificationRule:
allOf: allOf:
- $ref: "#/components/schemas/NotificationRuleDiscriminator" - $ref: "#/components/schemas/NotificationRuleDiscriminator"
@ -11377,6 +11518,31 @@ components:
enum: [pagerduty] enum: [pagerduty]
messageTemplate: messageTemplate:
type: string 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: NotificationEndpointUpdate:
type: object type: object
@ -11395,12 +11561,14 @@ components:
- $ref: "#/components/schemas/SlackNotificationEndpoint" - $ref: "#/components/schemas/SlackNotificationEndpoint"
- $ref: "#/components/schemas/PagerDutyNotificationEndpoint" - $ref: "#/components/schemas/PagerDutyNotificationEndpoint"
- $ref: "#/components/schemas/HTTPNotificationEndpoint" - $ref: "#/components/schemas/HTTPNotificationEndpoint"
- $ref: "#/components/schemas/TelegramNotificationEndpoint"
discriminator: discriminator:
propertyName: type propertyName: type
mapping: mapping:
slack: "#/components/schemas/SlackNotificationEndpoint" slack: "#/components/schemas/SlackNotificationEndpoint"
pagerduty: "#/components/schemas/PagerDutyNotificationEndpoint" pagerduty: "#/components/schemas/PagerDutyNotificationEndpoint"
http: "#/components/schemas/HTTPNotificationEndpoint" http: "#/components/schemas/HTTPNotificationEndpoint"
telegram: "#/components/schemas/TelegramNotificationEndpoint"
NotificationEndpoint: NotificationEndpoint:
allOf: allOf:
- $ref: "#/components/schemas/NotificationEndpointDiscrimator" - $ref: "#/components/schemas/NotificationEndpointDiscrimator"
@ -11519,9 +11687,22 @@ components:
description: Customized headers. description: Customized headers.
additionalProperties: additionalProperties:
type: string 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: NotificationEndpointType:
type: string type: string
enum: ["slack", "pagerduty", "http"] enum: ["slack", "pagerduty", "http", "telegram"]
DBRP: DBRP:
required: required:
- orgID - orgID