Skip to main content

Inventory Device Variables

Endpoints Summary

Method Path Swagger GET /inventory_device_variables/ Swagger ↗ PUT /inventory_device_variables/{parent_id}/ Swagger ↗

The Inventory Device Variables API provides completeaccess control overto device configuration parameters and settings variables.for network devices. These endpoints allow you to retrieve current variable values, monitor pending changes, and update device-specificdevice variablesconfigurations thatprogrammatically. controlEssential for device behavior,management, configuration settings,automation, and operationalmonitoring parameterssystem withinstate across your inventorynetwork management system.infrastructure.

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

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Overview

The Inventory Device Variables API categoryenables managescomprehensive management of device configuration parameters within the Zequenze control platform. This API category focuses on the variables and settings that define howdevice devicesbehavior, operateperformance withincharacteristics, your inventory system. These variables can include network settings,and operational parameters, feature flags, thresholds, and other device-specific configurations.parameters.

ThisKey API is essential for:Concepts:

  • Device Variables: Configuration parameters that control device behavior (e.g., IP addresses, SNMP community strings, timeout values)
Pending Changes: Modifications that have been staged but not yet applied to the device Variable Types: Different categories of parameters (network, system, monitoring, etc.) Force Update: Real-time retrieval of current device state vs. cached values

Common Integration Scenarios:

    Configuration Management: CentrallyRetrieve managecurrent device settings andfor parametersbackup or audit purposes Bulk Configuration Updates: UpdateApply configuration changes across multiple devicedevices variables efficientlyprogrammatically ConfigurationChange MonitoringTracking: TrackMonitor pending changes andbefore variabledeployment statesto production Dynamic Device Behavior: Modify device behavior without physical accessdevices Compliance and StandardsMonitoring: EnsureVerify devicesdevice meetconfigurations match organizational requirementsstandards Automation Workflows: Integrate device variable management into CI/CD pipelines

    The twoThese endpoints work together to provide complete CRUDlifecycle functionalitymanagement -of retrievedevice currentconfigurations, variablefrom statesinitial withdiscovery filteringthrough ongoing maintenance and search capabilities, then update specific device configurations as needed. The API supports advanced features like wildcard searching, pending change tracking, and forced updates to ensure real-time configuration management.updates.


    Endpoints

    GET /inventory_device_variables/

    Description: Retrieves device configuration variables withand their current values for a specified device. This endpoint supports extensive filtering and search capabilities. This endpoint allows youoptions to querytarget devicespecific variables by parent device, variable names, parameter names,parameters and includescan optionsoptionally for tracking pending changes and forcingforce real-time updates.updates from devices rather than returning cached values.

    Use Cases:

    • RetrieveAudit alldevice configuration variablesconfigurations for acompliance specific deviceverification
    • SearchBackup forcurrent device settings before making changes
    Monitor specific parameters across multiple devices using variable names or parameter names MonitorCheck for pending configuration changes before applying them Audit device configurations and compliance status Export device settings for backup or migration purposesdeployment

    Full URL Example:

    https://control.zequenze.com/api/v1/inventory_device_variables/?parent_id=123&parameter__variable_name=network_config,device_timeoutsnmp_community,mgmt_ip&extra=true&pending=true&extra=true
    

    Parameters:

    Parameter Type In Required Description
    parent_id integer query Yes The unique identifier of the parent device ID to filter settings by. This identifies which device'swhose variables you want to retrieve
    parameter__variable_name string query No Comma-separated list of specific variable names to retrievefilter (e.g., "network_ip,device_port,timeout_value"snmp_community,mgmt_ip,hostname")
    parameter__name string query No Comma-separated list of parameter display names to retrieve
    parameter__short_name string query No Comma-separated list of parameter short names for quick identificationfiltering
    limit integer query No Number of results per page for pagination (default varies by systemserver configuration)
    offset integer query No Starting indexposition for paginationpaginated results (0-based indexing)
    pending boolean query No Include pendinginformation changeabout informationwhether parameters have uncommitted changes waiting to showbe variables with uncommitted updatesapplied
    wildcard boolean query No EnableAllow wildcard (*) character matching in variable_name and parameter name fields
    force_update boolean query No Force refreshreal-time retrieval from device settingsinstead fromof theusing actualcached device before returning resultsvalues
    extra boolean query No Include additional metadata and extended information aboutfor each parameter
    dates boolean query No Include creation,timestamp modification,information andfor when parameters were last sync date informationmodified

    cURL Example:

    curl -X GET "https://control.zequenze.com/api/v1/inventory_device_variables/?parent_id=123&parameter__variable_name=network_config,security_modesnmp_community,mgmt_ip&extra=true&pending=true&extra=true" \
      -H "Authorization: Bearer YOUR_API_TOKEN" \
      -H "Content-Type: application/json"
    

    Example Response:

    {
      "count": 15,
      "next": "https://control.zequenze.com/api/v1/inventory_device_variables/?parent_id=123&limit=10&offset=10"10&parent_id=123",
      "previous": null,
      "results": [
        {
          "id": 1001,1247,
          "name": "NetworkSNMP Configuration"Community String",
          "variable_name": "network_config"snmp_community",
          "value": "public",
          "type": "string",
          "short_name": "SNMP Comm",
          "extra": true,
          "extra_value": "v2c protocol",
          "pending": false
        },
        {
          "id": 1248,
          "name": "Management IP Address",
          "variable_name": "mgmt_ip",
          "value": "192.168.1.100",
          "type": "ip_address"ipv4",
          "short_name": "net_cfg",Mgmt "extra": true,
          "extra_value": "Static IP assignment for production network",
          "pending": false
        },
        {
          "id": 1002,
          "name": "Security Mode",
          "variable_name": "security_mode",
          "value": "enhanced",
          "type": "enum",
          "short_name": "sec_mode"IP",
          "extra": false,
          "extra_value": null,
          "pending": true
        },
        {
          "id": 1003,1249,
          "name": "Device Timeout"Hostname",
          "variable_name": "device_timeout"hostname",
          "value": "300"core-switch-01",
          "type": "integer"string",
          "short_name": "timeout"Hostname",
          "extra": true,false,
          "extra_value": "Timeout in seconds for device communication",null,
          "pending": false
        }
      ]
    }
    

    Response Codes:

    Status Description
    200 Success - Returns filtered device variables withmatching paginationthe specified criteria
    400 Bad Request - Missing requiredInvalid parent_id or invalidmalformed query parameters
    401 Unauthorized - Invalid or missing APIauthentication token
    404 Not Found - Device with specified parent_id does not exist
    500 Internal Server Error - SystemServer-side error during variable retrievaloccurred

    PUT /inventory_device_variables/{parent_id}/

    Description: Updates device configuration variables for a specificspecified device. This endpoint allowsaccepts youbulk tovariable modifyupdates multipleand devicestages variables in a single request, with changes typically markedthem as pending untilchanges that can be applied to the actualdevice. device.The update operation supports both individual parameter changes and batch modifications.

    Use Cases:

    • Update device network settings and connectivity parameters
    Modify operational thresholds and limits Change security settings and access controls Apply configurationnew templatesIP address configurations to devices ImplementUpdate bulkSNMP settings across multiple network devices Modify device-specific parameters like timeout values or polling intervals Stage configuration changes acrossfor devicelater fleetsdeployment during maintenance windows

    Full URL Example:

    https://control.zequenze.com/api/v1/inventory_device_variables/123/
    

    Parameters:

    Parameter Type In Required Description
    parent_id integer path Yes The unique identifier of the device ID to updatewhose variables forare (includedbeing in URL path)updated
    data string body Yes JSON stringpayload containing the variable updates withto variable names and new valuesapply

    cURL Example:

    curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_variables/123/" \
      -H "Authorization: Bearer YOUR_API_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "network_config"variable_name": "mgmt_ip",
        "value": "192.168.1.150",
        "security_mode": "standard",
        "device_timeout": "600"
      }'
    

    Example Request Body:

    {
      "network_config"variable_name": "192.168.1.150"snmp_community",
      "security_mode"value": "standard", 
      "device_timeout": "600",
      "polling_interval": "30",
      "max_connections": "10"monitoring123"
    }
    

    Example Response:

    {
      "id": 1001,1247,
      "name": "NetworkSNMP Configuration"Community String",
      "variable_name": "network_config"snmp_community",
      "value": "192.168.1.150"monitoring123",
      "type": "ip_address"string",
      "short_name": "net_cfg"SNMP Comm",
      "extra": true,
      "extra_value": "Updatedv2c static IP assignment"protocol",
      "pending": true
    }
    

    Response Codes:

    Status Description
    200 Success - VariablesVariable updated successfully and staged as pending
    400 Bad Request - Invalid variabledata namesformat or valuesvariable inconstraints request dataviolated
    401 Unauthorized - Invalid or missing APIauthentication token
    404 Not Found - Device withor specified parent_idvariable does not exist
    422 Unprocessable Entity - VariableData validation failed
    500 Internal Server Error - SystemServer-side error during updateoccurred

    Common Use Cases

    Use Case 1: DeviceConfiguration Network Configuration

    RetrieveAudit and update network-related variables for a device to change IP addresses, ports, or connectivity settings. Use GET to check current network configuration, then PUT to apply new network parameters.

    Use Case 2: Bulk Security Settings Update

    Query devices using wildcard searches to find all security-related variables, then update security modes, access controls, and authentication settings across multiple devices.

    Use Case 3: Configuration Change Management

    Monitor pending changes using the pending=true parameter to review configuration updates before they're applied to physical devices, ensuring changes can be validated before deployment.

    Use Case 4: Device Template Application

    Use parameter filtering to retrieve specific configuration templates, then apply standardized variable sets to new devices to ensure consistent configuration across your inventory.

    Use Case 5: Compliance Auditing

    Retrieve all device variables withto extraverify informationconfigurations andmeet datesorganizational tostandards, then generate compliance reports,reports trackhighlighting any deviations.

    # Get all variables for compliance check
    curl -X GET "https://control.zequenze.com/api/v1/inventory_device_variables/?parent_id=123&extra=true&dates=true" \
      -H "Authorization: Bearer YOUR_API_TOKEN"
    

    Use Case 2: Bulk IP Address Updates

    Update management IP addresses across multiple devices during network restructuring, staging changes to be applied during maintenance windows.

    # Update management IP address
    curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_variables/123/" \
      -H "Authorization: Bearer YOUR_API_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{"variable_name": "mgmt_ip", "value": "10.0.1.100"}'
    

    Use Case 3: Monitoring Pending Changes

    Check for uncommitted configuration changes overbefore time,deploying updates to production devices, ensuring change control processes are followed.

    # Check for pending changes
    curl -X GET "https://control.zequenze.com/api/v1/inventory_device_variables/?parent_id=123&pending=true" \
      -H "Authorization: Bearer YOUR_API_TOKEN"
    

    Use Case 4: Real-time Configuration Verification

    Force real-time retrieval of device variables to verify that applied changes are active on the device, bypassing cached values.

    # Force update from device
    curl -X GET "https://control.zequenze.com/api/v1/inventory_device_variables/?parent_id=123&force_update=true" \
      -H "Authorization: Bearer YOUR_API_TOKEN"
    

    Use Case 5: Selective Parameter Management

    Retrieve and ensureupdate devicesonly meetspecific organizationalconfiguration standards.parameters using wildcard filtering, useful for managing specific aspects like SNMP settings across device fleets.

    # Get only SNMP-related variables
    curl -X GET "https://control.zequenze.com/api/v1/inventory_device_variables/?parent_id=123&parameter__variable_name=snmp_*&wildcard=true" \
      -H "Authorization: Bearer YOUR_API_TOKEN"
    

    Best Practices

    • Use PaginationParent ID Validation: Always verify the parent_id exists and you have appropriate permissions before making requests to avoid unnecessary API calls.

    Implement Change Staging: Utilize the pending changes functionality to stage configuration updates during business hours and apply them during maintenance windows.

    Leverage Filtering: Use specific parameter filtering (variable_name, name, short_name) to reduce response sizes and improve performance when working with devices that have many variables.

    Handle Pagination Properly: For devices with extensive configurations, implement proper pagination for large device inventorieshandling using limit and offset parameters to avoid timeoutstimeouts.

    and improve performance

    FilterCache StrategicallyManagement: Use specificthe variableforce_update nameparameter filtersjudiciously ratheras thanit retrievingcan allimpact variablesperformance; whenprefer youcached only need specific parameters

    Monitor Pending Changes: Regularly checkvalues for pendingroutine changesoperations usingand the pending=true parameter before applying criticalforce updates Force Updates Sparingly: Use force_update=true only when real-time accuracy is essential,critical. as it impacts performance Validate Before Update: Always retrieve current variable values before updating to ensure you understand the current state

    Error HandlingRecovery: Implement properrobust error handling for validation404 failuresresponses (422when status)devices may be offline or have been removed, and retry logic for temporary422 failuresresponses when variable constraints are violated.

    Batch Operations: When updating multiple variables, consider the order of operations and potential dependencies between variables to avoid configuration conflicts.

    Security Considerations: Treat device variables as sensitive datadata; andsome ensuremay propercontain authenticationcredentials andor authorization for all requests

    Batch Updates: Group security-related variableconfigurations updatesthat inshould singlebe PUThandled requestswith ratherappropriate thancare. making multiple individual calls