1
0

hostgroup.html 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288
  1. <!DOCTYPE html>
  2. <html>
  3. <head lang="en">
  4. <title> API Documentation </title>
  5. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
  6. <link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
  7. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
  8. <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  9. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
  10. <style type="text/css">
  11. body {
  12. font-family: 'Roboto', sans-serif;
  13. }
  14. .hidden {
  15. display:none;
  16. }
  17. pre {
  18. outline: 1px solid #ccc;
  19. padding: 5px; margin: 5px;
  20. }
  21. .string { color: green; }
  22. .number { color: darkorange; }
  23. .boolean { color: blue; }
  24. .null { color: magenta; }
  25. .key { color: red; }
  26. </style>
  27. <style type="text/css">
  28. pre.prettyprint {
  29. border: 1px solid #ccc;
  30. margin-bottom: 0;
  31. padding: 9.5px;
  32. }
  33. </style>
  34. <script>
  35. function syntaxHighlight(json) {
  36. json = json.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
  37. return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {
  38. var cls = 'number';
  39. if (/^"/.test(match)) {
  40. if (/:$/.test(match)) {
  41. cls = 'key';
  42. } else {
  43. cls = 'string';
  44. }
  45. } else if (/true|false/.test(match)) {
  46. cls = 'boolean';
  47. } else if (/null/.test(match)) {
  48. cls = 'null';
  49. }
  50. return '<span class="' + cls + '">' + match + '</span>';
  51. });
  52. }
  53. function spaceJson(json){
  54. var validJson = JSON.parse(json);
  55. return JSON.stringify(validJson, undefined, 4);
  56. }
  57. </script>
  58. </head>
  59. <body>
  60. <nav class="navbar navbar-default navbar-fixed-top">
  61. <div class="container-fluid">
  62. <div class="navbar-header">
  63. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
  64. data-target="#bs-example-navbar-collapse-1">
  65. <span class="sr-only">Toggle navigation</span>
  66. <span class="icon-bar"></span>
  67. <span class="icon-bar"></span>
  68. <span class="icon-bar"></span>
  69. </button>
  70. <a class="navbar-brand" href="#">Gin</a>
  71. <p class="navbar-text">Developed by Gophers at <a href="http://betacraft.co">Betacraft</a></p>
  72. </div>
  73. </div>
  74. </nav>
  75. <div class="container-fluid" style="margin-top: 70px;margin-bottom: 20px;">
  76. <div class="container-fluid">
  77. <div class="col-md-4">
  78. <div class="panel panel-default">
  79. <div class="panel-heading">Base Urls</div>
  80. <div class="panel-body">
  81. <p>Production : <strong>/api/v1</strong></p>
  82. <p>Staging : <strong>/api/v1</strong></p>
  83. </div>
  84. </div>
  85. <ul class="nav nav-pills nav-stacked" role="tablist">
  86. <li role="presentation"><a href="#0top" role="tab" data-toggle="tab">POST : /api/v1/hostgroup</a></li>
  87. <li role="presentation"><a href="#1top" role="tab" data-toggle="tab">POST : /api/v1/hostgroup/host</a></li>
  88. <li role="presentation"><a href="#2top" role="tab" data-toggle="tab">PUT : /api/v1/hostgroup/host</a></li>
  89. <li role="presentation"><a href="#3top" role="tab" data-toggle="tab">GET : /api/v1/hostgroup/343</a></li>
  90. <li role="presentation"><a href="#4top" role="tab" data-toggle="tab">GET : /api/v1/hostgroup</a></li>
  91. <li role="presentation"><a href="#5top" role="tab" data-toggle="tab">DELETE : /api/v1/hostgroup/343</a></li>
  92. <li role="presentation"><a href="#6top" role="tab" data-toggle="tab">GET : /api/v1/hostgroup/3/template</a></li>
  93. <li role="presentation"><a href="#7top" role="tab" data-toggle="tab">PUT : /api/v1/hostgroup/template</a></li>
  94. <li role="presentation"><a href="#8top" role="tab" data-toggle="tab">POST : /api/v1/hostgroup/template</a></li>
  95. <ul>
  96. </div>
  97. <div class="col-md-8 tab-content">
  98. <div id="0top" role="tabpanel" class="tab-pane col-md-10">
  99. <p> <H4> Request Headers </H4> </p>
  100. <table class="table table-bordered table-striped">
  101. <tr>
  102. <th>Key</th>
  103. <th>Value</th>
  104. </tr>
  105. <tr>
  106. <td>Apitoken</td>
  107. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  108. </tr>
  109. <tr>
  110. <td>Content-Type</td>
  111. <td> application/json </td>
  112. </tr>
  113. <tr>
  114. <td>X-Forwarded-For</td>
  115. <td> 127.0.0.1 </td>
  116. </tr>
  117. </table>
  118. <p> <H4> Request Body </H4> </p>
  119. <pre id="request-body-0-0" class="prettyprint">{&#34;name&#34;:&#34;testhostgroup&#34;}</pre>
  120. <script>
  121. var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};
  122. if (requestHeader["Content-Type"] === "application/json"){
  123. try {
  124. var jsonStr = spaceJson("{\"name\":\"testhostgroup\"}");
  125. document.getElementById('request-body0-0').innerHTML = syntaxHighlight(jsonStr);
  126. } catch (e) {
  127. }
  128. }
  129. </script>
  130. <p><h4> Response Code</h4></p>
  131. <pre class="prettyprint lang-json">200</pre>
  132. <p><h4> Response Headers</h4></p>
  133. <table class="table table-bordered table-striped">
  134. <tr>
  135. <th>Key</th>
  136. <th>Value</th>
  137. </tr>
  138. <tr>
  139. <td>Access-Control-Allow-Credentials</td>
  140. <td> true</td>
  141. </tr>
  142. <tr>
  143. <td>Access-Control-Allow-Headers</td>
  144. <td> Content-Type, Content-Length, Apitoken</td>
  145. </tr>
  146. <tr>
  147. <td>Access-Control-Allow-Methods</td>
  148. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  149. </tr>
  150. <tr>
  151. <td>Access-Control-Allow-Origin</td>
  152. <td> *</td>
  153. </tr>
  154. <tr>
  155. <td>Access-Control-Expose-Headers</td>
  156. <td> Content-Length</td>
  157. </tr>
  158. <tr>
  159. <td>Access-Control-Max-Age</td>
  160. <td> 86400</td>
  161. </tr>
  162. <tr>
  163. <td>Content-Type</td>
  164. <td> application/json; charset=utf-8</td>
  165. </tr>
  166. </table>
  167. <p> <H4> Response Body </H4> </p>
  168. <pre class="prettyprint" id="response-body-0-0">{&#34;id&#34;:343,&#34;grp_name&#34;:&#34;testhostgroup&#34;,&#34;create_user&#34;:&#34;root&#34;}</pre>
  169. <script>
  170. var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};
  171. if (responseHeader["Content-Type"] === "application/json"){
  172. try {
  173. var jsonStr = spaceJson("{\"id\":343,\"grp_name\":\"testhostgroup\",\"create_user\":\"root\"}");
  174. document.getElementById('response-body-0-0').innerHTML = syntaxHighlight(jsonStr);
  175. } catch (e) {
  176. }
  177. }
  178. </script>
  179. <hr>
  180. </div>
  181. <div id="1top" role="tabpanel" class="tab-pane col-md-10">
  182. <p> <H4> Request Headers </H4> </p>
  183. <table class="table table-bordered table-striped">
  184. <tr>
  185. <th>Key</th>
  186. <th>Value</th>
  187. </tr>
  188. <tr>
  189. <td>Apitoken</td>
  190. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  191. </tr>
  192. <tr>
  193. <td>Content-Type</td>
  194. <td> application/json </td>
  195. </tr>
  196. <tr>
  197. <td>X-Forwarded-For</td>
  198. <td> 127.0.0.1 </td>
  199. </tr>
  200. </table>
  201. <p> <H4> Request Body </H4> </p>
  202. <pre id="request-body-1-0" class="prettyprint">{&#34;hosts&#34;:[&#34;testhostgroup&#34;,&#34;agent_test&#34;],&#34;hostgroup_id&#34;:342}</pre>
  203. <script>
  204. var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};
  205. if (requestHeader["Content-Type"] === "application/json"){
  206. try {
  207. var jsonStr = spaceJson("{\"hosts\":[\"testhostgroup\",\"agent_test\"],\"hostgroup_id\":342}");
  208. document.getElementById('request-body1-0').innerHTML = syntaxHighlight(jsonStr);
  209. } catch (e) {
  210. }
  211. }
  212. </script>
  213. <p><h4> Response Code</h4></p>
  214. <pre class="prettyprint lang-json">417</pre>
  215. <p><h4> Response Headers</h4></p>
  216. <table class="table table-bordered table-striped">
  217. <tr>
  218. <th>Key</th>
  219. <th>Value</th>
  220. </tr>
  221. <tr>
  222. <td>Access-Control-Allow-Credentials</td>
  223. <td> true</td>
  224. </tr>
  225. <tr>
  226. <td>Access-Control-Allow-Headers</td>
  227. <td> Content-Type, Content-Length, Apitoken</td>
  228. </tr>
  229. <tr>
  230. <td>Access-Control-Allow-Methods</td>
  231. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  232. </tr>
  233. <tr>
  234. <td>Access-Control-Allow-Origin</td>
  235. <td> *</td>
  236. </tr>
  237. <tr>
  238. <td>Access-Control-Expose-Headers</td>
  239. <td> Content-Length</td>
  240. </tr>
  241. <tr>
  242. <td>Access-Control-Max-Age</td>
  243. <td> 86400</td>
  244. </tr>
  245. <tr>
  246. <td>Content-Type</td>
  247. <td> application/json; charset=utf-8</td>
  248. </tr>
  249. </table>
  250. <p> <H4> Response Body </H4> </p>
  251. <pre class="prettyprint" id="response-body-1-0">{&#34;error&#34;:&#34;record not found&#34;}</pre>
  252. <script>
  253. var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};
  254. if (responseHeader["Content-Type"] === "application/json"){
  255. try {
  256. var jsonStr = spaceJson("{\"error\":\"record not found\"}");
  257. document.getElementById('response-body-1-0').innerHTML = syntaxHighlight(jsonStr);
  258. } catch (e) {
  259. }
  260. }
  261. </script>
  262. <hr>
  263. <p> <H4> Request Headers </H4> </p>
  264. <table class="table table-bordered table-striped">
  265. <tr>
  266. <th>Key</th>
  267. <th>Value</th>
  268. </tr>
  269. <tr>
  270. <td>Apitoken</td>
  271. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  272. </tr>
  273. <tr>
  274. <td>Content-Type</td>
  275. <td> application/json </td>
  276. </tr>
  277. <tr>
  278. <td>X-Forwarded-For</td>
  279. <td> 127.0.0.1 </td>
  280. </tr>
  281. </table>
  282. <p> <H4> Request Body </H4> </p>
  283. <pre id="request-body-1-1" class="prettyprint">{&#34;hosts&#34;:[&#34;testhostgroup&#34;,&#34;agent_test&#34;],&#34;hostgroup_id&#34;:343}</pre>
  284. <script>
  285. var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};
  286. if (requestHeader["Content-Type"] === "application/json"){
  287. try {
  288. var jsonStr = spaceJson("{\"hosts\":[\"testhostgroup\",\"agent_test\"],\"hostgroup_id\":343}");
  289. document.getElementById('request-body1-1').innerHTML = syntaxHighlight(jsonStr);
  290. } catch (e) {
  291. }
  292. }
  293. </script>
  294. <p><h4> Response Code</h4></p>
  295. <pre class="prettyprint lang-json">200</pre>
  296. <p><h4> Response Headers</h4></p>
  297. <table class="table table-bordered table-striped">
  298. <tr>
  299. <th>Key</th>
  300. <th>Value</th>
  301. </tr>
  302. <tr>
  303. <td>Access-Control-Allow-Credentials</td>
  304. <td> true</td>
  305. </tr>
  306. <tr>
  307. <td>Access-Control-Allow-Headers</td>
  308. <td> Content-Type, Content-Length, Apitoken</td>
  309. </tr>
  310. <tr>
  311. <td>Access-Control-Allow-Methods</td>
  312. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  313. </tr>
  314. <tr>
  315. <td>Access-Control-Allow-Origin</td>
  316. <td> *</td>
  317. </tr>
  318. <tr>
  319. <td>Access-Control-Expose-Headers</td>
  320. <td> Content-Length</td>
  321. </tr>
  322. <tr>
  323. <td>Access-Control-Max-Age</td>
  324. <td> 86400</td>
  325. </tr>
  326. <tr>
  327. <td>Content-Type</td>
  328. <td> application/json; charset=utf-8</td>
  329. </tr>
  330. </table>
  331. <p> <H4> Response Body </H4> </p>
  332. <pre class="prettyprint" id="response-body-1-1">{&#34;message&#34;:&#34;[9312 9313] bind to hostgroup: 343&#34;}</pre>
  333. <script>
  334. var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};
  335. if (responseHeader["Content-Type"] === "application/json"){
  336. try {
  337. var jsonStr = spaceJson("{\"message\":\"[9312 9313] bind to hostgroup: 343\"}");
  338. document.getElementById('response-body-1-1').innerHTML = syntaxHighlight(jsonStr);
  339. } catch (e) {
  340. }
  341. }
  342. </script>
  343. <hr>
  344. </div>
  345. <div id="2top" role="tabpanel" class="tab-pane col-md-10">
  346. <p> <H4> Request Headers </H4> </p>
  347. <table class="table table-bordered table-striped">
  348. <tr>
  349. <th>Key</th>
  350. <th>Value</th>
  351. </tr>
  352. <tr>
  353. <td>Apitoken</td>
  354. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  355. </tr>
  356. <tr>
  357. <td>Content-Type</td>
  358. <td> application/json </td>
  359. </tr>
  360. <tr>
  361. <td>X-Forwarded-For</td>
  362. <td> 127.0.0.1 </td>
  363. </tr>
  364. </table>
  365. <p> <H4> Request Body </H4> </p>
  366. <pre id="request-body-2-0" class="prettyprint">{&#34;hostgroup_id&#34;:343,&#34;host_id&#34;:9312}</pre>
  367. <script>
  368. var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};
  369. if (requestHeader["Content-Type"] === "application/json"){
  370. try {
  371. var jsonStr = spaceJson("{\"hostgroup_id\":343,\"host_id\":9312}");
  372. document.getElementById('request-body2-0').innerHTML = syntaxHighlight(jsonStr);
  373. } catch (e) {
  374. }
  375. }
  376. </script>
  377. <p><h4> Response Code</h4></p>
  378. <pre class="prettyprint lang-json">200</pre>
  379. <p><h4> Response Headers</h4></p>
  380. <table class="table table-bordered table-striped">
  381. <tr>
  382. <th>Key</th>
  383. <th>Value</th>
  384. </tr>
  385. <tr>
  386. <td>Access-Control-Allow-Credentials</td>
  387. <td> true</td>
  388. </tr>
  389. <tr>
  390. <td>Access-Control-Allow-Headers</td>
  391. <td> Content-Type, Content-Length, Apitoken</td>
  392. </tr>
  393. <tr>
  394. <td>Access-Control-Allow-Methods</td>
  395. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  396. </tr>
  397. <tr>
  398. <td>Access-Control-Allow-Origin</td>
  399. <td> *</td>
  400. </tr>
  401. <tr>
  402. <td>Access-Control-Expose-Headers</td>
  403. <td> Content-Length</td>
  404. </tr>
  405. <tr>
  406. <td>Access-Control-Max-Age</td>
  407. <td> 86400</td>
  408. </tr>
  409. <tr>
  410. <td>Content-Type</td>
  411. <td> application/json; charset=utf-8</td>
  412. </tr>
  413. </table>
  414. <p> <H4> Response Body </H4> </p>
  415. <pre class="prettyprint" id="response-body-2-0">{&#34;message&#34;:&#34;unbind host:9312 of hostgroup: 343&#34;}</pre>
  416. <script>
  417. var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};
  418. if (responseHeader["Content-Type"] === "application/json"){
  419. try {
  420. var jsonStr = spaceJson("{\"message\":\"unbind host:9312 of hostgroup: 343\"}");
  421. document.getElementById('response-body-2-0').innerHTML = syntaxHighlight(jsonStr);
  422. } catch (e) {
  423. }
  424. }
  425. </script>
  426. <hr>
  427. </div>
  428. <div id="3top" role="tabpanel" class="tab-pane col-md-10">
  429. <p> <H4> Request Headers </H4> </p>
  430. <table class="table table-bordered table-striped">
  431. <tr>
  432. <th>Key</th>
  433. <th>Value</th>
  434. </tr>
  435. <tr>
  436. <td>Apitoken</td>
  437. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  438. </tr>
  439. <tr>
  440. <td>X-Forwarded-For</td>
  441. <td> 127.0.0.1 </td>
  442. </tr>
  443. </table>
  444. <p><h4> Response Code</h4></p>
  445. <pre class="prettyprint lang-json">200</pre>
  446. <p><h4> Response Headers</h4></p>
  447. <table class="table table-bordered table-striped">
  448. <tr>
  449. <th>Key</th>
  450. <th>Value</th>
  451. </tr>
  452. <tr>
  453. <td>Access-Control-Allow-Credentials</td>
  454. <td> true</td>
  455. </tr>
  456. <tr>
  457. <td>Access-Control-Allow-Headers</td>
  458. <td> Content-Type, Content-Length, Apitoken</td>
  459. </tr>
  460. <tr>
  461. <td>Access-Control-Allow-Methods</td>
  462. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  463. </tr>
  464. <tr>
  465. <td>Access-Control-Allow-Origin</td>
  466. <td> *</td>
  467. </tr>
  468. <tr>
  469. <td>Access-Control-Expose-Headers</td>
  470. <td> Content-Length</td>
  471. </tr>
  472. <tr>
  473. <td>Access-Control-Max-Age</td>
  474. <td> 86400</td>
  475. </tr>
  476. <tr>
  477. <td>Content-Type</td>
  478. <td> application/json; charset=utf-8</td>
  479. </tr>
  480. </table>
  481. <p> <H4> Response Body </H4> </p>
  482. <pre class="prettyprint" id="response-body-3-0">{&#34;hostgroup&#34;:{&#34;id&#34;:343,&#34;grp_name&#34;:&#34;testhostgroup&#34;,&#34;create_user&#34;:&#34;root&#34;},&#34;hosts&#34;:[{&#34;id&#34;:9313,&#34;hostname&#34;:&#34;agent_test&#34;,&#34;ip&#34;:&#34;&#34;,&#34;agent_version&#34;:&#34;&#34;,&#34;plugin_version&#34;:&#34;&#34;,&#34;maintain_begin&#34;:0,&#34;maintain_end&#34;:0}]}</pre>
  483. <script>
  484. var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};
  485. if (responseHeader["Content-Type"] === "application/json"){
  486. try {
  487. var jsonStr = spaceJson("{\"hostgroup\":{\"id\":343,\"grp_name\":\"testhostgroup\",\"create_user\":\"root\"},\"hosts\":[{\"id\":9313,\"hostname\":\"agent_test\",\"ip\":\"\",\"agent_version\":\"\",\"plugin_version\":\"\",\"maintain_begin\":0,\"maintain_end\":0}]}");
  488. document.getElementById('response-body-3-0').innerHTML = syntaxHighlight(jsonStr);
  489. } catch (e) {
  490. }
  491. }
  492. </script>
  493. <hr>
  494. </div>
  495. <div id="4top" role="tabpanel" class="tab-pane col-md-10">
  496. <p> <H4> Request Headers </H4> </p>
  497. <table class="table table-bordered table-striped">
  498. <tr>
  499. <th>Key</th>
  500. <th>Value</th>
  501. </tr>
  502. <tr>
  503. <td>Apitoken</td>
  504. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  505. </tr>
  506. <tr>
  507. <td>X-Forwarded-For</td>
  508. <td> 127.0.0.1 </td>
  509. </tr>
  510. </table>
  511. <p><h4> Response Code</h4></p>
  512. <pre class="prettyprint lang-json">200</pre>
  513. <p><h4> Response Headers</h4></p>
  514. <table class="table table-bordered table-striped">
  515. <tr>
  516. <th>Key</th>
  517. <th>Value</th>
  518. </tr>
  519. <tr>
  520. <td>Access-Control-Allow-Credentials</td>
  521. <td> true</td>
  522. </tr>
  523. <tr>
  524. <td>Access-Control-Allow-Headers</td>
  525. <td> Content-Type, Content-Length, Apitoken</td>
  526. </tr>
  527. <tr>
  528. <td>Access-Control-Allow-Methods</td>
  529. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  530. </tr>
  531. <tr>
  532. <td>Access-Control-Allow-Origin</td>
  533. <td> *</td>
  534. </tr>
  535. <tr>
  536. <td>Access-Control-Expose-Headers</td>
  537. <td> Content-Length</td>
  538. </tr>
  539. <tr>
  540. <td>Access-Control-Max-Age</td>
  541. <td> 86400</td>
  542. </tr>
  543. <tr>
  544. <td>Content-Type</td>
  545. <td> application/json; charset=utf-8</td>
  546. </tr>
  547. </table>
  548. <p> <H4> Response Body </H4> </p>
  549. <pre class="prettyprint" id="response-body-4-0">[{&#34;id&#34;:3,&#34;grp_name&#34;:&#34;hostnameA&#34;,&#34;create_user&#34;:&#34;UserA&#34;},{&#34;id&#34;:5,&#34;grp_name&#34;:&#34;TAI&#34;,&#34;create_user&#34;:&#34;UserB&#34;},{&#34;id&#34;:8,&#34;grp_name&#34;:&#34;ForTestHostG&#34;,&#34;create_user&#34;:&#34;root&#34;}]</pre>
  550. <script>
  551. var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};
  552. if (responseHeader["Content-Type"] === "application/json"){
  553. try {
  554. var jsonStr = spaceJson("[{\"id\":3,\"grp_name\":\"hostnameA\",\"create_user\":\"UserA\"},{\"id\":5,\"grp_name\":\"TAI\",\"create_user\":\"UserB\"},{\"id\":8,\"grp_name\":\"ForTestHostG\",\"create_user\":\"root\"}]");
  555. document.getElementById('response-body-4-0').innerHTML = syntaxHighlight(jsonStr);
  556. } catch (e) {
  557. }
  558. }
  559. </script>
  560. <hr>
  561. <p> <H4> Request Headers </H4> </p>
  562. <table class="table table-bordered table-striped">
  563. <tr>
  564. <th>Key</th>
  565. <th>Value</th>
  566. </tr>
  567. <tr>
  568. <td>Apitoken</td>
  569. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  570. </tr>
  571. <tr>
  572. <td>X-Forwarded-For</td>
  573. <td> 127.0.0.1 </td>
  574. </tr>
  575. </table>
  576. <p> <H4> URL Params </H4> </p>
  577. <table class="table table-bordered table-striped">
  578. <tr>
  579. <th>Key</th>
  580. <th>Value</th>
  581. </tr>
  582. <tr>
  583. <td>limit</td>
  584. <td> 10</td>
  585. </tr>
  586. <tr>
  587. <td>page</td>
  588. <td> 1</td>
  589. </tr>
  590. </table>
  591. <p><h4> Response Code</h4></p>
  592. <pre class="prettyprint lang-json">200</pre>
  593. <p><h4> Response Headers</h4></p>
  594. <table class="table table-bordered table-striped">
  595. <tr>
  596. <th>Key</th>
  597. <th>Value</th>
  598. </tr>
  599. <tr>
  600. <td>Access-Control-Allow-Credentials</td>
  601. <td> true</td>
  602. </tr>
  603. <tr>
  604. <td>Access-Control-Allow-Headers</td>
  605. <td> Content-Type, Content-Length, Apitoken</td>
  606. </tr>
  607. <tr>
  608. <td>Access-Control-Allow-Methods</td>
  609. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  610. </tr>
  611. <tr>
  612. <td>Access-Control-Allow-Origin</td>
  613. <td> *</td>
  614. </tr>
  615. <tr>
  616. <td>Access-Control-Expose-Headers</td>
  617. <td> Content-Length</td>
  618. </tr>
  619. <tr>
  620. <td>Access-Control-Max-Age</td>
  621. <td> 86400</td>
  622. </tr>
  623. <tr>
  624. <td>Content-Type</td>
  625. <td> application/json; charset=utf-8</td>
  626. </tr>
  627. </table>
  628. <p> <H4> Response Body </H4> </p>
  629. <pre class="prettyprint" id="response-body-4-1">[{&#34;id&#34;:3,&#34;grp_name&#34;:&#34;docker-A&#34;,&#34;create_user&#34;:&#34;user-A&#34;},{&#34;id&#34;:5,&#34;grp_name&#34;:&#34;docker-T&#34;,&#34;create_user&#34;:&#34;cheminlin&#34;},{&#34;id&#34;:8,&#34;grp_name&#34;:&#34;docker-F&#34;,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:9,&#34;grp_name&#34;:&#34;docker-B&#34;,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:11,&#34;grp_name&#34;:&#34;docker-D&#34;,&#34;create_user&#34;:&#34;user-C&#34;},{&#34;id&#34;:12,&#34;grp_name&#34;:&#34;docker-E&#34;,&#34;create_user&#34;:&#34;user-C&#34;},{&#34;id&#34;:14,&#34;grp_name&#34;:&#34;docker-G&#34;,&#34;create_user&#34;:&#34;user-C&#34;},{&#34;id&#34;:15,&#34;grp_name&#34;:&#34;docker-G2&#34;,&#34;create_user&#34;:&#34;user-C&#34;},{&#34;id&#34;:16,&#34;grp_name&#34;:&#34;docker-H&#34;,&#34;create_user&#34;:&#34;user-C&#34;},{&#34;id&#34;:17,&#34;grp_name&#34;:&#34;tools&#34;,&#34;create_user&#34;:&#34;user-C&#34;}]</pre>
  630. <script>
  631. var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};
  632. if (responseHeader["Content-Type"] === "application/json"){
  633. try {
  634. var jsonStr = spaceJson("[{\"id\":3,\"grp_name\":\"docker-A\",\"create_user\":\"user-A\"},{\"id\":5,\"grp_name\":\"docker-T\",\"create_user\":\"cheminlin\"},{\"id\":8,\"grp_name\":\"docker-F\",\"create_user\":\"root\"},{\"id\":9,\"grp_name\":\"docker-B\",\"create_user\":\"root\"},{\"id\":11,\"grp_name\":\"docker-D\",\"create_user\":\"user-C\"},{\"id\":12,\"grp_name\":\"docker-E\",\"create_user\":\"user-C\"},{\"id\":14,\"grp_name\":\"docker-G\",\"create_user\":\"user-C\"},{\"id\":15,\"grp_name\":\"docker-G2\",\"create_user\":\"user-C\"},{\"id\":16,\"grp_name\":\"docker-H\",\"create_user\":\"user-C\"},{\"id\":17,\"grp_name\":\"tools\",\"create_user\":\"user-C\"}]");
  635. document.getElementById('response-body-4-1').innerHTML = syntaxHighlight(jsonStr);
  636. } catch (e) {
  637. }
  638. }
  639. </script>
  640. <hr>
  641. </div>
  642. <div id="5top" role="tabpanel" class="tab-pane col-md-10">
  643. <p> <H4> Request Headers </H4> </p>
  644. <table class="table table-bordered table-striped">
  645. <tr>
  646. <th>Key</th>
  647. <th>Value</th>
  648. </tr>
  649. <tr>
  650. <td>Apitoken</td>
  651. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  652. </tr>
  653. <tr>
  654. <td>X-Forwarded-For</td>
  655. <td> 127.0.0.1 </td>
  656. </tr>
  657. </table>
  658. <p><h4> Response Code</h4></p>
  659. <pre class="prettyprint lang-json">200</pre>
  660. <p><h4> Response Headers</h4></p>
  661. <table class="table table-bordered table-striped">
  662. <tr>
  663. <th>Key</th>
  664. <th>Value</th>
  665. </tr>
  666. <tr>
  667. <td>Access-Control-Allow-Credentials</td>
  668. <td> true</td>
  669. </tr>
  670. <tr>
  671. <td>Access-Control-Allow-Headers</td>
  672. <td> Content-Type, Content-Length, Apitoken</td>
  673. </tr>
  674. <tr>
  675. <td>Access-Control-Allow-Methods</td>
  676. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  677. </tr>
  678. <tr>
  679. <td>Access-Control-Allow-Origin</td>
  680. <td> *</td>
  681. </tr>
  682. <tr>
  683. <td>Access-Control-Expose-Headers</td>
  684. <td> Content-Length</td>
  685. </tr>
  686. <tr>
  687. <td>Access-Control-Max-Age</td>
  688. <td> 86400</td>
  689. </tr>
  690. <tr>
  691. <td>Content-Type</td>
  692. <td> application/json; charset=utf-8</td>
  693. </tr>
  694. </table>
  695. <p> <H4> Response Body </H4> </p>
  696. <pre class="prettyprint" id="response-body-5-0">{&#34;message&#34;:&#34;hostgroup:343 has been deleted&#34;}</pre>
  697. <script>
  698. var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};
  699. if (responseHeader["Content-Type"] === "application/json"){
  700. try {
  701. var jsonStr = spaceJson("{\"message\":\"hostgroup:343 has been deleted\"}");
  702. document.getElementById('response-body-5-0').innerHTML = syntaxHighlight(jsonStr);
  703. } catch (e) {
  704. }
  705. }
  706. </script>
  707. <hr>
  708. </div>
  709. <div id="6top" role="tabpanel" class="tab-pane col-md-10">
  710. <p> <H4> Request Headers </H4> </p>
  711. <table class="table table-bordered table-striped">
  712. <tr>
  713. <th>Key</th>
  714. <th>Value</th>
  715. </tr>
  716. <tr>
  717. <td>Apitoken</td>
  718. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  719. </tr>
  720. <tr>
  721. <td>X-Forwarded-For</td>
  722. <td> 127.0.0.1 </td>
  723. </tr>
  724. </table>
  725. <p><h4> Response Code</h4></p>
  726. <pre class="prettyprint lang-json">200</pre>
  727. <p><h4> Response Headers</h4></p>
  728. <table class="table table-bordered table-striped">
  729. <tr>
  730. <th>Key</th>
  731. <th>Value</th>
  732. </tr>
  733. <tr>
  734. <td>Access-Control-Allow-Credentials</td>
  735. <td> true</td>
  736. </tr>
  737. <tr>
  738. <td>Access-Control-Allow-Headers</td>
  739. <td> Content-Type, Content-Length, Apitoken</td>
  740. </tr>
  741. <tr>
  742. <td>Access-Control-Allow-Methods</td>
  743. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  744. </tr>
  745. <tr>
  746. <td>Access-Control-Allow-Origin</td>
  747. <td> *</td>
  748. </tr>
  749. <tr>
  750. <td>Access-Control-Expose-Headers</td>
  751. <td> Content-Length</td>
  752. </tr>
  753. <tr>
  754. <td>Access-Control-Max-Age</td>
  755. <td> 86400</td>
  756. </tr>
  757. <tr>
  758. <td>Content-Type</td>
  759. <td> application/json; charset=utf-8</td>
  760. </tr>
  761. </table>
  762. <p> <H4> Response Body </H4> </p>
  763. <pre class="prettyprint" id="response-body-6-0">{&#34;hostgroup&#34;:{&#34;id&#34;:3,&#34;grp_name&#34;:&#34;hostgroupA&#34;,&#34;create_user&#34;:&#34;root&#34;},&#34;templates&#34;:[{&#34;id&#34;:5,&#34;tpl_name&#34;:&#34;TplA&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:12,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:91,&#34;tpl_name&#34;:&#34;TplB&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:59,&#34;create_user&#34;:&#34;userA&#34;},{&#34;id&#34;:94,&#34;tpl_name&#34;:&#34;TplB&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:62,&#34;create_user&#34;:&#34;userA&#34;},{&#34;id&#34;:103,&#34;tpl_name&#34;:&#34;TplC&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:74,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:104,&#34;tpl_name&#34;:&#34;TplD&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:75,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:105,&#34;tpl_name&#34;:&#34;TplE&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:76,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:116,&#34;tpl_name&#34;:&#34;TplG&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:87,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:125,&#34;tpl_name&#34;:&#34;TplH&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:99,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:126,&#34;tpl_name&#34;:&#34;http&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:100,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:127,&#34;tpl_name&#34;:&#34;TplJ&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:101,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:194,&#34;tpl_name&#34;:&#34;TplK&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:153,&#34;create_user&#34;:&#34;root&#34;},{&#34;id&#34;:208,&#34;tpl_name&#34;:&#34;PT_TEST&#34;,&#34;parent_id&#34;:0,&#34;action_id&#34;:163,&#34;create_user&#34;:&#34;userO&#34;}]}</pre>
  764. <script>
  765. var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};
  766. if (responseHeader["Content-Type"] === "application/json"){
  767. try {
  768. var jsonStr = spaceJson("{\"hostgroup\":{\"id\":3,\"grp_name\":\"hostgroupA\",\"create_user\":\"root\"},\"templates\":[{\"id\":5,\"tpl_name\":\"TplA\",\"parent_id\":0,\"action_id\":12,\"create_user\":\"root\"},{\"id\":91,\"tpl_name\":\"TplB\",\"parent_id\":0,\"action_id\":59,\"create_user\":\"userA\"},{\"id\":94,\"tpl_name\":\"TplB\",\"parent_id\":0,\"action_id\":62,\"create_user\":\"userA\"},{\"id\":103,\"tpl_name\":\"TplC\",\"parent_id\":0,\"action_id\":74,\"create_user\":\"root\"},{\"id\":104,\"tpl_name\":\"TplD\",\"parent_id\":0,\"action_id\":75,\"create_user\":\"root\"},{\"id\":105,\"tpl_name\":\"TplE\",\"parent_id\":0,\"action_id\":76,\"create_user\":\"root\"},{\"id\":116,\"tpl_name\":\"TplG\",\"parent_id\":0,\"action_id\":87,\"create_user\":\"root\"},{\"id\":125,\"tpl_name\":\"TplH\",\"parent_id\":0,\"action_id\":99,\"create_user\":\"root\"},{\"id\":126,\"tpl_name\":\"TplI\",\"parent_id\":0,\"action_id\":100,\"create_user\":\"root\"},{\"id\":127,\"tpl_name\":\"TplJ\",\"parent_id\":0,\"action_id\":101,\"create_user\":\"root\"},{\"id\":194,\"tpl_name\":\"TplK\",\"parent_id\":0,\"action_id\":153,\"create_user\":\"root\"},{\"id\":208,\"tpl_name\":\"PT_TEST\",\"parent_id\":0,\"action_id\":163,\"create_user\":\"userO\"}]}");
  769. document.getElementById('response-body-6-0').innerHTML = syntaxHighlight(jsonStr);
  770. } catch (e) {
  771. }
  772. }
  773. </script>
  774. <hr>
  775. </div>
  776. <div id="7top" role="tabpanel" class="tab-pane col-md-10">
  777. <p> <H4> Request Headers </H4> </p>
  778. <table class="table table-bordered table-striped">
  779. <tr>
  780. <th>Key</th>
  781. <th>Value</th>
  782. </tr>
  783. <tr>
  784. <td>Apitoken</td>
  785. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  786. </tr>
  787. <tr>
  788. <td>Content-Type</td>
  789. <td> application/json </td>
  790. </tr>
  791. <tr>
  792. <td>X-Forwarded-For</td>
  793. <td> 127.0.0.1 </td>
  794. </tr>
  795. </table>
  796. <p> <H4> Request Body </H4> </p>
  797. <pre id="request-body-7-0" class="prettyprint">{&#34;tpl_id&#34;:5,&#34;grp_id&#34;:3}</pre>
  798. <script>
  799. var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};
  800. if (requestHeader["Content-Type"] === "application/json"){
  801. try {
  802. var jsonStr = spaceJson("{\"tpl_id\":5,\"grp_id\":3}");
  803. document.getElementById('request-body7-0').innerHTML = syntaxHighlight(jsonStr);
  804. } catch (e) {
  805. }
  806. }
  807. </script>
  808. <p><h4> Response Code</h4></p>
  809. <pre class="prettyprint lang-json">200</pre>
  810. <p><h4> Response Headers</h4></p>
  811. <table class="table table-bordered table-striped">
  812. <tr>
  813. <th>Key</th>
  814. <th>Value</th>
  815. </tr>
  816. <tr>
  817. <td>Access-Control-Allow-Credentials</td>
  818. <td> true</td>
  819. </tr>
  820. <tr>
  821. <td>Access-Control-Allow-Headers</td>
  822. <td> Content-Type, Content-Length, Apitoken</td>
  823. </tr>
  824. <tr>
  825. <td>Access-Control-Allow-Methods</td>
  826. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  827. </tr>
  828. <tr>
  829. <td>Access-Control-Allow-Origin</td>
  830. <td> *</td>
  831. </tr>
  832. <tr>
  833. <td>Access-Control-Expose-Headers</td>
  834. <td> Content-Length</td>
  835. </tr>
  836. <tr>
  837. <td>Access-Control-Max-Age</td>
  838. <td> 86400</td>
  839. </tr>
  840. <tr>
  841. <td>Content-Type</td>
  842. <td> application/json; charset=utf-8</td>
  843. </tr>
  844. </table>
  845. <p> <H4> Response Body </H4> </p>
  846. <pre class="prettyprint" id="response-body-7-0">{&#34;message&#34;:&#34;template: 5 is unbind of HostGroup: 3&#34;}</pre>
  847. <script>
  848. var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};
  849. if (responseHeader["Content-Type"] === "application/json"){
  850. try {
  851. var jsonStr = spaceJson("{\"message\":\"template: 5 is unbind of HostGroup: 3\"}");
  852. document.getElementById('response-body-7-0').innerHTML = syntaxHighlight(jsonStr);
  853. } catch (e) {
  854. }
  855. }
  856. </script>
  857. <hr>
  858. </div>
  859. <div id="8top" role="tabpanel" class="tab-pane col-md-10">
  860. <p> <H4> Request Headers </H4> </p>
  861. <table class="table table-bordered table-striped">
  862. <tr>
  863. <th>Key</th>
  864. <th>Value</th>
  865. </tr>
  866. <tr>
  867. <td>Apitoken</td>
  868. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  869. </tr>
  870. <tr>
  871. <td>Content-Type</td>
  872. <td> application/json </td>
  873. </tr>
  874. <tr>
  875. <td>X-Forwarded-For</td>
  876. <td> 127.0.0.1 </td>
  877. </tr>
  878. </table>
  879. <p> <H4> Request Body </H4> </p>
  880. <pre id="request-body-8-0" class="prettyprint">{&#34;tpl_id&#34;:5,&#34;grp_id&#34;:3}</pre>
  881. <script>
  882. var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};
  883. if (requestHeader["Content-Type"] === "application/json"){
  884. try {
  885. var jsonStr = spaceJson("{\"tpl_id\":5,\"grp_id\":3}");
  886. document.getElementById('request-body8-0').innerHTML = syntaxHighlight(jsonStr);
  887. } catch (e) {
  888. }
  889. }
  890. </script>
  891. <p><h4> Response Code</h4></p>
  892. <pre class="prettyprint lang-json">200</pre>
  893. <p><h4> Response Headers</h4></p>
  894. <table class="table table-bordered table-striped">
  895. <tr>
  896. <th>Key</th>
  897. <th>Value</th>
  898. </tr>
  899. <tr>
  900. <td>Access-Control-Allow-Credentials</td>
  901. <td> true</td>
  902. </tr>
  903. <tr>
  904. <td>Access-Control-Allow-Headers</td>
  905. <td> Content-Type, Content-Length, Apitoken</td>
  906. </tr>
  907. <tr>
  908. <td>Access-Control-Allow-Methods</td>
  909. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  910. </tr>
  911. <tr>
  912. <td>Access-Control-Allow-Origin</td>
  913. <td> *</td>
  914. </tr>
  915. <tr>
  916. <td>Access-Control-Expose-Headers</td>
  917. <td> Content-Length</td>
  918. </tr>
  919. <tr>
  920. <td>Access-Control-Max-Age</td>
  921. <td> 86400</td>
  922. </tr>
  923. <tr>
  924. <td>Content-Type</td>
  925. <td> application/json; charset=utf-8</td>
  926. </tr>
  927. </table>
  928. <p> <H4> Response Body </H4> </p>
  929. <pre class="prettyprint" id="response-body-8-0">{&#34;grp_id&#34;:3,&#34;tpl_id&#34;:5,&#34;bind_user&#34;:2}</pre>
  930. <script>
  931. var responseHeader ={"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Headers":"Content-Type, Content-Length, Apitoken","Access-Control-Allow-Methods":"POST, GET, OPTIONS, PUT, DELETE, UPDATE","Access-Control-Allow-Origin":"*","Access-Control-Expose-Headers":"Content-Length","Access-Control-Max-Age":"86400","Content-Type":"application/json; charset=utf-8"};
  932. if (responseHeader["Content-Type"] === "application/json"){
  933. try {
  934. var jsonStr = spaceJson("{\"grp_id\":3,\"tpl_id\":5,\"bind_user\":2}");
  935. document.getElementById('response-body-8-0').innerHTML = syntaxHighlight(jsonStr);
  936. } catch (e) {
  937. }
  938. }
  939. </script>
  940. <hr>
  941. </div>
  942. </div>
  943. </div>
  944. </div>
  945. <hr>
  946. </body>
  947. </html>