{ "ApiSpecs": [ { "HttpVerb": "POST", "Path": "/api/v1/user/create", "Calls": [ { "Id": 0, "CurrentPath": "/api/v1/user/create", "MethodType": "POST", "PostForm": null, "RequestHeader": { "Content-Type": " application/json\r", "X-Forwarded-For": " " }, "CommonRequestHeaders": null, "ResponseHeader": { "Access-Control-Allow-Headers": "Content-Type,Token", "Access-Control-Allow-Origin": "*", "Content-Type": "application/json; charset=utf-8" }, "RequestUrlParams": {}, "RequestBody": "{\"name\": \"test\",\"password\": \"test\"}", "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\"}", "ResponseCode": 400 }, { "Id": 1, "CurrentPath": "/api/v1/user/create", "MethodType": "POST", "PostForm": null, "RequestHeader": { "Content-Type": " application/json\r", "X-Forwarded-For": " " }, "CommonRequestHeaders": null, "ResponseHeader": { "Access-Control-Allow-Headers": "Content-Type,Token", "Access-Control-Allow-Origin": "*", "Content-Type": "application/json; charset=utf-8" }, "RequestUrlParams": {}, "RequestBody": "{\"name\": \"owltester\",\"password\": \"mypassword\", \"cnname\": \"翱鶚\", \"email\": \"root123@cepave.com\", \"im\": \"44955834958\", \"phone\": \"99999999999\", \"qq\": \"904394234239\"}", "ResponseBody": "{\"name\":\"owltester\",\"sig\":\"9b42a728c0ea11e690c5001500c6ca5a\"}", "ResponseCode": 200 } ] }, { "HttpVerb": "PUT", "Path": "/api/v1/user/update", "Calls": [ { "Id": 2, "CurrentPath": "/api/v1/user/update", "MethodType": "PUT", "PostForm": null, "RequestHeader": { "Content-Type": " application/json\r", "Cookie": " name=test1; sig=d4f71cba377911e699d60242ac110010\r", "X-Forwarded-For": " " }, "CommonRequestHeaders": null, "ResponseHeader": { "Access-Control-Allow-Headers": "Content-Type,Token", "Access-Control-Allow-Origin": "*", "Content-Type": "application/json; charset=utf-8" }, "RequestUrlParams": {}, "RequestBody": "{\"name\": \"test1\",\"password\": \"test1\", \"cnname\": \"翱鶚Test\", \"email\": \"root123@cepave.com\", \"im\": \"44955834958\", \"phone\": \"99999999999\", \"qq\": \"904394234239\"}", "ResponseBody": "{\"message\":\"user info updated\"}", "ResponseCode": 200 } ] }, { "HttpVerb": "PUT", "Path": "/api/v1/user/cgpasswd", "Calls": [ { "Id": 3, "CurrentPath": "/api/v1/user/cgpasswd", "MethodType": "PUT", "PostForm": null, "RequestHeader": { "Content-Type": " application/json\r", "Cookie": " name=test1; sig=d4f71cba377911e699d60242ac110010\r", "X-Forwarded-For": " " }, "CommonRequestHeaders": null, "ResponseHeader": { "Access-Control-Allow-Headers": "Content-Type,Token", "Access-Control-Allow-Origin": "*", "Content-Type": "application/json; charset=utf-8" }, "RequestUrlParams": {}, "RequestBody": "{\"new_password\": \"test1\", \"old_password\": \"test1\"}", "ResponseBody": "{\"message\":\"password updated!\"}", "ResponseCode": 200 } ] }, { "HttpVerb": "GET", "Path": "/api/v1/user/users", "Calls": [ { "Id": 4, "CurrentPath": "/api/v1/user/users", "MethodType": "GET", "PostForm": null, "RequestHeader": { "Cookie": " name=test1; sig=d4f71cba377911e699d60242ac110010\r", "X-Forwarded-For": " " }, "CommonRequestHeaders": null, "ResponseHeader": { "Access-Control-Allow-Headers": "Content-Type,Token", "Access-Control-Allow-Origin": "*", "Content-Type": "application/json; charset=utf-8" }, "RequestUrlParams": {}, "RequestBody": "", "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}]", "ResponseCode": 200 } ] }, { "HttpVerb": "POST", "Path": "/api/v1/user/login", "Calls": [ { "Id": 5, "CurrentPath": "/api/v1/user/login", "MethodType": "POST", "PostForm": null, "RequestHeader": { "X-Forwarded-For": " " }, "CommonRequestHeaders": null, "ResponseHeader": { "Access-Control-Allow-Headers": "Content-Type,Token", "Access-Control-Allow-Origin": "*", "Content-Type": "application/json; charset=utf-8" }, "RequestUrlParams": { "name": "gg123", "password": "willnotpass" }, "RequestBody": "", "ResponseBody": "{\"error\":\"password error\"}", "ResponseCode": 400 }, { "Id": 6, "CurrentPath": "/api/v1/user/login", "MethodType": "POST", "PostForm": null, "RequestHeader": { "X-Forwarded-For": " " }, "CommonRequestHeaders": null, "ResponseHeader": { "Access-Control-Allow-Headers": "Content-Type,Token", "Access-Control-Allow-Origin": "*", "Content-Type": "application/json; charset=utf-8" }, "RequestUrlParams": { "name": "test2", "password": "test2" }, "RequestBody": "", "ResponseBody": "{\"sig\":\"9d791331c0ea11e690c5001500c6ca5a\",\"name\":\"test2\",\"admin\":false}", "ResponseCode": 200 } ] }, { "HttpVerb": "GET", "Path": "/api/v1/user/logout", "Calls": [ { "Id": 8, "CurrentPath": "/api/v1/user/logout", "MethodType": "GET", "PostForm": null, "RequestHeader": { "Cookie": " name=test2; sig=9d791331c0ea11e690c5001500c6ca5a\r", "X-Forwarded-For": " " }, "CommonRequestHeaders": null, "ResponseHeader": { "Access-Control-Allow-Headers": "Content-Type,Token", "Access-Control-Allow-Origin": "*", "Content-Type": "application/json; charset=utf-8" }, "RequestUrlParams": {}, "RequestBody": "", "ResponseBody": "{\"message\":\"logout successful\"}", "ResponseCode": 200 } ] }, { "HttpVerb": "GET", "Path": "/api/v1/user/auth_session", "Calls": [ { "Id": 9, "CurrentPath": "/api/v1/user/auth_session", "MethodType": "GET", "PostForm": null, "RequestHeader": { "Cookie": " name=test1; sig=d4f71cba377911e699d60242ac110010\r", "X-Forwarded-For": " " }, "CommonRequestHeaders": null, "ResponseHeader": { "Access-Control-Allow-Headers": "Content-Type,Token", "Access-Control-Allow-Origin": "*", "Content-Type": "application/json; charset=utf-8" }, "RequestUrlParams": {}, "RequestBody": "", "ResponseBody": "{\"message\":\"session is vaild!\"}", "ResponseCode": 200 }, { "Id": 10, "CurrentPath": "/api/v1/user/auth_session", "MethodType": "GET", "PostForm": null, "RequestHeader": { "Cookie": " name=testtest; sig=9a84ae1d377911e699d60242ac110010\r", "X-Forwarded-For": " " }, "CommonRequestHeaders": null, "ResponseHeader": { "Access-Control-Allow-Headers": "Content-Type,Token", "Access-Control-Allow-Origin": "*", "Content-Type": "application/json; charset=utf-8" }, "RequestUrlParams": {}, "RequestBody": "", "ResponseBody": "{\"error\":\"not found this user\"}", "ResponseCode": 401 } ] }, { "HttpVerb": "GET", "Path": "/api/v1/user/current", "Calls": [ { "Id": 0, "CurrentPath": "/api/v1/user/current", "MethodType": "GET", "PostForm": null, "RequestHeader": { "Apitoken": "{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}", "X-Forwarded-For": " 127.0.0.1\r" }, "CommonRequestHeaders": null, "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" }, "RequestUrlParams": {}, "RequestBody": "", "ResponseBody": "{\"id\":2,\"name\":\"root\",\"cnname\":\"\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"\",\"role\":2}", "ResponseCode": 200 } ] }, { "HttpVerb": "GET", "Path": "/api/v1/user/u/3", "Calls": [ { "Id": 0, "CurrentPath": "/api/v1/user/u/3", "MethodType": "GET", "PostForm": null, "RequestHeader": { "Apitoken": "{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}", "X-Forwarded-For": " 127.0.0.1\r" }, "CommonRequestHeaders": null, "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" }, "RequestUrlParams": {}, "RequestBody": "", "ResponseBody": "{\"error\":\"record not found\"}", "ResponseCode": 417 } ] }, { "HttpVerb": "GET", "Path": "/api/v1/user/u/4", "Calls": [ { "Id": 1, "CurrentPath": "/api/v1/user/u/4", "MethodType": "GET", "PostForm": null, "RequestHeader": { "Apitoken": "{\"name\":\"root\",\"sig\":\"427d6803b78311e68afd0242ac130006\"}", "X-Forwarded-For": " 127.0.0.1\r" }, "CommonRequestHeaders": null, "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" }, "RequestUrlParams": {}, "RequestBody": "", "ResponseBody": "{\"id\":4,\"name\":\"userA\",\"cnname\":\"tear\",\"email\":\"\",\"phone\":\"\",\"im\":\"\",\"qq\":\"\",\"role\":0}", "ResponseCode": 200 } ] } ] }