kafka-ui-api.yaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. openapi: 3.0.0
  2. info:
  3. description: Api Documentation
  4. version: 0.1.0
  5. title: Api Documentation
  6. termsOfService: urn:tos
  7. contact: {}
  8. license:
  9. name: Apache 2.0
  10. url: http://www.apache.org/licenses/LICENSE-2.0
  11. tags:
  12. - name: /api/clusters
  13. servers:
  14. - url: /localhost
  15. paths:
  16. /api/clusters:
  17. get:
  18. tags:
  19. - /api/clusters
  20. summary: getClusters
  21. operationId: getClusters
  22. responses:
  23. 200:
  24. description: OK
  25. content:
  26. application/json:
  27. schema:
  28. type: array
  29. items:
  30. $ref: '#/components/schemas/Cluster'
  31. /api/clusters/{clusterName}/brokers:
  32. get:
  33. tags:
  34. - /api/clusters
  35. summary: getBrokers
  36. operationId: getBrokers
  37. parameters:
  38. - name: clusterName
  39. in: path
  40. required: true
  41. schema:
  42. type: string
  43. responses:
  44. 200:
  45. description: OK
  46. content:
  47. application/json:
  48. schema:
  49. type: array
  50. items:
  51. $ref: '#/components/schemas/Broker'
  52. /api/clusters/{clusterName}/metrics/broker:
  53. get:
  54. tags:
  55. - /api/clusters
  56. summary: getBrokersMetrics
  57. operationId: getBrokersMetrics
  58. parameters:
  59. - name: clusterName
  60. in: path
  61. required: true
  62. schema:
  63. type: string
  64. responses:
  65. 200:
  66. description: OK
  67. content:
  68. application/json:
  69. schema:
  70. $ref: '#/components/schemas/BrokersMetrics'
  71. /api/clusters/{clusterName}/topics:
  72. get:
  73. tags:
  74. - /api/clusters
  75. summary: getTopics
  76. operationId: getTopics
  77. parameters:
  78. - name: clusterName
  79. in: path
  80. required: true
  81. schema:
  82. type: string
  83. responses:
  84. 200:
  85. description: OK
  86. content:
  87. application/json:
  88. schema:
  89. type: array
  90. items:
  91. $ref: '#/components/schemas/Topic'
  92. post:
  93. tags:
  94. - /api/clusters
  95. summary: createTopic
  96. operationId: createTopic
  97. parameters:
  98. - name: clusterName
  99. in: path
  100. required: true
  101. schema:
  102. type: string
  103. requestBody:
  104. content:
  105. application/json:
  106. schema:
  107. $ref: '#/components/schemas/TopicFormData'
  108. responses:
  109. 201:
  110. description: Created
  111. content:
  112. application/json:
  113. schema:
  114. $ref: '#/components/schemas/Topic'
  115. /api/clusters/{clusterName}/topics/{topicName}:
  116. get:
  117. tags:
  118. - /api/clusters
  119. summary: getTopicDetails
  120. operationId: getTopicDetails
  121. parameters:
  122. - name: clusterName
  123. in: path
  124. required: true
  125. schema:
  126. type: string
  127. - name: topicName
  128. in: path
  129. required: true
  130. schema:
  131. type: string
  132. responses:
  133. 200:
  134. description: OK
  135. content:
  136. application/json:
  137. schema:
  138. $ref: '#/components/schemas/TopicDetails'
  139. patch:
  140. tags:
  141. - /api/clusters
  142. summary: updateTopic
  143. operationId: updateTopic
  144. parameters:
  145. - name: clusterName
  146. in: path
  147. required: true
  148. schema:
  149. type: string
  150. - name: topicName
  151. in: path
  152. required: true
  153. schema:
  154. type: string
  155. requestBody:
  156. content:
  157. application/json:
  158. schema:
  159. $ref: '#/components/schemas/TopicFormData'
  160. responses:
  161. 200:
  162. description: Updated
  163. content:
  164. application/json:
  165. schema:
  166. $ref: '#/components/schemas/Topic'
  167. /api/clusters/{clusterName}/topics/{topicName}/config:
  168. get:
  169. tags:
  170. - /api/clusters
  171. summary: getTopicConfigs
  172. operationId: getTopicConfigs
  173. parameters:
  174. - name: clusterName
  175. in: path
  176. required: true
  177. schema:
  178. type: string
  179. - name: topicName
  180. in: path
  181. required: true
  182. schema:
  183. type: string
  184. responses:
  185. 200:
  186. description: OK
  187. content:
  188. application/json:
  189. schema:
  190. type: array
  191. items:
  192. $ref: '#/components/schemas/TopicConfig'
  193. /api/clusters/{clusterName}/topics/{topicName}/messages:
  194. get:
  195. tags:
  196. - /api/clusters
  197. summary: getTopicMessages
  198. operationId: getTopicMessages
  199. parameters:
  200. - name: clusterName
  201. in: path
  202. required: true
  203. schema:
  204. type: string
  205. - name: topicName
  206. in: path
  207. required: true
  208. schema:
  209. type: string
  210. - name: seekType
  211. in: query
  212. schema:
  213. $ref: "#/components/schemas/SeekType"
  214. - name: seekTo
  215. in: query
  216. schema:
  217. type: array
  218. items:
  219. type: string
  220. description: The format is [partition]::[offset] for specifying offsets or [partition]::[timstamp in millis] for specifying timestamps
  221. - name: limit
  222. in: query
  223. schema:
  224. type: integer
  225. responses:
  226. 200:
  227. description: OK
  228. content:
  229. application/json:
  230. schema:
  231. type: array
  232. items:
  233. $ref: '#/components/schemas/TopicMessage'
  234. /api/clusters/{clusterName}/consumer-groups/{id}:
  235. get:
  236. tags:
  237. - /api/clusters
  238. summary: get Consumer Group By Id
  239. operationId: getConsumerGroup
  240. parameters:
  241. - name: clusterName
  242. in: path
  243. required: true
  244. schema:
  245. type: string
  246. - name: id
  247. in: path
  248. required: true
  249. schema:
  250. type: string
  251. responses:
  252. 200:
  253. description: OK
  254. content:
  255. application/json:
  256. schema:
  257. $ref: '#/components/schemas/ConsumerGroupDetails'
  258. /api/clusters/{clusterName}/brokers/{brokerId}/metrics/{canonicalName}:
  259. get:
  260. tags:
  261. - /api/clusters
  262. summary: get specific JmxMetric for broker
  263. operationId: getBrokerJmxMetric
  264. parameters:
  265. - name: clusterName
  266. in: path
  267. required: true
  268. schema:
  269. type: string
  270. - name: brokerId
  271. in: path
  272. required: true
  273. schema:
  274. type: integer
  275. - name: canonicalName
  276. in: path
  277. required: true
  278. schema:
  279. type: string
  280. responses:
  281. 200:
  282. description: OK
  283. content:
  284. application/json:
  285. schema:
  286. $ref: '#/components/schemas/JmxMetric'
  287. /api/clusters/{clusterName}/metrics:
  288. get:
  289. tags:
  290. - /api/clusters
  291. summary: get specific JmxMetric for cluster
  292. operationId: getClusterJmxMetric
  293. parameters:
  294. - name: clusterName
  295. in: path
  296. required: true
  297. schema:
  298. type: string
  299. - name: canonicalName
  300. in: path
  301. required: true
  302. schema:
  303. type: string
  304. responses:
  305. 200:
  306. description: OK
  307. content:
  308. application/json:
  309. schema:
  310. $ref: '#/components/schemas/JmxMetric'
  311. /api/clusters/{clusterName}/consumerGroups:
  312. get:
  313. tags:
  314. - /api/clusters
  315. summary: get all ConsumerGroups
  316. operationId: getConsumerGroups
  317. parameters:
  318. - name: clusterName
  319. in: path
  320. required: true
  321. schema:
  322. type: string
  323. responses:
  324. 200:
  325. description: OK
  326. content:
  327. application/json:
  328. schema:
  329. type: array
  330. items:
  331. $ref: '#/components/schemas/ConsumerGroup'
  332. components:
  333. schemas:
  334. Cluster:
  335. type: object
  336. properties:
  337. name:
  338. type: string
  339. defaultCluster:
  340. type: boolean
  341. status:
  342. $ref: '#/components/schemas/ServerStatus'
  343. brokerCount:
  344. type: integer
  345. onlinePartitionCount:
  346. type: integer
  347. topicCount:
  348. type: integer
  349. jmxMetricsNames:
  350. type: array
  351. items:
  352. $ref: '#/components/schemas/JmxMetricName'
  353. required:
  354. - id
  355. - name
  356. - status
  357. ServerStatus:
  358. type: string
  359. enum:
  360. - online
  361. - offline
  362. BrokersMetrics:
  363. type: object
  364. properties:
  365. zooKeeperStatus:
  366. type: integer
  367. activeControllers:
  368. type: integer
  369. uncleanLeaderElectionCount:
  370. type: integer
  371. underReplicatedPartitionCount:
  372. type: integer
  373. offlinePartitionCount:
  374. type: integer
  375. inSyncReplicasCount:
  376. type: integer
  377. outOfSyncReplicasCount:
  378. type: integer
  379. segmentZise:
  380. type: integer
  381. Topic:
  382. type: object
  383. properties:
  384. name:
  385. type: string
  386. internal:
  387. type: boolean
  388. partitions:
  389. type: array
  390. items:
  391. $ref: '#/components/schemas/Partition'
  392. Partition:
  393. type: object
  394. properties:
  395. partition:
  396. type: integer
  397. leader:
  398. type: integer
  399. replicas:
  400. type: array
  401. items:
  402. $ref: '#/components/schemas/Replica'
  403. Replica:
  404. type: object
  405. properties:
  406. broker:
  407. type: integer
  408. leader:
  409. type: boolean
  410. inSync:
  411. type: boolean
  412. TopicDetails:
  413. type: object
  414. properties:
  415. partitionCount:
  416. type: integer
  417. replicationFactor:
  418. type: integer
  419. replicas:
  420. type: integer
  421. inSyncReplicas:
  422. type: integer
  423. bytesInPerSec:
  424. type: integer
  425. segmentSize:
  426. type: integer
  427. segmentCount:
  428. type: integer
  429. underReplicatedPartitions:
  430. type: integer
  431. TopicConfig:
  432. type: object
  433. properties:
  434. name:
  435. type: string
  436. value:
  437. type: string
  438. defaultValue:
  439. type: string
  440. TopicFormData:
  441. type: object
  442. properties:
  443. name:
  444. type: string
  445. partitions:
  446. type: integer
  447. replicationFactor:
  448. type: integer
  449. configs:
  450. type: object
  451. additionalProperties:
  452. type: string
  453. Broker:
  454. type: object
  455. properties:
  456. id:
  457. type: string
  458. host:
  459. type: string
  460. ConsumerGroup:
  461. type: object
  462. properties:
  463. clusterId:
  464. type: string
  465. consumerGroupId:
  466. type: string
  467. numConsumers:
  468. type: integer
  469. numTopics:
  470. type: integer
  471. TopicMessage:
  472. type: object
  473. properties:
  474. partition:
  475. type: integer
  476. offset:
  477. type: integer
  478. format: int64
  479. timestamp:
  480. type: string
  481. format: date-time
  482. timestampType:
  483. type: string
  484. enum:
  485. - NO_TIMESTAMP_TYPE
  486. - CREATE_TIME
  487. - LOG_APPEND_TIME
  488. key:
  489. type: string
  490. headers:
  491. type: object
  492. additionalProperties:
  493. type: string
  494. content:
  495. type: object
  496. required:
  497. - partition
  498. - offset
  499. - timestamp
  500. SeekType:
  501. type: string
  502. enum:
  503. - BEGINNING
  504. - OFFSET
  505. - TIMESTAMP
  506. TopicPartitionDto:
  507. type: object
  508. properties:
  509. topic:
  510. type: string
  511. partition:
  512. type: integer
  513. required:
  514. - topic
  515. - partition
  516. ConsumerTopicPartitionDetail:
  517. type: object
  518. properties:
  519. consumerId:
  520. type: string
  521. topic:
  522. type: string
  523. partition:
  524. type: integer
  525. currentOffset:
  526. type: long
  527. endOffset:
  528. type: long
  529. messagesBehind:
  530. type: long
  531. ConsumerGroupDetails:
  532. type: object
  533. properties:
  534. consumerGroupId:
  535. type: string
  536. consumers:
  537. type: array
  538. items:
  539. $ref: '#/components/schemas/ConsumerTopicPartitionDetail'
  540. JmxMetric:
  541. type: object
  542. properties:
  543. canonicalName:
  544. type: string
  545. value:
  546. type: object
  547. additionalProperties:
  548. type: object
  549. JmxMetricName:
  550. type: object
  551. properties:
  552. canonicalName:
  553. type: string