kafka-ui-api.yaml 11 KB

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