res_client.json 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. {
  2. "apiVersion": "1.0",
  3. "apis": [
  4. {
  5. "description": "getInstances",
  6. "operations": [
  7. {
  8. "method": "GET",
  9. "summary": "根据资源树节点ID和资源类型ID获取主资源列表",
  10. "notes": "获取主资源列表",
  11. "nickname": "getInstances",
  12. "produces": [
  13. "application/json"
  14. ],
  15. "consumes": [
  16. "application/json"
  17. ],
  18. "parameters": [
  19. {
  20. "allowMultiple": false,
  21. "defaultValue": "",
  22. "description": "资源树节点ID,可通过/res/client/getResTypes4Json接口获得",
  23. "name": "treeNodeId",
  24. "paramType": "path",
  25. "type": "string",
  26. "required": true
  27. },
  28. {
  29. "allowMultiple": false,
  30. "defaultValue": "",
  31. "description": "资源类型ID,可通过/res/client/getResTypes4Json接口获得",
  32. "name": "resTypeId",
  33. "paramType": "path",
  34. "type": "string",
  35. "required": true
  36. }
  37. ],
  38. "responseMessages": [
  39. {
  40. "code": 200,
  41. "message": null,
  42. "responseModel": "主资源列表."
  43. },
  44. {
  45. "code": 500,
  46. "message": "请求出错,返回JSON: {message:\"错误信息\"}"
  47. },
  48. {
  49. "code": 502,
  50. "message": "缺少ssoToken或ssoToken已过期"
  51. }
  52. ],
  53. "deprecated": "false",
  54. "type": "主资源列表."
  55. }
  56. ],
  57. "path": "/res/client/getInstances/{treeNodeId}/{resTypeId}"
  58. },
  59. {
  60. "description": "getMetrics",
  61. "operations": [
  62. {
  63. "method": "GET",
  64. "summary": "根据资源类型ID获取该资源类型下的所有性能指标定义",
  65. "notes": "根据资源类型ID获取该资源类型下的所有性能指标定义",
  66. "nickname": "getMetrics",
  67. "produces": [
  68. "application/json"
  69. ],
  70. "consumes": [
  71. "application/json"
  72. ],
  73. "parameters": [
  74. {
  75. "allowMultiple": false,
  76. "defaultValue": "",
  77. "description": "资源类型ID,可通过/res/client/getResTypes4Json接口获得",
  78. "name": "resTypeId",
  79. "paramType": "path",
  80. "type": "string",
  81. "required": true
  82. }
  83. ],
  84. "responseMessages": [
  85. {
  86. "code": 200,
  87. "message": null,
  88. "responseModel": "指标列表."
  89. },
  90. {
  91. "code": 500,
  92. "message": "请求出错,返回JSON: {message:\"错误信息\"}"
  93. },
  94. {
  95. "code": 502,
  96. "message": "缺少ssoToken或ssoToken已过期"
  97. }
  98. ],
  99. "deprecated": "false",
  100. "type": "指标列表."
  101. }
  102. ],
  103. "path": "/res/client/getMetrics/{resTypeId}"
  104. },
  105. {
  106. "description": "getResProtocols",
  107. "operations": [
  108. {
  109. "method": "POST",
  110. "summary": "获取资源的链接信息",
  111. "notes": "根据资源ID列表,获取链接信息",
  112. "nickname": "getResProtocols",
  113. "produces": [
  114. "application/json"
  115. ],
  116. "consumes": [
  117. "application/json"
  118. ],
  119. "parameters": [
  120. {
  121. "allowMultiple": false,
  122. "defaultValue": "",
  123. "description": "资源ID,多个ID用逗号隔开",
  124. "name": "resIds",
  125. "paramType": "query",
  126. "type": "string",
  127. "required": true
  128. }
  129. ],
  130. "responseMessages": [
  131. {
  132. "code": 200,
  133. "message": null,
  134. "responseModel": "资源连接信息结果对象"
  135. },
  136. {
  137. "code": 500,
  138. "message": "请求出错,返回JSON: {message:\"错误信息\"}"
  139. },
  140. {
  141. "code": 502,
  142. "message": "缺少ssoToken或ssoToken已过期"
  143. }
  144. ],
  145. "deprecated": "false",
  146. "type": "资源连接信息结果对象"
  147. }
  148. ],
  149. "path": "/res/client/getResProtocols"
  150. },
  151. {
  152. "description": "getResTypes4Json",
  153. "operations": [
  154. {
  155. "method": "POST",
  156. "summary": "获取资源类型列表",
  157. "notes": "获取资源类型列表",
  158. "nickname": "getResTypes4Json",
  159. "produces": [
  160. "application/json"
  161. ],
  162. "consumes": [
  163. "application/json"
  164. ],
  165. "parameters": [],
  166. "responseMessages": [
  167. {
  168. "code": 200,
  169. "message": null,
  170. "responseModel": "资源模板列表."
  171. },
  172. {
  173. "code": 500,
  174. "message": "请求出错,返回JSON: {message:\"错误信息\"}"
  175. },
  176. {
  177. "code": 502,
  178. "message": "缺少ssoToken或ssoToken已过期"
  179. }
  180. ],
  181. "deprecated": "false",
  182. "type": "资源模板列表."
  183. }
  184. ],
  185. "path": "/res/client/getResTypes4Json"
  186. },
  187. {
  188. "description": "getSubResInstances4Json",
  189. "operations": [
  190. {
  191. "method": "GET",
  192. "summary": "根据资源数ID和子资源类型ID获取子资源列表",
  193. "notes": "根据资源数ID和子资源类型ID获取子资源列表",
  194. "nickname": "getSubResInstances4Json",
  195. "produces": [
  196. "application/json"
  197. ],
  198. "consumes": [
  199. "application/json"
  200. ],
  201. "parameters": [
  202. {
  203. "allowMultiple": false,
  204. "defaultValue": "",
  205. "description": "主资源树节点Id,可通过/res/client/getSubResTypes/{resTypeId}接口获得",
  206. "name": "treeNodeId",
  207. "paramType": "path",
  208. "type": "string",
  209. "required": true
  210. },
  211. {
  212. "allowMultiple": false,
  213. "defaultValue": "",
  214. "description": "子资源类型ID,可通过/res/client/getSubResTypes/{resTypeId}接口获得",
  215. "name": "subResTypeId",
  216. "paramType": "path",
  217. "type": "string",
  218. "required": true
  219. }
  220. ],
  221. "responseMessages": [
  222. {
  223. "code": 200,
  224. "message": null,
  225. "responseModel": "子资源列表."
  226. },
  227. {
  228. "code": 500,
  229. "message": "请求出错,返回JSON: {message:\"错误信息\"}"
  230. },
  231. {
  232. "code": 502,
  233. "message": "缺少ssoToken或ssoToken已过期"
  234. }
  235. ],
  236. "deprecated": "false",
  237. "type": "子资源列表."
  238. }
  239. ],
  240. "path": "/res/client/getSubResInstances4Json/{treeNodeId}/{subResTypeId}"
  241. },
  242. {
  243. "description": "getSubResTypes",
  244. "operations": [
  245. {
  246. "method": "GET",
  247. "summary": "根据资源类型ID获取子资源类型定义",
  248. "notes": "根据资源类型的ID获取子资源类型定义",
  249. "nickname": "getSubResTypes",
  250. "produces": [
  251. "application/json"
  252. ],
  253. "consumes": [
  254. "application/json"
  255. ],
  256. "parameters": [
  257. {
  258. "allowMultiple": false,
  259. "defaultValue": "",
  260. "description": "资源类型ID,可通过/res/client/getResTypes4Json接口获得",
  261. "name": "resTypeId",
  262. "paramType": "path",
  263. "type": "string",
  264. "required": true
  265. }
  266. ],
  267. "responseMessages": [
  268. {
  269. "code": 200,
  270. "message": null,
  271. "responseModel": "子模板列表."
  272. },
  273. {
  274. "code": 500,
  275. "message": "请求出错,返回JSON: {message:\"错误信息\"}"
  276. },
  277. {
  278. "code": 502,
  279. "message": "缺少ssoToken或ssoToken已过期"
  280. }
  281. ],
  282. "deprecated": "false",
  283. "type": "子模板列表."
  284. }
  285. ],
  286. "path": "/res/client/getSubResTypes/{resTypeId}"
  287. },
  288. {
  289. "description": "resTypeNumber",
  290. "operations": [
  291. {
  292. "method": "GET",
  293. "summary": "通过主资源类型ID获取资源数量",
  294. "notes": "通过主资源类型ID获取资源数量",
  295. "nickname": "resTypeNumber",
  296. "produces": [
  297. "application/json"
  298. ],
  299. "consumes": [
  300. "application/json"
  301. ],
  302. "parameters": [
  303. {
  304. "allowMultiple": false,
  305. "defaultValue": "",
  306. "description": "资源类型ID,可通过/res/client/getResTypes4Json接口获得,填写“ALL”获取所以资源数量总和",
  307. "name": "resTypeIds",
  308. "paramType": "query",
  309. "items": {
  310. "type": "string"
  311. },
  312. "type": "array",
  313. "uniqueItems": false,
  314. "required": true
  315. }
  316. ],
  317. "responseMessages": [
  318. {
  319. "code": 200,
  320. "message": null,
  321. "responseModel": "资源数量"
  322. },
  323. {
  324. "code": 500,
  325. "message": "请求出错,返回JSON: {message:\"错误信息\"}"
  326. },
  327. {
  328. "code": 502,
  329. "message": "缺少ssoToken或ssoToken已过期"
  330. }
  331. ],
  332. "deprecated": "false",
  333. "type": "资源数量"
  334. }
  335. ],
  336. "path": "/res/client/resTypeNumber"
  337. }
  338. ],
  339. "basePath": "/adapter",
  340. "consumes": [
  341. "application/json"
  342. ],
  343. "models": {
  344. "主资源列表.": {
  345. "description": "",
  346. "id": "主资源列表.",
  347. "properties": {
  348. "resInstances": {
  349. "description": "ResTypeVO对象集合",
  350. "items": {
  351. "type": "ResTypeVO"
  352. },
  353. "required": false,
  354. "type": "array"
  355. }
  356. }
  357. },
  358. "ResTypeVO": {
  359. "description": "",
  360. "id": "ResTypeVO",
  361. "properties": {
  362. "name": {
  363. "description": "资源类型名称",
  364. "required": false,
  365. "type": "string"
  366. },
  367. "id": {
  368. "description": "资源类型ID",
  369. "required": false,
  370. "type": "string"
  371. },
  372. "resInstList": {
  373. "description": "主资源List(其中对象为ResInstanceVO)",
  374. "items": {
  375. "type": "ResInstanceVO"
  376. },
  377. "required": false,
  378. "type": "array"
  379. },
  380. "treeNodeId": {
  381. "description": "Tree Node Id 可通过/res/client/getResTypes4Json接口获得",
  382. "required": false,
  383. "type": "string"
  384. },
  385. "parentId": {
  386. "description": "主资源类型ID",
  387. "required": false,
  388. "type": "string"
  389. },
  390. "subResTypeList": {
  391. "description": "子资源类型List(其中对象为ResTypeVO)",
  392. "items": {
  393. "type": "ResTypeVO"
  394. },
  395. "required": false,
  396. "type": "array"
  397. }
  398. }
  399. },
  400. "ResInstanceVO": {
  401. "description": "",
  402. "id": "ResInstanceVO",
  403. "properties": {
  404. "name": {
  405. "description": "资源名称",
  406. "required": false,
  407. "type": "string"
  408. },
  409. "main": {
  410. "description": "是否主资源.",
  411. "required": false,
  412. "type": "boolean"
  413. },
  414. "ip": {
  415. "description": "资源IP.",
  416. "required": false,
  417. "type": "string"
  418. },
  419. "instId": {
  420. "description": "主资源ID",
  421. "required": false,
  422. "type": "string"
  423. },
  424. "subInstId": {
  425. "description": "子资源ID",
  426. "required": false,
  427. "type": "string"
  428. },
  429. "resTypeId": {
  430. "description": "资源类型ID.",
  431. "required": false,
  432. "type": "string"
  433. },
  434. "subResInstVOList": {
  435. "description": "子资源List.",
  436. "items": {
  437. "type": "ResInstanceVO"
  438. },
  439. "required": false,
  440. "type": "array"
  441. }
  442. }
  443. },
  444. "指标列表.": {
  445. "description": "",
  446. "id": "指标列表.",
  447. "properties": {
  448. "metricList": {
  449. "description": "MetricVO对象集合",
  450. "items": {
  451. "type": "MetricVO"
  452. },
  453. "required": false,
  454. "type": "array"
  455. }
  456. }
  457. },
  458. "MetricVO": {
  459. "description": "",
  460. "id": "MetricVO",
  461. "properties": {
  462. "metricId": {
  463. "description": "指标ID",
  464. "required": false,
  465. "type": "string"
  466. },
  467. "metricName": {
  468. "description": "指标名称",
  469. "required": false,
  470. "type": "string"
  471. },
  472. "metricUnit": {
  473. "description": "指标单位",
  474. "required": false,
  475. "type": "string"
  476. },
  477. "metricType": {
  478. "description": "指标类型",
  479. "required": false,
  480. "type": "string"
  481. }
  482. }
  483. },
  484. "资源连接信息": {
  485. "description": "",
  486. "id": "资源连接信息",
  487. "properties": {
  488. "connectInfo": {
  489. "description": "链接信息集合",
  490. "items": {
  491. "type": "链接信息"
  492. },
  493. "required": false,
  494. "type": "array"
  495. },
  496. "resId": {
  497. "required": false,
  498. "type": "string"
  499. }
  500. }
  501. },
  502. "资源连接信息结果对象": {
  503. "description": "",
  504. "id": "资源连接信息结果对象",
  505. "properties": {
  506. "resConnections": {
  507. "description": "资源链接信息集合",
  508. "items": {
  509. "type": "资源连接信息"
  510. },
  511. "required": false,
  512. "type": "array"
  513. }
  514. }
  515. },
  516. "链接信息": {
  517. "description": "",
  518. "id": "链接信息",
  519. "properties": {
  520. "propId": {
  521. "required": false,
  522. "type": "string"
  523. },
  524. "propValue": {
  525. "required": false,
  526. "type": "string"
  527. }
  528. }
  529. },
  530. "资源模板列表.": {
  531. "description": "",
  532. "id": "资源模板列表.",
  533. "properties": {
  534. "resTypes": {
  535. "description": "ResTypeVO对象集合",
  536. "items": {
  537. "type": "ResTypeVO"
  538. },
  539. "required": false,
  540. "type": "array"
  541. }
  542. }
  543. },
  544. "子模板列表.": {
  545. "description": "",
  546. "id": "子模板列表.",
  547. "properties": {
  548. "subResTypes": {
  549. "description": "ResTypeVO对象集合",
  550. "items": {
  551. "type": "ResTypeVO"
  552. },
  553. "required": false,
  554. "type": "array"
  555. }
  556. }
  557. },
  558. "子资源列表.": {
  559. "description": "",
  560. "id": "子资源列表.",
  561. "properties": {
  562. "subResInstances": {
  563. "description": "ResInstanceVO对象集合",
  564. "items": {
  565. "type": "ResInstanceVO"
  566. },
  567. "required": false,
  568. "type": "array"
  569. }
  570. }
  571. },
  572. "ResNumPojo": {
  573. "description": "",
  574. "id": "ResNumPojo",
  575. "properties": {
  576. "resTypeId": {
  577. "required": false,
  578. "type": "string"
  579. },
  580. "resTypeName": {
  581. "required": false,
  582. "type": "string"
  583. },
  584. "num": {
  585. "required": false,
  586. "format": "int32",
  587. "type": "integer"
  588. }
  589. }
  590. },
  591. "资源数量": {
  592. "description": "",
  593. "id": "资源数量",
  594. "properties": {
  595. "resNumPojo": {
  596. "description": "resNumPojo对象集合",
  597. "items": {
  598. "type": "ResNumPojo"
  599. },
  600. "required": false,
  601. "type": "array"
  602. }
  603. }
  604. }
  605. },
  606. "produces": [
  607. "application/json"
  608. ],
  609. "resourcePath": "/res/client",
  610. "swaggerVersion": "1.2"
  611. }