Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Step how to access API Realtime:
- <?php $host = $_SERVER['HTTP_HOST']; ?>
- var hostName = '//<?php echo $host; ?>';
- var hawkUrl = localhost/index.php';
- 1. API Login
- url : hawkUrl + '/api_users/login'
- post data : {username: 'admin', password: 'admin'}
- from respon get 'token'
- 2. API Load Device
- url : hawkUrl + '/api_devices/load_device/' + token
- from respon get 'deviceid'
- 3. API Set Sesion device
- url : hawkUrl + '/api_devices/set_session_device/'+ token
- post data : {devices[]: deviceid}
- 4. API Register Realtime
- url : hawkUrl + '/api_positions/register_realtime/'+ token
- from respon get 'realtime_id'
- 5. API Realtime
- url : hawkUrl + '/api_positions/realtime/'+ token
- post data : realtime_id
- from respon get require data.
Add Comment
Please, Sign In to add comment