Get_users_near

Description

Gets the collection of users near a given location. You can filter the results for only those users who belong to a certain group.
This operation will return users with current active (non-closed yet) tracks only.

URL

/VERSION/users/get_near.FORMAT

Available Format

JSON

HTTP Method

GET

Accepted Version

1

Require

Authorization.

Headers

Parameters

  • access_token: (Required) access_token to user resources.
  • lat(Optional)latitude search center point. It is a required parameter is not specified poi.
  • lng(Optional)length from the center point search. It is a required parameter is not specified poi
  • poi(Optional)Identifier landmark around which the search is conducted. It is a mandatory parameter if not specified lat and lng.
  • radius(Required)search radius in meters, should be greater than zero
  • active(Optional)true/false¬†the search is performed only between users who are currently active track. Allowed values “true”. By default “true”
  • ugroup:(Optional)¬†group identifier to which the user belongs. You happen to belong to this group.
  • Count(Optional)number of users returned. The return will always be those closest to the point. Default value 1.

Example

https://api.topoos.com/1/users/get_near.json?lat=40.953107&lng=-4.123233&radius=100&Count=2&access_token=b9955415-82d3-4481-a736-330d962df9ea

Reply

JSON example reply

[{
    user_id: "e233dc82-d397-4f1c-b716-b31bfbd6ea63",
    position: {
        latitude: 40.953108,
        longitude: -4.123234,
        accuracy: 0
    }
}]