Device App Connection Log
RegisterTheanddevicetrackapp connection log API provides functionality to register network connectionlogseventsfrombetween devicestoand applications. This endpoint is essential for tracking connectivity patterns, monitoring device activity, and maintaining audit trails for security and compliance purposes.
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 allows you to record and track network connection events between devices and applications within your system. This logging mechanism is crucial for:
This API is typically used by network monitoring tools, security applications, and device management systems that need to maintain comprehensive logs of device connectivity events. The logged data can be used for generating reports, triggering alerts, or feeding into analytics systems.
Endpoints
POST /device_app_connection_log/
RegisterDescription: Registers a new network connection log entry between a device and an application. This endpoint captures connection events in real-time, allowing you to build a comprehensive audit trail of device-application interactions. Use this endpoint whenever a device establishes or terminates a connection with an application to maintain accurate connectivity records.
Use Cases:
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 connection log |
ExamplecURL Request:Example:
curl -X POST "https://gate.zequenze.com/api/v1/device_app_connection_log/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/jsonjson" Authorization:\
Bearer-d <your-api-token>'{
"device_id": "DEV-001-XR7H9",
"application_id": "APP-MOBILE-001",
"connection_type": "established",
"timestamp": "2024-01-15T14:30:25Z",
"ip_address": "192.168.1.105",
"user_agent": "MobileApp/2.1.0 (iOS 17.0)",
"status": "success",
"duration": null,
"metadata": {
"location": "Building A - Floor 2",
"network_type": "WiFi",
"signal_strength": -45
}
}'
Example Request Body:
{
"data"device_id": "{\DEV-001-XR7H9",
"device_id\"application_id": \"dev_12345\"APP-MOBILE-001",
\"app_id\"connection_type": \"app_67890\"established",
\"connection_type\"timestamp": \"wifi\", \"connection_status\": \"connected\", \"timestamp\": \"2024-01-15T10:15T14:30:00Z\"25Z",
\"ip_address\"ip_address": \"192.168.1.100\105",
"user_agent": "MobileApp/2.1.0 (iOS 17.0)",
\"signal_strength\status": "success",
"duration": null,
"metadata": {
"location": "Building A - Floor 2",
"network_type": "WiFi",
"signal_strength": -45,
\"data_transferred\"session_id": 1024}"sess_abc123xyz",
"protocol": "HTTPS"
}
}
Example Response:
{
"id": 12847,
"log_abc123"device_id": "DEV-001-XR7H9",
"status"application_id": "created"APP-MOBILE-001",
"connection_type": "established",
"timestamp": "2024-01-15T10:15T14:30:01Z"25Z",
"ip_address": "192.168.1.105",
"user_agent": "MobileApp/2.1.0 (iOS 17.0)",
"status": "success",
"duration": null,
"created_at": "2024-01-15T14:30:26Z",
"metadata": {
"location": "Building A - Floor 2",
"network_type": "WiFi",
"signal_strength": -45,
"session_id": "sess_abc123xyz",
"protocol": "HTTPS"
}
}
Response Codes:
| Status | Description |
|---|---|
| 201 | Created - Connection log |
| 400 | Bad Request - Invalid data format or missing required fields |
| 401 | Unauthorized - |
| 422 | Unprocessable |
Common Use Cases
Use Case 1: Real-time Security Monitoring
Monitor device connections in real-time to detect unauthorized access attempts or unusual connection patterns. Log every connection attempt with device details, timestamps, and connection outcomes to feed into security monitoring dashboards.
Use Case 2: Compliance Audit Trail
Maintain detailed logs of all device-application connections for regulatory compliance requirements. Record connection events with timestamps, user context, and session details to support audit processes and compliance reporting.
Use Case 3: Network Performance Analytics
Track connection patterns and durations to analyze network performance and identify bottlenecks. Use connection logs to understand peak usage times, popular applications, and connection quality metrics.
Use Case 4: Troubleshooting Connectivity Issues
Create detailed connection logs to assist with diagnosing connectivity problems. Include metadata such as signal strength, network type, and error codes to help technical teams quickly identify and resolve issues.
Use Case 5: Usage Analytics and Reporting
Generate reports on application usage patterns, device activity, and connection statistics. Use the logged data to understand user behavior, optimize resource allocation, and plan network capacity.
Best Practices
-
DataBatchFormatLogging:EnsureFor high-volume environments, consider batching multiple connection events into single API calls to improve performance
datametadata