kafka-ui-api.yaml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  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/{clusterId}/brokers:
  32. get:
  33. tags:
  34. - /api/clusters
  35. summary: getBrokers
  36. operationId: getBrokers
  37. parameters:
  38. - name: clusterId
  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/{clusterId}/metrics/broker:
  53. get:
  54. tags:
  55. - /api/clusters
  56. summary: getBrokersMetrics
  57. operationId: getBrokersMetrics
  58. parameters:
  59. - name: clusterId
  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/{clusterId}/topics:
  72. get:
  73. tags:
  74. - /api/clusters
  75. summary: getTopics
  76. operationId: getTopics
  77. parameters:
  78. - name: clusterId
  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: clusterId
  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/{clusterId}/topics/{topicName}:
  116. get:
  117. tags:
  118. - /api/clusters
  119. summary: getTopicDetails
  120. operationId: getTopicDetails
  121. parameters:
  122. - name: clusterId
  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. /api/clusters/{clusterId}/topics/{topicName}/config:
  140. get:
  141. tags:
  142. - /api/clusters
  143. summary: getTopicConfigs
  144. operationId: getTopicConfigs
  145. parameters:
  146. - name: clusterId
  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. type: array
  163. items:
  164. $ref: '#/components/schemas/TopicConfig'
  165. components:
  166. schemas:
  167. Cluster:
  168. type: object
  169. properties:
  170. id:
  171. type: string
  172. name:
  173. type: string
  174. defaultCluster:
  175. type: boolean
  176. status:
  177. $ref: '#/components/schemas/ServerStatus'
  178. brokerCount:
  179. type: integer
  180. onlinePartitionCount:
  181. type: integer
  182. topicCount:
  183. type: integer
  184. bytesInPerSec:
  185. type: integer
  186. bytesOutPerSec:
  187. type: integer
  188. required:
  189. - id
  190. - name
  191. - status
  192. ServerStatus:
  193. type: string
  194. enum:
  195. - online
  196. - offline
  197. BrokersMetrics:
  198. type: object
  199. properties:
  200. brokerCount:
  201. type: integer
  202. zooKeeperStatus:
  203. type: integer
  204. activeControllers:
  205. type: integer
  206. uncleanLeaderElectionCount:
  207. type: integer
  208. onlinePartitionCount:
  209. type: integer
  210. underReplicatedPartitionCount:
  211. type: integer
  212. offlinePartitionCount:
  213. type: integer
  214. inSyncReplicasCount:
  215. type: integer
  216. outOfSyncReplicasCount:
  217. type: integer
  218. Topic:
  219. type: object
  220. properties:
  221. clusterId:
  222. type: string
  223. name:
  224. type: string
  225. internal:
  226. type: boolean
  227. partitions:
  228. type: array
  229. items:
  230. $ref: '#/components/schemas/Partition'
  231. Partition:
  232. type: object
  233. properties:
  234. partition:
  235. type: integer
  236. leader:
  237. type: integer
  238. replicas:
  239. type: array
  240. items:
  241. $ref: '#/components/schemas/Replica'
  242. Replica:
  243. type: object
  244. properties:
  245. broker:
  246. type: integer
  247. leader:
  248. type: boolean
  249. inSync:
  250. type: boolean
  251. TopicDetails:
  252. type: object
  253. properties:
  254. partitionCount:
  255. type: integer
  256. replicationFactor:
  257. type: integer
  258. replicas:
  259. type: integer
  260. inSyncReplicas:
  261. type: integer
  262. bytesInPerSec:
  263. type: integer
  264. segmentSize:
  265. type: integer
  266. segmentCount:
  267. type: integer
  268. underReplicatedPartitions:
  269. type: integer
  270. TopicConfig:
  271. type: object
  272. properties:
  273. name:
  274. type: string
  275. value:
  276. type: string
  277. defaultValue:
  278. type: string
  279. TopicFormData:
  280. type: object
  281. properties:
  282. name:
  283. type: string
  284. partitions:
  285. type: integer
  286. replicationFactor:
  287. type: integer
  288. configs:
  289. type: object
  290. additionalProperties:
  291. type: string
  292. Broker:
  293. type: object
  294. properties:
  295. id:
  296. type: string