kafka-ui-api.yaml 13 KB

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