feat: reimplement influx telegrafs with new APIs (#120)
* feat: reimplement `influx telegrafs` with new APIs * chore: restructure structs for later modification * refactor: bump openapi & regenerate clients * refactor: better error output and descriptions Co-authored-by: Dan Moran <dmoran@influxdata.com>
This commit is contained in:
@ -61,10 +61,14 @@ paths:
|
||||
$ref: "./openapi/src/oss/paths/restore_kv.yml"
|
||||
/restore/sql:
|
||||
$ref: "./openapi/src/oss/paths/restore_sql.yml"
|
||||
/restore/bucket-metadata/{bucketID}:
|
||||
$ref: "./openapi/src/oss/paths/restore_bucket-metadata_bucketID.yml"
|
||||
/restore/bucket-metadata:
|
||||
$ref: "./openapi/src/oss/paths/restore_bucket-metadata.yml"
|
||||
/restore/shards/{shardID}:
|
||||
$ref: "./openapi/src/oss/paths/restore_shards_shardID.yml"
|
||||
"/telegrafs":
|
||||
$ref: "./openapi/src/common/paths/telegrafs.yml"
|
||||
"/telegrafs/{telegrafID}":
|
||||
$ref: "./overrides/paths/telegrafs_telegrafID.yml"
|
||||
components:
|
||||
parameters:
|
||||
TraceSpan:
|
||||
@ -225,7 +229,15 @@ components:
|
||||
$ref: "./openapi/src/oss/schemas/SubscriptionManifests.yml"
|
||||
SubscriptionManifest:
|
||||
$ref: "./openapi/src/oss/schemas/SubscriptionManifest.yml"
|
||||
RestoredBucketMappings:
|
||||
$ref: "./openapi/src/oss/schemas/RestoredBucketMappings.yml"
|
||||
BucketShardMappings:
|
||||
$ref: "./openapi/src/oss/schemas/BucketShardMappings.yml"
|
||||
BucketShardMapping:
|
||||
$ref: "./openapi/src/oss/schemas/BucketShardMapping.yml"
|
||||
Telegrafs:
|
||||
$ref: "./openapi/src/common/schemas/Telegrafs.yml"
|
||||
TelegrafRequest:
|
||||
$ref: "./openapi/src/common/schemas/TelegrafRequest.yml"
|
||||
Telegraf:
|
||||
$ref: "./openapi/src/common/schemas/Telegraf.yml"
|
||||
|
||||
Submodule api/contract/openapi updated: 3d27d5c5b8...b837e212d5
89
api/contract/overrides/paths/telegrafs_telegrafID.yml
Normal file
89
api/contract/overrides/paths/telegrafs_telegrafID.yml
Normal file
@ -0,0 +1,89 @@
|
||||
get:
|
||||
operationId: GetTelegrafsID
|
||||
tags:
|
||||
- Telegrafs
|
||||
summary: Retrieve a Telegraf configuration
|
||||
parameters:
|
||||
- $ref: "../../openapi/src/common/parameters/TraceSpan.yml"
|
||||
- in: path
|
||||
name: telegrafID
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: The Telegraf configuration ID.
|
||||
- in: header
|
||||
name: Accept
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
default: application/json
|
||||
enum:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Telegraf configuration details
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "../../openapi/src/common/schemas/Telegraf.yml"
|
||||
default:
|
||||
description: Unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "../../openapi/src/common/schemas/Error.yml"
|
||||
put:
|
||||
operationId: PutTelegrafsID
|
||||
tags:
|
||||
- Telegrafs
|
||||
summary: Update a Telegraf configuration
|
||||
parameters:
|
||||
- $ref: "../../openapi/src/common/parameters/TraceSpan.yml"
|
||||
- in: path
|
||||
name: telegrafID
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: The Telegraf config ID.
|
||||
requestBody:
|
||||
description: Telegraf configuration update to apply
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "../../openapi/src/common/schemas/TelegrafRequest.yml"
|
||||
responses:
|
||||
"200":
|
||||
description: An updated Telegraf configurations
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "../../openapi/src/common/schemas/Telegraf.yml"
|
||||
default:
|
||||
description: Unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "../../openapi/src/common/schemas/Error.yml"
|
||||
delete:
|
||||
operationId: DeleteTelegrafsID
|
||||
tags:
|
||||
- Telegrafs
|
||||
summary: Delete a Telegraf configuration
|
||||
parameters:
|
||||
- $ref: "../../openapi/src/common/parameters/TraceSpan.yml"
|
||||
- in: path
|
||||
name: telegrafID
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: The Telegraf configuration ID.
|
||||
responses:
|
||||
"204":
|
||||
description: Delete has been accepted
|
||||
default:
|
||||
description: Unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "../../openapi/src/common/schemas/Error.yml"
|
||||
Reference in New Issue
Block a user