Skip to main content

Device App Locations

Retrieve location data for device applications with filtering and pagination support.

Base URL: https://gate.zequenze.com/api/v1

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Endpoints

GET /device_app_locations/

Retrieve a paginated list of device application locations with optional filtering by last change date.

Parameters:

Parameter Type In Required Description
last_change__gte string query No Filter results to include only locations changed on or after this date (ISO 8601 format)
limit integer query No Number of results to return per page (default: 20)
offset integer query No The initial index from which to return the results (default: 0)

Example Request:

GET /api/v1/device_app_locations/?limit=10&offset=0&last_change__gte=2024-01-01T00:00:00Z

Example Response:

{
  "count": 150,
  "next": "https://gate.zequenze.com/api/v1/device_app_locations/?limit=10&offset=10",
  "previous": null,
  "results": [
    {
      "id": 1,
      "device_id": "dev_12345",
      "app_name": "ZequenzeApp",
      "location": {
        "latitude": 40.7128,
        "longitude": -74.0060,
        "accuracy": 10.5,
        "timestamp": "2024-01-15T14:30:00Z"
      },
      "last_change": "2024-01-15T14:30:00Z",
      "created_at": "2024-01-15T14:30:00Z",
      "updated_at": "2024-01-15T14:30:00Z"
    },
    {
      "id": 2,
      "device_id": "dev_67890",
      "app_name": "MobileTracker",
      "location": {
        "latitude": 34.0522,
        "longitude": -118.2437,
        "accuracy": 15.2,
        "timestamp": "2024-01-15T13:45:00Z"
      },
      "last_change": "2024-01-15T13:45:00Z",
      "created_at": "2024-01-15T13:45:00Z",
      "updated_at": "2024-01-15T13:45:00Z"
    }
  ]
}
Status Description
200 Successfully retrieved device app locations
400 Bad request - invalid parameters
401 Unauthorized - invalid or missing Bearer token
403 Forbidden - insufficient permissions
500 Internal server error

Best Practices

  • Pagination: Use limit and offset parameters to manage large datasets efficiently. Default page size is 20 items.
  • Date Filtering: Use ISO 8601 format for last_change__gte parameter (e.g., 2024-01-01T00:00:00Z)
  • Rate Limiting: Implement appropriate delays between requests to avoid overwhelming the server
  • Error Handling: Always check the HTTP status code and handle authentication errors appropriately
  • Data Freshness: Use the last_change__gte parameter to retrieve only recently updated location data
  • Performance: Limit the number of results per request to improve response times and reduce server load