Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # successful user login
- Request:
- http 127.0.0.1:5000/user/login login=admin password=123456
- Response:
- HTTP/1.0 200 OK
- Content-Type: text/html; charset=utf-8
- Content-Length: 74
- Set-Cookie: session="y+s2moFAmfy1aIaEkeeQN9Ps5Q0=?_fresh=STAxCi4=&_id=UydceGMxXHgxOVllXHhkZVx4ZWZpKlRceGU3XHhmYlx4MDNceGNiXHhlZFx4Y2FcbicKcDEKLg==&user_id=Y2NvcHlfcmVnCl9yZWNvbnN0cnVjdG9yCnAxCihjYnNvbi5vYmplY3RpZApPYmplY3RJZApwMgpjX19idWlsdGluX18Kb2JqZWN0CnAzCk50UnA0ClMnUCUwSVx4ZWVceGYzXHhkNXhnZFx4YTgpJwpwNQpiLg=="; Path=/; HttpOnly
- Server: Werkzeug/0.8.3 Python/2.7.2+
- Date: Tue, 14 Aug 2012 20:51:20 GMT
- {"login": "admin", "id": "50253049eef3d5786764a829", "is_logged_in": true}
- # failed user login
- Request:
- http mdm.sandbox.mobsafety.com:5000/user/login login=admin password=1234d56
- Response:
- HTTP/1.0 200 OK
- Content-Type: text/html; charset=utf-8
- Content-Length: 23
- Set-Cookie: session="NWXdRRRkDh+t4mGLbvKk4lUNoPE=?_id=UydceGMxXHgxOVllXHhkZVx4ZWZpKlRceGU3XHhmYlx4MDNceGNiXHhlZFx4Y2FcbicKcDEKLg=="; Path=/; HttpOnly
- Server: Werkzeug/0.8.3 Python/2.7.2+
- Date: Tue, 14 Aug 2012 20:52:17 GMT
- {"is_logged_in": false}
- # user status
- Request:
- http 127.0.0.1:5000/user/status Cookie:session="ks49WKOyk2zCfr0DGTqql4HEYh0=?_fresh=STAxCi4=&_id=UydceGUzU3dceGYxL1x4MDFqW1x4ZDdceGYzPStUXHhiN2ZpJwpwMQou&user_id=Y2NvcHlfcmVnCl9yZWNvbnN0cnVjdG9yCnAxCihjYnNvbi5vYmplY3RpZApPYmplY3RJZApwMgpjX19idWlsdGluX18Kb2JqZWN0CnAzCk50UnA0ClMiT1x4ZjRLdFx4ZjcnXHhkMlx4MDhtXHgwMFx4MDBceDAwIgpwNQpiLg=="
- Response:
- HTTP/1.0 200 OK
- Content-Type: text/html; charset=utf-8
- Content-Length: 116
- Set-Cookie: session="y+s2moFAmfy1aIaEkeeQN9Ps5Q0=?_fresh=STAxCi4=&_id=UydceGMxXHgxOVllXHhkZVx4ZWZpKlRceGU3XHhmYlx4MDNceGNiXHhlZFx4Y2FcbicKcDEKLg==&user_id=Y2NvcHlfcmVnCl9yZWNvbnN0cnVjdG9yCnAxCihjYnNvbi5vYmplY3RpZApPYmplY3RJZApwMgpjX19idWlsdGluX18Kb2JqZWN0CnAzCk50UnA0ClMnUCUwSVx4ZWVceGYzXHhkNXhnZFx4YTgpJwpwNQpiLg=="; Path=/; HttpOnly
- Server: Werkzeug/0.8.3 Python/2.7.2+
- Date: Tue, 14 Aug 2012 20:54:56 GMT
- {"data": {"profile": "#", "lastname": "Lastname", "login": "admin", "firstname": "Firstname"}, "is_logged_in": true}
- # device include (replace of device 'add')
- Request:
- 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=="
- Response:
- HTTP/1.0 200 OK
- Content-Type: text/html; charset=utf-8
- Content-Length: 35
- Server: Werkzeug/0.8.3 Python/2.7.1
- Date: Fri, 10 Aug 2012 16:08:42 GMT
- {"did": "50253206f727d241ed000007"}
- # device details
- Request:
- http 127.0.0.1:5000/device/details did=50252890f727d241ed000006 Cookie:session="ks49WKOyk2zCfr0DGTqql4HEYh0=?_fresh=STAxCi4=&_id=UydceGUzU3dceGYxL1x4MDFqW1x4ZDdceGYzPStUXHhiN2ZpJwpwMQou&user_id=Y2NvcHlfcmVnCl9yZWNvbnN0cnVjdG9yCnAxCihjYnNvbi5vYmplY3RpZApPYmplY3RJZApwMgpjX19idWlsdGluX18Kb2JqZWN0CnAzCk50UnA0ClMiT1x4ZjRLdFx4ZjcnXHhkMlx4MDhtXHgwMFx4MDBceDAwIgpwNQpiLg=="
- Response:
- HTTP/1.0 200 OK
- Content-Type: text/html; charset=utf-8
- Content-Length: 281
- Server: Werkzeug/0.8.3 Python/2.7.1
- Date: Fri, 10 Aug 2012 16:09:22 GMT
- {"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"}
- # device keywords
- Request:
- http 127.0.0.1:5000/device/search keywords='Android' Cookie:session="ks49WKOyk2zCfr0DGTqql4HEYh0=?_fresh=STAxCi4=&_id=UydceGUzU3dceGYxL1x4MDFqW1x4ZDdceGYzPStUXHhiN2ZpJwpwMQou&user_id=Y2NvcHlfcmVnCl9yZWNvbnN0cnVjdG9yCnAxCihjYnNvbi5vYmplY3RpZApPYmplY3RJZApwMgpjX19idWlsdGluX18Kb2JqZWN0CnAzCk50UnA0ClMiT1x4ZjRLdFx4ZjcnXHhkMlx4MDhtXHgwMFx4MDBceDAwIgpwNQpiLg=="
- Response:
- HTTP/1.0 200 OK
- Content-Type: text/html; charset=utf-8
- Content-Length: 4129
- Server: Werkzeug/0.8.3 Python/2.7.1
- Date: Fri, 10 Aug 2012 16:09:52 GMT
- [{"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"}]
- # not implemented yet
- request: POST /devices/command
- {'did': '<device_id>',
- 'command': 'set_restrictions',
- 'params' ['youtube', 'camera']}
- response:
- {'did': '<device_id>',
- 'command': 'set_restrictions,
- 'params' ['youtube', 'camera'],
- 'status': 'success'/'failed'
- }
- request:
- {'id': '<device_id>',
- 'command': 'lock'/'wipe'}
- on something like /device/manage
- response:
- {'id': '<device_id>',
- 'command': 'lock'/'wipe',
- 'status': 'success'/'failed'
- }
Add Comment
Please, Sign In to add comment