Inventory Device Diags
The
inventoryInventorydeviceDevicediagnosticsDiagnosticsendpointsAPIprovideenablesaccessyou todeviceconfigure and manage network diagnosticinformationtestsandonstatusmanagedupdates within your inventory system.devices. These endpoints allow you toretrieveschedule diagnosticdataoperationsforlikedevicesbandwidth tests, connectivity checks, andcreatenetworknewtroubleshootingdiagnosticdirectlyentries,onwithcustomeroptionalpremisesreal-timeequipmentstatus(CPE)updatesfromusingyourconfiguredcontrolhelpers.platform.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The inventoryInventory deviceDevice diagnosticsDiagnostics API enablesprovides comprehensive monitoringnetwork anddiagnostic managementcapabilities offor devicemanaged healthdevices and status information acrossin your organization's inventory. This API category isallows essentialyou forto maintainingremotely visibilityexecute intovarious devicediagnostic tests on customer premises equipment (CPE) to troubleshoot connectivity issues, measure network performance, troubleshooting issues, and ensuringgather optimaldetailed devicenetwork operations.information.
Key capabilities include:Features:
RetrievingExecute multiple diagnosticdataoperations:forHTTP download/upload tests, ICMP ping, UDP echo tests, traceroute, DNS lookups, and WiFi neighbor scans
These endpoints work together to provide a complete diagnostic workflow - you can query existing diagnostic information to understand current device status, then create new diagnostic entries when issues are identified or maintenance is performed. The optional status update feature ensures you always have the most current device information available.
Common integrationUse scenarios:Cases:
AutomatedmonitoringNetworksystemsTroubleshooting:thatWhenperiodicallycustomerscheckreport connectivity issues, quickly run ping, traceroute, or DNS lookup tests to identify problems
The diagnostic historyoperations
Endpoints
GET /inventory_device_diags/
Description: Retrieves a list of configured diagnostic informationoperations for devices in your inventory. This endpoint supportsallows filteringyou byto specificview deviceexisting IDsdiagnostic configurations and can optionally update device status in real-time using configured diagnostic helpersinformation before returning theresults. data.Use this to monitor scheduled diagnostics or review diagnostic configurations across your managed devices.
Use Cases:
MonitorReview all configured diagnostic tests across your device inventory
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_diags/?id=device-12345&update_status=true
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | string | query | No | |
| update_status | boolean | query | No | When set to true, uses configured |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_diags/?id=device-12345&update_status=true" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 12345,
"diag-001"operation": "download",
"device_id"target": "device-12345"http://speedtest.example.com/download/test.bin",
"device_name"upload_size": null,
"count": null,
"size": null,
"timeout": null,
"dns_server": null,
"max_hops": null,
"interface": "Office Printer HP-2024"eth0",
"device_serial"number_of_connections": "HP123456789"4
},
"diagnostic_type": "health_check",
"status": "warning",
"details":
{
"cpu_usage"id": 45,12346,
"memory_usage": 78,
"disk_space": 23,
"network_connectivity"operation": "good"ipping",
"last_ping"target": "2024-01-15T14:25:00Z"8.8.8.8",
"upload_size": null,
"count": 10,
"size": 64,
"timeout": 3,
"dns_server": null,
"max_hops": null,
"interface": "wan0",
"number_of_connections": null
},
"issues": [
{
"severity"id": 12347,
"operation": "medium"wifi.neighbor",
"message"target": "Low disk space detected"channel_scan",
"code"upload_size": null,
"count": null,
"size": null,
"timeout": null,
"dns_server": null,
"max_hops": null,
"interface": "DISK_LOW"wlan0",
"number_of_connections": null
}
],
"created_at": "2024-01-15T14:25:00Z",
"updated_at": "2024-01-15T14:25:00Z",
"next_check_due": "2024-01-15T18:25:00Z"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns array of diagnostic configurations |
POST /inventory_device_diags/
Description: Creates a new diagnostic operation configuration for requesteda devicesdevice. This endpoint allows you to schedule various network diagnostic tests including bandwidth measurements, connectivity tests, and network analysis operations. The diagnostic will be queued for execution on the target device according to the specified parameters.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_diags/
Request Body Parameters:
The request body should contain a JSON object with the diagnostic configuration:
download, upload, ipping, udpecho, traceroute, dnslookup, wifi.neighbor
target
string
Yes
Target for the operation - URL for download/upload, IP for ping/traceroute, hostname for DNS lookup, or parameter for WiFi diagnostics
upload_size
string
No
Size in MB for upload operations (e.g., "10")
count
integer
No
Number of packets for ping (default: 5) or DNS lookup repetitions (default: 1)
size
integer
No
Packet size in bytes for ping operations (default: 64)
timeout
integer
No
Response timeout in seconds for ping and DNS operations (default: 1)
dns_server
string
No
Specific DNS server IP for DNS lookup operations
max_hops
integer
No
Maximum hops for traceroute operations (default: 30)
interface
string
No
Network interface name to use for the operation
number_of_connections
integer
No
Number of concurrent connections for download/upload tests
cURL Examples:
Bandwidth Download Test:
curl -X POST "https://control.zequenze.com/api/v1/inventory_device_diags/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": 12345,
"operation": "download",
"target": "http://speedtest.example.com/download/100MB.bin",
"interface": "eth0",
"number_of_connections": 4
}'
Ping Connectivity Test:
curl -X POST "https://control.zequenze.com/api/v1/inventory_device_diags/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": 12346,
"operation": "ipping",
"target": "8.8.8.8",
"count": 20,
"size": 1024,
"timeout": 3,
"interface": "wan0"
}'
DNS Lookup Test:
curl -X POST "https://control.zequenze.com/api/v1/inventory_device_diags/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": 12347,
"operation": "dnslookup",
"target": "www.example.com",
"count": 3,
"timeout": 5,
"dns_server": "1.1.1.1"
}'
Example Response:
{
"id": 12348,
"operation": "download",
"target": "http://speedtest.example.com/download/100MB.bin",
"upload_size": null,
"count": null,
"size": null,
"timeout": null,
"dns_server": null,
"max_hops": null,
"interface": "eth0",
"number_of_connections": 4
}
Response Codes:
POST /inventory_device_diags/
Description: Creates a new diagnostic entry for a device in your inventory. This endpoint allows you to record diagnostic information, maintenance activities, or issue reports for tracking device health over time.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_diags/
Parameters:
cURL Example:
curl -X POST "https://control.zequenze.com/api/v1/inventory_device_diags/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"device_id": "device-12345",
"diagnostic_type": "maintenance",
"status": "completed",
"details": {
"action_performed": "firmware_update",
"previous_version": "1.2.3",
"new_version": "1.2.4",
"duration_minutes": 15
},
"notes": "Firmware update completed successfully",
"performed_by": "tech@company.com"
}'
Example Request Body:
{
"device_id": "device-12345",
"diagnostic_type": "issue_report",
"status": "open",
"details": {
"issue_category": "hardware",
"symptoms": ["intermittent_connectivity", "slow_response"],
"error_codes": ["ERR_NETWORK_001"],
"impact_level": "medium"
},
"notes": "Device experiencing intermittent network connectivity issues. Users report slow response times during peak hours.",
"reported_by": "helpdesk@company.com",
"priority": "high"
}
Example Response:
{
"id": "diag-002",
"device_id": "device-12345",
"device_name": "Office Printer HP-2024",
"diagnostic_type": "issue_report",
"status": "open",
"details": {
"issue_category": "hardware",
"symptoms": ["intermittent_connectivity", "slow_response"],
"error_codes": ["ERR_NETWORK_001"],
"impact_level": "medium"
},
"notes": "Device experiencing intermittent network connectivity issues. Users report slow response times during peak hours.",
"reported_by": "helpdesk@company.com",
"priority": "high",
"created_at": "2024-01-15T15:30:00Z",
"updated_at": "2024-01-15T15:30:00Z"
}
Response Codes:
Common Use Cases
Use Case 1: Real-timeCustomer DeviceSpeed HealthComplaint MonitoringInvestigation
BuildWhen a monitoringcustomer dashboardreports thatslow displaysinternet currentspeeds, create download and upload diagnostic tests to measure actual throughput from their device status acrossto your organization.test Useservers and identify if the GETissue endpointis with download, update_status=truetoupload, ensureor you'reboth always showing the latest diagnostic information, and refresh the data every few minutes to maintain real-time visibility.directions.
Use Case 2: MaintenanceConnectivity Workflow IntegrationTroubleshooting
IntegrateIf a customer experiences intermittent connectivity issues, schedule ping tests to critical infrastructure (DNS servers, gateways, service endpoints) with yourincreased maintenancepacket managementcounts systemand varying sizes to automaticallyidentify createpacket diagnostic entries when maintenance is performed. Use the POST endpoint to log activities like firmware updates, hardware replacements,loss or routinelatency inspections, creating a complete maintenance history.patterns.
Use Case 3: IncidentWiFi TrackingPerformance Optimization
Before and Resolutionafter
WhenWiFi usersconfiguration reportchanges, deviceuse issues,WiFi createneighbor diagnostic entriesdiagnostics to trackscan thefor probleminterference fromsources identificationand throughoptimal resolution.channel Startselection, with a POST requesthelping to logoptimize thewireless initialperformance issue,in thencrowded useRF GET requests to retrieve the diagnostic history during troubleshooting.environments.
Use Case 4: AutomatedService IssueInstallation DetectionValidation
SetAfter upinstalling automatednew monitoringequipment thator periodicallyservices, checksrun devicea statuscomprehensive diagnostic suite including ping tests to verify gateway connectivity, DNS lookups to confirm name resolution, and createsbandwidth diagnostic entries when issues are detected. Combine both endpoints - use GETtests to checkvalidate currentservice status,delivery then POST to create issue reports when problems are identified.speeds.
Use Case 5: ComplianceProactive Network Monitoring
Schedule regular diagnostic operations across your device inventory to proactively identify network degradation, plan capacity upgrades, and Auditmaintain Reportingservice
Generatequality compliancebefore reportscustomers byexperience retrieving diagnostic history for specific devices or time periods. Use the GET endpoint with appropriate filtering to collect maintenance records and diagnostic data required for regulatory compliance or internal audits.issues.
Best Practices
Operation Selection:
Use
paginationippingforlargebasicinventoriesconnectivity-verificationWhenandretrievinglatencydiagnosticsmeasurement
download/upload for Leverage the update_status parameter judiciously - While real-time status updates provide current information, they can impact response times. Use update_status=truetraceroute only when you need to identify where in the mostnetwork currentpath data.
wifi.neighbor for wireless environment analysis and channel optimization
StructureParameter diagnosticConfiguration:
Error Handling:
Implement404 properresponses errorgracefully handling - Always check response codes and handle cases wherewhen devices mightare not existoffline or diagnosticunreachable
CachePerformance Considerations:
update_status parameter judiciously as it adds processing time to GET requests
Consider rate limiting diagnostic Use meaningful diagnostic types - Establish standard diagnostic_type values (like "health_check", "maintenance", "issue_report") to enable better filtering and categorization of diagnostic data.