Skip to main content

Inventory Device Name Setting

The Inventory Device Name Setting endpoints provide complete CRUD operations for managing device-specific configuration parameters and settings. These endpoints allow you to retrieve, update, and modify settings for individual devices by their name, enabling granular control over device configurations in your inventory management system.

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 Setting API category enables comprehensive management of device-specific configuration settings within your inventory system. This API is designed for scenarios where you need to configure individual devices with custom parameters, update device settings in bulk, or retrieve current configuration states for monitoring and compliance purposes.

These endpoints work together to provide a complete device settings management workflow: use the GET endpoint to retrieve current settings and filter by various parameters, then use PUT or PATCH endpoints to update configurations as needed. The filtering capabilities allow you to find specific settings by parameter names, variable names, or check for pending configurations that require attention.

Common use cases include managing network device configurations, updating firmware settings, configuring device-specific operational parameters, and maintaining compliance with organizational policies across your device inventory.


Endpoints

GET /inventory_device_name_setting/

Description: Retrieves a paginated list of device settings for a specified parent device. This endpoint supports comprehensive filtering options to help you find specific settings based on parameter characteristics, and can identify pending configuration changes that haven't been applied yet.

Use Cases:

  • Audit current device configurations for compliance reporting
  • Filter settings by parameter types to update related configurations
  • Monitor pending configuration changes across devices
  • Retrieve specific settings before making updates

Full URL Example:

https://control.zequenze.com/api/v1/inventory_device_name_setting/?parent__name=router-01&parameter__name=bandwidth_limit&limit=50

Parameters:

Parameter Type In Required Description
parent__name string query Yes The name of the parent device to retrieve settings for
parameter_id string query No Filter results by specific parameter ID
parameter__variable_name string query No Filter settings by the parameter's variable name field
parameter__name string query No Filter settings by the parameter's display name field
parameter__short_name string query No Filter settings by the parameter's abbreviated name field
limit integer query No Number of results to return per page (default: 20)
offset integer query No The initial index from which to return results for pagination
pending boolean query No Filter to show only settings with pending changes (true/false)

cURL Example:

curl -X GET "https://control.zequenze.com/api/v1/inventory_device_name_setting/?parent__name=network-switch-01&parameter__name=port_config&limit=25" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response:

{
  "count": 15,
  "next": "https://control.zequenze.com/api/v1/inventory_device_name_setting/?limit=25&offset=25&parent__name=network-switch-01",
  "previous": null,
  "results": [
    {
      "id": 1247,
      "parent__name": "network-switch-01",
      "parameter_id": "port_config_001",
      "parameter": {
        "id": "port_config_001",
        "name": "Port Configuration",
        "short_name": "port_cfg",
        "variable_name": "PORT_CONFIG",
        "data_type": "string"
      },
      "value": "auto_negotiate",
      "pending": false,
      "last_updated": "2024-01-15T14:30:22Z",
      "created_at": "2024-01-10T09:15:33Z"
    },
    {
      "id": 1248,
      "parent__name": "network-switch-01",
      "parameter_id": "bandwidth_limit_002",
      "parameter": {
        "id": "bandwidth_limit_002",
        "name": "Bandwidth Limit",
        "short_name": "bw_limit",
        "variable_name": "BANDWIDTH_LIMIT",
        "data_type": "integer"
      },
      "value": "1000",
      "pending": true,
      "last_updated": "2024-01-16T11:45:10Z",
      "created_at": "2024-01-10T09:15:33Z"
    }
  ]
}

Response Codes:

Status Description
200 Success - Returns paginated device settings
400 Bad Request - Missing required parent__name parameter
401 Unauthorized - Invalid or missing API token
404 Not Found - Device with specified name does not exist

PUT /inventory_device_name_setting/{parent__name}/

Description: Performs a complete update of device settings for the specified parent device. This endpoint replaces the entire settings configuration, making it ideal for bulk updates or when you need to ensure a specific configuration state across all parameters.

Use Cases:

  • Apply standardized configuration templates to devices
  • Perform bulk updates of multiple device settings simultaneously
  • Reset device configurations to known good states
  • Implement configuration compliance by replacing all settings

Full URL Example:

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

Parameters:

Parameter Type In Required Description
parent__name string path Yes The name of the device to update settings for
data string body Yes JSON payload containing the complete settings configuration

cURL Example:

curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_name_setting/router-primary-01/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "settings": [
      {
        "parameter_id": "max_connections",
        "value": "500"
      },
      {
        "parameter_id": "timeout_seconds",
        "value": "30"
      },
      {
        "parameter_id": "logging_level",
        "value": "INFO"
      }
    ]
  }'

Example Response:

{
  "parent__name": "router-primary-01",
  "updated_settings": 3,
  "settings": [
    {
      "id": 2156,
      "parameter_id": "max_connections",
      "parameter_name": "Maximum Connections",
      "value": "500",
      "previous_value": "250",
      "pending": true,
      "updated_at": "2024-01-16T15:22:45Z"
    },
    {
      "id": 2157,
      "parameter_id": "timeout_seconds",
      "parameter_name": "Connection Timeout",
      "value": "30",
      "previous_value": "60",
      "pending": true,
      "updated_at": "2024-01-16T15:22:45Z"
    },
    {
      "id": 2158,
      "parameter_id": "logging_level",
      "parameter_name": "Logging Level",
      "value": "INFO",
      "previous_value": "DEBUG",
      "pending": true,
      "updated_at": "2024-01-16T15:22:45Z"
    }
  ],
  "message": "Device settings updated successfully. Changes are pending deployment."
}

Response Codes:

Status Description
200 Success - Settings updated successfully
400 Bad Request - Invalid data format or missing required fields
401 Unauthorized - Invalid or missing API token
404 Not Found - Device not found
422 Unprocessable Entity - Validation errors in setting values

PATCH /inventory_device_name_setting/{parent__name}/

Description: Performs partial updates on device settings for the specified parent device. This endpoint allows you to modify specific settings without affecting other configured parameters, making it ideal for targeted configuration changes and incremental updates.

Use Cases:

  • Update individual device parameters without affecting other settings
  • Apply configuration patches or hotfixes to specific settings
  • Modify settings based on monitoring alerts or performance metrics
  • Implement gradual configuration rollouts with selective parameter updates

Full URL Example:

https://control.zequenze.com/api/v1/inventory_device_name_setting/firewall-edge-02/

Parameters:

Parameter Type In Required Description
parent__name string path Yes The name of the device to partially update settings for
data string body Yes JSON payload containing the specific settings to update

cURL Example:

curl -X PATCH "https://control.zequenze.com/api/v1/inventory_device_name_setting/firewall-edge-02/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "settings": [
      {
        "parameter_id": "firewall_rule_timeout",
        "value": "3600"
      },
      {
        "parameter_id": "max_concurrent_sessions",
        "value": "10000"
      }
    ]
  }'

Example Response:

{
  "parent__name": "firewall-edge-02",
  "updated_settings": 2,
  "settings": [
    {
      "id": 3401,
      "parameter_id": "firewall_rule_timeout",
      "parameter": {
        "name": "Firewall Rule Timeout",
        "variable_name": "RULE_TIMEOUT",
        "data_type": "integer"
      },
      "value": "3600",
      "previous_value": "1800",
      "pending": true,
      "updated_at": "2024-01-16T16:05:12Z"
    },
    {
      "id": 3402,
      "parameter_id": "max_concurrent_sessions",
      "parameter": {
        "name": "Maximum Concurrent Sessions",
        "variable_name": "MAX_SESSIONS",
        "data_type": "integer"
      },
      "value": "10000",
      "previous_value": "5000",
      "pending": true,
      "updated_at": "2024-01-16T16:05:12Z"
    }
  ],
  "unchanged_settings": 23,
  "message": "Selected device settings updated successfully. Other settings remain unchanged."
}

Response Codes:

Status Description
200 Success - Selected settings updated successfully
400 Bad Request - Invalid data format or parameter references
401 Unauthorized - Invalid or missing API token
404 Not Found - Device or specified parameters not found
422 Unprocessable Entity - Validation errors in setting values

Common Use Cases

Use Case 1: Configuration Compliance Audit

Retrieve all device settings for compliance reporting and identify any configurations that don't meet organizational standards. Use the GET endpoint with filtering to check specific parameter types across multiple devices.

Use Case 2: Emergency Configuration Updates

When security vulnerabilities require immediate configuration changes, use the PATCH endpoint to quickly update specific security-related parameters without disrupting other device settings.

Use Case 3: Device Template Deployment

Apply standardized configuration templates to new devices using the PUT endpoint to ensure consistent settings across your infrastructure, then monitor with GET requests to verify successful deployment.

Use Case 4: Performance Optimization

Monitor device performance and use PATCH requests to adjust specific parameters like connection limits, timeouts, or buffer sizes based on real-world usage patterns and performance metrics.

Use Case 5: Staged Configuration Rollouts

Use the pending parameter filtering in GET requests to track configuration changes that haven't been deployed yet, allowing for staged rollouts and rollback capabilities.


Best Practices

  • Always filter by parent device name when using the GET endpoint to avoid retrieving unnecessary data and improve response times
  • Use PATCH for targeted updates and PUT only when you need to replace the entire configuration to minimize the risk of unintended changes
  • Monitor pending settings regularly using the pending filter to ensure configuration changes are being applied as expected
  • Implement proper error handling for validation errors (422 responses) as device settings often have strict value requirements and dependencies
  • Use pagination with appropriate limit values when retrieving settings for devices with many configured parameters
  • Validate parameter IDs before making update requests to avoid creating orphaned or invalid configurations
  • Cache frequently accessed settings but implement cache invalidation strategies since device configurations can change based on operational requirements