Skip to main content

Inventory Device Setting

The Inventory Device Setting API provides endpoints for managing configuration parameters and settings for devices within your inventory system. These endpoints allow you to retrieve, update, and modify device-specific settings such as operational parameters,manage configuration values,parameters for devices in your inventory. These endpoints are essential for monitoring device configurations, updating settings, and customtracking propertiesparameter thatchanges controlacross deviceyour behaviormanaged and functionality.devices.

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

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Overview

The Inventory Device Setting API enablesprovides youcomprehensive tomanagement manageof device configuration parameters forwithin devicesthe inZequenze yourplatform. inventoryThese system.endpoints Deviceenable settingsyou are parameter-value pairs that define how individual devices should operate, including network configurations, operational thresholds, feature toggles, and custom properties.

Key Concepts:to:

  • Parent ID: References the specificRetrieve device thesesettings settings- belong to
Parameters: PredefinedQuery configuration options with variable names, display names, and short names Settings: The actual values assigned to parameters for specific devices or groups of devices PendingUpdate Statusconfigurations: Indicates- whetherModify device settings through full or partial updates Track changes - Monitor setting changesmodifications arewith waitingtimestamps toand pending status indicators Filter parameters - Search settings by parameter names, variable names, or device relationships

Device settings in Zequenze represent configurable parameters that can be applied to managed devices. Each setting includes metadata about the deviceparameter type,

Commonwhether Useit's Cases:

required,
    read-only Configuringstatus, networkand if it should be tracked as a metric. The system maintains a history of changes and indicates when settings forare newlypending deployedapplication devicesto Updatingthe operationalactual parametersdevice. across

    Common multipleuse devices

    cases Managinginclude featurebulk flagsconfiguration updates, compliance monitoring, parameter validation before deployment, and custom properties Bulk configuration management forautomated device fleetsprovisioning Tracking pending configuration changes before deployment

    These endpoints work together to provide a complete configuration management system where you can list current settings, and update them as needed for operational requirements.workflows.


    Endpoints

    GET /inventory_device_setting/

    Description: Retrieves a paginated list of device settings basedfiltered onby various filter criteria. This endpoint is primarily used to query configuration parameters for specific devices or to search for settings based on parameter characteristics. It's essential for viewingconfiguration currentaudits, bulk operations preparation, and monitoring device configurations, finding settings by parameter names, and checking for pending changes across your device inventory.states.

    Use Cases:

    • ViewRetrieve all configuration settingsparameters for a specific device before making changes
    • FindSearch devicesfor withsettings specificby parameter configurationsname across multiple devices
    • Monitor pending configuration changes acrossthat yourhaven't fleetbeen applied yet
    • AuditGenerate deviceconfiguration configurationsreports for compliance auditing

    Full URL Example:

    https://control.zequenze.com/api/v1/inventory_device_setting/?parent_id=123&parameter__variable_name=network_timeoutparameter__name=wifi_ssid&pending=falselimit=50&offset=0
    

    Parameters:

    Parameter Type In Required Description
    parent_id integer query Yes The device ID to filter settings for. RequiredThis to specifyidentifies which device's settings you want to retrieve
    parameter_id string query No Filter by specific parameter ID if you need settings for a particular parameter type
    parameter__variable_name string query No Filter by parameter'sparameter variable name (e.g., "network_timeout"wifi_password", "max_connections"admin_user")
    parameter__name string query No Filter by parameter'shuman-readable displayparameter name (e.g., "WiFi Password", "Administrator Username")
    parameter__short_name string query No Filter by parameter'sparameter abbreviatedshort name or slug identifier
    limit integer query No Number of results per page (default: 20, max: 100)
    offset integer query No Starting positionindex for pagination (default: 0)
    pending boolean query No Filter for settings awaitingthat deploymentare pending application to the device (true) or applied settings (true/false)

    cURL Example:

    curl -X GET "https://control.zequenze.com/api/v1/inventory_device_setting/?parent_id=123&limit=10"parameter__variable_name=wifi_ssid&pending=true" \
      -H "Authorization: Bearer YOUR_API_TOKEN" \
      -H "Content-Type: application/json"
    

    Example Response:

    {
      "count": 25,
      "next": "https://control.zequenze.com/api/v1/inventory_device_setting/?parent_id=123&limit=1020&offset=10"20&parent_id=123",
      "previous": null,
      "results": [
        {
          "id": 1,1547,
          "parent_id": 123,"123",
          "parent__name": "Office-Router-01",
          "parameter": {
            "id": 45,
            "net_timeout"name": "WiFi SSID",
            "short_name": "wifi-ssid",
            "variable_name": "network_timeout"wifi_ssid",
            "type": "string",
            "position": 1,
            "required": true,
            "read_only": false,
            "metric": false,
            "group": {
              "id": 12,
              "name": "NetworkWireless Timeout"Configuration",
              "short_name"service": "NetWiFi TO"Management",
              "discovery_group": "Network",
              "title": "WiFi Settings"
            }
          },
          "value": "30"CompanyGuest",
          "pending": false,
          "created_at"created": "2024-01-15T10:30:00Z",
          "updated_at"last_change": "2024-01-20T14:25:00Z",
          "pending": false
        },
        {
          "id": 2,1548,
          "parent_id": 123,"123",
          "parent__name": "Office-Router-01",
          "parameter": {
            "id": 46,
            "max_conn"name": "WiFi Password",
            "short_name": "wifi-password",
            "variable_name": "max_connections"wifi_password",
            "type": "password",
            "position": 2,
            "required": true,
            "read_only": false,
            "metric": false,
            "group": {
              "id": 12,
              "name": "MaximumWireless Connections"Configuration",
              "short_name"service": "MaxWiFi Conn"Management",
              "discovery_group": "Network",
              "title": "WiFi Settings"
            }
          },
          "value": "100"********",
          "pending": true,
          "created_at"created": "2024-01-15T10:30:00Z",
          "updated_at"last_change": "2024-01-22T09:15:00Z",
          "pending": true
        }
      ]
    }
    

    Response Codes:

    Status Description
    200 Success - Returns thepaginated filteredlist of device settings
    400 Bad Request - Invalid query parameters or missingMissing required parent_id parameter
    401 Unauthorized - Invalid or missing API token
    403 Forbidden - Insufficient permissions to view device settings
    404 Not Found - Device with specified parent_id does not exist

    PUT /inventory_device_setting/{parent_id}/

    Description: Performs a complete update of device settings for the specified device. This endpoint replaces all existingcurrent settings for the device with the provided datadata, set.making it ideal for bulk configuration updates or when you need to ensure a device has exactly the configuration you specify. Use this when you needwant to performset bulkthe complete configuration updatesstate or resetof a device's configuration entirely.device.

    Use Cases:

    • CompleteDeploy a complete configuration template to a new device reconfiguration during maintenance
    • Applying standardized configuration templates to devices
    ResettingRestore device settings from a known good backup Standardize device configurations across a fleet Reset device configuration to factory ordefaults baselinewith configurationscustom Bulk updates when migrating device configurationsvalues

    Full URL Example:

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

    Parameters:

    Parameter Type In Required Description
    parent_id integer path Yes The device ID whose settings willyou bewant to update completely updated
    data stringobject body Yes Complete JSONdevice payloadconfiguration containingdata including all deviceparameter settings to be appliedvalues

    cURL Example:

    curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_setting/123/" \
      -H "Authorization: Bearer YOUR_API_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "settings": [
          {
            "parameter_id": "network_timeout",45,
            "value": "45"NewCompanyWiFi"
          },
          {
            "parameter_id": "max_connections",46,
            "value": "150"SecurePassword123!"
          },
          {
            "parameter_id": "enable_logging",47,
            "value": "true"192.168.1.1"
          }
        ]
      }'
    

    Example Response:

    {
      "success": true,
      "message": "Device settings updated successfully",
      "updated_settings": [
        {
          "id": 1,1547,
      "parent_id": 123,"123",
      "parent__name": "Office-Router-01",
      "parameter": {
        "id": 45,
        "network_timeout"name": "WiFi SSID",
        "short_name": "wifi-ssid",
        "variable_name": "network_timeout"wifi_ssid",
        "type": "string",
        "position": 1,
        "required": true,
        "read_only": false,
        "metric": false,
        "group": {
          "id": 12,
          "name": "NetworkWireless Timeout"Configuration",
          "service": "WiFi Management",
          "discovery_group": "Network",
          "title": "WiFi Settings"
        }
      },
      "value": "45"NewCompanyWiFi",
      "created": "2024-01-15T10:30:00Z",
      "last_change": "2024-01-25T11:45:00Z",
      "pending": true,
          "updated_at": "2024-01-22T15:30:00Z"
        },
        {
          "id": 2,
          "parent_id": 123,
          "parameter": {
            "id": "max_connections",
            "variable_name": "max_connections", 
            "name": "Maximum Connections"
          },
          "value": "150",
          "pending": true,
          "updated_at": "2024-01-22T15:30:00Z"
        }
      ]true
    }
    

    Response Codes:

    Status Description
    200 Success - All deviceDevice settings updated successfully
    400 Bad Request - Invalid data format or parametermissing valuesrequired parameters
    401 Unauthorized - Invalid or missing API token
    403 Forbidden - Insufficient permissions to modify device settings
    404 Not Found - Device with specified parent_id does not exist
    422 Unprocessable Entity - Validation errors in parameter values

    PATCH /inventory_device_setting/{parent_id}/

    Description: Performs a partial updatesupdate of device settings, allowing you to modify only specific device settingsparameters without affecting other existing settings. This endpoint allowsis youideal tofor modifytargeted individualconfiguration parameterschanges, such as updating a single parameter or a small groupssubset of settings while preserving allthe otherrest currentof configurations.the Idealdevice for targeted configuration changes.configuration.

    Use Cases:

    • UpdatingUpdate individuala specific configuration parametersparameter (e.g., changingchange timeoutWiFi values)password only)
    • Fine-tuningApply specificsecurity updates that affect only certain settings
    Make incremental configuration adjustments Update device settings based on performancemonitoring monitoringalerts Applyingor security patches that require configurationpolicy changes Making incremental adjustments to operational parameters

    Full URL Example:

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

    Parameters:

    Parameter Type In Required Description
    parent_id integer path Yes The device ID whose settings willyou bewant to partially updatedupdate
    data stringobject body Yes JSONPartial payloaddevice containingconfiguration data with only the specificparameters settingsyou want to be modifiedmodify

    cURL Example:

    curl -X PATCH "https://control.zequenze.com/api/v1/inventory_device_setting/123/" \
      -H "Authorization: Bearer YOUR_API_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "updates": [
          {
            "parameter_id": "network_timeout",46,
        "value": "60"
          }
        ]NewSecurePassword456!"
      }'
    

    Example Response:

    {
      "success": true,
      "message": "Device settings partially updated",
      "updated_settings": [
        {
          "id": 1,1548,
      "parent_id": 123,"123",
      "parent__name": "Office-Router-01",
      "parameter": {
        "id": 46,
        "network_timeout"name": "WiFi Password",
        "short_name": "wifi-password",
        "variable_name": "network_timeout"wifi_password",
        "type": "password",
        "position": 2,
        "required": true,
        "read_only": false,
        "metric": false,
        "group": {
          "id": 12,
          "name": "NetworkWireless Timeout"Configuration",
          "short_name"service": "NetWiFi TO"Management",
          "discovery_group": "Network",
          "title": "WiFi Settings"
        }
      },
      "value": "60"********",
      "previous_value"created": "45"2024-01-15T10:30:00Z",
      "last_change": "2024-01-25T16:20:00Z",
      "pending": true,
          "updated_at": "2024-01-22T16:45:00Z"
        }
      ],
      "unchanged_settings_count": 24true
    }
    

    Response Codes:

    Status Description
    200 Success - SpecifiedDevice settingssetting updated successfully
    400 Bad Request - Invalid parameterdata IDsformat or values in update dataparameter
    401 Unauthorized - Invalid or missing API token
    403 Forbidden - Insufficient permissions to modify device settings
    404 Not Found - Device or specifiedparameter parameters dodoes not exist
    422 Unprocessable Entity - Validation error for the parameter value

    Common Use Cases

    Use Case 1: Device Configuration Audit

    Retrieve all settings for multiplea devicesdevice to ensureperform compliance withchecking organizationalor standards.generate configuration reports. Use the GET endpoint with differentfiltering parent_idto valuesexamine andspecific compareparameter configurationsgroups acrossor youridentify devicepending fleet.changes before they're applied.

    Use Case 2: Bulk ConfigurationWiFi DeploymentPassword Update

    ApplyUpdate standardizedWiFi settingspasswords across multiple devices in your network. First, use GET to new devices or update existingidentify devices with newWiFi operationalparameters, parameters.then Use PUT for complete configuration replacement oruse PATCH forto targetedupdate updates.only the password parameter while preserving other wireless settings.

    Use Case 3: MonitoringNew PendingDevice ChangesProvisioning

    TrackDeploy a complete configuration changestemplate to newly added devices. Use PUT to apply a standardized configuration that haven'tincludes beenall deployedrequired toparameters devicesfor yetyour byorganization's filteringnetwork with pending=true. This helps manage deployment schedules and ensure changes are properly applied.policies.

    Use Case 4: Parameter-BasedMonitoring Configuration ManagementDrift

    FindRegularly allquery devicesdevice settings to detect unauthorized changes or configuration drift. Filter by parameter types and use the pending flag to identify settings that haven't been synchronized with specific parameter configurations using the parameterphysical filter options, enabling targeted updates across devices with similar configurations.device.

    Use Case 5: IncrementalEmergency ConfigurationSecurity Updates

    Quickly update security-related parameters across your device fleet. Use PATCH to makemodify small,specific targeted changes to devicesecurity settings (like admin passwords or access control parameters) without disrupting other configurations,operational ideal for performance tuning and gradual rollouts.configurations.


    Best Practices

    • Always specify parent_id: The parent_id parameter is required for GET requests and critical for identifying the correct device for updates.

    Use pagination effectivelywisely: ForWhen devicesquerying withlarge manydevice settings,inventories, implementalways properuse pagination usingappropriate limit andvalues offset(recommended: 50-100) to avoid performancetimeouts issues.and improve response times.

    Monitor pending changesstatus: RegularlyAlways check for pending settings using the pending filterfield in responses to understand which settings are queued for application. Schedule follow-up checks to ensure configuration changesconfigurations are properlysuccessfully deployed.applied.

    Filter effectively: Use parameter-based filters to reduce response sizes and improve query performance. Combine parent_id with specific parameter filters for targeted operations.

    Handle parameter types correctly: Respect parameter type definitions when updating values. Boolean parameters expect true/false, integers require numeric values, and password fields may have special validation rules.

    Implement retry logic: Device configuration updates may fail due to network issues or device unavailability. Implement exponential backoff retry logic for critical configuration changes.

    Validate parameterbefore namesbulk operations: Use theGET requests to validate current device states and parameter filter options to verify parameter names and IDsrequirements before makingperforming bulk updates towith avoidPUT configurationor errors.PATCH.

    ImplementTrack properchanges errorwith handlingtimestamps: AlwaysUse checkthe response codescreated and handlelast_change 404fields errorsto implement change tracking and audit trails for non-existentcompliance devices or parameters gracefully.requirements.

    UseSecure PATCHsensitive parameters: Be especially careful with password and security-related parameters. Ensure your application properly handles masked values in responses and validates input for incrementalsecurity updates: When modifying only a few settings, use PATCH instead of PUT to preserve existing configurations and reduce the risk of accidental overwrites.

    Batch related changes: Group related configuration changes into single API calls when possible to maintain configuration consistency and reduce API overhead.parameters.