Skip to main content

Device App Locations

RetrieveThe Device App Locations API enables tracking and management of mobile app location data forfrom devicedevices applicationswithin your organization. This endpoint provides access to location records with filtering capabilities based on modification timestamps and supports pagination support.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:

    Retrieve location data from all monitored devices and applications Filter location records by modification date to track recent changes Paginate through large datasets efficiently Monitor location tracking compliance and usage patterns

    Common Integration Scenarios:

      Security monitoring systems that need to verify device locations Compliance reporting for devices that must remain within specific geographic boundaries Asset management systems tracking the physical location of company devices Analytics platforms analyzing location patterns for business intelligence

      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:

        Generate compliance reports showing device application locations withover optionaltime filteringMonitor byreal-time lastlocation changechanges date.across your device fleet Integrate location data into security monitoring dashboards Analyze location patterns for business operations optimization

        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 includeshow only locationslocation changedrecords modified on or after this datetimestamp (ISO 8601 format)
        limit integer query No Number of results to return per page (default: 20)20, max: 100)
        offset integer query No The initial index from which to return the results (default:for 0)pagination

        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 Successfully retrieved device app locations
        400 Bad requestSuccess - invalidReturns parameterspaginated location data 401 Unauthorized - invalidInvalid or missing Bearerauthentication token 403400 ForbiddenBad Request - insufficientInvalid permissionsquery parameters (e.g., malformed timestamp) 429 Too Many Requests - Rate limit exceeded 500 Internal serverServer Error - Server processing error

        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: 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 appropriateEfficient delays between requests to avoid overwhelming the server Error Handling: Always check the HTTP status code and handle authentication errors appropriately Data Freshness:Polling: Use the last_change__gte parameter towith retrieveyour onlylast recentlysuccessful updatedsync location data Performance: Limit the number of results per requesttimestamp to improveavoid responseretrieving timesduplicate data and reduce serverAPI loadcalls.

        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.