123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- {
- "ApiSpecs": [
- {
- "HttpVerb": "POST",
- "Path": "/api/v1/admin/login",
- "Calls": [
- {
- "Id": 0,
- "CurrentPath": "/api/v1/admin/login",
- "MethodType": "POST",
- "PostForm": {
- "name": "qfeng"
- },
- "RequestHeader": {
- "Apitoken": "{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}",
- "Content-Type": " application/x-www-form-urlencoded\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": "{\"sig\":\"05434ff8db0311e7afde005056a6aba2\",\"name\":\"qfeng\",\"admin\":true}",
- "ResponseCode": 200
- },
- {
- "Id": 1,
- "CurrentPath": "/api/v1/admin/login",
- "MethodType": "POST",
- "PostForm": {
- "name": "daye"
- },
- "RequestHeader": {
- "Apitoken": "{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}",
- "Content-Type": " application/x-www-form-urlencoded\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\":\"no such user\"}",
- "ResponseCode": 400
- },
- {
- "Id": 2,
- "CurrentPath": "/api/v1/admin/login",
- "MethodType": "POST",
- "PostForm": {
- "name": "qfeng"
- },
- "RequestHeader": {
- "Apitoken": "{\"sig\": \"05434ff8db0311e7afde005056a6aba2\", \"name\": \"qfeng\"}",
- "Content-Type": " application/x-www-form-urlencoded\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\":\"API_USER not admin, no permissions can do this\"}",
- "ResponseCode": 400
- }
- ]
- },
- {
- "HttpVerb": "PUT",
- "Path": "/api/v1/admin/change_user_role",
- "Calls": [
- {
- "Id": 3,
- "CurrentPath": "/api/v1/admin/change_user_role",
- "MethodType": "PUT",
- "PostForm": null,
- "RequestHeader": {
- "Apitoken": "{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}",
- "Content-Type": " application/json\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": "{\"admin\": \"yes\", \"user_id\": 12}",
- "ResponseBody": "{\"message\":\"user role update sccuessful, affect row: 0\"}",
- "ResponseCode": 200
- },
- {
- "Id": 4,
- "CurrentPath": "/api/v1/admin/change_user_role",
- "MethodType": "PUT",
- "PostForm": null,
- "RequestHeader": {
- "Apitoken": "{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}",
- "Content-Type": " application/json\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": "{\"admin\": \"no\", \"user_id\": 12}",
- "ResponseBody": "{\"message\":\"user role update sccuessful, affect row: 1\"}",
- "ResponseCode": 200
- }
- ]
- },
- {
- "HttpVerb": "PUT",
- "Path": "/api/v1/admin/change_user_passwd",
- "Calls": [
- {
- "Id": 5,
- "CurrentPath": "/api/v1/admin/change_user_passwd",
- "MethodType": "PUT",
- "PostForm": null,
- "RequestHeader": {
- "Apitoken": "{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}",
- "Content-Type": " application/json\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": "{\"password\": \"lalala\", \"user_id\": 12}",
- "ResponseBody": "{\"message\":\"password updated!\"}",
- "ResponseCode": 200
- }
- ]
- },
- {
- "HttpVerb": "DELETE",
- "Path": "/api/v1/admin/delete_user",
- "Calls": [
- {
- "Id": 6,
- "CurrentPath": "/api/v1/admin/delete_user",
- "MethodType": "DELETE",
- "PostForm": null,
- "RequestHeader": {
- "Apitoken": "{\"sig\": \"25ae3f6cdb1711e79997005056a6aba2\", \"name\": \"root\"}",
- "Content-Type": " application/json\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": "{\"user_id\": 12}",
- "ResponseBody": "{\"message\":\"user 12 has been delete, affect row: 1\"}",
- "ResponseCode": 200
- }
- ]
- }
- ]
- }
|