Skip to main content

Inventory Device Name Variables

The Inventory Device Name Variables API provides endpointsaccess to manage and retrieve device configuration parameters and settings forwithin specificthe devicesZequenze incontrol your inventory.system. These endpoints allow you to queryretrieve deviceand update device-specific variables by device name and update device configurations,name, making it essentialeasy forto device management,manage configuration automation, and monitoring pending changesparameters across your infrastructure.device inventory programmatically.

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 Variables API enables comprehensive management of device-specificdevice configuration parameterssettings and variablesparameters withinthrough youra networkdevice-centric inventory.approach. This API category is specifically designed for scenarios where you need to interact with device settings using the device name as the primary identifier.

Key Capabilities:to:

  • DeviceRetrieve Parameterdevice Retrievalsettings: Queryby specificdevice configurationname variablesrather andthan parametersdevice forID, namedmaking devicesintegration easier when you know device names but not internal IDs
  • ConfigurationManage Managementconfiguration parameters: Updateincluding devicevariable settingsnames, values, types, and monitor pending configuration changesmetadata
  • FlexibleMonitor Filteringpending changes: Filterto parametersdevice byconfigurations variablebefore names,they parameterare names, or short namesapplied
  • Real-timeBulk Statusparameter operations: Checkusing comma-separated lists for pendingefficient settingsdata and force updates when neededretrieval
  • DetailedTrack Metadataconfiguration history: Accesswith additional parameterdate information including timestamps and extra details

Common Integration Scenarios:

    Network automation tools that need to verify or update device configurations Monitoring systems that track configuration drift and pending changes Bulk configuration management across multiple devices Compliance reporting that requires detailed parameter history and metadata

    ThisThe APIendpoints iswork particularlytogether usefulto provide a complete device configuration management workflow. The GET endpoint allows you to query current device settings with flexible filtering options, while the PUT endpoint enables updates to device configurations. Both endpoints support advanced features like wildcard matching, forced updates, and detailed metadata retrieval.

    Key concepts include:

      Variable Names: Internal parameter identifiers used by the system Parameter Names: Human-readable names for networkconfiguration administrators,settings DevOps engineers,Short Names: Abbreviated parameter identifiers for compact displays Pending Status: Indicates whether configuration changes are waiting to be applied Extra Information: Additional metadata and automationextended systemsparameter thatdetails manage large-scale device deployments where configuration consistency and change tracking are critical.

      Endpoints

      GET /inventory_device_name_variables/

      Description: Retrieves device configuration parameters and variables for devices in your inventory,settings filtered by device name. This endpoint is essential for querying current device settings,configurations, checking formonitoring pending configuration changes, and retrievingextracting detailedspecific parameter metadata.sets. It supports flexible filtering optionsby toparameter targetnames, specificvariable parametersnames, or parametershort types.names, with optional wildcard matching for pattern-based queries.

      Use Cases:

      • MonitorRetrieve all configuration statusparameters for a specific device by name
      Monitor devices with pending configuration changes across your inventory Extract specific parameters (like network settings or thresholds) from multiple devices Retrieve specific parameters for compliance reporting Check for pending configuration changes before maintenance Audit device settingsconfigurations andwith parameterhistorical historydate information

      Full URL Example:

      https://control.zequenze.com/api/v1/inventory_device_name_variables/?parent__name=router-01&parameter__variable_name=hostname,interface_confignetwork_config,snmp_community&pending=extra=true&limit=50dates=true
      

      Parameters:

      Parameter Type In Required Description
      parent__name string query Yes TheFilter settings by device name to filter by.name. This identifies thewhich specific device whosedevice's parameters you want to retrieve
      parameter__variable_name string query No Comma-separated list of parameter variable names to retrieve (e.g., "hostname,snmp_community,vlan_config"network_ip,snmp_port")
      parameter__name string query No Comma-separated list of human-readable parameter names to retrieve for more human-readable filtering
      parameter__short_name string query No Comma-separated list of parameter short names for abbreviated parametercompact identification
      limit integer query No Number of results to return per page (default varies,pagination recommended:limit 50-100)applies)
      offset integer query No Starting index for paginationpaginated results (use with limit for browsing large result sets)pagination)
      pending boolean query No SetFilter to true toshow only show devicesparameters with pending configurationchanges changeswhen set to true
      wildcard boolean query No Set to true to useEnable wildcard (*) charactersmatching in variable_name or parameter name fields
      force_update boolean query No Set to true to forceForce refresh of device settings from the actual device before returning resultsdata
      extra boolean query No Set to true to includeInclude additional metadata and detailedextended parameter information
      dates boolean query No SetInclude tocreation/modification true to include timestamp informationtimestamps for parametersconfiguration (created, modified, etc.)tracking

      cURL Example:

      curl -X GET "https://control.zequenze.com/api/v1/inventory_device_name_variables/?parent__name=router-01&parameter__variable_name=hostname,interface_speednetwork_config,device_name&extra=true&dates=true" \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json"
      

      Example Response:

      {
        "count": 25,15,
        "next": "https://control.zequenze.com/api/v1/inventory_device_name_variables/?limit=2010&offset=2010&parent__name=router-01",
        "previous": null,
        "results": [
          {
            "id": 1247,
            "device_name"name": "router-01",Network "parameter_name": "System Hostname",
            "parameter_short_name": "hostname"Configuration",
            "variable_name": "hostname"network_config",
            "current_value"value": "router-01.datacenter.company.com"192.168.1.100/24",
            "pending_value": null,
            "data_type"type": "string"ipv4_network",
            "is_pending": false,
            "last_updated"short_name": "2024-01-15T10:30:00Z"net_cfg",
            "created_at"extra": true,
            "extra_value": "2024-01-10T09:15:00Z"gateway=192.168.1.1,dns=8.8.8.8",
            "extra_info"pending": {
              "validation_rule": "^[a-zA-Z0-9\\.-]+$",
              "restart_required": false,
              "category": "system"
            }false
          },
          {
            "id": 1248,
            "name": "Device Name",
            "variable_name": "device_name",
            "value": "router-01",
            "parameter_name"type": "Interface Speed"string",
            "parameter_short_name"short_name": "int_speed"name",
            "extra": false,
            "extra_value": null,
            "pending": false
          },
          {
            "id": 1249,
            "name": "SNMP Community",
            "variable_name": "interface_speed"snmp_community",
            "current_value"value": "1000"private_updated",
            "pending_value"type": "10000"string",
            "data_type"short_name": "integer"snmp",
            "is_pending"extra": true,false,
            "last_updated"extra_value": "2024-01-16T14:22:00Z",null,
            "created_at"pending": "2024-01-10T09:15:00Z",
            "extra_info": {
              "unit": "Mbps",
              "valid_values": [100, 1000, 10000],
              "restart_required": true,
              "category": "network"
            }true
          }
        ]
      }
      

      Response Codes:

      Status Description
      200 Success - Returns the device parameters andmatching variablesthe specified criteria
      400 Bad Request - Missing required parent__name parameter or invalid query parameters
      401 Unauthorized - Invalid or missing authentication token
      404 Not Found - DeviceNo device found with the specified name does not exist
      500 Internal Server Error - Server error during parameter retrieval

      PUT /inventory_device_name_variables/{parent__name}/

      Description: Updates device configuration parameters and variables for athe specificspecified device identified by name. This endpoint allows you to modify device settings,settings applyby sending parameter data in the request body. The operation updates existing parameters or creates new ones as needed, with changes typically marked as pending configurations,until andapplied bulkto the actual device.

      Use Cases:

        Update network configuration settings for a specific device Modify SNMP parameters, thresholds, or operational settings Bulk update multiple parameters in a single operation.API It's the primary method for programmatic device configuration management.

        Use Cases:

          call Apply configuration changestemplates to devices throughby automation Bulk update multiple parameters for a device Set device configurations as part of deployment pipelines Synchronize device settings across environmentsname

          Full URL Example:

          https://control.zequenze.com/api/v1/inventory_device_name_variables/router-01/
          

          Parameters:

          Parameter Type In Required Description
          parent__name string path Yes The device name inof the URL path identifying which device towhose updateparameters will be updated
          data string body Yes JSON payload containing the parameter updates towith applyvariable tonames theand devicenew values

          cURL Example:

          curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_name_variables/router-01/" \
            -H "Authorization: Bearer YOUR_API_TOKEN" \
            -H "Content-Type: application/json" \
            -d '{
              "parameters": [
                {
                  "variable_name": "hostname"snmp_community",
                  "value": "router-01.newdomain.com"new_community_string"
                },
                {
                  "variable_name": "interface_speed"poll_interval",
                  "value": "10000"
                },
                {
                  "variable_name": "snmp_community",
                  "value": "production_read_v2"300"
                }
              ],
              "apply_immediately": false,
              "validate_only": false
            }'
          

          Example Request Body:

          {
            "parameters": [
              {
                "variable_name": "hostname",
                "value": "router-01.production.company.com",
                "force_update": false
              },
              {
                "variable_name": "interface_speed",
                "value": "10000",
                "force_update": true
              },
              {
                "variable_name": "vlan_config",
                "value": "100,200,300",
                "force_update": false
              }
            ],
            "apply_immediately": false,
            "validate_only": false,
            "backup_current": true
          }
          

          Example Response:

          {
            "status"id": 1249,
            "name": "success"SNMP Community",
            "device_name": "router-01",
            "updated_parameters": [
              {
            "variable_name": "hostname"snmp_community",
            "previous_value"value": "router-01.staging.company.com"new_community_string",
            "new_value"type": "router-01.production.company.com"string",
            "status"short_name": "pending"snmp",
            "requires_restart"extra": false
              },
              {false,
            "variable_name"extra_value": "interface_speed",null,
            "previous_value": "1000",
                "new_value": "10000",
                "status": "applied",
                "requires_restart"pending": true
              },
              {
                "variable_name": "vlan_config",
                "previous_value": "100,200",
                "new_value": "100,200,300",
                "status": "pending",
                "requires_restart": false
              }
            ],
            "summary": {
              "total_parameters": 3,
              "applied_immediately": 1,
              "pending_application": 2,
              "validation_errors": 0,
              "restart_required": true
            },
            "backup_id": "backup_router-01_20240116_142500",
            "timestamp": "2024-01-16T14:25:00Z"
          }
          

          Response Codes:

          Status Description
          200 Success - Parameters updated successfully
          400 Bad Request - Invalid parameter data or validationmalformed errorsrequest body
          401 Unauthorized - Invalid or missing authentication token
          404 Not Found - Device with specified name does not exist
          409422 ConflictUnprocessable Entity - Parameter updatevalidation conflicts with existing pending changes
          500 Internal Server Error - Server error during parameter updatefailed

          Common Use Cases

          Use Case 1: Device Configuration Compliance MonitoringAudit

          MonitorQuery deviceall configurationsparameters acrossfor yourspecific infrastructuredevices to ensureperform configuration audits or compliance with organizational standards.checks. Use the GETextra endpointand withdates specific parameter filtersparameters to checkget criticalcomplete settingsconfiguration like SNMP communities, NTP servers, and security policies across all devices.history.

          #curl Check SNMP configuration across devices-X GET "https://control.zequenze.com/api/v1/inventory_device_name_variables/?parameter__variable_name=snmp_community,snmp_versionparent__name=critical-router&extra=true&dates=true"
          

          Use Case 2: AutomatedBulk DeviceNetwork DeploymentConfiguration Updates

          DuringUpdate network settings across multiple devices by iterating through device provisioning,names useand the PUT endpoint to apply standardized configurations to new devices. This ensuresapplying consistent setup across your infrastructure and reduces manual configuration errors.parameters.

          Use Case 3: Pending ChangeChanges ManagementMonitoring

          Before maintenance windows, use the GET endpoint with pending=true to identify allMonitor devices with pending configuration changes,changes thento coordinatetrack thedeployment applicationstatus ofand theseensure changes duringare scheduledproperly maintenance.applied.

          curl -X GET "https://control.zequenze.com/api/v1/inventory_device_name_variables/?parent__name=router-01&pending=true"
          

          Use Case 4: ConfigurationParameter DriftPattern DetectionMatching

          RegularlyUse querywildcard devicefiltering to find all parameters andmatching comparespecific againstpatterns, youruseful for discovering related configuration management database to detect unauthorized changes or configuration driftsettings across your network infrastructure.devices.

          Use Case 5: BulkConfiguration ParameterTemplate UpdatesDeployment

          UseApply standardized configuration templates to devices by updating multiple parameters simultaneously through the PUT endpoint to update multiple related parameters simultaneously, such as updating VLAN configurations, routing parameters, and security settings as part of a coordinated network change.endpoint.


          Best Practices

          • Use Paginationdevice Effectivelynames consistently: - Ensure device names in your API calls match exactly with those stored in the system, as the parent__name parameter is case-sensitive

          Implement proper pagination - For largedevices inventories,with alwaysmany parameters, use limit and offset parameters to handle large result sets efficiently Monitor pending status - Always check the limitpending field in responses to understand which changes haven't been applied to physical devices yet Leverage wildcard filtering - Use the wildcard parameter (recommended:when 50-100searching itemsfor perparameter page)patterns, but be cautious of performance impact on large datasets Cache configuration data - Device parameters typically don't change frequently, so implement appropriate caching strategies to reduce API calls Handle force_update carefully - The force_update parameter triggers real device communication, which may be slow; use sparingly and implement proper pagination handling to avoidappropriate timeouts and excessive memory usage.

          LeverageValidate Filteringparameter types: - Check the type field in responses to ensure you're sending appropriately formatted values in PUT requests

          Use specific parameter filters (- Instead of retrieving all parameters, use parameter__variable_name, or parameter__name) filters to reduce response size and improve performance when youget only needneeded specific configuration data. data

          Handle Pending Changes: Always check the is_pending field in responses and consider using the pending=true query parameter to identify devices requiring attention before making new changes.

          Force Updates Judiciously: Use force_update=true sparingly as it triggers real-time device communication, which can impact performance. Reserve it for critical operations where you need the absolute latest data.

          Implement Properretry Errorlogic Handling:- Always handle 404 responses when querying by device name, asNetwork devices may be renamed, decommissioned, or temporarily unavailable.

          unreachable;

          Use Validation Mode: When updating parameters, consider using validate_only=true in your request to test parameter changes before applying them, especially in production environments.

          Monitor Rate Limits: Be mindful of API rate limits when making bulk operations. Implementimplement exponential backoff andfor respectfailed any rate limiting headers in responses.

          Backup Before Changes: Always set backup_current=true when updating critical device parameters to enable quick rollback if issues occur.

          requests