-
Notifications
You must be signed in to change notification settings - Fork 10
/
common.yml
14973 lines (14392 loc) · 486 KB
/
common.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
title: Influx Common API
version: 2.0.1
license:
name: MIT
url: 'https://opensource.org/licenses/MIT'
servers:
- url: /api/v2
paths:
/signin:
post:
operationId: PostSignin
summary: Create a user session.
description: |
Authenticates [Basic authentication credentials](#section/Authentication/BasicAuthentication)
for a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user),
and then, if successful, generates a user session.
To authenticate a user, pass the HTTP `Authorization` header with the
`Basic` scheme and the base64-encoded username and password.
For syntax and more information, see [Basic Authentication](#section/Authentication/BasicAuthentication) for
syntax and more information.
If authentication is successful, InfluxDB creates a new session for the user
and then returns the session cookie in the `Set-Cookie` response header.
InfluxDB stores user sessions in memory only.
They expire within ten minutes and during restarts of the InfluxDB instance.
#### User sessions with authorizations
- In InfluxDB Cloud, a user session inherits all the user's permissions for
the organization.
- In InfluxDB OSS, a user session inherits all the user's permissions for all
the organizations that the user belongs to.
#### Related endpoints
- [Signout](#tag/Signout)
tags:
- Security and access endpoints
- Signin
security:
- BasicAuthentication: []
parameters:
- $ref: '#/components/parameters/TraceSpan'
responses:
'204':
description: |
Success.
The user is authenticated.
The `Set-Cookie` response header contains the session cookie.
'401':
description: |
Unauthorized.
This error may be caused by one of the following problems:
- The user doesn't have access.
- The user passed incorrect credentials in the request.
- The credentials are formatted incorrectly in the request.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden. The user account is disabled.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: Unsuccessful authentication.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-codeSamples:
- lang: Shell
label: 'cURL: signin with --user option encoding'
source: |
curl --request POST http://localhost:8086/api/v2/signin \
--user "USERNAME:PASSWORD"
/signout:
post:
operationId: PostSignout
summary: Expire a user session
tags:
- Security and access endpoints
- Signout
description: |
Expires a user session specified by a session cookie.
Use this endpoint to expire a user session that was generated when the user
authenticated with the InfluxDB Developer Console (UI) or the `POST /api/v2/signin` endpoint.
For example, the `POST /api/v2/signout` endpoint represents the third step
in the following three-step process
to authenticate a user, retrieve the `user` resource, and then expire the session:
1. Send a request with the user's [Basic authentication credentials](#section/Authentication/BasicAuthentication)
to the `POST /api/v2/signin` endpoint to create a user session and
generate a session cookie.
2. Send a request to the `GET /api/v2/me` endpoint, passing the stored session cookie
from step 1 to retrieve user information.
3. Send a request to the `POST /api/v2/signout` endpoint, passing the stored session
cookie to expire the session.
_See the complete example in request samples._
InfluxDB stores user sessions in memory only.
If a user doesn't sign out, then the user session automatically expires within ten minutes or
during a restart of the InfluxDB instance.
To learn more about cookies in HTTP requests, see
[Mozilla Developer Network (MDN) Web Docs, HTTP cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies).
#### Related endpoints
- [Signin](#tag/Signin)
parameters:
- $ref: '#/components/parameters/TraceSpan'
responses:
'204':
description: Success. The session is expired.
'401':
description: Unauthorized.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: The session expiry is unsuccessful.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-codeSamples:
- lang: Shell
label: 'cURL: sign in a user, verify the user session, and then end the session'
source: |
# The following example shows how to use cURL and the InfluxDB API
# to do the following:
# 1. Sign in a user with a username and password.
# 2. Check that the user session exists for the user.
# 3. Sign out the user to expire the session.
# 4. Check that the session is no longer active.
# 1. Send a request to `POST /api/v2/signin` to sign in the user.
# In your request, pass the following:
#
# - `--user` option with basic authentication credentials.
# - `-c` option with a file path where cURL will write cookies.
curl --request POST \
-c ./cookie-file.tmp \
"$INFLUX_URL/api/v2/signin" \
--user "${INFLUX_USER_NAME}:${INFLUX_USER_PASSWORD}"
# 2. To check that a user session exists for the user in step 1,
# send a request to `GET /api/v2/me`.
# In your request, pass the `-b` option with the session cookie file path from step 1.
curl --request GET \
-b ./cookie-file.tmp \
"$INFLUX_URL/api/v2/me"
# InfluxDB responds with the `user` resource.
# 3. Send a request to `POST /api/v2/signout` to expire the user session.
# In your request, pass the `-b` option with the session cookie file path from step 1.
curl --request POST \
-b ./cookie-file.tmp \
"$INFLUX_URL/api/v2/signout"
# If the user session is successfully expired, InfluxDB responds with
an HTTP `204` status code.
# 4. To check that the user session is expired, call `GET /api/v2/me` again,
# passing the `-b` option with the cookie file path.
curl --request GET \
-b ./cookie-file.tmp \
"$INFLUX_URL/api/v2/me"
# If the user session is expired, InfluxDB responds with an HTTP `401` status code.
/ping:
get:
operationId: GetPing
summary: Get the status of the instance
description: |
Retrieves the status and InfluxDB version of the instance.
Use this endpoint to monitor uptime for the InfluxDB instance. The response
returns a HTTP `204` status code to inform you the instance is available.
#### InfluxDB Cloud
- Isn't versioned and doesn't return `X-Influxdb-Version` in the headers.
#### Related guides
- [Influx ping](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/ping/)
servers:
- url: ''
tags:
- Ping
- System information endpoints
responses:
'204':
description: |
Success.
Headers contain InfluxDB version information.
headers:
X-Influxdb-Build:
schema:
type: string
description: |
The type of InfluxDB build.
X-Influxdb-Version:
schema:
type: integer
description: |
The version of InfluxDB.
#### InfluxDB Cloud
- Doesn't return version.
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl --request GET "http://localhost:8086/ping"
head:
operationId: HeadPing
summary: Get the status of the instance
description: |
Returns the status and InfluxDB version of the instance.
Use this endpoint to monitor uptime for the InfluxDB instance. The response
returns a HTTP `204` status code to inform you the instance is available.
#### InfluxDB Cloud
- Isn't versioned and doesn't return `X-Influxdb-Version` in the headers.
#### Related guides
- [Influx ping](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/ping/)
servers:
- url: ''
tags:
- Ping
responses:
'204':
description: |
Success.
Headers contain InfluxDB version information.
headers:
X-Influxdb-Build:
schema:
type: string
description: The type of InfluxDB build.
X-Influxdb-Version:
schema:
type: integer
description: |
The version of InfluxDB.
#### InfluxDB Cloud
- Doesn't return version.
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl --request HEAD "http://localhost:8086/ping"
/:
get:
operationId: GetRoutes
summary: List all top level routes
description: |
Retrieves all the top level routes for the InfluxDB API.
#### Limitations
- Only returns top level routes--for example, the response contains
`"tasks":"/api/v2/tasks"`, and doesn't contain resource-specific routes
for tasks (`/api/v2/tasks/TASK_ID/...`).
tags:
- Routes
- System information endpoints
parameters:
- $ref: '#/components/parameters/TraceSpan'
responses:
'200':
description: |
Success.
The response body contains key-value pairs with the resource name and
top-level route.
content:
application/json:
schema:
$ref: '#/components/schemas/Routes'
/dbrps:
get:
operationId: GetDBRPs
tags:
- DBRPs
summary: List database retention policy mappings
description: |
Lists database retention policy (DBRP) mappings.
#### Related guide
- [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/)
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: query
name: orgID
description: |
An organization ID.
Only returns DBRP mappings for the specified organization.
schema:
type: string
- in: query
name: org
description: |
An organization name.
Only returns DBRP mappings for the specified organization.
schema:
type: string
- in: query
name: id
description: |
A DBPR mapping ID.
Only returns the specified DBRP mapping.
schema:
type: string
- in: query
name: bucketID
description: |
A bucket ID.
Only returns DBRP mappings that belong to the specified bucket.
schema:
type: string
- in: query
name: default
description: Specifies filtering on default
schema:
type: boolean
- in: query
name: db
description: |
A database.
Only returns DBRP mappings that belong to the 1.x database.
schema:
type: string
- in: query
name: rp
description: |
A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp).
Specifies the 1.x retention policy to filter on.
schema:
type: string
responses:
'200':
description: Success. The response body contains a list of database retention policy mappings.
content:
application/json:
schema:
$ref: '#/components/schemas/DBRPs'
examples:
successResponse:
value:
content:
- id: 0a3cbb5dd526a000
database: example_database_1
retention_policy: autogen
default: true
orgID: bea7ea952287f70d
bucketID: 4d4d9d5b61dee751
- id: 0a3cbcde20e38000
database: example_database_2
retention_policy: example_retention_policy
default: false
orgID: bea7ea952287f70d
bucketID: 4d4d9d5b61dee751
'400':
description: Bad request. The request has one or more invalid parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
invalidRequest:
description: |
The query parameters contain invalid values.
value:
code: invalid
message: invalid ID
'401':
$ref: '#/components/responses/AuthorizationError'
'500':
$ref: '#/components/responses/InternalServerError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
operationId: PostDBRP
tags:
- DBRPs
summary: Add a database retention policy mapping
description: |
Creates a database retention policy (DBRP) mapping and returns the mapping.
Use this endpoint to add InfluxDB 1.x API compatibility to your
InfluxDB Cloud or InfluxDB OSS 2.x buckets. Your buckets must contain a
DBRP mapping in order to query and write using the InfluxDB 1.x API.
object.
#### Related guide
- [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/)
parameters:
- $ref: '#/components/parameters/TraceSpan'
requestBody:
description: |
The database retention policy mapping to add.
Note that _`retention_policy`_ is a required parameter in the request body.
The value of _`retention_policy`_ can be any arbitrary `string` name or
value, with the default value commonly set as `autogen`.
The value of _`retention_policy`_ isn't a [retention_policy](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-policy-rp)
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DBRPCreate'
responses:
'201':
description: Created. The response body contains the database retention policy mapping.
content:
application/json:
schema:
$ref: '#/components/schemas/DBRP'
examples:
successResponse:
value:
id: 0a3cbb5dd526a000
database: example_database
retention_policy: autogen
default: true
orgID: bea7ea952287f70d
bucketID: 4d4d9d5b61dee751
'400':
description: Bad request. The mapping in the request has one or more invalid IDs.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
invalidRequest:
description: |
The query parameters contain invalid values.
value:
code: invalid
message: invalid ID
'401':
$ref: '#/components/responses/AuthorizationError'
'404':
$ref: '#/components/responses/ResourceNotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-codeSamples:
- lang: Shell
label: 'cURL: create a database retention policy mapping'
source: |
curl --request POST \
"http://localhost:8086/api/v2/dbrp/" \
--header 'Content-type: application/json' \
--header "Authorization: Token INFLUXDB_TOKEN" \
--data-binary @- << EOF
{ \
"bucketID": "INFLUXDB_BUCKET_ID", \
"orgID": "INFLUXDB_ORG_ID", \
"database": "database_name", \
"default": true, \
"retention_policy": "example_retention_policy_name" \
}
EOF
'/dbrps/{dbrpID}':
get:
operationId: GetDBRPsID
tags:
- DBRPs
summary: Retrieve a database retention policy mapping
description: |
Retrieves the specified retention policy (DBRP) mapping.
#### Related guide
- [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/)
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: query
name: orgID
description: |
An organization ID.
Specifies the organization that owns the DBRP mapping.
schema:
type: string
- in: query
name: org
description: |
An organization name.
Specifies the organization that owns the DBRP mapping.
schema:
type: string
- in: path
name: dbrpID
schema:
type: string
required: true
description: |
A DBRP mapping ID.
Specifies the DBRP mapping.
responses:
'200':
description: Success. The response body contains the DBRP mapping.
content:
application/json:
schema:
$ref: '#/components/schemas/DBRPGet'
examples:
successResponse:
value:
content:
id: 0a3cbb5dd526a000
database: example_database_1
retention_policy: autogen
default: true
orgID: bea7ea952287f70d
bucketID: 4d4d9d5b61dee751
'400':
description: Bad Request. Query parameters contain invalid values.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
invalidRequest:
description: |
The query parameters contain invalid values.
value:
code: invalid
message: invalid ID
'401':
$ref: '#/components/responses/AuthorizationError'
'404':
$ref: '#/components/responses/ResourceNotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
patch:
operationId: PatchDBRPID
tags:
- DBRPs
summary: Update a database retention policy mapping
requestBody:
description: |
Updates the database retention policy (DBRP) mapping and returns the mapping.
Use this endpoint to modify the _retention policy_ (`retention_policy` property) of a DBRP mapping.
#### Related guide
- [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/)
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DBRPUpdate'
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: query
name: orgID
description: |
An organization ID.
Specifies the organization that owns the DBRP mapping.
schema:
type: string
- in: query
name: org
description: |
An organization name.
Specifies the organization that owns the DBRP mapping.
schema:
type: string
- in: path
name: dbrpID
schema:
type: string
required: true
description: |
A DBRP mapping ID.
Specifies the DBRP mapping.
responses:
'200':
description: An updated mapping
content:
application/json:
schema:
$ref: '#/components/schemas/DBRPGet'
examples:
successResponse:
value:
content:
id: 0a3cbb5dd526a000
database: example_database
retention_policy: example_retention_policy
default: false
orgID: bea7ea952287f70d
bucketID: 4d4d9d5b61dee751
'400':
description: Bad Request. Query parameters contain invalid values.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
invalidRequest:
description: |
The query parameters contain invalid values.
value:
code: invalid
message: invalid ID
'401':
$ref: '#/components/responses/AuthorizationError'
'404':
$ref: '#/components/responses/ResourceNotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-codeSamples:
- lang: Shell
label: 'cURL: Update a DBRP mapping'
source: |
curl --request PATCH \
"http://localhost:8086/api/v2/dbrp/DBRP_ID" \
--header 'Content-type: application/json' \
--header "Authorization: Token INFLUX_API_TOKEN" \
--data-binary @- << EOF
{
"default": true,
"retention_policy": "example_retention_policy_name"
}
EOF
delete:
operationId: DeleteDBRPID
tags:
- DBRPs
summary: Delete a database retention policy
description: |
Deletes the specified database retention policy (DBRP) mapping.
#### Related guide
- [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/)
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: query
name: orgID
description: |
An organization ID.
Specifies the organization that owns the DBRP mapping.
schema:
type: string
- in: query
name: org
description: |
An organization name.
Specifies the organization that owns the DBRP mapping.
schema:
type: string
- in: path
name: dbrpID
schema:
type: string
required: true
description: |
A DBRP mapping ID.
Only returns the specified DBRP mapping.
responses:
'204':
description: Success. The delete is accepted.
'400':
description: Bad Request. Query parameters contain invalid values.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
invalidRequest:
description: |
The query parameters contain invalid values.
value:
code: invalid
message: invalid ID
'401':
$ref: '#/components/responses/AuthorizationError'
'404':
$ref: '#/components/responses/ResourceNotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/telegraf/plugins:
get:
operationId: GetTelegrafPlugins
tags:
- Telegraf Plugins
summary: List all Telegraf plugins
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: query
name: type
description: The type of plugin desired.
schema:
type: string
responses:
'200':
description: A list of Telegraf plugins.
content:
application/json:
schema:
$ref: '#/components/schemas/TelegrafPlugins'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/telegrafs:
get:
operationId: GetTelegrafs
tags:
- Telegrafs
summary: List all Telegraf configurations
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: query
name: orgID
description: The organization ID the Telegraf config belongs to.
schema:
type: string
responses:
'200':
description: A list of Telegraf configurations
content:
application/json:
schema:
$ref: '#/components/schemas/Telegrafs'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
operationId: PostTelegrafs
tags:
- Telegrafs
summary: Create a Telegraf configuration
parameters:
- $ref: '#/components/parameters/TraceSpan'
requestBody:
description: Telegraf configuration to create
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TelegrafPluginRequest'
responses:
'201':
description: Telegraf configuration created
content:
application/json:
schema:
$ref: '#/components/schemas/Telegraf'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'/telegrafs/{telegrafID}':
get:
operationId: GetTelegrafsID
tags:
- Telegrafs
summary: Retrieve a Telegraf configuration
parameters:
- $ref: '#/components/parameters/TraceSpan'
- 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/toml
enum:
- application/toml
- application/json
- application/octet-stream
responses:
'200':
description: Telegraf configuration details
content:
application/toml:
example: |-
[agent]
interval = "10s"
schema:
type: string
application/json:
schema:
$ref: '#/components/schemas/Telegraf'
application/octet-stream:
example: |-
[agent]
interval = "10s"
schema:
type: string
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
operationId: PutTelegrafsID
tags:
- Telegrafs
summary: Update a Telegraf configuration
parameters:
- $ref: '#/components/parameters/TraceSpan'
- 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: '#/components/schemas/TelegrafPluginRequest'
responses:
'200':
description: An updated Telegraf configurations
content:
application/json:
schema:
$ref: '#/components/schemas/Telegraf'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
operationId: DeleteTelegrafsID
tags:
- Telegrafs
summary: Delete a Telegraf configuration
parameters:
- $ref: '#/components/parameters/TraceSpan'
- 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: '#/components/schemas/Error'
'/telegrafs/{telegrafID}/labels':
get:
operationId: GetTelegrafsIDLabels
tags:
- Telegrafs
summary: List all labels for a Telegraf config
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: telegrafID
schema:
type: string
required: true
description: The Telegraf config ID.
responses:
'200':
description: A list of all labels for a Telegraf config
content:
application/json:
schema:
$ref: '#/components/schemas/LabelsResponse'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
operationId: PostTelegrafsIDLabels
tags:
- Telegrafs
summary: Add a label to a Telegraf config
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: telegrafID
schema:
type: string
required: true
description: The Telegraf config ID.
requestBody:
description: Label to add
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LabelMapping'
responses:
'201':
description: The label added to the Telegraf config
content:
application/json:
schema:
$ref: '#/components/schemas/LabelResponse'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'/telegrafs/{telegrafID}/labels/{labelID}':
delete:
operationId: DeleteTelegrafsIDLabelsID
tags:
- Telegrafs
summary: Delete a label from a Telegraf config
parameters:
- $ref: '#/components/parameters/TraceSpan'
- in: path
name: telegrafID
schema:
type: string
required: true
description: The Telegraf config ID.
- in: path
name: labelID
schema:
type: string