res.json 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  1. {
  2. "apiVersion": "1.0",
  3. "apis": [
  4. {
  5. "description": "getResInstanceById",
  6. "operations": [
  7. {
  8. "method": "POST",
  9. "summary": "通过主资源ID获取单个主资源以及包含的所有子资源.",
  10. "notes": "通过主资源ID获取单个主资源以及包含的所有子资源.",
  11. "nickname": "getResInstanceById",
  12. "produces": [
  13. "application/json"
  14. ],
  15. "consumes": [
  16. "application/json"
  17. ],
  18. "parameters": [
  19. {
  20. "allowMultiple": false,
  21. "description": "主资源ID(可通过/res/getResInstanceList接口获得)",
  22. "name": "resId",
  23. "paramAccess": "",
  24. "paramType": "query",
  25. "type": "string",
  26. "required": true
  27. }
  28. ],
  29. "responseMessages": [
  30. {
  31. "code": 200,
  32. "message": null,
  33. "responseModel": "ResInstPojo"
  34. },
  35. {
  36. "code": 500,
  37. "message": "请求出错,返回JSON: {message:\"错误信息\"}"
  38. },
  39. {
  40. "code": 502,
  41. "message": "缺少ssoToken或ssoToken已过期"
  42. }
  43. ],
  44. "deprecated": "false",
  45. "type": "ResInstPojo"
  46. }
  47. ],
  48. "path": "/res/getResInstanceById"
  49. },
  50. {
  51. "description": "getResInstanceList",
  52. "operations": [
  53. {
  54. "method": "POST",
  55. "summary": "获取所有资源及子资源信息",
  56. "notes": "获取所有资源及子资源信息",
  57. "nickname": "getResInstanceList",
  58. "produces": [
  59. "application/json"
  60. ],
  61. "consumes": [
  62. "application/json"
  63. ],
  64. "parameters": [
  65. {
  66. "allowMultiple": false,
  67. "description": "资源类型ID(可通过/res/client/getResTypes4Json接口获得)",
  68. "name": "resType",
  69. "paramAccess": "",
  70. "paramType": "query",
  71. "type": "string",
  72. "required": false
  73. }
  74. ],
  75. "responseMessages": [
  76. {
  77. "code": 200,
  78. "message": null,
  79. "responseModel": "资源列表数据"
  80. },
  81. {
  82. "code": 500,
  83. "message": "请求出错,返回JSON: {message:\"错误信息\"}"
  84. },
  85. {
  86. "code": 502,
  87. "message": "缺少ssoToken或ssoToken已过期"
  88. }
  89. ],
  90. "deprecated": "false",
  91. "type": "资源列表数据"
  92. }
  93. ],
  94. "path": "/res/getResInstanceList"
  95. },
  96. {
  97. "description": "getResMetricList",
  98. "operations": [
  99. {
  100. "method": "POST",
  101. "summary": "获取主资源指标详细信息",
  102. "notes": "获取主资源指标详细信息",
  103. "nickname": "getResMetricList",
  104. "produces": [
  105. "application/json"
  106. ],
  107. "consumes": [
  108. "application/json"
  109. ],
  110. "parameters": [
  111. {
  112. "allowMultiple": false,
  113. "description": "主资源ID(可通过/res/getResInstanceList接口获得)",
  114. "name": "resId",
  115. "paramAccess": "",
  116. "paramType": "query",
  117. "type": "string",
  118. "required": true
  119. },
  120. {
  121. "allowMultiple": false,
  122. "description": "指标类型,默认取所有类型(可用性指标:AVAIL 配置指标:CONF 信息指标:INFO 性能指标:PERF)",
  123. "name": "metricType",
  124. "paramAccess": "",
  125. "paramType": "query",
  126. "type": "string",
  127. "required": false
  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/getResMetricList"
  150. },
  151. {
  152. "description": "getSubResMetricList",
  153. "operations": [
  154. {
  155. "method": "POST",
  156. "summary": "获取子资源指标详细信息",
  157. "notes": "获取子资源指标详细信息",
  158. "nickname": "getSubResMetricList",
  159. "produces": [
  160. "application/json"
  161. ],
  162. "consumes": [
  163. "application/json"
  164. ],
  165. "parameters": [
  166. {
  167. "allowMultiple": false,
  168. "description": "子资源ID(可通过/res/getResInstanceList接口获得)",
  169. "name": "subResId",
  170. "paramAccess": "",
  171. "paramType": "query",
  172. "type": "string",
  173. "required": true
  174. },
  175. {
  176. "allowMultiple": false,
  177. "description": "指标类型,默认取所有类型(可用性指标:AVAIL 配置指标:CONF 信息指标:INFO 性能指标:PERF)",
  178. "name": "metricType",
  179. "paramAccess": "",
  180. "paramType": "query",
  181. "type": "string",
  182. "required": false
  183. }
  184. ],
  185. "responseMessages": [
  186. {
  187. "code": 200,
  188. "message": null,
  189. "responseModel": "主资源指标详细信息."
  190. },
  191. {
  192. "code": 500,
  193. "message": "请求出错,返回JSON: {message:\"错误信息\"}"
  194. },
  195. {
  196. "code": 502,
  197. "message": "缺少ssoToken或ssoToken已过期"
  198. }
  199. ],
  200. "deprecated": "false",
  201. "type": "主资源指标详细信息."
  202. }
  203. ],
  204. "path": "/res/getSubResMetricList"
  205. },
  206. {
  207. "description": "getResList",
  208. "operations": [
  209. {
  210. "method": "GET",
  211. "summary": "获取主资源列表",
  212. "notes": "获取主资源列表",
  213. "nickname": "getResList",
  214. "produces": [
  215. "application/json"
  216. ],
  217. "consumes": [
  218. "application/json"
  219. ],
  220. "parameters": [
  221. {
  222. "allowMultiple": false,
  223. "description": "资源树节点ID(00:代表所有资源)",
  224. "name": "treeNodeId",
  225. "paramAccess": "",
  226. "paramType": "query",
  227. "type": "string",
  228. "required": true
  229. },
  230. {
  231. "allowMultiple": false,
  232. "description": "域ID,可通过/login接口获得",
  233. "name": "domainId",
  234. "paramAccess": "",
  235. "paramType": "query",
  236. "type": "string",
  237. "required": false
  238. },
  239. {
  240. "allowMultiple": false,
  241. "description": "可用性状态,默认为全部 1:可用,-1:不可用,-2:未知,all:全部",
  242. "name": "state",
  243. "paramAccess": "",
  244. "paramType": "query",
  245. "type": "string",
  246. "required": false
  247. },
  248. {
  249. "allowMultiple": false,
  250. "description": "页数",
  251. "name": "pageIndex",
  252. "paramAccess": "",
  253. "paramType": "query",
  254. "type": "string",
  255. "required": false
  256. },
  257. {
  258. "allowMultiple": false,
  259. "description": "每页条数,默认值为20",
  260. "name": "pageSize",
  261. "paramAccess": "",
  262. "paramType": "query",
  263. "type": "string",
  264. "required": false
  265. },
  266. {
  267. "allowMultiple": false,
  268. "description": "排序字段,只可按照一个字段排序,sortColumn和sortType同时不为空才生效",
  269. "name": "sortColumn",
  270. "paramAccess": "",
  271. "paramType": "query",
  272. "type": "string",
  273. "required": false
  274. },
  275. {
  276. "allowMultiple": false,
  277. "description": "排序方式(ASC/DESC),sortColumn和sortType同时不为空才生效",
  278. "name": "sortType",
  279. "paramAccess": "",
  280. "paramType": "query",
  281. "type": "string",
  282. "required": false
  283. }
  284. ],
  285. "responseMessages": [
  286. {
  287. "code": 200,
  288. "message": null,
  289. "responseModel": "主资源列表数据"
  290. },
  291. {
  292. "code": 500,
  293. "message": "请求出错,返回JSON: {message:\"错误信息\"}"
  294. },
  295. {
  296. "code": 502,
  297. "message": "缺少ssoToken或ssoToken已过期"
  298. }
  299. ],
  300. "deprecated": "false",
  301. "type": "主资源列表数据"
  302. }
  303. ],
  304. "path": "/res/list"
  305. }
  306. ],
  307. "basePath": "/adapter",
  308. "consumes": [
  309. "application/json"
  310. ],
  311. "models": {
  312. "ResVO": {
  313. "description": "",
  314. "id": "ResVO",
  315. "properties": {
  316. "state": {
  317. "description": "可用状态",
  318. "required": false,
  319. "type": "string"
  320. },
  321. "name": {
  322. "description": "资源名称",
  323. "required": false,
  324. "type": "string"
  325. },
  326. "location": {
  327. "description": "物理位置",
  328. "required": false,
  329. "type": "string"
  330. },
  331. "type": {
  332. "description": "资源类型",
  333. "required": false,
  334. "type": "string"
  335. },
  336. "desc": {
  337. "description": "描述",
  338. "required": false,
  339. "type": "string"
  340. },
  341. "policyName": {
  342. "description": "策略名称",
  343. "required": false,
  344. "type": "string"
  345. },
  346. "usability": {
  347. "description": "可用率",
  348. "required": false,
  349. "type": "string"
  350. },
  351. "sysoid": {
  352. "description": "系统OID",
  353. "required": false,
  354. "type": "string"
  355. },
  356. "venderName": {
  357. "description": "厂商名称",
  358. "required": false,
  359. "type": "string"
  360. },
  361. "nameDisplay": {
  362. "description": "资源展示名称",
  363. "required": false,
  364. "type": "string"
  365. },
  366. "contact": {
  367. "description": "联系人ID",
  368. "required": false,
  369. "type": "string"
  370. },
  371. "modelNumber": {
  372. "description": "设备型号",
  373. "required": false,
  374. "type": "string"
  375. },
  376. "ip": {
  377. "description": "资源IP",
  378. "required": false,
  379. "type": "string"
  380. },
  381. "treeNodeId": {
  382. "description": "tree节点ID",
  383. "required": false,
  384. "type": "string"
  385. },
  386. "resTypeId": {
  387. "description": "资源类型ID",
  388. "required": false,
  389. "type": "string"
  390. },
  391. "resId": {
  392. "description": "资源ID",
  393. "required": false,
  394. "type": "string"
  395. },
  396. "series": {
  397. "description": "系列",
  398. "required": false,
  399. "type": "string"
  400. },
  401. "mac": {
  402. "description": "mac地址",
  403. "required": false,
  404. "type": "string"
  405. },
  406. "locationName": {
  407. "description": "物理位置",
  408. "required": false,
  409. "type": "string"
  410. },
  411. "contactName": {
  412. "description": "联系人名称",
  413. "required": false,
  414. "type": "string"
  415. },
  416. "memRate": {
  417. "description": "内存利用率",
  418. "required": false,
  419. "type": "string"
  420. },
  421. "cpuRate": {
  422. "description": "CPU利用率",
  423. "required": false,
  424. "type": "string"
  425. },
  426. "busy": {
  427. "description": "繁忙度",
  428. "required": false,
  429. "type": "string"
  430. },
  431. "sysInfo": {
  432. "description": "系统信息",
  433. "required": false,
  434. "type": "string"
  435. },
  436. "venderId": {
  437. "description": "厂商ID",
  438. "required": false,
  439. "type": "string"
  440. }
  441. }
  442. },
  443. "主资源列表数据": {
  444. "description": "",
  445. "id": "主资源列表数据",
  446. "properties": {
  447. "resList": {
  448. "description": "ResVO 对象集合",
  449. "items": {
  450. "type": "ResVO"
  451. },
  452. "required": false,
  453. "type": "array"
  454. },
  455. "totalPage": {
  456. "description": "总页数(分页显示时使用)",
  457. "required": false,
  458. "format": "int32",
  459. "type": "integer"
  460. },
  461. "pageIndex": {
  462. "description": "当前显示页(分页显示时使用)",
  463. "required": false,
  464. "format": "int32",
  465. "type": "integer"
  466. }
  467. }
  468. },
  469. "获取资源列表的查询对象": {
  470. "description": "",
  471. "id": "获取资源列表的查询对象",
  472. "properties": {
  473. "treeNodeId": {
  474. "description": "资源树节点ID(00:代表所有资源)",
  475. "required": true,
  476. "type": "string"
  477. },
  478. "domainId": {
  479. "description": "域ID,可通过/login接口获得",
  480. "required": false,
  481. "type": "string"
  482. },
  483. "state": {
  484. "description": "可用性状态,默认为全部 1:可用,-1:不可用,-2:未知,all:全部",
  485. "required": false,
  486. "type": "string"
  487. },
  488. "pageIndex": {
  489. "description": "页数",
  490. "required": false,
  491. "type": "string"
  492. },
  493. "pageSize": {
  494. "description": "每页条数,默认值为20",
  495. "required": false,
  496. "type": "string"
  497. },
  498. "sortColumn": {
  499. "description": "排序字段,只可按照一个字段排序,sortColumn和sortType同时不为空才生效",
  500. "required": false,
  501. "type": "string"
  502. },
  503. "sortType": {
  504. "description": "排序方式(ASC/DESC),sortColumn和sortType同时不为空才生效",
  505. "required": false,
  506. "type": "string"
  507. }
  508. }
  509. },
  510. "资源列表数据": {
  511. "description": "",
  512. "id": "资源列表数据",
  513. "properties": {
  514. "resInstList": {
  515. "description": "resInstPojo 对象集合",
  516. "items": {
  517. "type": "ResInstPojo"
  518. },
  519. "required": false,
  520. "type": "array"
  521. }
  522. }
  523. },
  524. "SubResPojo": {
  525. "description": "",
  526. "id": "SubResPojo",
  527. "properties": {
  528. "subName": {
  529. "description": "子资源名称",
  530. "required": false,
  531. "type": "string"
  532. },
  533. "resId": {
  534. "description": "主资源ID",
  535. "required": false,
  536. "type": "string"
  537. },
  538. "subResId": {
  539. "description": "子资源ID",
  540. "required": false,
  541. "type": "string"
  542. },
  543. "subResType": {
  544. "description": "子资源类型",
  545. "required": false,
  546. "type": "string"
  547. },
  548. "manage": {
  549. "description": "是否加入了监控(ture/false)",
  550. "required": false,
  551. "type": "boolean"
  552. }
  553. }
  554. },
  555. "通过资源类型获取资源列表的查询对象": {
  556. "description": "",
  557. "id": "通过资源类型获取资源列表的查询对象",
  558. "properties": {
  559. "resType": {
  560. "description": "资源类型ID(可通过/res/client/getResTypes4Json接口获得)",
  561. "required": false,
  562. "type": "string"
  563. }
  564. }
  565. },
  566. "ResInstPojo": {
  567. "description": "",
  568. "id": "ResInstPojo",
  569. "properties": {
  570. "resName": {
  571. "description": "资源名称",
  572. "required": false,
  573. "type": "string"
  574. },
  575. "resType": {
  576. "description": "资源类型",
  577. "required": false,
  578. "type": "string"
  579. },
  580. "resId": {
  581. "description": "资源ID",
  582. "required": false,
  583. "type": "string"
  584. },
  585. "resIp": {
  586. "description": "资源IP",
  587. "required": false,
  588. "type": "string"
  589. },
  590. "subResList": {
  591. "description": "子资源对象集合",
  592. "items": {
  593. "type": "SubResPojo"
  594. },
  595. "required": false,
  596. "type": "array"
  597. }
  598. }
  599. },
  600. "通过主资源ID获取单个主资源以及包含的所有子资源的查询对象": {
  601. "description": "",
  602. "id": "通过主资源ID获取单个主资源以及包含的所有子资源的查询对象",
  603. "properties": {
  604. "resId": {
  605. "description": "主资源ID(可通过/res/getResInstanceList接口获得)",
  606. "required": true,
  607. "type": "string"
  608. }
  609. }
  610. },
  611. "获取主资源指标详细信息的查询对象": {
  612. "description": "",
  613. "id": "获取主资源指标详细信息的查询对象",
  614. "properties": {
  615. "resId": {
  616. "description": "主资源ID(可通过/res/getResInstanceList接口获得)",
  617. "required": true,
  618. "type": "string"
  619. },
  620. "metricType": {
  621. "description": "指标类型,默认取所有类型(可用性指标:AVAIL 配置指标:CONF 信息指标:INFO 性能指标:PERF)",
  622. "required": false,
  623. "type": "string"
  624. }
  625. }
  626. },
  627. "ResMetricPojo": {
  628. "description": "",
  629. "id": "ResMetricPojo",
  630. "properties": {
  631. "metricValue": {
  632. "description": "值",
  633. "required": false,
  634. "type": "string"
  635. },
  636. "metricId": {
  637. "description": "指标Id",
  638. "required": false,
  639. "type": "string"
  640. },
  641. "metricName": {
  642. "description": "指标名称",
  643. "required": false,
  644. "type": "string"
  645. },
  646. "metricUnit": {
  647. "description": "指标单位",
  648. "required": false,
  649. "type": "string"
  650. },
  651. "resId": {
  652. "description": "主资源ID",
  653. "required": false,
  654. "type": "string"
  655. },
  656. "metricStatus": {
  657. "description": "指标状态",
  658. "required": false,
  659. "type": "string"
  660. },
  661. "metricStatus4Display": {
  662. "description": "指标状态的显示",
  663. "required": false,
  664. "type": "string"
  665. },
  666. "subResId": {
  667. "description": "子资源ID",
  668. "required": false,
  669. "type": "string"
  670. },
  671. "metricType": {
  672. "description": "指标类型",
  673. "required": false,
  674. "type": "string"
  675. },
  676. "gatherTime": {
  677. "required": false,
  678. "format": "date-time",
  679. "type": "string"
  680. }
  681. }
  682. },
  683. "主资源指标详细信息.": {
  684. "description": "",
  685. "id": "主资源指标详细信息.",
  686. "properties": {
  687. "resMetricList": {
  688. "description": "ResMetricPojo对象集合",
  689. "items": {
  690. "type": "ResMetricPojo"
  691. },
  692. "required": false,
  693. "type": "array"
  694. }
  695. }
  696. },
  697. "GetSubResMetricListPojo": {
  698. "description": "",
  699. "id": "GetSubResMetricListPojo",
  700. "properties": {
  701. "subResId": {
  702. "description": "子资源ID(可通过/res/getResInstanceList接口获得)",
  703. "required": true,
  704. "type": "string"
  705. },
  706. "metricType": {
  707. "description": "指标类型,默认取所有类型(可用性指标:AVAIL 配置指标:CONF 信息指标:INFO 性能指标:PERF)",
  708. "required": false,
  709. "type": "string"
  710. }
  711. }
  712. }
  713. },
  714. "produces": [
  715. "application/json"
  716. ],
  717. "resourcePath": "/res",
  718. "swaggerVersion": "1.2"
  719. }