Skip to main content

Device App Connection Summary

The device app connection summary API provides insights into how mobile applications connect to devices within your network. This endpoint delivers aggregated connection data, helping administrators monitor device connectivity patterns and troubleshoot connection issues.

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

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Overview

The Device App Connection Summary API category is designed for network administrators and system integrators who need to monitor and analyze how mobile applications interact with IoT devices, sensors, or other connected hardware in their infrastructure.

This API provides aggregated connection statistics that help you understand:

  • Which devices are actively communicating with mobile apps
  • Connection success rates and failure patterns
  • Peak usage times and connection duration metrics
  • Device availability and responsiveness data

Common scenarios include monitoring smart building systems, industrial IoT deployments, fleet management solutions, or any environment where mobile applications need to maintain reliable connections with physical devices. The summary data helps identify connectivity issues before they impact end users and provides valuable insights for capacity planning.


Endpoints

GET /device_app_connection_summary/

Description: Retrieves a comprehensive summary of connection statistics between mobile applications and devices in your network. This endpoint aggregates connection data over specified time periods, providing insights into connection success rates, failure patterns, device availability, and usage trends.

Use Cases:

  • Monitor overall system health and device connectivity status
  • Generate reports on device utilization and connection patterns
  • Identify devices with frequent connection issues requiring maintenance
  • Analyze peak usage periods for capacity planning

Full URL Example:

https://gate.zequenze.com/api/v1/device_app_connection_summary/?time_range=24h&device_type=sensor

Parameters:

Parameter Type In Required Description
time_range string query No Time period for summary data (1h, 24h, 7d, 30d). Defaults to 24h
device_type string query No Filter by device type (sensor, gateway, controller, etc.)
organization string query No Filter by organization ID or name
status string query No Filter by connection status (active, inactive, error)
limit integer query No Number of results per page (default: 50, max: 200)
offset integer query No Number of results to skip for pagination

cURL Example:

curl -X GET "https://gate.zequenze.com/api/v1/device_app_connection_summary/?time_range=24h&limit=10" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response:

{
  "count": 25,
  "next": "https://gate.zequenze.com/api/v1/device_app_connection_summary/?limit=10&offset=10",
  "previous": null,
  "summary": {
    "total_devices": 150,
    "active_connections": 142,
    "success_rate": 94.7,
    "average_response_time": 234,
    "time_range": "24h",
    "last_updated": "2024-01-15T14:30:00Z"
  },
  "results": [
    {
      "device_id": "dev_001",
      "device_name": "Temperature Sensor - Building A",
      "device_type": "sensor",
      "organization": "Acme Corp",
      "total_attempts": 288,
      "successful_connections": 275,
      "failed_connections": 13,
      "success_rate": 95.5,
      "average_response_time": 187,
      "last_successful_connection": "2024-01-15T14:25:00Z",
      "status": "active",
      "connection_quality": "excellent"
    },
    {
      "device_id": "dev_002", 
      "device_name": "Smart Gateway - Floor 3",
      "device_type": "gateway",
      "organization": "Acme Corp",
      "total_attempts": 432,
      "successful_connections": 398,
      "failed_connections": 34,
      "success_rate": 92.1,
      "average_response_time": 312,
      "last_successful_connection": "2024-01-15T14:28:00Z",
      "status": "active",
      "connection_quality": "good"
    }
  ]
}

Response Codes:

Status Description
200 Success - Returns connection summary data
401 Unauthorized - Invalid or missing API token
403 Forbidden - Insufficient permissions for requested data
400 Bad Request - Invalid parameters (e.g., unsupported time_range)
500 Internal Server Error - Server-side processing error

Common Use Cases

Use Case 1: System Health Dashboard

Monitor overall connectivity health across all devices in your network. Use the summary endpoint with default parameters to get a quick overview of connection success rates and identify any devices experiencing issues.

Use Case 2: Maintenance Planning

Filter by device type and analyze connection quality trends over longer time periods (7d, 30d) to identify devices that may need preventive maintenance before they fail completely.

Use Case 3: Performance Optimization

Track average response times and connection success rates during peak usage periods to optimize network configuration and identify bandwidth bottlenecks.

Use Case 4: Organizational Reporting

Generate periodic reports for different organizations or departments by filtering results and analyzing connection patterns specific to their device deployments.

Use Case 5: Troubleshooting Support

When users report connectivity issues, quickly identify affected devices and their recent connection history to accelerate problem resolution and determine if issues are isolated or systemic.


Best Practices

  • Pagination: Use appropriate limit values (10-50) for real-time dashboards to ensure fast response times. For bulk analysis, you can increase the limit up to 200 results per request.

  • Time Range Selection: Choose time ranges based on your use case - use 1h or 24h for operational monitoring, 7d for trend analysis, and 30d for capacity planning and reporting.

  • Filtering Strategy: Apply device_type and organization filters to reduce response payload size and improve query performance when you only need specific subsets of data.

  • Caching: Connection summary data is typically updated every 5-15 minutes. Implement client-side caching to avoid unnecessary API calls and respect rate limits.

  • Error Handling: Always check the success_rate and connection_quality fields to programmatically identify devices that need attention. Set up alerts for devices with success rates below 90%.

  • Rate Limiting: This endpoint supports up to 100 requests per minute per API token. For high-frequency monitoring, consider using webhooks or WebSocket connections for real-time updates instead of polling.