Skip to main content

Inventory Device Serial Variables

Endpoints Summary

Method Path Swagger GET /inventory_device_serial_variables/ Swagger ↗ PUT /inventory_device_serial_variables/{parent__serial_number}/ Swagger ↗

The Inventory Device Serial Variables API provides accessendpoints tofor managing and retrieving device-specific configuration parameters and variables for devices in your inventory.variables. These endpoints allow you to retrievequery device settings by serial number and update variabledevice settingsconfigurations, associatedmaking withthem specificessential for device serial numbers, enabling centralized device configuration management and monitoringconfiguration of pending changes.automation.

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

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Overview

The Inventory Device Serial Variables API categoryenables managesyou to manage configuration variablesparameters and parametersvariables for individualspecific devices in your inventoryinventory. system.This EachAPI device,category identifiedis bydesigned itsfor uniquedevice serialconfiguration number,management, canallowing haveyou multiple configurable parameters such as network settings, operational thresholds, feature flags, and custom variables.

Key Concepts:to:

  • DeviceRetrieve Serialdevice Variablesvariables: ConfigurationQuery specific configuration parameters tiedfor todevices specificusing devicetheir serial numbers
  • VariableUpdate Namesdevice settings: UniqueModify identifiersconfiguration variables for configurationindividual devices
Filter parameters: Use various filtering options to retrieve only the parameters (e.g.,you "network_timeout",need "max_connections") Monitor pending changes: Track whether devices have pending configuration updates

These endpoints work together to provide a complete device configuration management solution. The GET endpoint allows you to query current device settings and their status, while the PUT endpoint enables you to update configurations. The API supports advanced filtering capabilities including wildcard matching and parameter-specific queries.

Key concepts to understand:

    Variable Name: The internal identifier for a configuration parameter Parameter NamesName: Human-The human-readable namesname for the configuration options Short Name: An abbreviated version of the parameter name Pending Status: Indicates whether a configuration changeschange areis waiting to be applied to the device Extra Information: Additional metadata or computed values related toabout parameters when requested

    Common Scenarios:

      Retrieving current configuration for a specific device before maintenance Bulk updating device settings across multiple parameters Monitoring which devices have pending configuration changes Filtering devices by specific parameter types or values Implementing configuration templates and standardized settings

      This API supports wildcard searching for flexible parameter queries and provides pagination for handling large numbers of device variables efficiently.


      Endpoints

      GET /inventory_device_serial_variables/

      Description: Retrieves a list of configuration variables and parameters for devices based on their serial number and optional filtering criteria.numbers. This endpoint is essential for viewingquerying current device configurations, monitoring parameter values, and checking for pending changes,updates. andIt supports comprehensive filtering specificto parameterhelp typesyou acrossretrieve yourexactly devicethe inventory.data you need.

      Use Cases:

      • GetRetrieve all configuration variablesparameters for a specific device before performing updates
      • MonitorCheck devicesif witha device has pending configuration changes that need to be applied
      • FilterQuery specific parameter types (e.g., network settings)parameters across multiple devices
      • AuditMonitor currentdevice configuration statesstatus for compliance reporting

      Full URL Example:

      https://control.zequenze.com/api/v1/inventory_device_serial_variables/?parent__serial_number=DEV-2024-001ABC123456&parameter__variable_name=network_timeout,max_connectionsnetwork_config,security_settings&pending=extra=true&limit=20
      

      Parameters:

      Parameter Type In Required Description
      parent__serial_number string query Yes Filter settings by devicethe parent device's serial number. This identifies the specific device whose variables you want to retrievenumber
      parameter__variable_name string query No Comma-separated list of specificparameter variable names to retrieve (e.g., "network_timeout,device_mode")
      parameter__name string query No Comma-separated list of human-readable parameter names to filter byretrieve
      parameter__short_name string query No Comma-separated list of parameter short short-names forto concise identificationretrieve
      limit integer query No Number of results to return per page (defaultfor varies, typically 50-100)pagination)
      offset integer query No StartingThe initial index from which to return results (for pagination (0-based)pagination)
      pending boolean query No Filter to show only variablesdevices with pending changessettings (true)when or applied changes (false)true
      wildcard boolean query No Enable wildcard ('*') character matching in variable_namevariable name or parameter_nameparameter name fields
      extra boolean query No Include additionaladditional/extra metadatainformation andabout computedparameters valuesin forthe each parameterresponse

      cURL Example:

      curl -X GET "https://control.zequenze.com/api/v1/inventory_device_serial_variables/?parent__serial_number=DEV-2024-001DEV001&parameter__variable_name=network_timeout,max_connectionsnetwork_config&extra=true" \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json"
      

      Example Response:

      {
        "count": 3,
        "next": null,
        "previous": null,
        "results": [
          {
            "id": 1001,
            "name": "Network Timeout"Configuration",
            "variable_name": "network_timeout"network_config",
            "value": "30"192.168.1.100",
            "type": "integer"ip_address",
            "short_name": "net_timeout"net_cfg",
            "extra": true,
            "extra_value": "seconds"Primary network interface configuration",
            "pending": false
          },
          {
            "id": 1002,
            "name": "MaximumDevice Connections"Timeout",
            "variable_name": "max_connections"timeout_seconds",
            "value": "100"300",
            "type": "integer",
            "short_name": "max_conn"timeout",
            "extra": false,
            "extra_value": null,
            "pending": true
          },
          {
            "id": 1003,
            "name": "DeviceSecurity Mode",
            "variable_name": "device_mode"security_mode",
            "value": "production"enabled",
            "type": "string"boolean",
            "short_name": "mode"sec_mode",
            "extra": true,
            "extra_value": "enum:production,staging,development"Enhanced security protocol active",
            "pending": false
          }
        ]
      }
      

      Response Codes:

      Status Description
      200 Success - Returns the filteredrequested device variables
      400 Bad Request - Invalid query parameters or missingMissing required serialparent__serial_number numberparameter
      401 Unauthorized - Invalid or missing Bearerauthentication token
      404 Not Found - Device with specified serial number does not exist

      PUT /inventory_device_serial_variables/{parent__serial_number}/

      Description: Updates configuration variables for a specific device identified by its serial number. This endpoint allows bulkyou updatesto ofmodify multipledevice parameterssettings inand aparameters, singleenabling request,remote automaticallydevice markingconfiguration management. The changes may be applied immediately or queued as pending untildepending they can be synchronized withon the physicaldevice device.status.

      Use Cases:

      • ApplyUpdate network configuration templatesfor to newly provisionedremote devices
      • UpdateModify networksecurity settings acrossfor multiplecompliance requirements
      Bulk update configuration parameters simultaneouslyfor device maintenance ImplementApply firmware-specific configuration changes as part of maintenance workflows Synchronize device settings with centralized configuration policies

      Full URL Example:

      https://control.zequenze.com/api/v1/inventory_device_serial_variables/DEV-2024-001/DEV001/
      

      Parameters:

      Parameter Type In Required Description
      parent__serial_number string path Yes The serialSerial number of the device to update (included in URL path)
      data string body Yes JSON payloadstring containing the variable updates to apply

      Request Body Format:

      {
        "variables": [
          {
            "variable_name": "network_timeout",
            "value": "45"
          },
          {
            "variable_name": "max_connections",
            "value": "150"
          }
        ]
      }
      

      cURL Example:

      curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_serial_variables/DEV-2024-001/DEV001/" \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "variables"variable_name": ["network_config",
          "value": "192.168.1.150",
          "name": "Network Configuration"
        }'
      

      Example Request Body:

      {
        "variable_name": "network_timeout"timeout_seconds",
        "value": "45"
            }600",
        {
              "variable_name"name": "device_mode",Device "value": "staging"Timeout"
      }
          ]
        }'
      

      Example Response:

      {
        "id": 1001,1002,
        "name": "NetworkDevice Timeout",
        "variable_name": "network_timeout"timeout_seconds",
        "value": "45"600",
        "type": "integer",
        "short_name": "net_timeout"timeout",
        "extra": true,false,
        "extra_value": "seconds",null,
        "pending": true
      }
      

      Response Codes:

      Status Description
      200 Success - VariablesVariable updated successfully
      400 Bad Request - Invalid data format or variablemissing namesrequired fields
      401 Unauthorized - Invalid or missing Bearerauthentication token
      404 Not Found - Device with specified serial number does not exist
      422 ValidationUnprocessable ErrorEntity - InvalidData parametervalidation values or constraintsfailed

      Common Use Cases

      Use Case 1: Device Configuration Audit

      RetrieveQuery all configuration variablesparameters for a specific device to verifyperform currenta settingscompliance before performing maintenanceaudit or troubleshooting.

      troubleshooting
      #session. GetUse allthe variablesGET forendpoint with the device curlserial -Xnumber GETand "https://control.zequenze.com/api/v1/inventory_device_serial_variables/?parent__serial_number=DEV-2024-001&extra=true"enable \extra -Hinformation "Authorization:to Bearerget YOUR_API_TOKEN"comprehensive 
      details about each parameter.

      Use Case 2: Bulk ConfigurationParameter UpdateFiltering

      UpdateRetrieve multiplespecific network-relatedconfiguration variables across devices using parameter filtering. This is useful when you need to check particular settings like network configurations or security parameters foracross ayour device in preparation for a network infrastructure change.inventory.

      # Update network configuration
      curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_serial_variables/DEV-2024-001/" \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{"variables": [{"variable_name": "network_timeout", "value": "60"}, {"variable_name": "retry_attempts", "value": "5"}]}'
      

      Use Case 3: Pending Changes Monitoring

      Identify allMonitor devices withthat have pending configuration changes thatby needusing the pending=true filter. This helps administrators track which devices are waiting for configuration updates to be synchronized.applied.

      # Find devices with pending changes
      curl -X GET "https://control.zequenze.com/api/v1/inventory_device_serial_variables/?parent__serial_number=DEV-2024-001&pending=true" \
        -H "Authorization: Bearer YOUR_API_TOKEN"
      

      Use Case 4: ParameterRemote TypeDevice FilteringReconfiguration

      RetrieveUpdate onlycritical specificdevice typessettings of configuration parametersremotely using wildcardthe matching.PUT endpoint. This is essential for maintaining devices in the field, updating network settings, or applying security patches without physical access.

      # Get all network-related parameters
      curl -X GET "https://control.zequenze.com/api/v1/inventory_device_serial_variables/?parent__serial_number=DEV-2024-001&parameter__variable_name=network_*&wildcard=true" \
        -H "Authorization: Bearer YOUR_API_TOKEN"
      

      Use Case 5: Wildcard Configuration Template ApplicationSearch

      ApplyUse wildcard filtering to find all parameters matching a pattern, such as all network-related variables (network_*) or security settings (sec_*). This helps when working with devices that have standardized configurationnaming template to a newly provisioned device.conventions.

      # Apply production configuration template
      curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_serial_variables/DEV-2024-NEW/" \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{"variables": [{"variable_name": "device_mode", "value": "production"}, {"variable_name": "log_level", "value": "warn"}, {"variable_name": "max_connections", "value": "200"}]}'
      

      Best Practices

      • Always specify the device serial number: The parent__serial_number parameter is required for allthe GET requestsendpoint and- shouldensure beyou have the exactcorrect serial number asbefore registeredmaking in the inventory system.

        requests
      • Use pagination for large result setsdatasets: When querying devices with many variables,parameters, implement pagination using limit and offset parameters to avoid timeout issues and improve performance.

      • HandleMonitor pending status appropriately: After updating variables, they may remain in a "pending" state until synchronized with the physical device. MonitorCheck the pending field andin implementresponses appropriateto retryunderstand logicwhen forconfiguration criticalchanges updates.

        will take effect
      • Validate variabledata typesbefore and constraintsupdates: BeforeEnsure sending updates, ensureparameter values match the expected type (string, integer, boolean) and anyformat constraintsbefore indicatedsending inPUT the extra_value field.

        requests
      • Use wildcard filtering judiciously: Wildcard searches can be powerful but may impact performance. Use specific parameter namesfiltering: whenInstead possible,of andretrieving enableall wildcardsparameters, use the filtering options to get only whenthe necessary.

        data you need, improving performance
      • Handle wildcard searches carefully: When using wildcard=true, be specific with your patterns to avoid overly broad results

      Implement proper error handling: CheckAlways check response codes and handle validationcases errorswhere (422)devices bymight reviewingnot theexist erroror detailshave andrestricted correcting invalid parameter values. access

      Cache frequently accessed variablesdata: IfFor yourread-heavy applicationoperations, frequentlyconsider reads the samecaching device variables,configuration implement caching strategies while respecting the pending status for real-time accuracy.

      Batch related updates: When updating multiple related parameters, use a single PUT request rather than multiple individual requestsdata to ensure consistency and reduce API load.

      calls