1
0

aggregator.html 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  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/aggregator</a></li>
  87. <li role="presentation"><a href="#1top" role="tab" data-toggle="tab">GET : /api/v1/hostgroup/343/aggregator</a></li>
  88. <li role="presentation"><a href="#2top" role="tab" data-toggle="tab">PUT : /api/v1/aggregator</a></li>
  89. <li role="presentation"><a href="#3top" role="tab" data-toggle="tab">GET : /api/v1/aggregator/16</a></li>
  90. <li role="presentation"><a href="#4top" role="tab" data-toggle="tab">DELETE : /api/v1/aggregator/16</a></li>
  91. <ul>
  92. </div>
  93. <div class="col-md-8 tab-content">
  94. <div id="0top" role="tabpanel" class="tab-pane col-md-10">
  95. <p> <H4> Request Headers </H4> </p>
  96. <table class="table table-bordered table-striped">
  97. <tr>
  98. <th>Key</th>
  99. <th>Value</th>
  100. </tr>
  101. <tr>
  102. <td>Apitoken</td>
  103. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  104. </tr>
  105. <tr>
  106. <td>Content-Type</td>
  107. <td> application/json
  108. </td>
  109. </tr>
  110. <tr>
  111. <td>X-Forwarded-For</td>
  112. <td> 127.0.0.1
  113. </td>
  114. </tr>
  115. </table>
  116. <p> <H4> Request Body </H4> </p>
  117. <pre id="request-body-0-0" class="prettyprint">{&#34;tags&#34;:&#34;&#34;,&#34;step&#34;:60,&#34;numerator&#34;:&#34;$(cpu.idle)&#34;,&#34;metric&#34;:&#34;test.idle&#34;,&#34;hostgroup_id&#34;:343,&#34;endpoint&#34;:&#34;testenp&#34;,&#34;denominator&#34;:&#34;2&#34;}</pre>
  118. <script>
  119. var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};
  120. if (requestHeader["Content-Type"] === "application/json"){
  121. try {
  122. var jsonStr = spaceJson("{\"tags\":\"\",\"step\":60,\"numerator\":\"$(cpu.idle)\",\"metric\":\"test.idle\",\"hostgroup_id\":343,\"endpoint\":\"testenp\",\"denominator\":\"2\"}");
  123. document.getElementById('request-body0-0').innerHTML = syntaxHighlight(jsonStr);
  124. } catch (e) {
  125. }
  126. }
  127. </script>
  128. <p><h4> Response Code</h4></p>
  129. <pre class="prettyprint lang-json">200</pre>
  130. <p><h4> Response Headers</h4></p>
  131. <table class="table table-bordered table-striped">
  132. <tr>
  133. <th>Key</th>
  134. <th>Value</th>
  135. </tr>
  136. <tr>
  137. <td>Access-Control-Allow-Credentials</td>
  138. <td> true</td>
  139. </tr>
  140. <tr>
  141. <td>Access-Control-Allow-Headers</td>
  142. <td> Content-Type, Content-Length, Apitoken</td>
  143. </tr>
  144. <tr>
  145. <td>Access-Control-Allow-Methods</td>
  146. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  147. </tr>
  148. <tr>
  149. <td>Access-Control-Allow-Origin</td>
  150. <td> *</td>
  151. </tr>
  152. <tr>
  153. <td>Access-Control-Expose-Headers</td>
  154. <td> Content-Length</td>
  155. </tr>
  156. <tr>
  157. <td>Access-Control-Max-Age</td>
  158. <td> 86400</td>
  159. </tr>
  160. <tr>
  161. <td>Content-Type</td>
  162. <td> application/json; charset=utf-8</td>
  163. </tr>
  164. </table>
  165. <p> <H4> Response Body </H4> </p>
  166. <pre class="prettyprint" id="response-body-0-0">{&#34;id&#34;:16,&#34;grp_id&#34;:343,&#34;numerator&#34;:&#34;$(cpu.idle)&#34;,&#34;denominator&#34;:&#34;2&#34;,&#34;endpoint&#34;:&#34;testenp&#34;,&#34;metric&#34;:&#34;test.idle&#34;,&#34;tags&#34;:&#34;&#34;,&#34;ds_type&#34;:&#34;GAUGE&#34;,&#34;step&#34;:60,&#34;creator&#34;:&#34;root&#34;}</pre>
  167. <script>
  168. 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"};
  169. if (responseHeader["Content-Type"] === "application/json"){
  170. try {
  171. var jsonStr = spaceJson("{\"id\":16,\"grp_id\":343,\"numerator\":\"$(cpu.idle)\",\"denominator\":\"2\",\"endpoint\":\"testenp\",\"metric\":\"test.idle\",\"tags\":\"\",\"ds_type\":\"GAUGE\",\"step\":60,\"creator\":\"root\"}");
  172. document.getElementById('response-body-0-0').innerHTML = syntaxHighlight(jsonStr);
  173. } catch (e) {
  174. }
  175. }
  176. </script>
  177. <hr>
  178. </div>
  179. <div id="1top" role="tabpanel" class="tab-pane col-md-10">
  180. <p> <H4> Request Headers </H4> </p>
  181. <table class="table table-bordered table-striped">
  182. <tr>
  183. <th>Key</th>
  184. <th>Value</th>
  185. </tr>
  186. <tr>
  187. <td>Apitoken</td>
  188. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  189. </tr>
  190. <tr>
  191. <td>X-Forwarded-For</td>
  192. <td> 127.0.0.1
  193. </td>
  194. </tr>
  195. </table>
  196. <p><h4> Response Code</h4></p>
  197. <pre class="prettyprint lang-json">200</pre>
  198. <p><h4> Response Headers</h4></p>
  199. <table class="table table-bordered table-striped">
  200. <tr>
  201. <th>Key</th>
  202. <th>Value</th>
  203. </tr>
  204. <tr>
  205. <td>Access-Control-Allow-Credentials</td>
  206. <td> true</td>
  207. </tr>
  208. <tr>
  209. <td>Access-Control-Allow-Headers</td>
  210. <td> Content-Type, Content-Length, Apitoken</td>
  211. </tr>
  212. <tr>
  213. <td>Access-Control-Allow-Methods</td>
  214. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  215. </tr>
  216. <tr>
  217. <td>Access-Control-Allow-Origin</td>
  218. <td> *</td>
  219. </tr>
  220. <tr>
  221. <td>Access-Control-Expose-Headers</td>
  222. <td> Content-Length</td>
  223. </tr>
  224. <tr>
  225. <td>Access-Control-Max-Age</td>
  226. <td> 86400</td>
  227. </tr>
  228. <tr>
  229. <td>Content-Type</td>
  230. <td> application/json; charset=utf-8</td>
  231. </tr>
  232. </table>
  233. <p> <H4> Response Body </H4> </p>
  234. <pre class="prettyprint" id="response-body-1-0">[{&#34;id&#34;:13,&#34;grp_id&#34;:343,&#34;numerator&#34;:&#34;$(cpu.idle)&#34;,&#34;denominator&#34;:&#34;2&#34;,&#34;endpoint&#34;:&#34;testenp&#34;,&#34;metric&#34;:&#34;test.idle&#34;,&#34;tags&#34;:&#34;&#34;,&#34;ds_type&#34;:&#34;GAUGE&#34;,&#34;step&#34;:60,&#34;creator&#34;:&#34;root&#34;},{&#34;id&#34;:14,&#34;grp_id&#34;:343,&#34;numerator&#34;:&#34;$(cpu.idle)&#34;,&#34;denominator&#34;:&#34;2&#34;,&#34;endpoint&#34;:&#34;testenp&#34;,&#34;metric&#34;:&#34;test.idle&#34;,&#34;tags&#34;:&#34;&#34;,&#34;ds_type&#34;:&#34;GAUGE&#34;,&#34;step&#34;:60,&#34;creator&#34;:&#34;root&#34;},{&#34;id&#34;:15,&#34;grp_id&#34;:343,&#34;numerator&#34;:&#34;$(cpu.idle)&#34;,&#34;denominator&#34;:&#34;2&#34;,&#34;endpoint&#34;:&#34;testenp&#34;,&#34;metric&#34;:&#34;test.idle&#34;,&#34;tags&#34;:&#34;&#34;,&#34;ds_type&#34;:&#34;GAUGE&#34;,&#34;step&#34;:60,&#34;creator&#34;:&#34;root&#34;},{&#34;id&#34;:16,&#34;grp_id&#34;:343,&#34;numerator&#34;:&#34;$(cpu.idle)&#34;,&#34;denominator&#34;:&#34;2&#34;,&#34;endpoint&#34;:&#34;testenp&#34;,&#34;metric&#34;:&#34;test.idle&#34;,&#34;tags&#34;:&#34;&#34;,&#34;ds_type&#34;:&#34;GAUGE&#34;,&#34;step&#34;:60,&#34;creator&#34;:&#34;root&#34;}]</pre>
  235. <script>
  236. 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"};
  237. if (responseHeader["Content-Type"] === "application/json"){
  238. try {
  239. var jsonStr = spaceJson("[{\"id\":13,\"grp_id\":343,\"numerator\":\"$(cpu.idle)\",\"denominator\":\"2\",\"endpoint\":\"testenp\",\"metric\":\"test.idle\",\"tags\":\"\",\"ds_type\":\"GAUGE\",\"step\":60,\"creator\":\"root\"},{\"id\":14,\"grp_id\":343,\"numerator\":\"$(cpu.idle)\",\"denominator\":\"2\",\"endpoint\":\"testenp\",\"metric\":\"test.idle\",\"tags\":\"\",\"ds_type\":\"GAUGE\",\"step\":60,\"creator\":\"root\"},{\"id\":15,\"grp_id\":343,\"numerator\":\"$(cpu.idle)\",\"denominator\":\"2\",\"endpoint\":\"testenp\",\"metric\":\"test.idle\",\"tags\":\"\",\"ds_type\":\"GAUGE\",\"step\":60,\"creator\":\"root\"},{\"id\":16,\"grp_id\":343,\"numerator\":\"$(cpu.idle)\",\"denominator\":\"2\",\"endpoint\":\"testenp\",\"metric\":\"test.idle\",\"tags\":\"\",\"ds_type\":\"GAUGE\",\"step\":60,\"creator\":\"root\"}]");
  240. document.getElementById('response-body-1-0').innerHTML = syntaxHighlight(jsonStr);
  241. } catch (e) {
  242. }
  243. }
  244. </script>
  245. <hr>
  246. </div>
  247. <div id="2top" role="tabpanel" class="tab-pane col-md-10">
  248. <p> <H4> Request Headers </H4> </p>
  249. <table class="table table-bordered table-striped">
  250. <tr>
  251. <th>Key</th>
  252. <th>Value</th>
  253. </tr>
  254. <tr>
  255. <td>Apitoken</td>
  256. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  257. </tr>
  258. <tr>
  259. <td>Content-Type</td>
  260. <td> application/json
  261. </td>
  262. </tr>
  263. <tr>
  264. <td>X-Forwarded-For</td>
  265. <td> 127.0.0.1
  266. </td>
  267. </tr>
  268. </table>
  269. <p> <H4> Request Body </H4> </p>
  270. <pre id="request-body-2-0" class="prettyprint">{&#34;tags&#34;:&#34;&#34;,&#34;step&#34;:60,&#34;numerator&#34;:&#34;$(cpu.idle)&#34;,&#34;metric&#34;:&#34;test.idle&#34;,&#34;id&#34;:16,&#34;endpoint&#34;:&#34;testenp&#34;,&#34;denominator&#34;:&#34;$#&#34;}</pre>
  271. <script>
  272. var requestHeader ={"Apitoken":"{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}","Content-Type":" application/json\r","X-Forwarded-For":" 127.0.0.1\r"};
  273. if (requestHeader["Content-Type"] === "application/json"){
  274. try {
  275. var jsonStr = spaceJson("{\"tags\":\"\",\"step\":60,\"numerator\":\"$(cpu.idle)\",\"metric\":\"test.idle\",\"id\":16,\"endpoint\":\"testenp\",\"denominator\":\"$#\"}");
  276. document.getElementById('request-body2-0').innerHTML = syntaxHighlight(jsonStr);
  277. } catch (e) {
  278. }
  279. }
  280. </script>
  281. <p><h4> Response Code</h4></p>
  282. <pre class="prettyprint lang-json">200</pre>
  283. <p><h4> Response Headers</h4></p>
  284. <table class="table table-bordered table-striped">
  285. <tr>
  286. <th>Key</th>
  287. <th>Value</th>
  288. </tr>
  289. <tr>
  290. <td>Access-Control-Allow-Credentials</td>
  291. <td> true</td>
  292. </tr>
  293. <tr>
  294. <td>Access-Control-Allow-Headers</td>
  295. <td> Content-Type, Content-Length, Apitoken</td>
  296. </tr>
  297. <tr>
  298. <td>Access-Control-Allow-Methods</td>
  299. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  300. </tr>
  301. <tr>
  302. <td>Access-Control-Allow-Origin</td>
  303. <td> *</td>
  304. </tr>
  305. <tr>
  306. <td>Access-Control-Expose-Headers</td>
  307. <td> Content-Length</td>
  308. </tr>
  309. <tr>
  310. <td>Access-Control-Max-Age</td>
  311. <td> 86400</td>
  312. </tr>
  313. <tr>
  314. <td>Content-Type</td>
  315. <td> application/json; charset=utf-8</td>
  316. </tr>
  317. </table>
  318. <p> <H4> Response Body </H4> </p>
  319. <pre class="prettyprint" id="response-body-2-0">{&#34;id&#34;:16,&#34;grp_id&#34;:343,&#34;numerator&#34;:&#34;$(cpu.idle)&#34;,&#34;denominator&#34;:&#34;$#&#34;,&#34;endpoint&#34;:&#34;testenp&#34;,&#34;metric&#34;:&#34;test.idle&#34;,&#34;tags&#34;:&#34;&#34;,&#34;ds_type&#34;:&#34;GAUGE&#34;,&#34;step&#34;:60,&#34;creator&#34;:&#34;root&#34;}</pre>
  320. <script>
  321. 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"};
  322. if (responseHeader["Content-Type"] === "application/json"){
  323. try {
  324. var jsonStr = spaceJson("{\"id\":16,\"grp_id\":343,\"numerator\":\"$(cpu.idle)\",\"denominator\":\"$#\",\"endpoint\":\"testenp\",\"metric\":\"test.idle\",\"tags\":\"\",\"ds_type\":\"GAUGE\",\"step\":60,\"creator\":\"root\"}");
  325. document.getElementById('response-body-2-0').innerHTML = syntaxHighlight(jsonStr);
  326. } catch (e) {
  327. }
  328. }
  329. </script>
  330. <hr>
  331. </div>
  332. <div id="3top" role="tabpanel" class="tab-pane col-md-10">
  333. <p> <H4> Request Headers </H4> </p>
  334. <table class="table table-bordered table-striped">
  335. <tr>
  336. <th>Key</th>
  337. <th>Value</th>
  338. </tr>
  339. <tr>
  340. <td>Apitoken</td>
  341. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  342. </tr>
  343. <tr>
  344. <td>X-Forwarded-For</td>
  345. <td> 127.0.0.1
  346. </td>
  347. </tr>
  348. </table>
  349. <p><h4> Response Code</h4></p>
  350. <pre class="prettyprint lang-json">200</pre>
  351. <p><h4> Response Headers</h4></p>
  352. <table class="table table-bordered table-striped">
  353. <tr>
  354. <th>Key</th>
  355. <th>Value</th>
  356. </tr>
  357. <tr>
  358. <td>Access-Control-Allow-Credentials</td>
  359. <td> true</td>
  360. </tr>
  361. <tr>
  362. <td>Access-Control-Allow-Headers</td>
  363. <td> Content-Type, Content-Length, Apitoken</td>
  364. </tr>
  365. <tr>
  366. <td>Access-Control-Allow-Methods</td>
  367. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  368. </tr>
  369. <tr>
  370. <td>Access-Control-Allow-Origin</td>
  371. <td> *</td>
  372. </tr>
  373. <tr>
  374. <td>Access-Control-Expose-Headers</td>
  375. <td> Content-Length</td>
  376. </tr>
  377. <tr>
  378. <td>Access-Control-Max-Age</td>
  379. <td> 86400</td>
  380. </tr>
  381. <tr>
  382. <td>Content-Type</td>
  383. <td> application/json; charset=utf-8</td>
  384. </tr>
  385. </table>
  386. <p> <H4> Response Body </H4> </p>
  387. <pre class="prettyprint" id="response-body-3-0">{&#34;id&#34;:16,&#34;grp_id&#34;:343,&#34;numerator&#34;:&#34;$(cpu.idle)&#34;,&#34;denominator&#34;:&#34;$#&#34;,&#34;endpoint&#34;:&#34;testenp&#34;,&#34;metric&#34;:&#34;test.idle&#34;,&#34;tags&#34;:&#34;&#34;,&#34;ds_type&#34;:&#34;GAUGE&#34;,&#34;step&#34;:60,&#34;creator&#34;:&#34;root&#34;}</pre>
  388. <script>
  389. 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"};
  390. if (responseHeader["Content-Type"] === "application/json"){
  391. try {
  392. var jsonStr = spaceJson("{\"id\":16,\"grp_id\":343,\"numerator\":\"$(cpu.idle)\",\"denominator\":\"$#\",\"endpoint\":\"testenp\",\"metric\":\"test.idle\",\"tags\":\"\",\"ds_type\":\"GAUGE\",\"step\":60,\"creator\":\"root\"}");
  393. document.getElementById('response-body-3-0').innerHTML = syntaxHighlight(jsonStr);
  394. } catch (e) {
  395. }
  396. }
  397. </script>
  398. <hr>
  399. </div>
  400. <div id="4top" role="tabpanel" class="tab-pane col-md-10">
  401. <p> <H4> Request Headers </H4> </p>
  402. <table class="table table-bordered table-striped">
  403. <tr>
  404. <th>Key</th>
  405. <th>Value</th>
  406. </tr>
  407. <tr>
  408. <td>Apitoken</td>
  409. <td> {&#34;name&#34;:&#34;root&#34;,&#34;sig&#34;:&#34;427d6803b78311e68afd0242ac130006&#34;}</td>
  410. </tr>
  411. <tr>
  412. <td>X-Forwarded-For</td>
  413. <td> 127.0.0.1
  414. </td>
  415. </tr>
  416. </table>
  417. <p><h4> Response Code</h4></p>
  418. <pre class="prettyprint lang-json">200</pre>
  419. <p><h4> Response Headers</h4></p>
  420. <table class="table table-bordered table-striped">
  421. <tr>
  422. <th>Key</th>
  423. <th>Value</th>
  424. </tr>
  425. <tr>
  426. <td>Access-Control-Allow-Credentials</td>
  427. <td> true</td>
  428. </tr>
  429. <tr>
  430. <td>Access-Control-Allow-Headers</td>
  431. <td> Content-Type, Content-Length, Apitoken</td>
  432. </tr>
  433. <tr>
  434. <td>Access-Control-Allow-Methods</td>
  435. <td> POST, GET, OPTIONS, PUT, DELETE, UPDATE</td>
  436. </tr>
  437. <tr>
  438. <td>Access-Control-Allow-Origin</td>
  439. <td> *</td>
  440. </tr>
  441. <tr>
  442. <td>Access-Control-Expose-Headers</td>
  443. <td> Content-Length</td>
  444. </tr>
  445. <tr>
  446. <td>Access-Control-Max-Age</td>
  447. <td> 86400</td>
  448. </tr>
  449. <tr>
  450. <td>Content-Type</td>
  451. <td> application/json; charset=utf-8</td>
  452. </tr>
  453. </table>
  454. <p> <H4> Response Body </H4> </p>
  455. <pre class="prettyprint" id="response-body-4-0">{&#34;message&#34;:&#34;aggregator:16 is deleted&#34;}</pre>
  456. <script>
  457. 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"};
  458. if (responseHeader["Content-Type"] === "application/json"){
  459. try {
  460. var jsonStr = spaceJson("{\"message\":\"aggregator:16 is deleted\"}");
  461. document.getElementById('response-body-4-0').innerHTML = syntaxHighlight(jsonStr);
  462. } catch (e) {
  463. }
  464. }
  465. </script>
  466. <hr>
  467. </div>
  468. </div>
  469. </div>
  470. </div>
  471. <hr>
  472. </body>
  473. </html>