kafka-ui-api.yaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  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: partition
  211. in: query
  212. schema:
  213. type: integer
  214. - name: offset
  215. in: query
  216. schema:
  217. type: integer
  218. format: int64
  219. - name: timestamp
  220. in: query
  221. schema:
  222. type: string
  223. format: date-time
  224. responses:
  225. 200:
  226. description: OK
  227. content:
  228. application/json:
  229. schema:
  230. type: array
  231. items:
  232. $ref: '#/components/schemas/TopicMessage'
  233. /api/clusters/{clusterName}/consumer-groups/{id}:
  234. get:
  235. tags:
  236. - /api/clusters
  237. summary: get Consumer Group By Id
  238. operationId: getConsumerGroup
  239. parameters:
  240. - name: clusterName
  241. in: path
  242. required: true
  243. schema:
  244. type: string
  245. - name: id
  246. in: path
  247. required: true
  248. schema:
  249. type: string
  250. responses:
  251. 200:
  252. description: OK
  253. content:
  254. application/json:
  255. schema:
  256. $ref: '#/components/schemas/ConsumerGroupDetails'
  257. /api/clusters/{clusterName}/consumerGroups:
  258. get:
  259. tags:
  260. - /api/clusters
  261. summary: get all ConsumerGroups
  262. operationId: getConsumerGroups
  263. parameters:
  264. - name: clusterName
  265. in: path
  266. required: true
  267. schema:
  268. type: string
  269. responses:
  270. 200:
  271. description: OK
  272. content:
  273. application/json:
  274. schema:
  275. type: array
  276. items:
  277. $ref: '#/components/schemas/ConsumerGroup'
  278. components:
  279. schemas:
  280. Cluster:
  281. type: object
  282. properties:
  283. name:
  284. type: string
  285. defaultCluster:
  286. type: boolean
  287. status:
  288. $ref: '#/components/schemas/ServerStatus'
  289. brokerCount:
  290. type: integer
  291. onlinePartitionCount:
  292. type: integer
  293. topicCount:
  294. type: integer
  295. bytesInPerSec:
  296. type: integer
  297. bytesOutPerSec:
  298. type: integer
  299. required:
  300. - id
  301. - name
  302. - status
  303. ServerStatus:
  304. type: string
  305. enum:
  306. - online
  307. - offline
  308. BrokersMetrics:
  309. type: object
  310. properties:
  311. zooKeeperStatus:
  312. type: integer
  313. activeControllers:
  314. type: integer
  315. uncleanLeaderElectionCount:
  316. type: integer
  317. underReplicatedPartitionCount:
  318. type: integer
  319. offlinePartitionCount:
  320. type: integer
  321. inSyncReplicasCount:
  322. type: integer
  323. outOfSyncReplicasCount:
  324. type: integer
  325. segmentZise:
  326. type: integer
  327. Topic:
  328. type: object
  329. properties:
  330. name:
  331. type: string
  332. internal:
  333. type: boolean
  334. partitions:
  335. type: array
  336. items:
  337. $ref: '#/components/schemas/Partition'
  338. Partition:
  339. type: object
  340. properties:
  341. partition:
  342. type: integer
  343. leader:
  344. type: integer
  345. replicas:
  346. type: array
  347. items:
  348. $ref: '#/components/schemas/Replica'
  349. Replica:
  350. type: object
  351. properties:
  352. broker:
  353. type: integer
  354. leader:
  355. type: boolean
  356. inSync:
  357. type: boolean
  358. TopicDetails:
  359. type: object
  360. properties:
  361. partitionCount:
  362. type: integer
  363. replicationFactor:
  364. type: integer
  365. replicas:
  366. type: integer
  367. inSyncReplicas:
  368. type: integer
  369. bytesInPerSec:
  370. type: integer
  371. segmentSize:
  372. type: integer
  373. segmentCount:
  374. type: integer
  375. underReplicatedPartitions:
  376. type: integer
  377. TopicConfig:
  378. type: object
  379. properties:
  380. name:
  381. type: string
  382. value:
  383. type: string
  384. defaultValue:
  385. type: string
  386. TopicFormData:
  387. type: object
  388. properties:
  389. name:
  390. type: string
  391. partitions:
  392. type: integer
  393. replicationFactor:
  394. type: integer
  395. configs:
  396. type: object
  397. additionalProperties:
  398. type: string
  399. Broker:
  400. type: object
  401. properties:
  402. id:
  403. type: string
  404. ConsumerGroup:
  405. type: object
  406. properties:
  407. clusterId:
  408. type: string
  409. consumerGroupId:
  410. type: string
  411. numConsumers:
  412. type: integer
  413. numTopics:
  414. type: integer
  415. TopicMessage:
  416. type: object
  417. properties:
  418. partition:
  419. type: integer
  420. offset:
  421. type: integer
  422. format: int64
  423. timestamp:
  424. type: string
  425. format: date-time
  426. timestampType:
  427. type: string
  428. enum:
  429. - NO_TIMESTAMP_TYPE
  430. - CREATE_TIME
  431. - LOG_APPEND_TIME
  432. key:
  433. type: string
  434. headers:
  435. type: object
  436. additionalProperties:
  437. type: string
  438. content:
  439. type: string
  440. required:
  441. - partition
  442. - offset
  443. - timestamp
  444. TopicPartitionDto:
  445. type: object
  446. properties:
  447. topic:
  448. type: string
  449. partition:
  450. type: integer
  451. required:
  452. - topic
  453. - partition
  454. ConsumerTopicPartitionDetail:
  455. type: object
  456. properties:
  457. consumerId:
  458. type: string
  459. topic:
  460. type: string
  461. partition:
  462. type: integer
  463. currentOffset:
  464. type: long
  465. endOffset:
  466. type: long
  467. messagesBehind:
  468. type: long
  469. ConsumerGroupDetails:
  470. type: object
  471. properties:
  472. consumerGroupId:
  473. type: string
  474. consumers:
  475. type: array
  476. items:
  477. $ref: '#/components/schemas/ConsumerTopicPartitionDetail'