1
0

admin.html.json 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. {
  2. "ApiSpecs": [
  3. {
  4. "HttpVerb": "POST",
  5. "Path": "/api/v1/admin/login",
  6. "Calls": [
  7. {
  8. "Id": 0,
  9. "CurrentPath": "/api/v1/admin/login",
  10. "MethodType": "POST",
  11. "PostForm": {
  12. "name": "qfeng"
  13. },
  14. "RequestHeader": {
  15. "Apitoken": "{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}",
  16. "Content-Type": " application/x-www-form-urlencoded\r"
  17. },
  18. "CommonRequestHeaders": null,
  19. "ResponseHeader": {
  20. "Access-Control-Allow-Credentials": "true",
  21. "Access-Control-Allow-Headers": "Content-Type, Content-Length, Apitoken",
  22. "Access-Control-Allow-Methods": "POST, GET, OPTIONS, PUT, DELETE, UPDATE",
  23. "Access-Control-Allow-Origin": "*",
  24. "Access-Control-Expose-Headers": "Content-Length",
  25. "Access-Control-Max-Age": "86400",
  26. "Content-Type": "application/json; charset=utf-8"
  27. },
  28. "RequestUrlParams": {},
  29. "RequestBody": "",
  30. "ResponseBody": "{\"sig\":\"05434ff8db0311e7afde005056a6aba2\",\"name\":\"qfeng\",\"admin\":true}",
  31. "ResponseCode": 200
  32. },
  33. {
  34. "Id": 1,
  35. "CurrentPath": "/api/v1/admin/login",
  36. "MethodType": "POST",
  37. "PostForm": {
  38. "name": "daye"
  39. },
  40. "RequestHeader": {
  41. "Apitoken": "{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}",
  42. "Content-Type": " application/x-www-form-urlencoded\r"
  43. },
  44. "CommonRequestHeaders": null,
  45. "ResponseHeader": {
  46. "Access-Control-Allow-Credentials": "true",
  47. "Access-Control-Allow-Headers": "Content-Type, Content-Length, Apitoken",
  48. "Access-Control-Allow-Methods": "POST, GET, OPTIONS, PUT, DELETE, UPDATE",
  49. "Access-Control-Allow-Origin": "*",
  50. "Access-Control-Expose-Headers": "Content-Length",
  51. "Access-Control-Max-Age": "86400",
  52. "Content-Type": "application/json; charset=utf-8"
  53. },
  54. "RequestUrlParams": {},
  55. "RequestBody": "",
  56. "ResponseBody": "{\"error\":\"no such user\"}",
  57. "ResponseCode": 400
  58. },
  59. {
  60. "Id": 2,
  61. "CurrentPath": "/api/v1/admin/login",
  62. "MethodType": "POST",
  63. "PostForm": {
  64. "name": "qfeng"
  65. },
  66. "RequestHeader": {
  67. "Apitoken": "{\"sig\": \"05434ff8db0311e7afde005056a6aba2\", \"name\": \"qfeng\"}",
  68. "Content-Type": " application/x-www-form-urlencoded\r"
  69. },
  70. "CommonRequestHeaders": null,
  71. "ResponseHeader": {
  72. "Access-Control-Allow-Credentials": "true",
  73. "Access-Control-Allow-Headers": "Content-Type, Content-Length, Apitoken",
  74. "Access-Control-Allow-Methods": "POST, GET, OPTIONS, PUT, DELETE, UPDATE",
  75. "Access-Control-Allow-Origin": "*",
  76. "Access-Control-Expose-Headers": "Content-Length",
  77. "Access-Control-Max-Age": "86400",
  78. "Content-Type": "application/json; charset=utf-8"
  79. },
  80. "RequestUrlParams": {},
  81. "RequestBody": "",
  82. "ResponseBody": "{\"error\":\"API_USER not admin, no permissions can do this\"}",
  83. "ResponseCode": 400
  84. }
  85. ]
  86. },
  87. {
  88. "HttpVerb": "PUT",
  89. "Path": "/api/v1/admin/change_user_role",
  90. "Calls": [
  91. {
  92. "Id": 3,
  93. "CurrentPath": "/api/v1/admin/change_user_role",
  94. "MethodType": "PUT",
  95. "PostForm": null,
  96. "RequestHeader": {
  97. "Apitoken": "{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}",
  98. "Content-Type": " application/json\r"
  99. },
  100. "CommonRequestHeaders": null,
  101. "ResponseHeader": {
  102. "Access-Control-Allow-Credentials": "true",
  103. "Access-Control-Allow-Headers": "Content-Type, Content-Length, Apitoken",
  104. "Access-Control-Allow-Methods": "POST, GET, OPTIONS, PUT, DELETE, UPDATE",
  105. "Access-Control-Allow-Origin": "*",
  106. "Access-Control-Expose-Headers": "Content-Length",
  107. "Access-Control-Max-Age": "86400",
  108. "Content-Type": "application/json; charset=utf-8"
  109. },
  110. "RequestUrlParams": {},
  111. "RequestBody": "{\"admin\": \"yes\", \"user_id\": 12}",
  112. "ResponseBody": "{\"message\":\"user role update sccuessful, affect row: 0\"}",
  113. "ResponseCode": 200
  114. },
  115. {
  116. "Id": 4,
  117. "CurrentPath": "/api/v1/admin/change_user_role",
  118. "MethodType": "PUT",
  119. "PostForm": null,
  120. "RequestHeader": {
  121. "Apitoken": "{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}",
  122. "Content-Type": " application/json\r"
  123. },
  124. "CommonRequestHeaders": null,
  125. "ResponseHeader": {
  126. "Access-Control-Allow-Credentials": "true",
  127. "Access-Control-Allow-Headers": "Content-Type, Content-Length, Apitoken",
  128. "Access-Control-Allow-Methods": "POST, GET, OPTIONS, PUT, DELETE, UPDATE",
  129. "Access-Control-Allow-Origin": "*",
  130. "Access-Control-Expose-Headers": "Content-Length",
  131. "Access-Control-Max-Age": "86400",
  132. "Content-Type": "application/json; charset=utf-8"
  133. },
  134. "RequestUrlParams": {},
  135. "RequestBody": "{\"admin\": \"no\", \"user_id\": 12}",
  136. "ResponseBody": "{\"message\":\"user role update sccuessful, affect row: 1\"}",
  137. "ResponseCode": 200
  138. }
  139. ]
  140. },
  141. {
  142. "HttpVerb": "PUT",
  143. "Path": "/api/v1/admin/change_user_passwd",
  144. "Calls": [
  145. {
  146. "Id": 5,
  147. "CurrentPath": "/api/v1/admin/change_user_passwd",
  148. "MethodType": "PUT",
  149. "PostForm": null,
  150. "RequestHeader": {
  151. "Apitoken": "{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}",
  152. "Content-Type": " application/json\r"
  153. },
  154. "CommonRequestHeaders": null,
  155. "ResponseHeader": {
  156. "Access-Control-Allow-Credentials": "true",
  157. "Access-Control-Allow-Headers": "Content-Type, Content-Length, Apitoken",
  158. "Access-Control-Allow-Methods": "POST, GET, OPTIONS, PUT, DELETE, UPDATE",
  159. "Access-Control-Allow-Origin": "*",
  160. "Access-Control-Expose-Headers": "Content-Length",
  161. "Access-Control-Max-Age": "86400",
  162. "Content-Type": "application/json; charset=utf-8"
  163. },
  164. "RequestUrlParams": {},
  165. "RequestBody": "{\"password\": \"lalala\", \"user_id\": 12}",
  166. "ResponseBody": "{\"message\":\"password updated!\"}",
  167. "ResponseCode": 200
  168. }
  169. ]
  170. },
  171. {
  172. "HttpVerb": "DELETE",
  173. "Path": "/api/v1/admin/delete_user",
  174. "Calls": [
  175. {
  176. "Id": 6,
  177. "CurrentPath": "/api/v1/admin/delete_user",
  178. "MethodType": "DELETE",
  179. "PostForm": null,
  180. "RequestHeader": {
  181. "Apitoken": "{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}",
  182. "Content-Type": " application/json\r"
  183. },
  184. "CommonRequestHeaders": null,
  185. "ResponseHeader": {
  186. "Access-Control-Allow-Credentials": "true",
  187. "Access-Control-Allow-Headers": "Content-Type, Content-Length, Apitoken",
  188. "Access-Control-Allow-Methods": "POST, GET, OPTIONS, PUT, DELETE, UPDATE",
  189. "Access-Control-Allow-Origin": "*",
  190. "Access-Control-Expose-Headers": "Content-Length",
  191. "Access-Control-Max-Age": "86400",
  192. "Content-Type": "application/json; charset=utf-8"
  193. },
  194. "RequestUrlParams": {},
  195. "RequestBody": "{\"user_id\": 12}",
  196. "ResponseBody": "{\"message\":\"user 12 has been delete, affect row: 1\"}",
  197. "ResponseCode": 200
  198. }
  199. ]
  200. }
  201. ]
  202. }