Skip to main content

Device App Connection Log

Endpoints Summary

Method Path Swagger POST /device_app_connection_log/ Swagger ↗

The Device App Connection Log API enables applications to register detailedand track network connection logsdetails from devices. This endpoint is essential for monitoring network usage patterns, connection quality metrics, and analyticsgeographic purposes.location Thisdata endpointacross captures comprehensivedifferent network connectivity datatypes including connectionWiFi, types,Mobile, security protocols, location information,Bluetooth, and performanceEthernet metrics, making it essential for network monitoring applications and connectivity analysis tools.connections.

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 Log API provides a centralized way to trackcollect and logstore detailed network connectionsconnection information from devices andacross applications.your organization. This API is designedparticularly forvaluable organizationsfor:

that
need toNetwork monitorAnalytics: networkTrack usageconnection patterns, analyze connectivitynetwork performance, and maintainusage detailedstatistics recordsacross ofdifferent devicelocations network activity.

Key Features:

    Support for multipleand network types (WiFi, Mobile, Bluetooth, Ethernet) Comprehensive Quality Monitoring: Collect signal strength, link speed, and connection quality metrics to identify network issues Geographic Tracking: Monitor device connectivity across different locations using latitude/longitude data Security Analysis: Track network security protocoltypes trackingand (Open,authentication WEP,methods WPA,to WPA2,ensure 3GPP)compliance with security policies Location-based loggingRoaming withDetection: GPSIdentify coordinateswhen devices are operating outside their home networks Network

    The connection logs capture comprehensive network details including network identification (BSSID, Cell ID, MCC/MNC), performance metrics including(RSSI, SINR, link speed), data transferusage (inbound/outbound bytes), and linklocation speeds

    information. Connection quality measurements (RSSI, SINR) Mobile network specifics (MCC/MNC, Cell ID, roaming status)

    Common Use Cases:

      Network performance monitoring and analytics Device connectivity auditing and compliance Troubleshooting network connectivity issues GatheringThis data is essential for network optimizationadministrators, SecurityIT monitoringteams, and anomalydevelopers detectionbuilding location-aware or network-dependent applications.

      Endpoints

      POST /device_app_connection_log/

      Description: Registers a newcomprehensive network connection log entry with detailed network information,characteristics, performance metrics, and location data. This endpoint isaccepts typicallyconnection calleddata whenfrom a device establishes, maintains, or terminates avarious network connectiontypes toand createstores ait comprehensivefor auditanalytics trail.and monitoring purposes.

      Use Cases:

      • LoggingMobile WiFiapplications connection events with security and performance details
      Recording mobilereporting network connections including roamingconnectivity status and cell informationperformance TrackingIoT networkdevices usagelogging patternsconnection quality for analytics andnetwork optimization CreatingEnterprise auditapplications trailstracking foremployee securitydevice andconnectivity complianceacross locations Network monitoring tools collecting performance data from field devices

      Full URL Example:

      https://gate.zequenze.com/api/v1/device_app_connection_log/
      

      Parameters:

      Parameter Type In Required Description
      data string body Yes JSON string containing the network connection log data

      Request Body Schema:

      Field Type Required Description
      network_name string No Name of the current network (e.g., "Office WiFi", "Guest Network")
      network_type string Yes Network type. Use:type: 'wi' (WiFi), 'mo' (Mobile), 'bl' (Bluetooth), 'et' (Ethernet)
      network_security string Yes Security protocol. Use:type: 'opn' (Open), 'wep' (WEP), 'wpa' (WPA), 'wp2' (WPA2), '3gp' (3GPP)
      network_mccmnc string No Mobile Countrynetwork Code/MobileMCC/MNC Networkcode Code(e.g., "31026" for mobileT-Mobile networksUS)
      frequency number No Wireless network frequency in HzGHz (e.g., 2.4, 5.0 for WiFi)0)
      authentication string No Authentication method. Use:method: 'non' (None), 'cpo' (Captive portal), 'wis' (WISPr), 'psk' (Pre-shared key), 'rad' (RADIUS MAC-based)RADIUS), 'eap' (EAP/802.1x), '3gp' (3GPP)
      bssid string No BasicWireless Servicenetwork SetBSSID Identifier(MAC foraddress wirelessof networksaccess point)
      cellid string No Mobile network Cell ID identifierfor cellular connections
      roaming boolean No True ifWhether device wasis roaming onoutside aits non-home network
      latitude string No GPSDevice latitude coordinate in decimal format
      longitude string No GPSDevice longitude coordinate in decimal format
      inbytes integer No Number of bytesBytes received during thethis connection session
      outbytes integer No Number of bytesBytes transmitted during thethis connection session
      link_speed number No Maximum attainable linkConnection speed in Mbps as reported by network adapter
      quality_metric string No Connection qualityQuality measurement type. Use:type: 'rssi' (RSSI), or 'sinr' (SINR)
      quality_value number No NumericSignal quality value forcorresponding to the qualitymetric metrictype

      cURL Example:

      curl -X POST "https://gate.zequenze.com/api/v1/device_app_connection_log/" \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "network_name": "Office WiFi 5GHz"Main",
          "network_type": "wi",
          "network_security": "wp2",
          "frequency": 5.2,0,
          "authentication": "psk"eap",
          "bssid": "aa:bb:cc:dd:ee:ff"00:1a:2b:3c:4d:5e",
          "roaming": false,
          "latitude": "40.7128",
          "longitude": "-74.0060",
          "inbytes": 1048576,
          "outbytes": 524288,
          "link_speed": 150.0,
          "quality_metric": "rssi",
          "quality_value": -45
        }'
      

      Example Response:

      {
        "network_name": "Office WiFi Main",
        "network_type": "wi",
        "network_security": "wp2",
        "network_mccmnc": null,
        "frequency": 5.0,
        "authentication": "eap",
        "bssid": "00:1a:2b:3c:4d:5e",
        "cellid": null,
        "roaming": false,
        "latitude": "40.7128",
        "longitude": "-74.0060",
        "inbytes": 1048576,
        "outbytes": 524288,
        "link_speed": 150.0,
        "quality_metric": "rssi",
        "quality_value": -45.0
      }'
      

      Example Response (201 Created):

      {
        "network_name": "Office WiFi 5GHz",
        "network_type": "wi",
        "network_security": "wp2",
        "network_mccmnc": null,
        "frequency": 5.2,
        "authentication": "psk",
        "bssid": "aa:bb:cc:dd:ee:ff",
        "cellid": null,
        "roaming": null,
        "latitude": "40.7128",
        "longitude": "-74.0060",
        "inbytes": 1048576,
        "outbytes": 524288,
        "link_speed": 150.0,
        "quality_metric": "rssi",
        "quality_value": -45.0
      }
      

      Mobile Network Example:

      curl -X POST "https://gate.zequenze.com/api/v1/device_app_connection_log/" \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "network_name": "Verizon LTE",
          "network_type": "mo",
          "network_security": "3gp",
          "network_mccmnc": "310012",
          "authentication": "3gp",
          "cellid": "12345678",
          "roaming": false,
          "latitude": "37.7749",
          "longitude": "-122.4194",
          "inbytes": 2097152,
          "outbytes": 1048576,
          "quality_metric": "sinr",
          "quality_value": 15.2
        }'
      

      Response Codes:

      Status Description
      201 Created - Connection log successfully registered
      400 Bad Request - Invalid data format or missing required fields
      401 Unauthorized - Invalid or missing authentication token
      422 Unprocessable Entity - InvalidData fieldvalidation values or constraintsfailed

      Common Use Cases

      Use Case 1: WiFiMobile ConnectionApp Network Monitoring

      ApplicationsMobile monitoringapplications WiFican use this endpoint to track network performance and connectivity patterns. When users experience connectivity issues, the app can log each connection event withdetailed network name,information security type,including signal strength, network type, and location data usage.to This helpshelp identify problematic areas or network performance issues and optimize WiFi deployments.configurations.

      Use Case 2: MobileIoT NetworkDevice AnalyticsFleet Management

      MobileIoT devicedevices managementdeployed applicationsacross multiple locations can trackregularly cellularreport connectionstheir including carrier information, roamingconnectivity status, helping administrators monitor network coverage, identify devices experiencing poor connectivity, and data consumption to analyze mobileoptimize network infrastructure based on actual usage patterns and costs.performance metrics.

      Use Case 3: Location-BasedEnterprise NetworkSecurity AnalysisCompliance

      IoTOrganizations can track which networks their devices connect to, monitor security protocols in use, and mobileensure applicationsdevices canonly combineconnect to approved networks. This is particularly valuable for detecting unauthorized network connectionaccess dataor withidentifying GPSdevices coordinatesconnecting to analyzeunsecured network coverage, identify dead zones, and correlate network performance with geographic locations.networks.

      Use Case 4: SecurityNetwork AuditingPerformance Analytics

      SecurityNetwork applicationsadministrators can logcollect aggregated connection data to analyze network connectionsperformance totrends, detectidentify unusualpeak usage times, monitor data consumption patterns, and make informed decisions about network access patterns, unauthorized network usage, or potential security threats by analyzing connection typescapacity and authenticationinfrastructure methods.improvements.

      Use Case 5: PerformanceLocation-Based TroubleshootingServices

      NetworkApplications diagnosticproviding toolslocation-based services can capturecorrelate detailednetwork connectionconnectivity metricsdata includingwith linkgeographic speeds,coordinates signalto quality,understand connectivity patterns across different locations, optimize content delivery, and dataprovide transferlocation-aware volumesfeatures tobased help troubleshoot connectivity issues and optimizeon network performance.availability.


      Best Practices

      • Data AccuracyValidation: EnsureAlways validate network type and security values useagainst the specifiedallowed codesenumeration (wi,before mo,sending bl,requests. etInvalid forvalues types;will opn,result wep,in wpa,validation wp2,errors.

        3gp for security) to maintain data consistency
      • LocationPrivacy PrivacyConsiderations: OnlyWhen includecollecting GPSlocation coordinatesdata when necessary for your use case and(latitude/longitude), ensure compliance with privacy regulations and obtain appropriate user consent. Consider data anonymization for analytics purposes.

      • Batch Processing: For high-volumeapplications logging,generating high volumes of connection logs, consider implementing client-sidelocal batchingqueuing and batch processing to reduce API callscall frequency and improve performanceperformance.

      • Error Handling: Implement retryrobust logicerror handling for network failures,connectivity butissues. avoidStore duplicatelogs loglocally entrieswhen bythe usingAPI client-sideis deduplicationunreachable and sync when connectivity is restored.

      • Data ValidationCompleteness: ValidateWhile many fields are optional, providing comprehensive data locallyimproves beforethe sendingvalue of analytics. Include quality metrics, data usage, and location information when available.

      Security: Never log sensitive authentication credentials or personal information. The API is designed to capture network characteristics, not user credentials or private data.

      Rate Limiting: Implement appropriate rate limiting in your applications to avoid 400/422overwhelming errors,the API, especially for numericdevices fieldsthat likefrequently change networks or generate high-frequency and quality values

      Security Considerations: Use HTTPS for all requests and store API tokens securely, especially when logging sensitive network information Monitoring: Track API response times and error rates to ensure reliable logging, as missing connection logsevents. can impact analytics accuracy