user.html.json 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. {
  2. "ApiSpecs": [
  3. {
  4. "HttpVerb": "POST",
  5. "Path": "/api/v1/user/create",
  6. "Calls": [
  7. {
  8. "Id": 0,
  9. "CurrentPath": "/api/v1/user/create",
  10. "MethodType": "POST",
  11. "PostForm": null,
  12. "RequestHeader": {
  13. "Content-Type": " application/json\r",
  14. "X-Forwarded-For": " "
  15. },
  16. "CommonRequestHeaders": null,
  17. "ResponseHeader": {
  18. "Access-Control-Allow-Headers": "Content-Type,Token",
  19. "Access-Control-Allow-Origin": "*",
  20. "Content-Type": "application/json; charset=utf-8"
  21. },
  22. "RequestUrlParams": {},
  23. "RequestBody": "{\"name\": \"test\",\"password\": \"test\"}",
  24. "ResponseBody": "{\"error\":\"Key: 'APIUserInput.Cnname' Error:Field validation for 'Cnname' failed on the 'required' tag\\nKey: 'APIUserInput.Email' Error:Field validation for 'Email' failed on the 'required' tag\"}",
  25. "ResponseCode": 400
  26. },
  27. {
  28. "Id": 1,
  29. "CurrentPath": "/api/v1/user/create",
  30. "MethodType": "POST",
  31. "PostForm": null,
  32. "RequestHeader": {
  33. "Content-Type": " application/json\r",
  34. "X-Forwarded-For": " "
  35. },
  36. "CommonRequestHeaders": null,
  37. "ResponseHeader": {
  38. "Access-Control-Allow-Headers": "Content-Type,Token",
  39. "Access-Control-Allow-Origin": "*",
  40. "Content-Type": "application/json; charset=utf-8"
  41. },
  42. "RequestUrlParams": {},
  43. "RequestBody": "{\"name\": \"owltester\",\"password\": \"mypassword\", \"cnname\": \"翱鶚\", \"email\": \"root123@cepave.com\", \"im\": \"44955834958\", \"phone\": \"99999999999\", \"qq\": \"904394234239\"}",
  44. "ResponseBody": "{\"name\":\"owltester\",\"sig\":\"9b42a728c0ea11e690c5001500c6ca5a\"}",
  45. "ResponseCode": 200
  46. }
  47. ]
  48. },
  49. {
  50. "HttpVerb": "PUT",
  51. "Path": "/api/v1/user/update",
  52. "Calls": [
  53. {
  54. "Id": 2,
  55. "CurrentPath": "/api/v1/user/update",
  56. "MethodType": "PUT",
  57. "PostForm": null,
  58. "RequestHeader": {
  59. "Content-Type": " application/json\r",
  60. "Cookie": " name=test1; sig=d4f71cba377911e699d60242ac110010\r",
  61. "X-Forwarded-For": " "
  62. },
  63. "CommonRequestHeaders": null,
  64. "ResponseHeader": {
  65. "Access-Control-Allow-Headers": "Content-Type,Token",
  66. "Access-Control-Allow-Origin": "*",
  67. "Content-Type": "application/json; charset=utf-8"
  68. },
  69. "RequestUrlParams": {},
  70. "RequestBody": "{\"name\": \"test1\",\"password\": \"test1\", \"cnname\": \"翱鶚Test\", \"email\": \"root123@cepave.com\", \"im\": \"44955834958\", \"phone\": \"99999999999\", \"qq\": \"904394234239\"}",
  71. "ResponseBody": "{\"message\":\"user info updated\"}",
  72. "ResponseCode": 200
  73. }
  74. ]
  75. },
  76. {
  77. "HttpVerb": "PUT",
  78. "Path": "/api/v1/user/cgpasswd",
  79. "Calls": [
  80. {
  81. "Id": 3,
  82. "CurrentPath": "/api/v1/user/cgpasswd",
  83. "MethodType": "PUT",
  84. "PostForm": null,
  85. "RequestHeader": {
  86. "Content-Type": " application/json\r",
  87. "Cookie": " name=test1; sig=d4f71cba377911e699d60242ac110010\r",
  88. "X-Forwarded-For": " "
  89. },
  90. "CommonRequestHeaders": null,
  91. "ResponseHeader": {
  92. "Access-Control-Allow-Headers": "Content-Type,Token",
  93. "Access-Control-Allow-Origin": "*",
  94. "Content-Type": "application/json; charset=utf-8"
  95. },
  96. "RequestUrlParams": {},
  97. "RequestBody": "{\"new_password\": \"test1\", \"old_password\": \"test1\"}",
  98. "ResponseBody": "{\"message\":\"password updated!\"}",
  99. "ResponseCode": 200
  100. }
  101. ]
  102. },
  103. {
  104. "HttpVerb": "GET",
  105. "Path": "/api/v1/user/users",
  106. "Calls": [
  107. {
  108. "Id": 4,
  109. "CurrentPath": "/api/v1/user/users",
  110. "MethodType": "GET",
  111. "PostForm": null,
  112. "RequestHeader": {
  113. "Cookie": " name=test1; sig=d4f71cba377911e699d60242ac110010\r",
  114. "X-Forwarded-For": " "
  115. },
  116. "CommonRequestHeaders": null,
  117. "ResponseHeader": {
  118. "Access-Control-Allow-Headers": "Content-Type,Token",
  119. "Access-Control-Allow-Origin": "*",
  120. "Content-Type": "application/json; charset=utf-8"
  121. },
  122. "RequestUrlParams": {},
  123. "RequestBody": "",
  124. "ResponseBody": "[{\"id\":1,\"name\":\"root\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":2},{\"id\":2,\"name\":\"yao104\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":3,\"name\":\"xiecz\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":4,\"name\":\"test1\",\"cnname\":\"翱鶚Test\",\"email\":\"root123@cepave.com\",\"phone\":\"99999999999\",\"im\":\"44955834958\",\"qq\":\"904394234239\",\"role\":0},{\"id\":5,\"name\":\"don\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":6,\"name\":\"masato\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":7,\"name\":\"cepave1\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":9,\"name\":\"test2\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":10,\"name\":\"kordan\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":11,\"name\":\"laurence\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":12,\"name\":\"kelly\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":13,\"name\":\"masato25\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":0},{\"id\":14,\"name\":\"myhung\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"904394234239\",\"role\":1},{\"id\":32,\"name\":\"owltester\",\"cnname\":\"翱鶚\",\"email\":\"root123@cepave.com\",\"phone\":\"99999999999\",\"im\":\"44955834958\",\"qq\":\"904394234239\",\"role\":0}]",
  125. "ResponseCode": 200
  126. }
  127. ]
  128. },
  129. {
  130. "HttpVerb": "POST",
  131. "Path": "/api/v1/user/login",
  132. "Calls": [
  133. {
  134. "Id": 5,
  135. "CurrentPath": "/api/v1/user/login",
  136. "MethodType": "POST",
  137. "PostForm": null,
  138. "RequestHeader": {
  139. "X-Forwarded-For": " "
  140. },
  141. "CommonRequestHeaders": null,
  142. "ResponseHeader": {
  143. "Access-Control-Allow-Headers": "Content-Type,Token",
  144. "Access-Control-Allow-Origin": "*",
  145. "Content-Type": "application/json; charset=utf-8"
  146. },
  147. "RequestUrlParams": {
  148. "name": "gg123",
  149. "password": "willnotpass"
  150. },
  151. "RequestBody": "",
  152. "ResponseBody": "{\"error\":\"password error\"}",
  153. "ResponseCode": 400
  154. },
  155. {
  156. "Id": 6,
  157. "CurrentPath": "/api/v1/user/login",
  158. "MethodType": "POST",
  159. "PostForm": null,
  160. "RequestHeader": {
  161. "X-Forwarded-For": " "
  162. },
  163. "CommonRequestHeaders": null,
  164. "ResponseHeader": {
  165. "Access-Control-Allow-Headers": "Content-Type,Token",
  166. "Access-Control-Allow-Origin": "*",
  167. "Content-Type": "application/json; charset=utf-8"
  168. },
  169. "RequestUrlParams": {
  170. "name": "test2",
  171. "password": "test2"
  172. },
  173. "RequestBody": "",
  174. "ResponseBody": "{\"sig\":\"9d791331c0ea11e690c5001500c6ca5a\",\"name\":\"test2\",\"admin\":false}",
  175. "ResponseCode": 200
  176. }
  177. ]
  178. },
  179. {
  180. "HttpVerb": "GET",
  181. "Path": "/api/v1/user/logout",
  182. "Calls": [
  183. {
  184. "Id": 8,
  185. "CurrentPath": "/api/v1/user/logout",
  186. "MethodType": "GET",
  187. "PostForm": null,
  188. "RequestHeader": {
  189. "Cookie": " name=test2; sig=9d791331c0ea11e690c5001500c6ca5a\r",
  190. "X-Forwarded-For": " "
  191. },
  192. "CommonRequestHeaders": null,
  193. "ResponseHeader": {
  194. "Access-Control-Allow-Headers": "Content-Type,Token",
  195. "Access-Control-Allow-Origin": "*",
  196. "Content-Type": "application/json; charset=utf-8"
  197. },
  198. "RequestUrlParams": {},
  199. "RequestBody": "",
  200. "ResponseBody": "{\"message\":\"logout successful\"}",
  201. "ResponseCode": 200
  202. }
  203. ]
  204. },
  205. {
  206. "HttpVerb": "GET",
  207. "Path": "/api/v1/user/auth_session",
  208. "Calls": [
  209. {
  210. "Id": 9,
  211. "CurrentPath": "/api/v1/user/auth_session",
  212. "MethodType": "GET",
  213. "PostForm": null,
  214. "RequestHeader": {
  215. "Cookie": " name=test1; sig=d4f71cba377911e699d60242ac110010\r",
  216. "X-Forwarded-For": " "
  217. },
  218. "CommonRequestHeaders": null,
  219. "ResponseHeader": {
  220. "Access-Control-Allow-Headers": "Content-Type,Token",
  221. "Access-Control-Allow-Origin": "*",
  222. "Content-Type": "application/json; charset=utf-8"
  223. },
  224. "RequestUrlParams": {},
  225. "RequestBody": "",
  226. "ResponseBody": "{\"message\":\"session is vaild!\"}",
  227. "ResponseCode": 200
  228. },
  229. {
  230. "Id": 10,
  231. "CurrentPath": "/api/v1/user/auth_session",
  232. "MethodType": "GET",
  233. "PostForm": null,
  234. "RequestHeader": {
  235. "Cookie": " name=testtest; sig=9a84ae1d377911e699d60242ac110010\r",
  236. "X-Forwarded-For": " "
  237. },
  238. "CommonRequestHeaders": null,
  239. "ResponseHeader": {
  240. "Access-Control-Allow-Headers": "Content-Type,Token",
  241. "Access-Control-Allow-Origin": "*",
  242. "Content-Type": "application/json; charset=utf-8"
  243. },
  244. "RequestUrlParams": {},
  245. "RequestBody": "",
  246. "ResponseBody": "{\"error\":\"not found this user\"}",
  247. "ResponseCode": 401
  248. }
  249. ]
  250. },
  251. {
  252. "HttpVerb": "GET",
  253. "Path": "/api/v1/user/current",
  254. "Calls": [
  255. {
  256. "Id": 0,
  257. "CurrentPath": "/api/v1/user/current",
  258. "MethodType": "GET",
  259. "PostForm": null,
  260. "RequestHeader": {
  261. "Apitoken": "{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}",
  262. "X-Forwarded-For": " 127.0.0.1\r"
  263. },
  264. "CommonRequestHeaders": null,
  265. "ResponseHeader": {
  266. "Access-Control-Allow-Credentials": "true",
  267. "Access-Control-Allow-Headers": "Content-Type, Content-Length, Apitoken",
  268. "Access-Control-Allow-Methods": "POST, GET, OPTIONS, PUT, DELETE, UPDATE",
  269. "Access-Control-Allow-Origin": "*",
  270. "Access-Control-Expose-Headers": "Content-Length",
  271. "Access-Control-Max-Age": "86400",
  272. "Content-Type": "application/json; charset=utf-8"
  273. },
  274. "RequestUrlParams": {},
  275. "RequestBody": "",
  276. "ResponseBody": "{\"id\":2,\"name\":\"root\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"\",\"role\":2}",
  277. "ResponseCode": 200
  278. }
  279. ]
  280. },
  281. {
  282. "HttpVerb": "GET",
  283. "Path": "/api/v1/user/u/3",
  284. "Calls": [
  285. {
  286. "Id": 0,
  287. "CurrentPath": "/api/v1/user/u/3",
  288. "MethodType": "GET",
  289. "PostForm": null,
  290. "RequestHeader": {
  291. "Apitoken": "{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}",
  292. "X-Forwarded-For": " 127.0.0.1\r"
  293. },
  294. "CommonRequestHeaders": null,
  295. "ResponseHeader": {
  296. "Access-Control-Allow-Credentials": "true",
  297. "Access-Control-Allow-Headers": "Content-Type, Content-Length, Apitoken",
  298. "Access-Control-Allow-Methods": "POST, GET, OPTIONS, PUT, DELETE, UPDATE",
  299. "Access-Control-Allow-Origin": "*",
  300. "Access-Control-Expose-Headers": "Content-Length",
  301. "Access-Control-Max-Age": "86400",
  302. "Content-Type": "application/json; charset=utf-8"
  303. },
  304. "RequestUrlParams": {},
  305. "RequestBody": "",
  306. "ResponseBody": "{\"error\":\"record not found\"}",
  307. "ResponseCode": 417
  308. }
  309. ]
  310. },
  311. {
  312. "HttpVerb": "GET",
  313. "Path": "/api/v1/user/u/4",
  314. "Calls": [
  315. {
  316. "Id": 1,
  317. "CurrentPath": "/api/v1/user/u/4",
  318. "MethodType": "GET",
  319. "PostForm": null,
  320. "RequestHeader": {
  321. "Apitoken": "{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}",
  322. "X-Forwarded-For": " 127.0.0.1\r"
  323. },
  324. "CommonRequestHeaders": null,
  325. "ResponseHeader": {
  326. "Access-Control-Allow-Credentials": "true",
  327. "Access-Control-Allow-Headers": "Content-Type, Content-Length, Apitoken",
  328. "Access-Control-Allow-Methods": "POST, GET, OPTIONS, PUT, DELETE, UPDATE",
  329. "Access-Control-Allow-Origin": "*",
  330. "Access-Control-Expose-Headers": "Content-Length",
  331. "Access-Control-Max-Age": "86400",
  332. "Content-Type": "application/json; charset=utf-8"
  333. },
  334. "RequestUrlParams": {},
  335. "RequestBody": "",
  336. "ResponseBody": "{\"id\":4,\"name\":\"userA\",\"cnname\":\"tear\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"\",\"role\":0}",
  337. "ResponseCode": 200
  338. }
  339. ]
  340. }
  341. ]
  342. }