-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathadmin-api.yaml
6042 lines (6025 loc) · 205 KB
/
admin-api.yaml
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.1
info:
title: Redpanda Admin API
version: 1.0.0
description: |
Use the Admin API to administer and manage Redpanda.
---
servers:
- url: http://localhost:9644
paths:
# /config:
# get:
# tags:
# - Cluster
# summary: Get cluster configurations
# description: |
# Get the cluster configuration properties of a cluster.
# For supported properties, see [/cluster_config/schema](#operation/get_cluster_config_schema).
# operationId: get_config
# responses:
# 200:
# description: Cluster configuration response
# content:
# application/json:
# schema:
# type: array
# items:
# $ref: '#/components/schemas/cluster_config_properties'
/v1/node_config:
get:
tags:
- Clusters
summary: Get brokers' configurations
description: |
List the configuration properties of all brokers (nodes) in the cluster.
For the broker configuration properties of the latest Redpanda version, see [Broker Configuration Properties](https://docs.redpanda.com/docs/reference/broker-properties/).
operationId: get_node_config
responses:
200:
description: Brokers' configurations response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/node_config_properties'
/v1/loggers:
get:
tags:
- Logging
summary: Get loggers
description: List of all registered loggers. Each logger has its own configurable `log_level` that dictates how verbose logs are within their corresponding subsystems.
operationId: get_loggers
responses:
200:
description: Loggers response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/logger'
/v1/config/log_level/{name}:
put:
tags:
- Logging
summary: Set log level
description: Set the log level for a logger.
operationId: set_log_level
parameters:
- name: name
in: path
description: Name of logger.
required: true
schema:
type: string
- name: level
in: query
description: Log level to set.
required: true
schema:
type: string
enum:
- error
- warn
- info
- debug
- trace
- name: expires
in: query
description: |
Duration, in seconds, that the logger is set to the specified log level, after which the level reverts to its previous value.
* **Default value**: 600 (10 minutes)
* **Valid values**: `0` (infinite duration) or greater
schema:
type: number
responses:
200:
description: Log level set successfully
content: {}
/v1/cluster_config:
get:
tags:
- Clusters
summary: Get cluster configuration
description: |
List the configuration properties of a cluster.
For supported cluster properties, see [/cluster_config/schema](#operation/get_cluster_config_schema).
operationId: get_cluster_config
parameters:
- name: include_defaults
in: query
description: If false, only properties which have been changed from the default
are included.
schema:
type: string
responses:
200:
description: Cluster configuration response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/cluster_config_properties'
put:
tags:
- Clusters
summary: Update cluster configuration
description: Modify cluster configuration properties of a cluster.
operationId: patch_cluster_config
parameters:
- name: force
in: query
description: If nonzero, skip validation of properties, and permit setting
unknown properties
schema:
type: string
- name: dry_run
in: query
description: If nonzero, do not apply any changes (but still do validation
and return 400 on errors)
schema:
type: string
responses:
200:
description: Success
content: {}
/v1/cluster_config/schema:
get:
tags:
- Clusters
summary: Get cluster configuration schema
description: Get the schema describing all cluster configuration properties.
operationId: get_cluster_config_schema
responses:
200:
description: Cluster configuration schema response
content:
application/json:
schema:
type: object
/v1/cluster_config/status:
get:
tags:
- Clusters
summary: Get cluster configuration status
description: Get the configuration status of all brokers in a cluster.
operationId: get_cluster_config_status
responses:
200:
description: Cluster configuration status response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/cluster_config_status'
/v1/raft/{group_id}/transfer_leadership:
post:
tags:
- Partitions
summary: Transfer Raft group leadership
description: Transfer leadership of the Raft group (`{group_id}`) to the node
with `target` ID.
operationId: raft_transfer_leadership
parameters:
- name: group_id
in: path
required: true
schema:
type: integer
- name: target
in: query
schema:
type: integer
responses:
200:
description: Raft leadership transfer success
content: {}
/v1/security/roles:
get:
parameters:
- description: Return only roles whose names match this substring
in: query
name: filter
required: false
schema:
type: string
- description: Return only roles which are assigned to this user
in: query
name: principal
required: false
schema:
type: string
- description: Applies to `principal` parameter. Ignored if `principal` is not set
in: query
name: principal_type
required: false
schema:
enum:
- User
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/roles_list'
description: OK
tags:
- Roles
operationId: list_roles
summary: List roles
post:
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/role_definition'
description: Created
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/rbac_error_body'
description: Bad Request
'409':
content:
application/json:
schema:
$ref: '#/components/schemas/rbac_error_body'
description: Conflict
tags:
- Roles
operationId: create_role
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/role_definition'
required: true
summary: Create a role
'/v1/security/roles/{role}':
delete:
parameters:
- in: path
name: role
required: true
schema:
type: string
responses:
'204':
description: Role successfully deleted
content: {}
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/rbac_error_body'
description: Not Found
tags:
- Roles
operationId: delete_role
summary: Remove a role by name
get:
parameters:
- in: path
name: role
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/role'
description: OK
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/rbac_error_body'
description: Not Found
tags:
- Roles
operationId: get_role
summary: Get the specified role
'/v1/security/roles/{role}/members':
get:
parameters:
- in: path
name: role
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/role_members_list'
description: OK
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/rbac_error_body'
description: Not Found
tags:
- Roles
operationId: list_role_members
summary: List members assigned a given role
post:
parameters:
- in: path
name: role
required: true
schema:
type: string
- description: 'Creates a role with name {role} if not found'
in: query
name: create
required: false
schema:
type: boolean
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/role_member_update_response'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/rbac_error_body'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/rbac_error_body'
description: Not found
tags:
- Roles
operationId: update_role_members
requestBody:
content:
application/json:
schema:
properties:
add:
items:
$ref: '#/components/schemas/role_member'
type: array
remove:
items:
$ref: '#/components/schemas/role_member'
type: array
type: object
summary: Update role membership
/v1/security/users:
get:
tags:
- Users
summary: List users
description: List users.
operationId: list_users
parameters:
- name: include_ephemeral
in: query
required: false
schema:
type: boolean
responses:
200:
description: List users response
content:
application/json:
schema:
type: array
items:
type: string
post:
tags:
- Users
summary: Create user
description: Create a user.
operationId: create_user
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/security_create_user'
responses:
200:
description: User successfully created
content: {}
/v1/security/users/{user}:
put:
tags:
- Users
summary: Update user
description: Update a user.
operationId: update_user
parameters:
- name: user
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/scram_credential'
responses:
200:
description: User successfully updated
content: {}
delete:
tags:
- Users
summary: Delete user
description: Delete a user.
operationId: delete_user
parameters:
- name: user
in: path
required: true
schema:
type: string
responses:
200:
description: User successfully deleted
content: {}
/v1/security/users/roles:
get:
parameters:
- description: Return only roles whose names match this substring
in: query
name: filter
required: false
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/roles_list'
description: OK
'401':
description: Unauthorized
tags:
- Users
operationId: list_user_roles
summary: List role assignments for a user
/v1/security/oidc/whoami:
get:
tags:
- Authentication
summary: Verify identity of current user and resolve to a principal
description: Obtain the principal and details of the JWT passed in the bearer token.
operationId: oidc_whoami
responses:
200:
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/oidc_whoami_response'
401:
description: Unauthorized
content: {}
/v1/security/oidc/keys/cache_invalidate:
post:
tags:
- Authentication
summary: Reload the keys from the identity provider
description: Flush the JWK cache and force reload keys.
operationId: oidc_keys_cache_invalidate
responses:
200:
description: Keys reload successful
content: {}
500:
description: Keys reload failed
content:
application/json:
schema:
$ref: '#/components/schemas/oidc_keys_cache_invalidate_error_response'
/v1/security/oidc/revoke:
post:
tags:
- Authentication
summary: Reload the keys from the identity provider and disconnect clients
description: Explicitly revoke client tokens by flushing caches and disconnecting clients to ensure revoked tokens are not used.
operationId: oidc_revoke
responses:
200:
description: Key reload successful
content: {}
500:
description: Key reload failed
content:
application/json:
schema:
$ref: '#/components/schemas/oidc_keys_cache_invalidate_error_response'
/v1/status/ready:
get:
tags:
- Clusters
summary: Get cluster ready status
description: Check the health of the Redpanda cluster.
operationId: ready
responses:
200:
description: Cluster ready status response
content:
application/json:
schema:
$ref: '#/components/schemas/cluster_ready_status'
/v1/features:
get:
tags:
- Licenses and Features
summary: List available features
description: List the available Redpanda features. Available features are based
on the loaded Redpanda license and activated features configuration.
operationId: get_features
responses:
200:
description: Features response
content:
application/json:
schema:
$ref: '#/components/schemas/features_response'
/v1/features/enterprise:
get:
summary: Get license and feature status
operationId: get_enterprise_license_status
tags:
- Licenses and Features
responses:
'200':
description: The status of the Enterprise Edition license and details about Enterprise features that are in-use in the cluster.
content:
application/json:
schema:
$ref: '#/components/schemas/enterprise_response'
description: >
This endpoint reports the current status of the [Enterprise Edition license](https://docs.redpanda.com/docs/get-started/licenses/) and lists all Enterprise features currently in use.
Use this endpoint to monitor license compliance and detect if any Enterprise features are active without a valid license.
/v1/features/license:
get:
tags:
- Licenses and Features
summary: Get license details
description: Get details about the currently loaded Enterprise Edition license.
operationId: get_license
responses:
200:
description: License response
content:
application/json:
schema:
$ref: '#/components/schemas/license_response'
put:
tags:
- Licenses and Features
summary: Upload license
description: Upload a new license for Redpanda.
operationId: put_license
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/license_contents'
responses:
200:
description: Upload license success
content: {}
/v1/features/{feature_name}:
put:
tags:
- Licenses and Features
summary: Activate feature
description: Activate or deactivate a feature.
operationId: put_feature
parameters:
- name: feature_name
in: path
required: true
schema:
type: string
responses:
200:
description: Activate feature success
content: {}
/v1/brokers:
get:
tags:
- Brokers
summary: Get all brokers
description: Get information about all brokers in the cluster.
operationId: get_brokers
responses:
200:
description: Brokers response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/broker'
/v1/brokers/{id}:
get:
tags:
- Brokers
summary: Get a broker
description: Get information about one broker in the cluster.
operationId: get_broker
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
200:
description: Broker response
content:
application/json:
schema:
$ref: '#/components/schemas/broker'
/v1/brokers/{id}/cancel_partition_moves:
post:
tags:
- Brokers
summary: Cancel partition movement
description: Cancel movement of all partition replicas to or from the specified broker.
operationId: cancel_partition_moves
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
200:
description: Cancel partition moves success
content: {}
/v1/brokers/{id}/decommission:
get:
tags:
- Brokers
summary: Get broker decommission status
description: Get the status on the decommissioning of the broker with the specified
`id`.
operationId: get_decommission
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
200:
description: Broker decommission status
content:
application/json:
schema:
$ref: '#/components/schemas/decommission_status'
put:
tags:
- Brokers
summary: Decommission broker
description: Decommission the specified broker.
operationId: decommission
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
200:
description: Decommission broker success
content: {}
/v1/brokers/{id}/maintenance:
put:
tags:
- Brokers
summary: Enter broker maintenance mode
description: Request the specified broker to enter maintenance mode.
operationId: start_broker_maintenance
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
200:
description: Enter broker maintenance mode success
content: {}
delete:
tags:
- Brokers
summary: Exit broker maintenance mode
description: Request the specified broker to exit maintenance mode.
operationId: stop_broker_maintenance
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
200:
description: Exit broker maintenance mode success
content: {}
/v1/brokers/{id}/recommission:
put:
tags:
- Brokers
summary: Recommission broker
description: Recommission the specified broker.
operationId: recommission
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
200:
description: Recommission broker success
content: {}
/v1/broker/pre_restart_probe:
get:
tags:
- Brokers
summary: Check broker pre-restart
description: Check if it is safe to restart this broker.
operationId: pre_restart_probe
parameters:
- name: limit
in: query
required: false
schema:
type: integer
description: "Limit the number of partitions listed for each risk type (default: 128)."
responses:
200:
description: Pre-restart check result. Returns risks associated with restarting the broker, and partitions affected, if any.
content:
application/json:
schema:
$ref: '#/components/schemas/pre_restart_check_result'
/v1/broker/post_restart_probe:
get:
tags:
- Brokers
summary: Check broker post-restart
description: Check if the broker has recovered after a restart.
operationId: post_restart_probe
responses:
200:
description: Post-restart check result
content:
application/json:
schema:
$ref: '#/components/schemas/post_restart_check_result'
/v1/cluster_view:
get:
tags:
- Clusters
summary: Get cluster view
description: Get a summary view of a cluster and its brokers.
operationId: get_cluster_view
responses:
200:
description: Cluster view response
content:
application/json:
schema:
$ref: '#/components/schemas/cluster_view'
/v1/maintenance:
get:
tags:
- Brokers
summary: Get maintenance status
description: Get status of maintenance.
operationId: get_local_maintenance
responses:
200:
description: Maintenance status response
content:
application/json:
schema:
$ref: '#/components/schemas/maintenance_status'
put:
tags:
- Brokers
summary: Start maintenance
description: Start local maintenance.
operationId: start_local_maintenance
responses:
200:
description: Start maintenance success
content: {}
delete:
tags:
- Brokers
summary: Stop maintenance
description: Stop local maintenance.
operationId: stop_local_maintenance
responses:
200:
description: Stop maintenance success
content: {}
/v1/topics/mountable:
get:
operationId: list_mountable_topics
tags:
- Mount and unmount topics
summary: List mountable topics
description: List mountable topics available in object storage.
responses:
200:
description: List of mountable topics
content:
application/json:
schema:
$ref: "#/components/schemas/list_mountable_topics_response"
/v1/topics/mount:
post:
operationId: mount_topics
tags:
- Mount and unmount topics
summary: Mount a topic to a cluster
description: Mount a topic in object storage to a cluster according to the specified configuration.
requestBody:
description: Mount topic configuration
content:
application/json:
schema:
$ref: '#/components/schemas/mount_configuration'
required: true
responses:
200:
description: Underlying migration information
content:
application/json:
schema:
$ref: '#/components/schemas/migration_info'
/v1/topics/unmount:
post:
operationId: unmount_topics
tags:
- Mount and unmount topics
summary: Unmount topics from a cluster
description: Unmount provided list of topics from a cluster to object storage.
requestBody:
description: List of topics to unmount
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/namespaced_topic'
required: true
responses:
200:
description: Underlying migration information
content:
application/json:
schema:
$ref: '#/components/schemas/migration_info'
/v1/migrations:
get:
summary: List all available migrations
operationId: list_migrations
responses:
200:
description: OK
content:
application/json:
schema:
type: array
items:
oneOf:
- $ref: "#/components/schemas/outbound_migration_state"
- $ref: "#/components/schemas/inbound_migration_state"
tags:
- Mount and unmount topics
put:
summary: Create migration
operationId: add_migration
tags:
- Mount and unmount topics
requestBody:
description: Migration configuration
required: true
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/inbound_migration"
- $ref: "#/components/schemas/outbound_migration"
discriminator:
propertyName: migration_type
mapping:
inbound: "#/components/schemas/inbound_migration"
outbound: "#/components/schemas/outbound_migration"
responses:
200:
description: OK
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/inbound_migration"
- $ref: "#/components/schemas/outbound_migration"
/v1/migrations/{id}:
get:
summary: Get migration state
operationId: get_migration
tags:
- Mount and unmount topics
parameters:
- name: id
description: Mount or unmount operation ("migration") ID
in: path
required: true
schema:
type: integer
format: int32
responses:
200:
description: OK
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/inbound_migration"
- $ref: "#/components/schemas/outbound_migration"
post:
summary: Execute migration action
operationId: execute_migration_action
tags:
- Mount and unmount topics
parameters:
- name: id
description: Mount or unmount operation ("migration") ID
in: path
required: true
schema:
type: integer
format: int32
- name: action