Skip to main content

Inventory Device Serial Diags

The Inventoryinventory Devicedevice Serialserial Diagnosticsdiagnostics APIendpoints providesallow accessyou to diagnostic informationschedule and testingretrieve capabilitiesnetwork diagnostic operations for specific devices in your inventory.inventory using their serial numbers. These endpoints enable youremote to retrieve diagnostic data from devicestroubleshooting and triggernetwork newperformance diagnostictesting testson tomanaged monitor 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 Diagnostic InformationTypes: AccessSupport currentfor HTTP download/upload tests, ICMP ping, UDP echo, traceroute, DNS lookup, and historicalWiFi diagnosticneighbor data for devices, including connection status, performance metrics, and error logsscanning
  • TriggerDevice-Specific Diagnostic TestsOperations: InitiateTarget newspecific diagnosticdevices proceduresusing totheir testserial device connectivity, functionality, and performancenumbers
  • MonitorConfigurable Device HealthParameters: GetCustomize real-timetest updatesparameters onlike packet size, timeout values, hop counts, and network interfaces
Real-Time Status Updates: Option to update device status and identify potential issues before theyreturning impactdiagnostic operationsinformation

TheseCommon Use Cases:

    Remote troubleshooting of connectivity issues Network performance benchmarking and monitoring Automated diagnostic scheduling for device health checks WiFi environment analysis and optimization DNS resolution testing and validation

    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 devicethe healthstatus acrossof yourpreviously entirescheduled inventorydiagnostic operations
    • Retrieve diagnostic historyresults forand specificperformance metrics
    Check which devices duringhave troubleshootingpending diagnostic operations Get real-timeUpdate device connectivity status updatesbefore forretrieving criticaldiagnostic infrastructure monitoring Generate reports on device performance and connectivityinformation

    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 device or scheduled transaction to retrieve diagnostics for
    update_status boolean query No When true, runsUse configured diagnostic helpers to update device status before returning results.the Useful for real-time monitoring but may increase response timeinformation

    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 diagnostic data for the specifiedlist devicesof scheduled diagnostics
    401 Unauthorized - Invalid or missing authentication token
    404403 Not FoundForbidden - NoInsufficient diagnostic data found for the specified IDpermissions
    500 Internal Server Error - DiagnosticServer-side serviceerror temporarily unavailableoccurred

    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 regularconnectivity diagnostictests checksto troubleshoot network issues
    Perform bandwidth testing with HTTP download/upload operations Diagnose routing problems using traceroute operations Test DNS resolution capabilities Scan WiFi environment for criticalinterference networkand equipment Trigger immediate diagnostic tests when issues are reported Run batch diagnostics across multiple devices after maintenance Initiate custom diagnostic procedures for specific device typesoptimization

    Full URL Example:

    https://control.zequenze.com/api/v1/inventory_device_serial_diags/
    

    Request Body Parameters:

    ParameterField Type
    In Required Description dataserial_number string bodyYes Serial number of the device to run diagnostics on operation string Yes JSONType string containingof diagnostic requestoperation information(download, includingupload, deviceipping, IDs,udpecho, diagnostictraceroute, types,dnslookup, andwifi.neighbor) test parameters target string Yes URL for download/upload, IP for ping/traceroute, hostname for DNS lookup, or parameter for WiFi scan upload_size string No File size in MB for upload operations 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 (default: 1) max_hops integer No Maximum hops for traceroute (default: 30) interface string No Network interface name to use for the operation

    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 testoperation successfully scheduled
    400 Bad Request - Invalid data formatparameters or missing required parametersfields
    401 Unauthorized - Invalid or missing authenticationtoken
    token 403 Forbidden - Insufficient permissions 404 Not Found - Device with specified serial number not found 422 Unprocessable Entity - ValidInvalid formatoperation buttype logicalor errorsparameter in request data 500 Server Error - Unable to schedule diagnostic testcombination

    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 update_status=truetraceroute to getidentify 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

    • UseOperation PaginationSelection: 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
    Parameter Optimization: Adjust timeout values based on network conditions and expected latency - longer timeouts for satellite or high-latency connections Interface Specification: Always specify the network interface when testing specific connection types (ethernet vs WiFi) to get accurate results Batch Processing: When retrievingtesting diagnosticsmultiple fordevices, large inventories, implement proper pagination to avoid timeouts and improve performance Monitor Rate Limits: Space outstagger diagnostic requestsoperations to avoid overwhelming devicesnetwork or the API serviceresources HandleStatus Async OperationsUpdates: DiagnosticUse teststhe mayupdate_status=true takeparameter timewhen retrieving diagnostics to complete;ensure implementyou properhave pollingthe mechanismsmost whencurrent checkingdevice resultsstatus after scheduling tests Cache Results: Cache diagnostic data when appropriate to reduce API calls, especially for devices that don't change frequentlyinformation Error Handling: Implement robustproper errorretry handlinglogic for failed diagnostic operations, as network timeouts,conditions devicecan unavailability,cause andtemporary service interruptionsfailures SelectiveSecurity UpdatesConsiderations: UseEnsure thediagnostic update_statustargets parameter(URLs, judiciouslyIP asaddresses) itare increasestrusted responseand time; only use when real-time data is essential Batch Operations: When possible, include multiple devices in a single POST request rather than making individual callsappropriate for eachyour devicenetwork security policies