How to obtain the userID and position using REST API

This guide explains how to obtain the user ID of a user with its username, and obtain its latest position data using REST API.

Requisites

Resource used

Users > Username

mceclip0.png

How to

1. Log in to http://host_name/comGpsGate/api/v.1/test 

Note: replace host_name with your actual server IP address or host name.

2. Click on the resource name, then > Try it out

mceclip1.png

3. Insert the parameters required. This API resource requires app ID and username.

Note: If you don't know your Application ID, you can obtain it as explained here.

mceclip2.png

4. From these parameters you will obtain Curl, Request URL, 

mceclip5.png

and the Response message from the request, containing, among other data, the latest known location of the vehicle and the user ID at the end of the message.

2019-12-10_14-03-47.png