Device App Locations
RetrieveThe Device App Locations API enables tracking and management of mobile app location dataforfromdevicedevicesapplicationswithin your organization. This endpoint provides access to location records with filtering capabilities based on modification timestamps and supports paginationsupport.for handling large datasets efficiently.
Base URL: https://gate.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Device App Locations API is designed for organizations that need to track and monitor location data from mobile applications installed on managed devices. This API category serves as a central repository for location information collected from various apps across your device fleet.
Key Capabilities:
Common Integration Scenarios:
The API uses a standard REST architecture with JSON responses and supports query-based filtering to help you retrieve exactly the location data you need without unnecessary overhead.
Endpoints
GET /device_app_locations/
RetrieveDescription: Retrieves a paginated list of all location records from applications on monitored devices. This endpoint allows you to access historical and current location data, filter by modification timestamps, and handle large datasets through pagination controls.
Use Cases:
Full URL Example:
https://gate.zequenze.com/api/v1/device_app_locations/?last_change__gte=2024-01-15T10:00:00Z&limit=50&offset=0
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| last_change__gte | string | query | No | Filter results to |
| limit | integer | query | No | Number of results to return per page (default: |
| offset | integer | query | No | The initial index from which to return |
ExamplecURL Request:Example:
curl -X GET "https://gate.zequenze.com/api/v1/device_app_locations/?limit=10&offset=0&last_change__gte=2024-01-01T00:15T10:00:00Z&limit=25" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 150,1247,
"next": "https://gate.zequenze.com/api/v1/device_app_locations/?limit=1025&offset=10"25",
"previous": null,
"results": [
{
"id": 1,15842,
"device_id": "dev_12345"DEV-2024-001",
"device_name": "iPhone 15 - John Doe",
"app_name": "ZequenzeApp"Corporate Mobile App",
"location"app_package": {"com.company.mobile",
"latitude": 40.7128,
"longitude": -74.0060,
"accuracy": 5.2,
"altitude": 10.5,
"timestamp": "2024-01-15T14:30:00Z"
}23:17Z",
"last_change": "2024-01-15T14:30:00Z"23:20Z",
"created_at"location_method": "2024-01-15T14:30:00Z"GPS",
"updated_at"address": "2024-01-15T14:30:00Z"123 Business St, New York, NY 10001",
"is_mock_location": false,
"battery_level": 78,
"network_type": "WiFi"
},
{
"id": 2,15841,
"device_id": "dev_67890"DEV-2024-002",
"device_name": "Samsung Galaxy S24 - Jane Smith",
"app_name": "MobileTracker"Field Service App",
"location"app_package": {"com.company.fieldservice",
"latitude": 34.0522,
"longitude": -118.2437,
"accuracy": 15.2,3.8,
"altitude": 71.3,
"timestamp": "2024-01-15T13:45:00Z"
}15T14:20:45Z",
"last_change": "2024-01-15T13:45:00Z"15T14:20:48Z",
"created_at"location_method": "2024-01-15T13:45:00Z"GPS",
"updated_at"address": "2024-01-15T13:45:00Z"456 Client Ave, Los Angeles, CA 90028",
"is_mock_location": false,
"battery_level": 92,
"network_type": "4G"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 |
Common Use Cases
Use Case 1: Real-Time Location Monitoring
Monitor recent location changes across all devices by using the last_change__gte parameter with a recent timestamp. This is ideal for security dashboards that need to show current device positions and detect unusual movement patterns.
Use Case 2: Compliance Reporting
Generate periodic reports by fetching location data for specific time periods. Combine timestamp filtering with pagination to process large datasets efficiently for compliance documentation and audit trails.
Use Case 3: Geofence Violation Detection
Regularly poll the API for recent location updates and cross-reference coordinates against predefined geographic boundaries to identify devices that have moved outside approved areas.
Use Case 4: Asset Tracking Integration
Integrate location data into asset management systems by periodically syncing device positions, enabling better inventory management and theft prevention for mobile device fleets.
Use Case 5: Business Intelligence Analytics
Export location data for analysis of employee mobility patterns, client visit optimization, and operational efficiency improvements in field service operations.
Best Practices
-
Pagination:Uselimitandoffsetparameters to manage large datasets efficiently. Default page size is 20 items.
last_change__gte2024-01-01T00:00:00Zlast_change__gte parameter Optimize Pagination: Choose appropriate limit values based on your processing capacity. Smaller batches (20-50) provide better responsiveness, while larger batches (up to 100) reduce total API calls for bulk operations.
Handle Rate Limits: Implement exponential backoff when receiving 429 responses, and consider caching location data locally to reduce API dependency for frequent access patterns.
Validate Location Accuracy: Check the accuracy field and is_mock_location flag to filter out low-quality location data that might affect your analysis or compliance reporting.
Monitor Data Freshness: Compare timestamp (when location was recorded) vs last_change (when record was modified) to understand data latency and ensure your monitoring systems account for potential delays.
Secure Token Management: Store API tokens securely and implement token rotation. Consider using environment variables or secure credential management systems rather than hardcoding tokens.