123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735 |
- <!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/expression</a></li>
- <li role="presentation"><a href="#1top" role="tab" data-toggle="tab">PUT : /api/v1/expression</a></li>
- <li role="presentation"><a href="#2top" role="tab" data-toggle="tab">GET : /api/v1/expression/5</a></li>
- <li role="presentation"><a href="#3top" role="tab" data-toggle="tab">DELETE : /api/v1/expression/5</a></li>
- <li role="presentation"><a href="#4top" role="tab" data-toggle="tab">GET : /api/v1/expression</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">{"right_value":"0","priority":2,"pause":0,"op":"==","note":"this is a test exp","max_step":3,"func":"all(#3)","expression":"each(metric=agent.alive endpoint=docker-agent)","action":{"url":"http://localhost:1234/callback","uic":["test"],"callback":1,"before_callback_sms":1,"before_callback_mail":0,"after_callback_sms":1,"after_callback_mail":0}}</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("{\"right_value\":\"0\",\"priority\":2,\"pause\":0,\"op\":\"==\",\"note\":\"this is a test exp\",\"max_step\":3,\"func\":\"all(#3)\",\"expression\":\"each(metric=agent.alive endpoint=docker-agent)\",\"action\":{\"url\":\"http://localhost:1234/callback\",\"uic\":[\"test\"],\"callback\":1,\"before_callback_sms\":1,\"before_callback_mail\":0,\"after_callback_sms\":1,\"after_callback_mail\":0}}");
- 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">{"message":"expression created"}</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\":\"expression created\"}");
- 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">{"right_value":"0","priority":2,"pause":1,"op":"==","note":"this is a test exp","max_step":3,"id":5,"func":"all(#3)","expression":"each(metric=agent.alive endpoint=docker-agent)","action":{"url":"http://localhost:1234/callback","uic":["test","test2"],"callback":0,"before_callback_sms":1,"before_callback_mail":0,"after_callback_sms":1,"after_callback_mail":0}}</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("{\"right_value\":\"0\",\"priority\":2,\"pause\":1,\"op\":\"==\",\"note\":\"this is a test exp\",\"max_step\":3,\"id\":5,\"func\":\"all(#3)\",\"expression\":\"each(metric=agent.alive endpoint=docker-agent)\",\"action\":{\"url\":\"http://localhost:1234/callback\",\"uic\":[\"test\",\"test2\"],\"callback\":0,\"before_callback_sms\":1,\"before_callback_mail\":0,\"after_callback_sms\":1,\"after_callback_mail\":0}}");
- document.getElementById('request-body1-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-1-0">{"message":"expression:5 has been updated"}</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\":\"expression:5 has been updated\"}");
- document.getElementById('response-body-1-0').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>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-2-0">{"action":{"id":5,"uic":"taipei","url":"","callback":0,"before_callback_sms":0,"before_callback_mail":0,"after_callback_sms":0,"after_callback_mail":0},"expression":{"id":5,"expression":"each(metric=agent.alive endpoint=docker-agent)","func":"all(#3)","op":"==","right_value":"0","max_step":3,"priority":2,"note":"this is a test exp","action_id":177,"create_user":"root","pause":1}}</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("{\"action\":{\"id\":5,\"uic\":\"taipei\",\"url\":\"\",\"callback\":0,\"before_callback_sms\":0,\"before_callback_mail\":0,\"after_callback_sms\":0,\"after_callback_mail\":0},\"expression\":{\"id\":5,\"expression\":\"each(metric=agent.alive endpoint=docker-agent)\",\"func\":\"all(#3)\",\"op\":\"==\",\"right_value\":\"0\",\"max_step\":3,\"priority\":2,\"note\":\"this is a test exp\",\"action_id\":177,\"create_user\":\"root\",\"pause\":1}}");
- 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">{"message":"expression:5 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\":\"expression:5 has been deleted\"}");
- 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":2,"expression":"each(metric=? xx=yy)","func":"all(#3)","op":"==","right_value":"0","max_step":3,"priority":0,"note":"","action_id":18,"create_user":"root","pause":0},{"id":3,"expression":"each(metric=ss.close.wait endpoint=docker-A)","func":"all(#1)","op":"!=","right_value":"0","max_step":1,"priority":4,"note":"boss docker-A 连接数大于10","action_id":91,"create_user":"root","pause":0},{"id":4,"expression":"each(metric=agent.alive endpoint=docker-agent)","func":"all(#3)","op":"==","right_value":"0","max_step":3,"priority":2,"note":"this is a test exp","action_id":176,"create_user":"root","pause":1}]</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\":2,\"expression\":\"each(metric=? xx=yy)\",\"func\":\"all(#3)\",\"op\":\"==\",\"right_value\":\"0\",\"max_step\":3,\"priority\":0,\"note\":\"\",\"action_id\":18,\"create_user\":\"root\",\"pause\":0},{\"id\":3,\"expression\":\"each(metric=ss.close.wait endpoint=docker-A)\",\"func\":\"all(#1)\",\"op\":\"!=\",\"right_value\":\"0\",\"max_step\":1,\"priority\":4,\"note\":\"boss docker-A 连接数大于10\",\"action_id\":91,\"create_user\":\"root\",\"pause\":0},{\"id\":4,\"expression\":\"each(metric=agent.alive endpoint=docker-agent)\",\"func\":\"all(#3)\",\"op\":\"==\",\"right_value\":\"0\",\"max_step\":3,\"priority\":2,\"note\":\"this is a test exp\",\"action_id\":176,\"create_user\":\"root\",\"pause\":1}]");
- 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> 2</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":2,"expression":"each(metric=? xx=yy)","func":"all(#3)","op":"==","right_value":"0","max_step":3,"priority":0,"note":"","action_id":18,"create_user":"root","pause":0},{"id":3,"expression":"each(metric=ss.close.wait endpoint=docker-A)","func":"all(#1)","op":"!=","right_value":"0","max_step":1,"priority":4,"note":"boss docker-A 连接数大于10","action_id":91,"create_user":"root","pause":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("[{\"id\":2,\"expression\":\"each(metric=? xx=yy)\",\"func\":\"all(#3)\",\"op\":\"==\",\"right_value\":\"0\",\"max_step\":3,\"priority\":0,\"note\":\"\",\"action_id\":18,\"create_user\":\"root\",\"pause\":0},{\"id\":3,\"expression\":\"each(metric=ss.close.wait endpoint=docker-A)\",\"func\":\"all(#1)\",\"op\":\"!=\",\"right_value\":\"0\",\"max_step\":1,\"priority\":4,\"note\":\"boss docker-A 连接数大于10\",\"action_id\":91,\"create_user\":\"root\",\"pause\":0}]");
- document.getElementById('response-body-4-1').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
- }
- }
- </script>
- <hr>
- </div>
- </div>
- </div>
- </div>
- <hr>
- </body>
- </html>
|