Skip to content

Commit e466681

Browse files
chore(openapi): update kafka-mgmt/v1 OpenAPI document (#202)
Co-authored-by: app-services-ci <app-services-ci@users.noreply.github.com>
1 parent dedc8bf commit e466681

File tree

1 file changed

+86
-26
lines changed

1 file changed

+86
-26
lines changed

.openapi/kas-fleet-manager.yaml

Lines changed: 86 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ paths:
2525
$ref: '#/components/schemas/VersionMetadata'
2626
description: Version metadata
2727
summary: Returns the version metadata
28-
28+
2929
/api/kafkas_mgmt/v1/errors/{id}:
3030
get:
3131
operationId: getErrorById
@@ -38,9 +38,9 @@ paths:
3838
description: Get error by Id
3939
summary: Returns the error by id
4040
tags:
41-
- errors
41+
- errors
4242
parameters:
43-
- $ref: "#/components/parameters/id"
43+
- $ref: "#/components/parameters/id"
4444

4545
/api/kafkas_mgmt/v1/errors:
4646
get:
@@ -55,7 +55,7 @@ paths:
5555
summary: Returns the list of possible API errors
5656
tags:
5757
- errors
58-
58+
5959
/api/kafkas_mgmt/v1/status:
6060
get:
6161
operationId: getServiceStatus
@@ -77,7 +77,7 @@ paths:
7777
$ref: '#/components/examples/500Example'
7878
summary: Returns the status of resources, such as whether maximum service capacity has been reached
7979
security:
80-
- Bearer: []
80+
- Bearer: [ ]
8181
/api/kafkas_mgmt/v1/kafkas/{id}:
8282
get:
8383
operationId: getKafkaById
@@ -130,7 +130,7 @@ paths:
130130
$ref: '#/components/examples/500Example'
131131
description: Unexpected error occurred
132132
security:
133-
- Bearer: []
133+
- Bearer: [ ]
134134
summary: Returns a Kafka request by ID
135135
delete:
136136
operationId: deleteKafkaById
@@ -197,11 +197,11 @@ paths:
197197
description: Unexpected error occurred
198198
summary: Deletes a Kafka request by ID
199199
security:
200-
- Bearer: []
200+
- Bearer: [ ]
201201
patch:
202202
summary: Update a Kafka instance by id
203203
security:
204-
- Bearer: []
204+
- Bearer: [ ]
205205
operationId: updateKafkaById
206206
requestBody:
207207
description: Update owner of kafka
@@ -343,13 +343,13 @@ paths:
343343
$ref: '#/components/examples/500Example'
344344
description: An unexpected error occurred while creating the Kafka request
345345
security:
346-
- Bearer: []
346+
- Bearer: [ ]
347347
summary: Creates a Kafka request
348348
get:
349349
summary: Returns a list of Kafka requests
350350
operationId: getKafkas
351351
security:
352-
- Bearer: []
352+
- Bearer: [ ]
353353
responses:
354354
"200":
355355
description: A list of Kafka requests
@@ -403,7 +403,7 @@ paths:
403403
summary: Returns the list of supported cloud providers
404404
operationId: getCloudProviders
405405
security:
406-
- Bearer: []
406+
- Bearer: [ ]
407407
responses:
408408
'200':
409409
description: Returned list of supported cloud providers
@@ -437,7 +437,7 @@ paths:
437437
summary: Returns the list of supported regions of the supported cloud provider
438438
operationId: getCloudProviderRegions
439439
security:
440-
- Bearer: []
440+
- Bearer: [ ]
441441
responses:
442442
'200':
443443
description: Returned list of supported cloud provider regions
@@ -504,7 +504,7 @@ paths:
504504
$ref: '#/components/examples/500Example'
505505
description: Unexpected error occurred
506506
security:
507-
- Bearer: []
507+
- Bearer: [ ]
508508
tags:
509509
- security
510510
operationId: getServiceAccounts
@@ -558,7 +558,7 @@ paths:
558558
$ref: '#/components/examples/500Example'
559559
description: Unexpected error occurred
560560
security:
561-
- Bearer: []
561+
- Bearer: [ ]
562562
operationId: createServiceAccount
563563
tags:
564564
- security
@@ -578,7 +578,7 @@ paths:
578578
$ref: '#/components/examples/ServiceAccountByIdExample'
579579
description: Returns a service account by ID
580580
security:
581-
- Bearer: []
581+
- Bearer: [ ]
582582
operationId: getServiceAccountById
583583
tags:
584584
- security
@@ -616,13 +616,13 @@ paths:
616616
'500':
617617
content:
618618
application/json:
619-
schema: {}
619+
schema: { }
620620
examples:
621621
500Example:
622622
$ref: '#/components/examples/500Example'
623623
description: Unexpected error occurred
624624
security:
625-
- Bearer: []
625+
- Bearer: [ ]
626626
operationId: deleteServiceAccountById
627627
tags:
628628
- security
@@ -662,13 +662,13 @@ paths:
662662
'500':
663663
content:
664664
application/json:
665-
schema: {}
665+
schema: { }
666666
examples:
667667
500Example:
668668
$ref: '#/components/examples/500Example'
669669
description: Unexpected error occurred
670670
security:
671-
- Bearer: []
671+
- Bearer: [ ]
672672
operationId: resetServiceAccountCreds
673673
tags:
674674
- security
@@ -681,7 +681,7 @@ paths:
681681
summary: Returns metrics with timeseries range query by Kafka ID
682682
operationId: getMetricsByRangeQuery
683683
security:
684-
- Bearer: []
684+
- Bearer: [ ]
685685
responses:
686686
'200':
687687
description: Returned JSON array of Prometheus metrics objects from observatorium
@@ -717,7 +717,7 @@ paths:
717717
summary: Returns metrics with instant query by Kafka ID
718718
operationId: getMetricsByInstantQuery
719719
security:
720-
- Bearer: []
720+
- Bearer: [ ]
721721
responses:
722722
'200':
723723
description: Returned JSON array of Prometheus metrics objects from observatorium
@@ -746,7 +746,57 @@ paths:
746746
parameters:
747747
- $ref: "#/components/parameters/id"
748748
- $ref: "#/components/parameters/filters"
749-
749+
/api/kafkas_mgmt/v1/kafkas/{id}/metrics/federate:
750+
get:
751+
summary: Returns all metrics in scrapeable format for a given kafka id
752+
operationId: federateMetrics
753+
security:
754+
- Bearer: [ ]
755+
responses:
756+
'200':
757+
description: Returned Kafka metrics in a Prometheus text format
758+
content:
759+
text/plain:
760+
schema:
761+
type: string
762+
'400':
763+
description: Bad request
764+
content:
765+
application/json:
766+
schema:
767+
$ref: '#/components/schemas/Error'
768+
examples:
769+
MissingParameterExample:
770+
$ref: '#/components/examples/400MissingParameterExample'
771+
'401':
772+
description: Auth token is invalid
773+
content:
774+
application/json:
775+
schema:
776+
$ref: '#/components/schemas/Error'
777+
examples:
778+
401Example:
779+
$ref: '#/components/examples/401Example'
780+
'404':
781+
description: Kafka id not found
782+
content:
783+
application/json:
784+
schema:
785+
$ref: '#/components/schemas/Error'
786+
examples:
787+
404Example:
788+
$ref: '#/components/examples/404Example'
789+
'500':
790+
description: Unexpected error occurred
791+
content:
792+
application/json:
793+
schema:
794+
$ref: '#/components/schemas/Error'
795+
examples:
796+
500Example:
797+
$ref: '#/components/examples/500Example'
798+
parameters:
799+
- $ref: "#/components/parameters/id"
750800

751801
components:
752802
schemas:
@@ -1115,6 +1165,8 @@ components:
11151165
items:
11161166
allOf:
11171167
- $ref: "#/components/schemas/InstantQuery"
1168+
MetricsFederationResult:
1169+
type: string
11181170
InstantQuery:
11191171
type: object
11201172
properties:
@@ -1150,7 +1202,7 @@ components:
11501202
duration:
11511203
name: duration
11521204
in: query
1153-
description: The length of time in minutes for which to return the metrics
1205+
description: The length of time in minutes for which to return the metrics
11541206
required: true
11551207
schema:
11561208
type: integer
@@ -1183,7 +1235,7 @@ components:
11831235
type: array
11841236
items:
11851237
type: string
1186-
default: []
1238+
default: [ ]
11871239
page:
11881240
name: page
11891241
in: query
@@ -1294,7 +1346,7 @@ components:
12941346
cloud_provider: "aws"
12951347
multi_az: true
12961348
region: "us-east-1"
1297-
owner: "api_kafka_service"
1349+
owner: "api_kafka_service"
12981350
name: "serviceapi"
12991351
bootstrap_server_host: "serviceapi-1isy6rq3jki8q0otmjqfd3ocfrg.apps.mk-bttg0jn170hp.x5u8.s1.devshift.org"
13001352
created_at: "2020-10-05T12:51:24.053142Z"
@@ -1310,7 +1362,7 @@ components:
13101362
cloud_provider: "aws"
13111363
multi_az: true
13121364
region: "us-east-1"
1313-
owner: "api_kafka_service"
1365+
owner: "api_kafka_service"
13141366
name: "serviceapi"
13151367
bootstrap_server_host: "serviceapi-1isy6rq3jki8q0otmjqfd3ocfrg.apps.mk-bttg0jn170hp.x5u8.s1.devshift.org"
13161368
created_at: "2020-10-05T12:51:24.053142Z"
@@ -1410,6 +1462,14 @@ components:
14101462
code: "KAFKAS-MGMT-23"
14111463
reason: "Failed to parse search query: Unable to list Kafka requests for api_kafka_service: KAFKAS-MGMT-23: Failed to parse search query: Unsupported column name for search: 'id'. Supported column names are: region, name, cloud_provider, name, status. Query invalid: id = 123"
14121464
operation_id: "1lWDGuybIrEnxrAem724gqkkiDv"
1465+
400MissingParameterExample:
1466+
value:
1467+
id: "21"
1468+
kind: "Error"
1469+
href: "/api/kafkas_mgmt/v1/errors/21"
1470+
code: "KAFKAS-MGMT-21"
1471+
reason: "missing path parameter: kafka id"
1472+
operation_id: "1lWDGuybIrEnxrAem724gqkkiDv"
14131473
404Example:
14141474
value:
14151475
id: "404"

0 commit comments

Comments
 (0)