Guest User

Untitled

a guest
Nov 30th, 2018
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.54 KB | None | 0 0
  1. # successful user login
  2. Request:
  3. http 127.0.0.1:5000/user/login login=admin password=123456
  4. Response:
  5. HTTP/1.0 200 OK
  6. Content-Type: text/html; charset=utf-8
  7. Content-Length: 74
  8. Set-Cookie: session="y+s2moFAmfy1aIaEkeeQN9Ps5Q0=?_fresh=STAxCi4=&_id=UydceGMxXHgxOVllXHhkZVx4ZWZpKlRceGU3XHhmYlx4MDNceGNiXHhlZFx4Y2FcbicKcDEKLg==&user_id=Y2NvcHlfcmVnCl9yZWNvbnN0cnVjdG9yCnAxCihjYnNvbi5vYmplY3RpZApPYmplY3RJZApwMgpjX19idWlsdGluX18Kb2JqZWN0CnAzCk50UnA0ClMnUCUwSVx4ZWVceGYzXHhkNXhnZFx4YTgpJwpwNQpiLg=="; Path=/; HttpOnly
  9. Server: Werkzeug/0.8.3 Python/2.7.2+
  10. Date: Tue, 14 Aug 2012 20:51:20 GMT
  11.  
  12. {"login": "admin", "id": "50253049eef3d5786764a829", "is_logged_in": true}
  13.  
  14.  
  15. # failed user login
  16. Request:
  17. http mdm.sandbox.mobsafety.com:5000/user/login login=admin password=1234d56
  18. Response:
  19. HTTP/1.0 200 OK
  20. Content-Type: text/html; charset=utf-8
  21. Content-Length: 23
  22. Set-Cookie: session="NWXdRRRkDh+t4mGLbvKk4lUNoPE=?_id=UydceGMxXHgxOVllXHhkZVx4ZWZpKlRceGU3XHhmYlx4MDNceGNiXHhlZFx4Y2FcbicKcDEKLg=="; Path=/; HttpOnly
  23. Server: Werkzeug/0.8.3 Python/2.7.2+
  24. Date: Tue, 14 Aug 2012 20:52:17 GMT
  25.  
  26. {"is_logged_in": false}
  27.  
  28.  
  29. # user status
  30. Request:
  31. http 127.0.0.1:5000/user/status Cookie:session="ks49WKOyk2zCfr0DGTqql4HEYh0=?_fresh=STAxCi4=&_id=UydceGUzU3dceGYxL1x4MDFqW1x4ZDdceGYzPStUXHhiN2ZpJwpwMQou&user_id=Y2NvcHlfcmVnCl9yZWNvbnN0cnVjdG9yCnAxCihjYnNvbi5vYmplY3RpZApPYmplY3RJZApwMgpjX19idWlsdGluX18Kb2JqZWN0CnAzCk50UnA0ClMiT1x4ZjRLdFx4ZjcnXHhkMlx4MDhtXHgwMFx4MDBceDAwIgpwNQpiLg=="
  32. Response:
  33. HTTP/1.0 200 OK
  34. Content-Type: text/html; charset=utf-8
  35. Content-Length: 116
  36. Set-Cookie: session="y+s2moFAmfy1aIaEkeeQN9Ps5Q0=?_fresh=STAxCi4=&_id=UydceGMxXHgxOVllXHhkZVx4ZWZpKlRceGU3XHhmYlx4MDNceGNiXHhlZFx4Y2FcbicKcDEKLg==&user_id=Y2NvcHlfcmVnCl9yZWNvbnN0cnVjdG9yCnAxCihjYnNvbi5vYmplY3RpZApPYmplY3RJZApwMgpjX19idWlsdGluX18Kb2JqZWN0CnAzCk50UnA0ClMnUCUwSVx4ZWVceGYzXHhkNXhnZFx4YTgpJwpwNQpiLg=="; Path=/; HttpOnly
  37. Server: Werkzeug/0.8.3 Python/2.7.2+
  38. Date: Tue, 14 Aug 2012 20:54:56 GMT
  39.  
  40. {"data": {"profile": "#", "lastname": "Lastname", "login": "admin", "firstname": "Firstname"}, "is_logged_in": true}
  41.  
  42.  
  43. # device include (replace of device 'add')
  44. Request:
  45. http 127.0.0.1:5000/device/include holder=megaholder os=iOS email=aleksandr.sorokoumov@gmail.com notification_type='email' message=message phone=+12-921-3354991 Cookie:session="ks49WKOyk2zCfr0DGTqql4HEYh0=?_fresh=STAxCi4=&_id=UydceGUzU3dceGYxL1x4MDFqW1x4ZDdceGYzPStUXHhiN2ZpJwpwMQou&user_id=Y2NvcHlfcmVnCl9yZWNvbnN0cnVjdG9yCnAxCihjYnNvbi5vYmplY3RpZApPYmplY3RJZApwMgpjX19idWlsdGluX18Kb2JqZWN0CnAzCk50UnA0ClMiT1x4ZjRLdFx4ZjcnXHhkMlx4MDhtXHgwMFx4MDBceDAwIgpwNQpiLg=="
  46. Response:
  47. HTTP/1.0 200 OK
  48. Content-Type: text/html; charset=utf-8
  49. Content-Length: 35
  50. Server: Werkzeug/0.8.3 Python/2.7.1
  51. Date: Fri, 10 Aug 2012 16:08:42 GMT
  52.  
  53. {"did": "50253206f727d241ed000007"}
  54.  
  55.  
  56. # device details
  57. Request:
  58. http 127.0.0.1:5000/device/details did=50252890f727d241ed000006 Cookie:session="ks49WKOyk2zCfr0DGTqql4HEYh0=?_fresh=STAxCi4=&_id=UydceGUzU3dceGYxL1x4MDFqW1x4ZDdceGYzPStUXHhiN2ZpJwpwMQou&user_id=Y2NvcHlfcmVnCl9yZWNvbnN0cnVjdG9yCnAxCihjYnNvbi5vYmplY3RpZApPYmplY3RJZApwMgpjX19idWlsdGluX18Kb2JqZWN0CnAzCk50UnA0ClMiT1x4ZjRLdFx4ZjcnXHhkMlx4MDhtXHgwMFx4MDBceDAwIgpwNQpiLg=="
  59. Response:
  60. HTTP/1.0 200 OK
  61. Content-Type: text/html; charset=utf-8
  62. Content-Length: 281
  63. Server: Werkzeug/0.8.3 Python/2.7.1
  64. Date: Fri, 10 Aug 2012 16:09:22 GMT
  65.  
  66. {"os": "iOS", "phone": "+12-921-3354991", "included": "2012-08-10T15:28:17.957000+00:00", "notification_type": "email", "message": "message", "_id": "50252890f727d241ed000006", "holder": "megaholder", "email": "aleksandr.sorokoumov@gmail.com", "identity": "waiting for activation"}
  67.  
  68.  
  69. # device keywords
  70. Request:
  71. http 127.0.0.1:5000/device/search keywords='Android' Cookie:session="ks49WKOyk2zCfr0DGTqql4HEYh0=?_fresh=STAxCi4=&_id=UydceGUzU3dceGYxL1x4MDFqW1x4ZDdceGYzPStUXHhiN2ZpJwpwMQou&user_id=Y2NvcHlfcmVnCl9yZWNvbnN0cnVjdG9yCnAxCihjYnNvbi5vYmplY3RpZApPYmplY3RJZApwMgpjX19idWlsdGluX18Kb2JqZWN0CnAzCk50UnA0ClMiT1x4ZjRLdFx4ZjcnXHhkMlx4MDhtXHgwMFx4MDBceDAwIgpwNQpiLg=="
  72. Response:
  73. HTTP/1.0 200 OK
  74. Content-Type: text/html; charset=utf-8
  75. Content-Length: 4129
  76. Server: Werkzeug/0.8.3 Python/2.7.1
  77. Date: Fri, 10 Aug 2012 16:09:52 GMT
  78.  
  79. [{"os": "iOS", "plist": [1, 2], "phone": "+12-921-3354991", "included": "2012-08-10T15:19:59.277000+00:00", "notification_type": "email", "message": "message", "_id": "4ff97010f727d20336000000", "holder": "megaholder", "email": "aleksandr.sorokoumov@gmail.com", "identity": "waiting for activation"}, {"tags": ["345", "12", "mr", "test", "678912", "ios"], "holder": "Mr. Test", "phone": "+12-345-678912", "included": "2012-07-22T19:55:20.787000+00:00", "message": "Open it: [link]", "_id": "500c5aa8c932f2d7fe000001", "os": "iOS"}, {"tags": ["345", "12", "mr", "test", "678912", "ios"], "holder": "Mr. Test", "phone": "+12-345-678912", "included": "2012-07-22T19:55:59.777000+00:00", "message": "Open it: [link]", "_id": "500c5acfc932f2d808000001", "os": "iOS"}, {"tags": ["345", "12", "mr", "test", "678912", "ios"], "holder": "Mr. Test", "phone": "+12-345-678912", "included": "2012-07-22T19:56:10.149000+00:00", "message": "Open it: [link]", "_id": "500c5adac932f2d80d000001", "os": "iOS"}, {"tags": ["345", "12", "mr", "test", "678912", "ios"], "holder": "Mr. Test", "phone": "+12-345-678912", "included": "2012-07-22T19:57:50.243000+00:00", "message": "Open it: [link]", "_id": "500c5b3ec932f2d819000001", "os": "iOS"}, {"tags": ["345", "12", "mr", "test", "678912", "ios"], "holder": "Mr. Test", "phone": "+12-345-678912", "included": "2012-07-22T19:59:51.478000+00:00", "message": "Open it: [link]", "_id": "500c5bb7c932f2d820000001", "os": "iOS"}, {"tags": ["345", "12", "mr", "test", "678912", "ios"], "holder": "Mr. Test", "phone": "+12-345-678912", "included": "2012-07-22T20:01:07.382000+00:00", "message": "Open it: [link]", "_id": "500c5c03c932f2d82c000001", "os": "iOS"}, {"tags": ["345", "12", "mr", "test", "678912", "ios"], "holder": "Mr. Test", "phone": "+12-345-678912", "included": "2012-07-22T20:01:18.541000+00:00", "message": "Open it: [link]", "_id": "500c5c0ec932f2d831000001", "os": "iOS"}, {"tags": ["345", "12", "mr", "test", "678912", "ios"], "holder": "Mr. Test", "phone": "+12-345-678912", "included": "2012-07-22T20:02:56.140000+00:00", "message": "Open it: [link]", "_id": "500c5c70c932f2d838000001", "os": "iOS"}, {"os": "iOS", "phone": "+12-921-3354991", "included": "2012-08-10T15:24:34.463000+00:00", "notification_type": "email", "message": "message", "_id": "502527b0f727d241ed000001", "holder": "megaholder", "email": "aleksandr.sorokoumov@gmail.com", "identity": "waiting for activation"}, {"os": "iOS", "phone": "+12-921-3354991", "included": "2012-08-10T15:25:24.250000+00:00", "notification_type": "email", "message": "message", "_id": "502527e2f727d241ed000002", "holder": "megaholder", "email": "aleksandr.sorokoumov@gmail.com", "identity": "waiting for activation"}, {"os": "iOS", "phone": "+12-921-3354991", "included": "2012-08-10T15:25:57.875000+00:00", "notification_type": "email", "message": "message", "_id": "50252802f727d241ed000003", "holder": "megaholder", "email": "aleksandr.sorokoumov@gmail.com", "identity": "waiting for activation"}, {"os": "iOS", "phone": "+12-921-3354991", "included": "2012-08-10T15:27:13.566000+00:00", "notification_type": "email", "message": "message", "_id": "5025284ff727d241ed000004", "holder": "megaholder", "email": "aleksandr.sorokoumov@gmail.com", "identity": "waiting for activation"}, {"os": "iOS", "phone": "+12-921-3354991", "included": "2012-08-10T15:27:58.596000+00:00", "notification_type": "email", "message": "message", "_id": "5025287cf727d241ed000005", "holder": "megaholder", "email": "aleksandr.sorokoumov@gmail.com", "identity": "waiting for activation"}, {"os": "iOS", "phone": "+12-921-3354991", "included": "2012-08-10T15:28:17.957000+00:00", "notification_type": "email", "message": "message", "_id": "50252890f727d241ed000006", "holder": "megaholder", "email": "aleksandr.sorokoumov@gmail.com", "identity": "waiting for activation"}, {"os": "iOS", "phone": "+12-921-3354991", "included": "2012-08-10T16:08:41.219000+00:00", "notification_type": "email", "message": "message", "_id": "50253206f727d241ed000007", "holder": "megaholder", "email": "aleksandr.sorokoumov@gmail.com", "identity": "waiting for activation"}]
  80.  
  81. # not implemented yet
  82. request: POST /devices/command
  83. {'did': '<device_id>',
  84. 'command': 'set_restrictions',
  85. 'params' ['youtube', 'camera']}
  86. response:
  87. {'did': '<device_id>',
  88. 'command': 'set_restrictions,
  89. 'params' ['youtube', 'camera'],
  90. 'status': 'success'/'failed'
  91. }
  92.  
  93. request:
  94. {'id': '<device_id>',
  95. 'command': 'lock'/'wipe'}
  96. on something like /device/manage
  97. response:
  98. {'id': '<device_id>',
  99. 'command': 'lock'/'wipe',
  100. 'status': 'success'/'failed'
  101. }
Add Comment
Please, Sign In to add comment