Merge pull request #578 from influxdata/api/swagger-alpha-19

Api/swagger alpha 19
pull/579/head^2
Scott Anderson 2019-10-30 17:16:10 -06:00 committed by GitHub
commit 82666eddd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 201 additions and 17 deletions

View File

@ -1640,6 +1640,68 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/delete:
post:
summary: Delete time series data from InfluxDB
requestBody:
description: Predicate delete request
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/DeletePredicateRequest"
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: query
name: org
description: Specifies the organization that owns the bucket.
schema:
type: string
description: All points within batch are written to this organization.
- in: query
name: bucket
description: Specifies the bucket to delete data from.
schema:
type: string
description: Points are only deleted from this bucket.
- in: query
name: orgID
description: Specifies the organization ID that owns the bucket.
schema:
type: string
- in: query
name: bucketID
description: Specifies the bucket ID to delete data from.
schema:
type: string
description: Points are only deleted from this bucket.
responses:
'204':
description: delete has been accepted
'400':
description: invalid request.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'404':
description: the bucket or organization is not found.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
'403':
description: no token was sent or does not have sufficient permissions.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default:
description: internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/ready: /ready:
servers: servers:
- url: / - url: /
@ -3212,7 +3274,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/Bucket" $ref: "#/components/schemas/PostBucketRequest"
responses: responses:
'201': '201':
description: Bucket created description: Bucket created
@ -3975,6 +4037,12 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/ResourceMembers" $ref: "#/components/schemas/ResourceMembers"
'404':
description: Organization not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default: default:
description: Unexpected error description: Unexpected error
content: content:
@ -4067,6 +4135,12 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/ResourceOwners" $ref: "#/components/schemas/ResourceOwners"
'404':
description: Organization not found
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
default: default:
description: Unexpected error description: Unexpected error
content: content:
@ -5126,7 +5200,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/Check" $ref: "#/components/schemas/PostCheck"
responses: responses:
'201': '201':
description: Check created description: Check created
@ -5420,7 +5494,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/NotificationRule" $ref: "#/components/schemas/PostNotificationRule"
responses: responses:
'201': '201':
description: Notification rule created description: Notification rule created
@ -5780,7 +5854,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/NotificationEndpoint" $ref: "#/components/schemas/PostNotificationEndpoint"
responses: responses:
'201': '201':
description: Notification endpoint created description: Notification endpoint created
@ -6160,6 +6234,21 @@ components:
$ref: "#/components/schemas/Identifier" $ref: "#/components/schemas/Identifier"
path: path:
$ref: "#/components/schemas/StringLiteral" $ref: "#/components/schemas/StringLiteral"
DeletePredicateRequest:
description: The delete predicate request
type: object
required: [start, stop]
properties:
start:
description: RFC3339Nano
type: string
stop:
description: RFC3339Nano
type: string
predicate:
description: SQL-like predicate expression
example: tag1="value1" and tag2="value2"
type: string
Node: Node:
oneOf: oneOf:
- $ref: "#/components/schemas/Expression" - $ref: "#/components/schemas/Expression"
@ -6674,6 +6763,34 @@ components:
type: array type: array
items: items:
$ref: "#/components/schemas/Authorization" $ref: "#/components/schemas/Authorization"
PostBucketRequest:
properties:
orgID:
type: string
name:
type: string
description:
type: string
rp:
type: string
retentionRules:
type: array
description: Rules to expire or retain data. No rules means data never expires.
items:
type: object
properties:
type:
type: string
default: expire
enum:
- expire
everySeconds:
type: integer
description: Duration in seconds for how long data will be kept in the database.
example: 86400
minimum: 1
required: [type, everySeconds]
required: [name, retentionRules]
Bucket: Bucket:
properties: properties:
links: links:
@ -7038,6 +7155,16 @@ components:
type: string type: string
format: date-time format: date-time
readOnly: true readOnly: true
lastRunStatus:
readOnly: true
type: string
enum:
- failed
- success
- canceled
lastRunError:
readOnly: true
type: string
createdAt: createdAt:
type: string type: string
format: date-time format: date-time
@ -9261,9 +9388,6 @@ components:
TaskCreateRequest: TaskCreateRequest:
type: object type: object
properties: properties:
type:
description: The type of task, this can be used for filtering tasks on list actions.
type: string
orgID: orgID:
description: The ID of the organization that owns this Task. description: The ID of the organization that owns this Task.
type: string type: string
@ -9319,7 +9443,7 @@ components:
enum: enum:
- active - active
- inactive - inactive
Check: CheckDiscriminator:
oneOf: oneOf:
- $ref: "#/components/schemas/DeadmanCheck" - $ref: "#/components/schemas/DeadmanCheck"
- $ref: "#/components/schemas/ThresholdCheck" - $ref: "#/components/schemas/ThresholdCheck"
@ -9328,6 +9452,28 @@ components:
mapping: mapping:
deadman: "#/components/schemas/DeadmanCheck" deadman: "#/components/schemas/DeadmanCheck"
threshold: "#/components/schemas/ThresholdCheck" threshold: "#/components/schemas/ThresholdCheck"
Check:
allOf:
- $ref: "#/components/schemas/CheckDiscriminator"
- type: object
properties:
labels:
$ref: "#/components/schemas/Labels"
PostCheck:
allOf:
- $ref: "#/components/schemas/CheckDiscriminator"
- type: object
properties:
status:
type: string
enum:
- active
- inactive
labels:
type: array
description: List of label IDs to associate with check
items:
type: string
Checks: Checks:
properties: properties:
checks: checks:
@ -9384,8 +9530,6 @@ components:
statusMessageTemplate: statusMessageTemplate:
description: The template used to generate and write a status message. description: The template used to generate and write a status message.
type: string type: string
labels:
$ref: "#/components/schemas/Labels"
links: links:
type: object type: object
readOnly: true readOnly: true
@ -9518,7 +9662,7 @@ components:
enum: enum:
- active - active
- inactive - inactive
NotificationRule: NotificationRuleDiscriminator:
oneOf: oneOf:
- $ref: "#/components/schemas/SlackNotificationRule" - $ref: "#/components/schemas/SlackNotificationRule"
- $ref: "#/components/schemas/SMTPNotificationRule" - $ref: "#/components/schemas/SMTPNotificationRule"
@ -9531,6 +9675,28 @@ 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"
NotificationRule:
allOf:
- $ref: "#/components/schemas/NotificationRuleDiscriminator"
- type: object
properties:
labels:
$ref: "#/components/schemas/Labels"
PostNotificationRule:
allOf:
- $ref: "#/components/schemas/NotificationRuleDiscriminator"
- type: object
properties:
status:
type: string
enum:
- active
- inactive
labels:
type: array
description: List of label IDs to associate with notification rule
items:
type: string
NotificationRules: NotificationRules:
properties: properties:
notificationRules: notificationRules:
@ -9605,8 +9771,6 @@ components:
minItems: 1 minItems: 1
items: items:
$ref: "#/components/schemas/StatusRule" $ref: "#/components/schemas/StatusRule"
labels:
$ref: "#/components/schemas/Labels"
links: links:
type: object type: object
readOnly: true readOnly: true
@ -9719,7 +9883,7 @@ components:
enum: enum:
- active - active
- inactive - inactive
NotificationEndpoint: NotificationEndpointDiscrimator:
oneOf: oneOf:
- $ref: "#/components/schemas/SlackNotificationEndpoint" - $ref: "#/components/schemas/SlackNotificationEndpoint"
- $ref: "#/components/schemas/PagerDutyNotificationEndpoint" - $ref: "#/components/schemas/PagerDutyNotificationEndpoint"
@ -9730,6 +9894,28 @@ components:
slack: "#/components/schemas/SlackNotificationEndpoint" slack: "#/components/schemas/SlackNotificationEndpoint"
pagerduty: "#/components/schemas/PagerDutyNotificationEndpoint" pagerduty: "#/components/schemas/PagerDutyNotificationEndpoint"
http: "#/components/schemas/HTTPNotificationEndpoint" http: "#/components/schemas/HTTPNotificationEndpoint"
NotificationEndpoint:
allOf:
- $ref: "#/components/schemas/NotificationEndpointDiscrimator"
- type: object
properties:
labels:
$ref: "#/components/schemas/Labels"
PostNotificationEndpoint:
allOf:
- $ref: "#/components/schemas/NotificationEndpointDiscrimator"
- type: object
properties:
status:
type: string
enum:
- active
- inactive
labels:
type: array
description: List of label IDs to associate with check
items:
type: string
NotificationEndpoints: NotificationEndpoints:
properties: properties:
notificationEndpoints: notificationEndpoints:
@ -9766,8 +9952,6 @@ components:
default: active default: active
type: string type: string
enum: ["active", "inactive"] enum: ["active", "inactive"]
labels:
$ref: "#/components/schemas/Labels"
links: links:
type: object type: object
readOnly: true readOnly: true
@ -9808,7 +9992,7 @@ components:
allOf: allOf:
- $ref: "#/components/schemas/NotificationEndpointBase" - $ref: "#/components/schemas/NotificationEndpointBase"
- type: object - type: object
required: [clientURL, routingKey] required: [routingKey]
properties: properties:
clientURL: clientURL:
type: string type: string