Skip to main content

Inventory Device Name Setting

ManageThe deviceInventory 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 inventoryindividual itemsdevices by their name, enabling granular control over device name.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/

RetrieveDescription: Retrieves a paginated list of device configurationsettings for a specified parent device. This endpoint supports comprehensive filtering options to help you find specific settings filteredbased 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 device name and various parameter criteria.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 ParentThe name of the parent device nameto retrieve settings for
    parameter_id string query No Filter results by specific parameter ID
    parameter__variable_name string query No Filter settings by parameterthe parameter's variable name field
    parameter__name string query No Filter settings by parameterthe parameter's display name field
    parameter__short_name string query No Filter settings by parameterthe shortparameter's abbreviated name field
    limit integer query No Number of results to return per page (default: 20)
    offset integer query No InitialThe initial index from which to return results for pagination
    pending boolean query No Filter byto show only settings with pending statuschanges (true/false)

    ExamplecURL Request:Example:

    curl -X GET "https://control.zequenze.com/api/v1/inventory_device_name_setting/?parent__name=router-001network-switch-01&parameter__name=hostnameport_config&limit=2025" \
      -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=2025&offset=20"25&parent__name=network-switch-01",
      "previous": null,
      "results": [
        {
          "id": 1247,
          "123e4567-e89b-12d3-a456-426614174000"parent__name": "network-switch-01",
          "parameter_id": "param_001"port_config_001",
          "parameter": {
            "variable_name"id": "hostname"port_config_001",
            "name": "DevicePort Hostname"Configuration",
            "short_name": "hostname"port_cfg",
            "variable_name": "PORT_CONFIG",
            "data_type": "string"
          },
          "value": "router-001.example.com"auto_negotiate",
          "pending": false,
          "last_updated": "2024-01-15T14:30:22Z",
          "created_at": "2024-01-15T10:30:00Z"10T09:15:33Z"
        },
        {
          "id": 1248,
          "parent__name": "network-switch-01",
          "updated_at"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-15T10:30:00Z"16T11:45:10Z",
          "created_at": "2024-01-10T09:15:33Z"
        }
      ]
    }
    

    Response Codes:

    Status Description
    200 SettingsSuccess retrieved- successfullyReturns paginated device settings
    400 Bad requestRequest - missingMissing required parent__name parameter
    401 Unauthorized - Invalid or missing API token
    404 Not Found - Device with specified name does not foundexist

    PUT /inventory_device_name_setting/{parent__name}/

    UpdateDescription: allPerforms 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 device,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 existingall configuration.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 ParentThe name of the device nameto update settings for
      data objectstring body Yes CompleteJSON devicepayload containing the complete settings dataconfiguration

      ExamplecURL Request:Example:

      curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_name_setting/router-001/primary-01/" \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/jsonjson" \
        -d '{
          "settings": [
            {
              "parameter_id": "param_001"max_connections",
              "value": "router-001.newdomain.com"500"
            },
            {
              "parameter_id": "param_002"timeout_seconds",
              "value": "192.168.1.1"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",successfully. Changes are pending deployment."updated_count": 2,
        "settings": [
          {
            "parameter_id": "param_001",
            "value": "router-001.newdomain.com",
            "pending": true
          },
          {
            "parameter_id": "param_002",
            "value": "192.168.1.1", 
            "pending": true
          }
        ]
      }
      

      Response Codes:

      Status Description
      200 Success - Settings updated successfully
      400 Bad requestRequest - invalidInvalid 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}/

      PartiallyDescription: updatePerforms partial updates on device settings for the specified parent device. This endpoint allows you to modify specific device settings without affecting other configured parameters, making it ideal for targeted configuration parameters.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 ParentThe name of the device nameto partially update settings for
        data objectstring body Yes PartialJSON devicepayload containing the specific settings datato update

        ExamplecURL Request:Example:

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

        Example Response:

        {
          "message"parent__name": "Device settings partially updated"firewall-edge-02",
          "updated_count"updated_settings": 1,2,
          "settings": [
            {
              "id": 3401,
              "parameter_id": "param_001"firewall_rule_timeout",
              "parameter": {
                "name": "Firewall Rule Timeout",
                "variable_name": "RULE_TIMEOUT",
                "data_type": "integer"
              },
              "value": "router-001.updated.com"3600",
              "previous_value": "1800",
              "pending": true,
              "updated_at": "2024-01-15T14:25:00Z"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 SettingsSuccess partially- Selected settings updated successfully
        400 Bad requestRequest - invalidInvalid 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

        BestCommon PracticesUse 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 deviceparameter names:types Alwaysacross providemultiple devices.

          Use Case 2: Emergency Configuration Updates

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

          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 theGET parent__name parameter to avoid conflicts

          Batch updates efficiently: Use PUT for complete setting replacements and PATCH for selective updates Monitor pending status: Check the pending fieldrequests 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 yetas expected Implement pagination:proper error handling Usefor limitvalidation errors (422 responses) as device settings often have strict value requirements and offset parameters for large device inventories to improve performancedependencies FilterUse strategically:pagination Combinewith parameterappropriate filterslimit tovalues reducewhen responseretrieving sizesettings andfor improvedevices querywith performancemany configured parameters HandleValidate errorsparameter gracefully:IDs Alwaysbefore checkmaking forupdate 404requests responsesto whenavoid workingcreating withorphaned deviceor namesinvalid that may not existconfigurations Cache resultsfrequently appropriately:accessed settings Devicebut settingsimplement typicallycache invalidation strategies since device configurations can change infrequently,based makingon themoperational suitable for cachingrequirements