API 信息

获取当前 REST API 列表

API 定义:

  1. GET api/v3/

请求示例:

  1. GET api/v3/

返回数据:

  1. {
  2. "code": 0,
  3. "data": [
  4. {
  5. "name": "list_clientid",
  6. "method": "GET",
  7. "path": "/auth_clientid",
  8. "descr": "List available clientid in the cluster"
  9. },
  10. {
  11. "name": "lookup_clientid",
  12. "method": "GET",
  13. "path": "/auth_clientid/:clientid",
  14. "descr": "Lookup clientid in the cluster"
  15. },
  16. {
  17. "name": "add_clientid",
  18. "method": "POST",
  19. "path": "/auth_clientid",
  20. "descr": "Add clientid in the cluster"
  21. },
  22. {
  23. "name": "update_clientid",
  24. "method": "PUT",
  25. "path": "/auth_clientid/:clientid",
  26. "descr": "Update clientid in the cluster"
  27. },
  28. {
  29. "name": "delete_clientid",
  30. "method": "DELETE",
  31. "path": "/auth_clientid/:clientid",
  32. "descr": "Delete clientid in the cluster"
  33. },
  34. {
  35. "name": "list_username",
  36. "method": "GET",
  37. "path": "/auth_username",
  38. "descr": "List available username in the cluster"
  39. },
  40. {
  41. "name": "lookup_username",
  42. "method": "GET",
  43. "path": "/auth_username/:username",
  44. "descr": "Lookup username in the cluster"
  45. },
  46. {
  47. "name": "add_username",
  48. "method": "POST",
  49. "path": "/auth_username",
  50. "descr": "Add username in the cluster"
  51. },
  52. {
  53. "name": "update_username",
  54. "method": "PUT",
  55. "path": "/auth_username/:username",
  56. "descr": "Update username in the cluster"
  57. },
  58. {
  59. "name": "delete_username",
  60. "method": "DELETE",
  61. "path": "/auth_username/:username",
  62. "descr": "Delete username in the cluster"
  63. },
  64. {
  65. "name": "list_all_alarms",
  66. "method": "GET",
  67. "path": "/alarms/",
  68. "descr": "List all alarms"
  69. },
  70. {
  71. "name": "list_node_alarms",
  72. "method": "GET",
  73. "path": "/alarms/:node",
  74. "descr": "List alarms of a node"
  75. },
  76. {
  77. "name": "list_banned",
  78. "method": "GET",
  79. "path": "/banned/",
  80. "descr": "List banned"
  81. },
  82. {
  83. "name": "create_banned",
  84. "method": "POST",
  85. "path": "/banned/",
  86. "descr": "Create banned"
  87. },
  88. {
  89. "name": "delete_banned",
  90. "method": "DELETE",
  91. "path": "/banned/:who",
  92. "descr": "Delete banned"
  93. },
  94. {
  95. "name": "list_brokers",
  96. "method": "GET",
  97. "path": "/brokers/",
  98. "descr": "A list of brokers in the cluster"
  99. },
  100. {
  101. "name": "get_broker",
  102. "method": "GET",
  103. "path": "/brokers/:node",
  104. "descr": "Get broker info of a node"
  105. },
  106. {
  107. "name": "get_all_configs",
  108. "method": "GET",
  109. "path": "/configs/",
  110. "descr": "Get all configs"
  111. },
  112. {
  113. "name": "get_all_configs",
  114. "method": "GET",
  115. "path": "/nodes/:node/configs/",
  116. "descr": "Get all configs of a node"
  117. },
  118. {
  119. "name": "update_config",
  120. "method": "PUT",
  121. "path": "/configs/:app",
  122. "descr": "Update config of an application in the cluster"
  123. },
  124. {
  125. "name": "update_node_config",
  126. "method": "PUT",
  127. "path": "/nodes/:node/configs/:app",
  128. "descr": "Update config of an application on a node"
  129. },
  130. {
  131. "name": "get_plugin_configs",
  132. "method": "GET",
  133. "path": "/nodes/:node/plugin_configs/:plugin",
  134. "descr": "Get configurations of a plugin on the node"
  135. },
  136. {
  137. "name": "update_plugin_configs",
  138. "method": "PUT",
  139. "path": "/nodes/:node/plugin_configs/:plugin",
  140. "descr": "Update configurations of a plugin on the node"
  141. },
  142. {
  143. "name": "list_connections",
  144. "method": "GET",
  145. "path": "/connections/",
  146. "descr": "A list of connections in the cluster"
  147. },
  148. {
  149. "name": "list_node_connections",
  150. "method": "GET",
  151. "path": "nodes/:node/connections/",
  152. "descr": "A list of connections on a node"
  153. },
  154. {
  155. "name": "lookup_node_connections",
  156. "method": "GET",
  157. "path": "nodes/:node/connections/:clientid",
  158. "descr": "Lookup a connection on node"
  159. },
  160. {
  161. "name": "lookup_connections",
  162. "method": "GET",
  163. "path": "/connections/:clientid",
  164. "descr": "Lookup a connection in the cluster"
  165. },
  166. {
  167. "name": "lookup_node_connection_via_username",
  168. "method": "GET",
  169. "path": "/nodes/:node/connection/username/:username",
  170. "descr": "Lookup a connection via username in the cluster "
  171. },
  172. {
  173. "name": "lookup_connection_via_username",
  174. "method": "GET",
  175. "path": "/connection/username/:username",
  176. "descr": "Lookup a connection via username on a node "
  177. },
  178. {
  179. "name": "kickout_connection",
  180. "method": "DELETE",
  181. "path": "/connections/:clientid",
  182. "descr": "Kick out a connection"
  183. },
  184. {
  185. "name": "list_listeners",
  186. "method": "GET",
  187. "path": "/listeners/",
  188. "descr": "A list of listeners in the cluster"
  189. },
  190. {
  191. "name": "list_node_listeners",
  192. "method": "GET",
  193. "path": "/nodes/:node/listeners",
  194. "descr": "A list of listeners on the node"
  195. },
  196. {
  197. "name": "list_all_metrics",
  198. "method": "GET",
  199. "path": "/metrics/",
  200. "descr": "A list of metrics of all nodes in the cluster"
  201. },
  202. {
  203. "name": "list_node_metrics",
  204. "method": "GET",
  205. "path": "/nodes/:node/metrics/",
  206. "descr": "A list of metrics of a node"
  207. },
  208. {
  209. "name": "list_nodes",
  210. "method": "GET",
  211. "path": "/nodes/",
  212. "descr": "A list of nodes in the cluster"
  213. },
  214. {
  215. "name": "get_node",
  216. "method": "GET",
  217. "path": "/nodes/:node",
  218. "descr": "Lookup a node in the cluster"
  219. },
  220. {
  221. "name": "list_all_plugins",
  222. "method": "GET",
  223. "path": "/plugins/",
  224. "descr": "List all plugins in the cluster"
  225. },
  226. {
  227. "name": "list_node_plugins",
  228. "method": "GET",
  229. "path": "/nodes/:node/plugins/",
  230. "descr": "List all plugins on a node"
  231. },
  232. {
  233. "name": "load_plugin",
  234. "method": "PUT",
  235. "path": "/nodes/:node/plugins/:plugin/load",
  236. "descr": "Load a plugin"
  237. },
  238. {
  239. "name": "unload_plugin",
  240. "method": "PUT",
  241. "path": "/nodes/:node/plugins/:plugin/unload",
  242. "descr": "Unload a plugin"
  243. },
  244. {
  245. "name": "mqtt_subscribe",
  246. "method": "POST",
  247. "path": "/mqtt/subscribe",
  248. "descr": "Subscribe a topic"
  249. },
  250. {
  251. "name": "mqtt_publish",
  252. "method": "POST",
  253. "path": "/mqtt/publish",
  254. "descr": "Publish a MQTT message"
  255. },
  256. {
  257. "name": "mqtt_unsubscribe",
  258. "method": "POST",
  259. "path": "/mqtt/unsubscribe",
  260. "descr": "Unsubscribe a topic"
  261. },
  262. {
  263. "name": "list_routes",
  264. "method": "GET",
  265. "path": "/routes/",
  266. "descr": "List routes"
  267. },
  268. {
  269. "name": "lookup_routes",
  270. "method": "GET",
  271. "path": "/routes/:topic",
  272. "descr": "Lookup routes to a topic"
  273. },
  274. {
  275. "name": "list_sessions",
  276. "method": "GET",
  277. "path": "/sessions/",
  278. "descr": "A list of sessions in the cluster"
  279. },
  280. {
  281. "name": "list_node_sessions",
  282. "method": "GET",
  283. "path": "nodes/:node/sessions/",
  284. "descr": "A list of sessions on a node"
  285. },
  286. {
  287. "name": "lookup_session",
  288. "method": "GET",
  289. "path": "/sessions/:clientid",
  290. "descr": "Lookup a session in the cluster"
  291. },
  292. {
  293. "name": "lookup_node_session",
  294. "method": "GET",
  295. "path": "nodes/:node/sessions/:clientid",
  296. "descr": "Lookup a session on the node"
  297. },
  298. {
  299. "name": "list_stats",
  300. "method": "GET",
  301. "path": "/stats/",
  302. "descr": "A list of stats of all nodes in the cluster"
  303. },
  304. {
  305. "name": "lookup_node_stats",
  306. "method": "GET",
  307. "path": "/nodes/:node/stats/",
  308. "descr": "A list of stats of a node"
  309. },
  310. {
  311. "name": "list_subscriptions",
  312. "method": "GET",
  313. "path": "/subscriptions/",
  314. "descr": "A list of subscriptions in the cluster"
  315. },
  316. {
  317. "name": "list_node_subscriptions",
  318. "method": "GET",
  319. "path": "/nodes/:node/subscriptions/",
  320. "descr": "A list of subscriptions on a node"
  321. },
  322. {
  323. "name": "lookup_client_subscriptions",
  324. "method": "GET",
  325. "path": "/subscriptions/:clientid",
  326. "descr": "A list of subscriptions of a client"
  327. },
  328. {
  329. "name": "lookup_client_subscriptions_with_node",
  330. "method": "GET",
  331. "path": "/nodes/:node/subscriptions/:clientid",
  332. "descr": "A list of subscriptions of a client on the node"
  333. },
  334. {
  335. "name": "create_rule",
  336. "method": "POST",
  337. "path": "/rules/",
  338. "descr": "Create a rule"
  339. },
  340. {
  341. "name": "list_rules",
  342. "method": "GET",
  343. "path": "/rules/",
  344. "descr": "A list of all rules"
  345. },
  346. {
  347. "name": "show_rule",
  348. "method": "GET",
  349. "path": "/rules/:id",
  350. "descr": "Show a rule"
  351. },
  352. {
  353. "name": "delete_rule",
  354. "method": "DELETE",
  355. "path": "/rules/:id",
  356. "descr": "Delete a rule"
  357. },
  358. {
  359. "name": "list_actions",
  360. "method": "GET",
  361. "path": "/actions/",
  362. "descr": "A list of all actions"
  363. },
  364. {
  365. "name": "show_action",
  366. "method": "GET",
  367. "path": "/actions/:name",
  368. "descr": "Show an action"
  369. },
  370. {
  371. "name": "list_resources",
  372. "method": "GET",
  373. "path": "/resources/",
  374. "descr": "A list of all resources"
  375. },
  376. {
  377. "name": "create_resource",
  378. "method": "POST",
  379. "path": "/resources/",
  380. "descr": "Create a resource"
  381. },
  382. {
  383. "name": "show_resource",
  384. "method": "GET",
  385. "path": "/resources/:id",
  386. "descr": "Show a resource"
  387. },
  388. {
  389. "name": "delete_resource",
  390. "method": "DELETE",
  391. "path": "/resources/:id",
  392. "descr": "Delete a resource"
  393. },
  394. {
  395. "name": "list_resource_types",
  396. "method": "GET",
  397. "path": "/resource_types/",
  398. "descr": "List all resource types"
  399. },
  400. {
  401. "name": "show_resource_type",
  402. "method": "GET",
  403. "path": "/resource_types/:name",
  404. "descr": "Show a resource type"
  405. },
  406. {
  407. "name": "list_resources_by_type",
  408. "method": "GET",
  409. "path": "/resource_types/:type/resources",
  410. "descr": "List all resources of a resource type"
  411. },
  412. {
  413. "name": "list_actions_by_type",
  414. "method": "GET",
  415. "path": "/resource_types/:type/actions",
  416. "descr": "List all actions of a resource type"
  417. }]
  418. }