Skip to main content

Inventory Device Name Diags

The inventory device name diagnostics endpoints provideenable functionalityyou forto managingexecute and monitoringmanage devicenetwork diagnostic informationoperations withinon specific devices in your inventory system.inventory. These endpoints allow you to retrieveperform diagnosticvarious datanetwork fortests specificincluding devicesspeed tests, connectivity checks, and createWiFi new diagnostic entries, with optional real-time status updatesdiagnostics to ensure accuratetroubleshoot device monitoring.performance and network issues.

Base URL: https://control.zequenze.com/api/v1

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Overview

The inventory device name diagnostics API categoryprovides isa designedcomprehensive suite of network diagnostic tools for comprehensive device health monitoringmanaging and diagnostic data management within your inventory infrastructure. These endpoints serve as the foundation for tracking device performance, identifying issues, and maintaining detailed diagnostic logs.

Key Capabilities:

    Retrieve diagnostic information for specific devices or alltroubleshooting devices in your inventorynetwork inventory. This category allows you to remotely execute various diagnostic operations on Customer Premises Equipment (CPE) and other network devices to assess connectivity, performance, and configuration issues.

    Key Features:

      Multiple Diagnostic Types: Support for HTTP download/upload tests, ICMP ping, UDP echo tests, traceroute, DNS lookups, and WiFi neighbor discovery Create newFlexible diagnosticTargeting: entriesConfigure tests with specific targets, interfaces, and parameters Real-time Status Updates: Option to track device health events Optionally trigger real-timerefresh device status updatesbefore usingreturning configureddiagnostic helpersinformation Support forComprehensive scheduledTest diagnosticParameters: transactionsControl packet sizes, timeouts, hop counts, and monitoringrepetition workflowscounts

      Common IntegrationUse Scenarios:Cases:

      • Network performance monitoring systemsand thatspeed needtesting
      toConnectivity tracktroubleshooting devicefor healthcustomer overdevices timeWiFi environment analysis and interference detection DNS resolution and routing path analysis Automated diagnosticnetwork workflowshealth that collect and store device performance data Inventory management systems requiring real-time device status verification Maintenance scheduling systems that rely on diagnostic data for proactive servicingassessments

      The endpoints work together to provide a complete diagnostic lifecycleworkflow: -list fromexisting dataor collectionscheduled diagnostics, and storagecreate to retrieval and analysis. The optional status update functionality ensures that retrievednew diagnostic informationoperations reflectswith thecustomized mostparameters currentfor devicespecific state.network testing scenarios.


      Endpoints

      GET /inventory_device_name_diags/

      Description: Retrieves a list of network diagnostic informationoperations for devices in your inventory. This endpoint supportsallows filteringyou byto specificview scheduled, running, or completed diagnostic tests and optionally refresh device IDs and can optionally trigger real-time status updatesinformation before returning data, ensuring you receive the most current diagnostic information available.results.

      Use Cases:

      • Monitor the health status of allongoing devicesdiagnostic in your inventoryoperations
      • RetrieveReview historical diagnostic historytest forresults
      aCheck specificscheduled diagnostic tasks before creating new ones Update device during troubleshooting Generate reports on device performance trends over time Validate deviceconnectivity status beforeas performingpart maintenanceof operationsdiagnostic reporting

      Full URL Example:

      https://control.zequenze.com/api/v1/inventory_device_name_diags/?id=device-12345diag_12345&update_status=true
      

      Parameters:

      Parameter Type In Required Description
      id string query No ID of the specific scheduled transaction or device to filter diagnostic resultsretrieve
      update_status boolean query No When true, usesUse configured helpers to update device status before returning diagnosticthe information

      cURL Example:

      curl -X GET "https://control.zequenze.com/api/v1/inventory_device_name_diags/?id=device-12345&update_status=true" \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json"
      

      Example Response:

      [
        {
          "name": "customer-router-01",
          "operation": "download",
          "target": "http://speedtest.example.com/100mb.bin",
          "count": 25,null,
          "next": "https://control.zequenze.com/api/v1/inventory_device_name_diags/?limit=10&offset=10",
        "previous"size": null,
          "results"timeout": [
          {null,
          "id"max_hops": null,
          "interface": "diag-001"eth0",
          "device_id"upload_size": "device-12345",
            "device_name": "Router-Dallas-Core-01",
            "transaction_id": "txn-98765",
            "diagnostic_type": "health_check",
            "status": "healthy",
            "cpu_usage": 23.5,
            "memory_usage": 67.8,
            "disk_usage": 45.2,
            "network_status": "connected",
            "last_updated": "2024-01-15T14:30:22Z",
            "created_at": "2024-01-15T14:30:00Z",
            "diagnostic_details": {
              "uptime": "45 days, 12:34:56",
              "temperature": "42°C",
              "power_status": "normal",
              "error_count": 0
            }null
        },
        {
          "id"name": "diag-002"office-ap-wireless",
          "device_id"operation": "device-67890"ipping",
          "device_name"target": "Switch-Austin-Floor2-03"8.8.8.8",
          "transaction_id"count": "txn-54321",10,
          "diagnostic_type"size": "performance_check",64,
          "status"timeout": "warning",
            "cpu_usage": 78.9,
            "memory_usage": 85.3,
            "disk_usage": 23.1,
          "network_status"max_hops": "connected",null,
          "last_updated"interface": "2024-01-15T14:25:15Z",null,
          "created_at"upload_size": "2024-01-15T14:25:00Z"null
        },
            "diagnostic_details":
        {
          "uptime"name": "12 days, 8:15:32"branch-gateway-02",
          "temperature"operation": "58°C"wifi.neighbor",
          "power_status"target": "normal"channel_scan",
          "error_count"count": 3null,
          }"size": null,
          "timeout": null,
          "max_hops": null,
          "interface": "wlan0",
          "upload_size": null
        }
      ]
      }
      

      Response Codes:

      Status Description
      200 Success - Returns array of diagnostic data for requested devicesoperations
      401 Unauthorized - Invalid or missing API token
      403
      Forbidden - Insufficient permissions to access diagnostic data 404 Not Found - SpecifiedNo devicediagnostic IDoperations does not existfound 500 Internal Server Error - IssueServer-side withprocessing status update helperserror

      POST /inventory_device_name_diags/

      Description: Creates a new network diagnostic entryoperation for a devicespecified in your inventory system.device. This endpoint allows you to store diagnostic information, performance metrics,configure and healthinitiate statusvarious datatypes thatof cannetwork betests retrievedincluding laterspeed fortests, monitoringconnectivity checks, DNS lookups, and analysisWiFi purposes.diagnostics with customizable parameters.

      Use Cases:

      • LogInitiate diagnosticspeed resultstests fromto automatedmeasure monitoringdownload/upload scriptsperformance
      • StorePerform performanceconnectivity metricsdiagnostics collectedfor during scheduled maintenancetroubleshooting
      • CreateSchedule diagnosticWiFi entriesenvironment fromscans externalfor monitoringinterference toolsanalysis
      • RecordExecute devicetraceroute health status changesoperations for auditrouting trailspath analysis
      Run DNS lookup tests to verify name resolution

      Full URL Example:

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

      Request Body Parameters:

      Parameter Type In
      Required Description dataname string bodyYes Name of the target device for diagnostic operation operation string Yes JSONType of diagnostic operation. Allowed values: download, upload, ipping, udpecho, traceroute, dnslookup, wifi.neighbor target string containingYes Target URL, IP address, or hostname depending on operation type upload_size string No File size in MB for upload operations count integer No Number of packets (ping) or repetitions (DNS). Default: 5 for ping, 1 for DNS size integer No Packet size in bytes for ping operations. Default: 64 bytes timeout integer No Response timeout in seconds for ping/DNS operations. Default: 1 second max_hops integer No Maximum hops for traceroute operations. Default: 30 hops interface string No Network interface name to use for the diagnostic information to be storedoperation

      cURL Example:Example - HTTP Download Test:

      curl -X POST "https://control.zequenze.com/api/v1/inventory_device_name_diags/" \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "device_id"name": "device-55555",
          "device_name": "Firewall-Phoenix-DMZ-customer-router-01",
          "diagnostic_type"operation": "security_scan"download",
          "status"target": "healthy"http://speedtest.example.com/100mb.bin",
          "cpu_usage": 34.7,
          "memory_usage": 52.1,
          "disk_usage": 78.9,
          "network_status"interface": "connected"eth0"
        }'
      

      cURL Example - ICMP Ping Test:

      curl -X POST "https://control.zequenze.com/api/v1/inventory_device_name_diags/" \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "name": "office-gateway",
          "diagnostic_details"operation": "ipping",
          "target": "8.8.8.8",
          "count": 10,
          "size": 128,
          "timeout": 2
        }'
      

      cURL Example - WiFi Neighbor Scan:

      curl -X POST "https://control.zequenze.com/api/v1/inventory_device_name_diags/" \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "uptime"name": "89 days, 15:42:18"wireless-ap-01",
          "temperature"operation": "39°C"wifi.neighbor",
          "power_status"target": "normal"full_scan",
          "error_count"interface": 0,
            "security_threats_blocked": 1247,
            "firewall_rules_active": 342
          }wlan0"
        }'
      

      Example Response:

      {
        "id"name": "diag-003",
        "device_id": "device-55555",
        "device_name": "Firewall-Phoenix-DMZ-customer-router-01",
        "transaction_id"operation": "txn-11111"download",
        "diagnostic_type"target": "security_scan"http://speedtest.example.com/100mb.bin",
        "status"upload_size": null,
        "count": null,
        "size": null,
        "timeout": null,
        "max_hops": null,
        "interface": "healthy",
        "cpu_usage": 34.7,
        "memory_usage": 52.1,
        "disk_usage": 78.9,
        "network_status": "connected",
        "last_updated": "2024-01-15T15:45:30Z",
        "created_at": "2024-01-15T15:45:30Z",
        "diagnostic_details": {
          "uptime": "89 days, 15:42:18",
          "temperature": "39°C",
          "power_status": "normal",
          "error_count": 0,
          "security_threats_blocked": 1247,
          "firewall_rules_active": 342
        }eth0"
      }
      

      Response Codes:

      Status Description
      201 Created - Diagnostic entryoperation successfully createdinitiated
      400 Bad Request - Invalid parameters or malformed diagnostic datarequest
      401 Unauthorized - Invalid or missing API token
      403404 ForbiddenNot Found - InsufficientSpecified permissionsdevice tonot createfound diagnosticin entriesinventory
      422 Unprocessable Entity - Valid JSON but invalid diagnosticoperation data structureparameters
      500 Internal Server Error - DatabaseServer-side or serverprocessing error occurred

      Common Use Cases

      Use Case 1: Real-timeNetwork DevicePerformance Health DashboardMonitoring

      BuildMonitor acustomer monitoringconnection dashboardspeeds thatby displaysscheduling currentregular devicedownload statusand acrossupload your entire inventory.tests. Use the GET endpoint withto update_status=truetrack historical performance data and the POST endpoint to ensureinitiate real-timenew accuracy,speed thentests refreshduring thepeak datausage periodically to maintain an up-to-date view of device health.times.

      Use Case 2: AutomatedConnectivity Diagnostic CollectionTroubleshooting

      ImplementWhen scheduledcustomers scriptsreport thatconnectivity collectissues, diagnosticuse information from devicesping and storetraceroute itoperations usingto thediagnose POSTnetwork endpoint.path Thisproblems. createsStart awith historicalbasic recordping oftests deviceto performanceverify thatconnectivity, canthen beuse analyzedtraceroute forto trendsidentify andwhere usedpackets forare predictivebeing maintenance.dropped or delayed.

      Use Case 3: TroubleshootingWiFi Environment Analysis

      For wireless network optimization, use WiFi neighbor diagnostics to scan for interference and Issueanalyze Investigationchannel

      When investigating device issues, use the GET endpoint with a specific device ID to retrieve the diagnostic history.utilization. This helps identify patterns,optimal performancechannel degradation,assignments orand recurringdetect problemsrogue thataccess may not be immediately apparent.points.

      Use Case 4: ComplianceDNS Resolution Monitoring

      Ensure reliable internet access by testing DNS lookup performance against multiple DNS servers. Use this to identify DNS-related connectivity issues and Auditoptimize ReportingDNS

      Generateserver compliance reports by retrieving diagnostic data for specific time periods or device types. The stored diagnostic information provides an audit trail of device health and performance metrics required for regulatory compliance.configurations.

      Use Case 5: ProactiveScheduled MaintenanceHealth SchedulingChecks

      MonitorImplement automated network health monitoring by combining device status updates with diagnostic trends to identify devices that may require maintenance before they fail.operations. Use the diagnosticupdate_status dataparameter to schedulerefresh proactivedevice maintenanceinformation basedbefore onexecuting performance metrics like CPU usage, temperature, or error counts.diagnostics.


      Best Practices

      • Operation Selection: Choose the appropriate diagnostic operation for your use case. Use ipping for basic connectivity, traceroute for routing analysis, and download/upload for performance testing

      Parameter Optimization: Adjust timeout values based on network conditions. Increase timeouts for high-latency connections and reduce packet counts for faster results Interface Specification: Always specify the interface when testing specific network paths, especially on multi-homed devices with multiple network connections Rate Limiting: Avoid overwhelming devices by spacing diagnostic operations appropriately. Consider device capabilities when scheduling multiple concurrent tests Error Handling: Implement retry logic for failed operations, but include exponential backoff to prevent overwhelming devices or network infrastructure Status UpdatesUpdates: Judiciously:Use Thethe update_status=true parameter triggers real-time device queries, which can increase response times. Use this only when you need the most current data,device notinformation, forbut routinebe monitoringaware queries.this may increase response times

      ImplementTarget Proper Error HandlingSelection:: Always check response status codes and handle errors gracefully, especially for the POST endpoint where data validation failures are common.

      Structure Diagnostic Data Consistently: When creating diagnostic entries, maintain consistent field names and data types in the diagnostic_details object to ensure compatibility with reporting and analysis tools.

      Optimize for Pagination: For largespeed inventories,tests, alwaysuse implementgeographically paginationappropriate whentest retrievingservers. diagnosticFor data.ping Usetests, reasonableuse limitreliable valuestargets like major DNS servers (10-1008.8.8.8, records) to balance performance with data completeness.

      Cache Frequently Accessed Data: If you're building dashboards or reports that don't require real-time data, cache diagnostic information to reduce API calls and improve application performance.

      Validate Input Data: Before sending diagnostic data via POST, validate that all required fields are present and properly formatted to avoid 400/422 errors.

      Monitor Rate Limits: Be mindful of API rate limits, especially when implementing automated diagnostic collection systems that may generate high volumes of requests.

      1.1.1.1)