123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342 |
- {
- "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
- }
- ]
- }
- ]
- }
|