Inventory Device Serial Diags
The
InventoryinventoryDevicedeviceSerialserialDiagnosticsdiagnosticsAPIendpointsprovidesallowaccessyou todiagnostic informationschedule andtestingretrievecapabilitiesnetwork diagnostic operations for specific devices in yourinventory.inventory using their serial numbers. These endpoints enableyouremoteto retrieve diagnostic data from devicestroubleshooting andtriggernetworknewperformancediagnostictestingtestsontomanagedmonitor device health and performance.devices.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Inventoryinventory Devicedevice Serialserial Diagnosticsdiagnostics API isprovides designedpowerful remote diagnostic capabilities for managing and monitoring the diagnostic status of networknetwork-connected devices in your inventory. This API category allowsenables you to:to perform various network diagnostic operations on devices by referencing their serial numbers, making it ideal for remote troubleshooting, performance monitoring, and network health assessments.
Key Features:
-
RetrieveMultiple DiagnosticInformationTypes:AccessSupportcurrentfor HTTP download/upload tests, ICMP ping, UDP echo, traceroute, DNS lookup, andhistoricalWiFidiagnosticneighbordata for devices, including connection status, performance metrics, and error logsscanning -
TriggerDevice-SpecificDiagnostic TestsOperations:InitiateTargetnewspecificdiagnosticdevicesproceduresusingtotheirtestserialdevice connectivity, functionality, and performancenumbers -
MonitorConfigurableDevice HealthParameters:GetCustomizereal-timetestupdatesparametersonlike packet size, timeout values, hop counts, and network interfaces
TheseCommon Use Cases:
The endpoints work together to provide comprehensivea devicecomplete monitoringdiagnostic capabilities.workflow: Theuse the GET endpoint retrievesto existingretrieve diagnosticscheduled information,diagnostics whileand their results, and the POST endpoint allows you to schedulecreate new diagnostic tests. The update_status parameter enables real-time status updates by running configured diagnostic helpers before returning data.
Common scenarios include automated health monitoring, troubleshooting connectivity issues, and maintaining device inventory accuracy through regular diagnostic checks.operations.
Endpoints
GET /inventory_device_serial_diags/
Description: Retrieves a list of scheduled network diagnostic informationoperations for inventorydevices devices.in your inventory. This endpoint returnsallows you to view existing diagnostic dataschedules, includingcheck devicetheir status, connectivity tests, performance metrics, and error logs. You can filter results by specific device IDs and optionally trigger real-time device status updates.updates before returning the information.
Use Cases:
- Monitor
devicethehealthstatusacrossofyourpreviouslyentirescheduledinventorydiagnostic operations - Retrieve diagnostic
historyresultsforandspecificperformance metrics
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_serial_diags/?id=12345&update_status=true
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | string | query | No | ID of the specific |
| update_status | boolean | query | No |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_serial_diags/?id=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",
"device_id": "DEV-001",
"serial_number": "SN123456789",
"device_name"operation": "Core Switch 01"ipping",
"diagnostic_type"target": "connectivity_test"8.8.8.8",
"status"count": 10,
"size": 64,
"timeout": 2,
"interface": "passed",
"last_updated": "2024-01-15T14:30:00Z",
"response_time_ms": 45,
"error_count": 0,
"details": {
"ping_test": "success",
"snmp_connectivity": "success",
"uptime_seconds": 2547600,
"cpu_usage_percent": 12.5,
"memory_usage_percent": 34.2
},
"scheduled_transaction_id": "ST-789"eth0"
},
{
"id": "12346",
"device_id": "DEV-002",
"serial_number": "SN987654321",
"device_name"operation": "Access Point 02"download",
"diagnostic_type"target": "performance_test"https://speedtest.example.com/100MB.zip",
"status"timeout": 30,
"interface": "warning"wlan0"
},
"last_updated": "2024-01-15T14:25:00Z",
"response_time_ms": 120,
"error_count": 2,
"details":
{
"ping_test"serial_number": "success"SN456789123",
"snmp_connectivity"operation": "timeout"wifi.neighbor",
"signal_strength_dbm"target": -65,
"client_count": 23,
"bandwidth_utilization_percent": 78
}scan_all",
"scheduled_transaction_id"interface": "ST-790"wlan0"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns |
| 401 | Unauthorized - Invalid or missing |
| 500 | Internal Server Error - |
POST /inventory_device_serial_diags/
Description: Creates a new network diagnostic test requestoperation for onea orspecific moredevice devicesidentified inby yourits inventory.serial number. This endpoint schedules diagnosticvarious procedurestypes suchof asnetwork connectivitytests tests,including performanceconnectivity, monitoring,performance, orand customenvironment diagnosticscanning scripts.operations Thethat diagnosticwill databe providedexecuted should specifyon the devicestarget to test and the type of diagnostics to perform.device.
Use Cases:
- Schedule
regularconnectivitydiagnostictestschecksto troubleshoot network issues
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_serial_diags/
Request Body Parameters:
| Type |
|---|
cURL Example:Example - ICMP Ping Test:
curl -X POST "https://control.zequenze.com/api/v1/inventory_device_serial_diags/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"devices": [
{
"device_id"serial_number": "DEV-003"SN123456789",
"operation": "ipping",
"target": "8.8.8.8",
"count": 10,
"size": 64,
"timeout": 2,
"interface": "eth0"
}'
cURL Example - HTTP Download Test:
curl -X POST "https://control.zequenze.com/api/v1/inventory_device_serial_diags/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"serial_number": "SN555666777"
}
]SN987654321",
"diagnostic_type"operation": "full_system_check"download",
"priority"target": "high"https://speedtest.example.com/100MB.zip",
"schedule_immediately"timeout": true,30,
"test_parameters"interface": "wlan0"
}'
cURL Example - WiFi Neighbor Scan:
curl -X POST "https://control.zequenze.com/api/v1/inventory_device_serial_diags/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"include_performance"serial_number": true,"SN456789123",
"include_connectivity"operation": true,"wifi.neighbor",
"include_security_scan"target": false,"scan_all",
"timeout_seconds"interface": 300
}"wlan0"
}'
Example Response:
{
"transaction_id": "ST-791",
"status": "scheduled",
"message": "Diagnostic test scheduled successfully",
"devices_count": 1,
"estimated_completion": "2024-01-15T15:15:00Z",
"diagnostic_details": {
"diagnostic_type": "full_system_check",
"priority": "high",
"created_at": "2024-01-15T15:00:00Z",
"scheduled_devices": [
{
"device_id": "DEV-003",
"serial_number": "SN555666777"SN123456789",
"device_name"operation": "Router 03"ipping",
"test_status"target": "queued"8.8.8.8",
}"count": ]10,
}"size": 64,
"timeout": 2,
"max_hops": null,
"interface": "eth0",
"upload_size": null
}
Response Codes:
| Status | Description |
|---|---|
| 201 | Created - Diagnostic |
| 400 | Bad Request - Invalid |
| 401 | Unauthorized - Invalid or missing |
Common Use Cases
Use Case 1: Real-timeRemote DeviceConnectivity Health MonitoringTroubleshooting
MonitorWhen criticala device reports connectivity issues, schedule an ICMP ping test to verify basic network devicesconnectivity, followed by regularlya calling the GET endpoint with traceroute to update_status=truegetidentify currentrouting diagnostic informationproblems, and identifya devicesDNS thatlookup maytest needto attention.verify name resolution.
Use Case 2: ScheduledBandwidth MaintenancePerformance DiagnosticsTesting
BeforeSchedule HTTP download and afterupload scheduledtests maintenanceto windows, usemeasure the POSTactual endpointthroughput toperformance triggerof comprehensivedevices, diagnosticuseful tests,for thenvalidating monitorservice resultslevel throughagreements theand GETidentifying endpointbandwidth to verify all systems are functioning properly.bottlenecks.
Use Case 3: TroubleshootingWiFi WorkflowEnvironment Analysis
WhenUse usersWiFi reportneighbor connectivity issues, use the POST endpointdiagnostics to immediately schedule diagnostic testsscan for affectednearby devices,access thenpoints, pollidentify thechannel GETinterference, endpointand tooptimize retrievewireless detailed diagnostic resultsperformance for troubleshooting.devices in dense RF environments.
Use Case 4: InventoryAutomated Health ReportingMonitoring
GenerateCreate regular reports by retrievingscheduled diagnostic dataoperations that run periodically to monitor device health, combining ping tests for allconnectivity, devicesDNS usinglookups thefor GETname endpoint,resolution, thenand analyzinginterface-specific the results to identify trends, recurring issues, or devices requiring replacement.tests.
Use Case 5: AutomatedNetwork AlertTroubleshooting SystemWorkflow
Implement automateda monitoringsystematic troubleshooting approach by combiningfirst bothretrieving endpoints:existing usediagnostic POSTresults, then scheduling new tests based on the findings, and finally updating device status to schedulereflect regularcurrent diagnostic tests, then GET to retrieve results and trigger alerts when devices fail diagnostic checks.conditions.
Best Practices
-
UseOperationPaginationSelection: Choose the most appropriate diagnostic operation for your specific troubleshooting needs - use ping for basic connectivity, traceroute for routing issues, and download/upload for performance testing
update_status=true update_statustargets