123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863 |
- <!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/admin/login</a></li>
-
- <li role="presentation"><a href="#1top" role="tab" data-toggle="tab">PUT : /api/v1/admin/change_user_role</a></li>
-
- <li role="presentation"><a href="#2top" role="tab" data-toggle="tab">PUT : /api/v1/admin/change_user_passwd</a></li>
-
- <li role="presentation"><a href="#3top" role="tab" data-toggle="tab">DELETE : /api/v1/admin/delete_user</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> {"sig": "25ae3f6cdb1711e79997005056a6aba2", "name": "root"}</td>
- </tr>
-
- <tr>
- <td>Content-Type</td>
- <td> application/x-www-form-urlencoded
</td>
- </tr>
-
- </table>
-
-
- <p> <H4> Post Form </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
-
- <tr>
- <td>name</td>
- <td> qfeng</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-0-0">{"sig":"05434ff8db0311e7afde005056a6aba2","name":"qfeng","admin":true}</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("{\"sig\":\"05434ff8db0311e7afde005056a6aba2\",\"name\":\"qfeng\",\"admin\":true}");
- document.getElementById('response-body-0-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> {"sig": "25ae3f6cdb1711e79997005056a6aba2", "name": "root"}</td>
- </tr>
-
- <tr>
- <td>Content-Type</td>
- <td> application/x-www-form-urlencoded
</td>
- </tr>
-
- </table>
-
-
- <p> <H4> Post Form </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
-
- <tr>
- <td>name</td>
- <td> daye</td>
- </tr>
-
- </table>
-
-
-
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">400</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-1">{"error":"no such user"}</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\":\"no such user\"}");
- document.getElementById('response-body-0-1').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> {"sig": "05434ff8db0311e7afde005056a6aba2", "name": "qfeng"}</td>
- </tr>
-
- <tr>
- <td>Content-Type</td>
- <td> application/x-www-form-urlencoded
</td>
- </tr>
-
- </table>
-
-
- <p> <H4> Post Form </H4> </p>
- <table class="table table-bordered table-striped">
- <tr>
- <th>Key</th>
- <th>Value</th>
- </tr>
-
- <tr>
- <td>name</td>
- <td> qfeng</td>
- </tr>
-
- </table>
-
-
-
- <p><h4> Response Code</h4></p>
- <pre class="prettyprint lang-json">400</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-2">{"error":"API_USER not admin, no permissions can do this"}</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\":\"API_USER not admin, no permissions can do this\"}");
- document.getElementById('response-body-0-2').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> {"sig": "25ae3f6cdb1711e79997005056a6aba2", "name": "root"}</td>
- </tr>
-
- <tr>
- <td>Content-Type</td>
- <td> application/json
</td>
- </tr>
-
- </table>
-
-
-
-
- <p> <H4> Request Body </H4> </p>
- <pre id="request-body-1-0" class="prettyprint">{"admin": "yes", "user_id": 12}</pre>
- <script>
-
- var requestHeader ={"Apitoken":"{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}","Content-Type":" application/json\r"};
- if (requestHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"admin\": \"yes\", \"user_id\": 12}");
- 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":"user role update sccuessful, affect row: 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("{\"message\":\"user role update sccuessful, affect row: 0\"}");
- 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> {"sig": "25ae3f6cdb1711e79997005056a6aba2", "name": "root"}</td>
- </tr>
-
- <tr>
- <td>Content-Type</td>
- <td> application/json
</td>
- </tr>
-
- </table>
-
-
-
-
- <p> <H4> Request Body </H4> </p>
- <pre id="request-body-1-1" class="prettyprint">{"admin": "no", "user_id": 12}</pre>
- <script>
-
- var requestHeader ={"Apitoken":"{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}","Content-Type":" application/json\r"};
- if (requestHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"admin\": \"no\", \"user_id\": 12}");
- 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":"user role update sccuessful, affect row: 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("{\"message\":\"user role update sccuessful, affect row: 1\"}");
- 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> {"sig": "25ae3f6cdb1711e79997005056a6aba2", "name": "root"}</td>
- </tr>
-
- <tr>
- <td>Content-Type</td>
- <td> application/json
</td>
- </tr>
-
- </table>
-
-
-
-
- <p> <H4> Request Body </H4> </p>
- <pre id="request-body-2-0" class="prettyprint">{"password": "lalala", "user_id": 12}</pre>
- <script>
-
- var requestHeader ={"Apitoken":"{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}","Content-Type":" application/json\r"};
- if (requestHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"password\": \"lalala\", \"user_id\": 12}");
- 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":"password 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\":\"password updated!\"}");
- 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> {"sig": "25ae3f6cdb1711e79997005056a6aba2", "name": "root"}</td>
- </tr>
-
- <tr>
- <td>Content-Type</td>
- <td> application/json
</td>
- </tr>
-
- </table>
-
-
-
-
- <p> <H4> Request Body </H4> </p>
- <pre id="request-body-3-0" class="prettyprint">{"user_id": 12}</pre>
- <script>
-
- var requestHeader ={"Apitoken":"{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}","Content-Type":" application/json\r"};
- if (requestHeader["Content-Type"] === "application/json"){
- try {
- var jsonStr = spaceJson("{\"user_id\": 12}");
- document.getElementById('request-body3-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-3-0">{"message":"user 12 has been delete, affect row: 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("{\"message\":\"user 12 has been delete, affect row: 1\"}");
- document.getElementById('response-body-3-0').innerHTML = syntaxHighlight(jsonStr);
- } catch (e) {
-
- }
- }
- </script>
-
- <hr>
-
- </div>
-
- </div>
- </div>
- </div>
- <hr>
- </body>
- </html>
|