1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288 |
- <!DOCTYPE html>
- <html>
- <head lang="en">
- <title> API Documentation </title>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
- <link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
- <style type="text/css">
- body {
- font-family: 'Roboto', sans-serif;
- }
- .hidden {
- display:none;
- }
- pre {
- outline: 1px solid #ccc;
- padding: 5px; margin: 5px;
- }
- .string { color: green; }
- .number { color: darkorange; }
- .boolean { color: blue; }
- .null { color: magenta; }
- .key { color: red; }
- </style>
- <style type="text/css">
- pre.prettyprint {
- border: 1px solid #ccc;
- margin-bottom: 0;
- padding: 9.5px;
- }
- </style>
- <script>
- function syntaxHighlight(json) {
- json = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
- return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {
- var cls = 'number';
- if (/^"/.test(match)) {
- if (/:$/.test(match)) {
- cls = 'key';
- } else {
- cls = 'string';
- }
- } else if (/true|false/.test(match)) {
- cls = 'boolean';
- } else if (/null/.test(match)) {
- cls = 'null';
- }
- return '<span class="' + cls + '">' + match + '</span>';
- });
- }
- function spaceJson(json){
- var validJson = JSON.parse(json);
- return JSON.stringify(validJson, undefined, 4);
- }
- </script>
- </head>
- <body>
- <nav class="navbar navbar-default navbar-fixed-top">
- <div class="container-fluid">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
- data-target="#bs-example-navbar-collapse-1">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="navbar-brand" href="#">Gin</a>
- <p class="navbar-text">Developed by Gophers at <a href="http://betacraft.co">Betacraft</a></p>
- </div>
- </div>
- </nav>
- <div class="container-fluid" style="margin-top: 70px;margin-bottom: 20px;">
- <div class="container-fluid">
- <div class="col-md-4">
- <div class="panel panel-default">
- <div class="panel-heading">Base Urls</div>
- <div class="panel-body">
- <p>Production : <strong>/api/v1</strong></p>
- <p>Staging : <strong>/api/v1</strong></p>
- </div>
- </div>
- <ul class="nav nav-pills nav-stacked" role="tablist">
- <li role="presentation"><a href="#0top" role="tab" data-toggle="tab">POST : /api/v1/hostgroup</a></li>
- <li role="presentation"><a href="#1top" role="tab" data-toggle="tab">POST : /api/v1/hostgroup/host</a></li>
- <li role="presentation"><a href="#2top" role="tab" data-toggle="tab">PUT : /api/v1/hostgroup/host</a></li>
- <li role="presentation"><a href="#3top" role="tab" data-toggle="tab">GET : /api/v1/hostgroup/343</a></li>
- <li role="presentation"><a href="#4top" role="tab" data-toggle="tab">GET : /api/v1/hostgroup</a></li>
- <li role="presentation"><a href="#5top" role="tab" data-toggle="tab">DELETE : /api/v1/hostgroup/343</a></li>
- <li role="presentation"><a href="#6top" role="tab" data-toggle="tab">GET : /api/v1/hostgroup/3/template</a></li>
- <li role="presentation"><a href="#7top" role="tab" data-toggle="tab">PUT : /api/v1/hostgroup/template</a></li>
- <li role="presentation"><a href="#8top" role="tab" data-toggle="tab">POST : /api/v1/hostgroup/template</a></li>
- <ul>
- </div>
- <div class="col-md-8 tab-content">
- <div id="0top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Apitoken</td>
- <td> {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json
</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> 127.0.0.1
</td>
- </tr>
- </table>
- <p> <H4> Request Body </H4> </p>
- <pre id="request-body-0-0" class="prettyprint">{"name":"testhostgroup"}</pre>
- <script>
- var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};
- if (requestHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"name\":\"testhostgroup\"}");
- document.getElementById('request-body0-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Credentials</td>
- <td> true</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type, Content-Length, Apitoken</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Methods</td>
- <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Access-Control-Expose-Headers</td>
- <td> Content-Length</td>
- </tr>
- <tr>
- <td>Access-Control-Max-Age</td>
- <td> 86400</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-0-0">{"id":343,"grp_name":"testhostgroup","create_user":"root"}</pre>
- <script>
- 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"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"id\":343,\"grp_name\":\"testhostgroup\",\"create_user\":\"root\"}");
- document.getElementById('response-body-0-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="1top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Apitoken</td>
- <td> {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json
</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> 127.0.0.1
</td>
- </tr>
- </table>
- <p> <H4> Request Body </H4> </p>
- <pre id="request-body-1-0" class="prettyprint">{"hosts":["testhostgroup","agent_test"],"hostgroup_id":342}</pre>
- <script>
- var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};
- if (requestHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"hosts\":[\"testhostgroup\",\"agent_test\"],\"hostgroup_id\":342}");
- document.getElementById('request-body1-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">417</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Credentials</td>
- <td> true</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type, Content-Length, Apitoken</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Methods</td>
- <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Access-Control-Expose-Headers</td>
- <td> Content-Length</td>
- </tr>
- <tr>
- <td>Access-Control-Max-Age</td>
- <td> 86400</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-1-0">{"error":"record not found"}</pre>
- <script>
- 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"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"error\":\"record not found\"}");
- document.getElementById('response-body-1-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Apitoken</td>
- <td> {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json
</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> 127.0.0.1
</td>
- </tr>
- </table>
- <p> <H4> Request Body </H4> </p>
- <pre id="request-body-1-1" class="prettyprint">{"hosts":["testhostgroup","agent_test"],"hostgroup_id":343}</pre>
- <script>
- var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};
- if (requestHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"hosts\":[\"testhostgroup\",\"agent_test\"],\"hostgroup_id\":343}");
- document.getElementById('request-body1-1').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Credentials</td>
- <td> true</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type, Content-Length, Apitoken</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Methods</td>
- <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Access-Control-Expose-Headers</td>
- <td> Content-Length</td>
- </tr>
- <tr>
- <td>Access-Control-Max-Age</td>
- <td> 86400</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-1-1">{"message":"[9312 9313] bind to hostgroup: 343"}</pre>
- <script>
- 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"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"message\":\"[9312 9313] bind to hostgroup: 343\"}");
- document.getElementById('response-body-1-1').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="2top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Apitoken</td>
- <td> {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json
</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> 127.0.0.1
</td>
- </tr>
- </table>
- <p> <H4> Request Body </H4> </p>
- <pre id="request-body-2-0" class="prettyprint">{"hostgroup_id":343,"host_id":9312}</pre>
- <script>
- var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};
- if (requestHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"hostgroup_id\":343,\"host_id\":9312}");
- document.getElementById('request-body2-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Credentials</td>
- <td> true</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type, Content-Length, Apitoken</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Methods</td>
- <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Access-Control-Expose-Headers</td>
- <td> Content-Length</td>
- </tr>
- <tr>
- <td>Access-Control-Max-Age</td>
- <td> 86400</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-2-0">{"message":"unbind host:9312 of hostgroup: 343"}</pre>
- <script>
- 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"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"message\":\"unbind host:9312 of hostgroup: 343\"}");
- document.getElementById('response-body-2-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="3top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Apitoken</td>
- <td> {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> 127.0.0.1
</td>
- </tr>
- </table>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Credentials</td>
- <td> true</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type, Content-Length, Apitoken</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Methods</td>
- <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Access-Control-Expose-Headers</td>
- <td> Content-Length</td>
- </tr>
- <tr>
- <td>Access-Control-Max-Age</td>
- <td> 86400</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-3-0">{"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}]}</pre>
- <script>
- 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"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- 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}]}");
- document.getElementById('response-body-3-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="4top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Apitoken</td>
- <td> {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> 127.0.0.1
</td>
- </tr>
- </table>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Credentials</td>
- <td> true</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type, Content-Length, Apitoken</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Methods</td>
- <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Access-Control-Expose-Headers</td>
- <td> Content-Length</td>
- </tr>
- <tr>
- <td>Access-Control-Max-Age</td>
- <td> 86400</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-4-0">[{"id":3,"grp_name":"hostnameA","create_user":"UserA"},{"id":5,"grp_name":"TAI","create_user":"UserB"},{"id":8,"grp_name":"ForTestHostG","create_user":"root"}]</pre>
- <script>
- 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"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- 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\"}]");
- document.getElementById('response-body-4-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Apitoken</td>
- <td> {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> 127.0.0.1
</td>
- </tr>
- </table>
- <p> <H4> URL Params </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>limit</td>
- <td> 10</td>
- </tr>
- <tr>
- <td>page</td>
- <td> 1</td>
- </tr>
- </table>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Credentials</td>
- <td> true</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type, Content-Length, Apitoken</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Methods</td>
- <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Access-Control-Expose-Headers</td>
- <td> Content-Length</td>
- </tr>
- <tr>
- <td>Access-Control-Max-Age</td>
- <td> 86400</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-4-1">[{"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"}]</pre>
- <script>
- 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"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- 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\"}]");
- document.getElementById('response-body-4-1').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="5top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Apitoken</td>
- <td> {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> 127.0.0.1
</td>
- </tr>
- </table>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Credentials</td>
- <td> true</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type, Content-Length, Apitoken</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Methods</td>
- <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Access-Control-Expose-Headers</td>
- <td> Content-Length</td>
- </tr>
- <tr>
- <td>Access-Control-Max-Age</td>
- <td> 86400</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-5-0">{"message":"hostgroup:343 has been deleted"}</pre>
- <script>
- 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"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"message\":\"hostgroup:343 has been deleted\"}");
- document.getElementById('response-body-5-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="6top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Apitoken</td>
- <td> {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> 127.0.0.1
</td>
- </tr>
- </table>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Credentials</td>
- <td> true</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type, Content-Length, Apitoken</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Methods</td>
- <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Access-Control-Expose-Headers</td>
- <td> Content-Length</td>
- </tr>
- <tr>
- <td>Access-Control-Max-Age</td>
- <td> 86400</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-6-0">{"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":"http","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"}]}</pre>
- <script>
- 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"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- 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\"}]}");
- document.getElementById('response-body-6-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="7top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Apitoken</td>
- <td> {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json
</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> 127.0.0.1
</td>
- </tr>
- </table>
- <p> <H4> Request Body </H4> </p>
- <pre id="request-body-7-0" class="prettyprint">{"tpl_id":5,"grp_id":3}</pre>
- <script>
- var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};
- if (requestHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"tpl_id\":5,\"grp_id\":3}");
- document.getElementById('request-body7-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Credentials</td>
- <td> true</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type, Content-Length, Apitoken</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Methods</td>
- <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Access-Control-Expose-Headers</td>
- <td> Content-Length</td>
- </tr>
- <tr>
- <td>Access-Control-Max-Age</td>
- <td> 86400</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-7-0">{"message":"template: 5 is unbind of HostGroup: 3"}</pre>
- <script>
- 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"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"message\":\"template: 5 is unbind of HostGroup: 3\"}");
- document.getElementById('response-body-7-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- <div id="8top" role="tabpanel" class="tab-pane col-md-10">
- <p> <H4> Request Headers </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Apitoken</td>
- <td> {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json
</td>
- </tr>
- <tr>
- <td>X-Forwarded-For</td>
- <td> 127.0.0.1
</td>
- </tr>
- </table>
- <p> <H4> Request Body </H4> </p>
- <pre id="request-body-8-0" class="prettyprint">{"tpl_id":5,"grp_id":3}</pre>
- <script>
- var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};
- if (requestHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"tpl_id\":5,\"grp_id\":3}");
- document.getElementById('request-body8-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">200</pre>
- <p><h4> Response Headers</h4></p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
- <tr>
- <td>Access-Control-Allow-Credentials</td>
- <td> true</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Headers</td>
- <td> Content-Type, Content-Length, Apitoken</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Methods</td>
- <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
- </tr>
- <tr>
- <td>Access-Control-Allow-Origin</td>
- <td> *</td>
- </tr>
- <tr>
- <td>Access-Control-Expose-Headers</td>
- <td> Content-Length</td>
- </tr>
- <tr>
- <td>Access-Control-Max-Age</td>
- <td> 86400</td>
- </tr>
- <tr>
- <td>Content-Type</td>
- <td> application/json; charset=utf-8</td>
- </tr>
- </table>
- <p> <H4> Response Body </H4> </p>
- <pre class="prettyprint" id="response-body-8-0">{"grp_id":3,"tpl_id":5,"bind_user":2}</pre>
- <script>
- 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"};
- if (responseHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"grp_id\":3,\"tpl_id\":5,\"bind_user\":2}");
- document.getElementById('response-body-8-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- </div>
- </div>
- </div>
- <hr>
- </body>
- </html>
|