Inventory Device Variables
Endpoints Summary
GET
/inventory_device_variables/
Swagger ↗
PUT
/inventory_device_variables/{parent_id}/
Swagger ↗
The Inventory Device Variables API provides
completeaccesscontrol overto device configuration parameters and settingsvariables.for network devices. These endpoints allow you to retrieve current variable values, monitor pending changes, and updatedevice-specificdevicevariablesconfigurationsthatprogrammatically.controlEssential for devicebehavior,management, configurationsettings,automation, andoperationalmonitoringparameterssystemwithinstate across yourinventorynetworkmanagement 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)
Common Integration Scenarios:
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:
RetrieveAuditalldeviceconfiguration variablesconfigurations foracompliancespecific deviceverificationSearchBackupforcurrent device settings before making changes
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_variables/?parent_id=123¶meter__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 |
| parameter__variable_name | string | query | No | Comma-separated list of specific variable names to |
| 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 |
| limit | integer | query | No | Number of results per page for pagination (default varies by |
| offset | integer | query | No | Starting |
| pending | boolean | query | No | Include |
| wildcard | boolean | query | No | |
| force_update | boolean | query | No | Force |
| extra | boolean | query | No | Include additional metadata and extended information |
| dates | boolean | query | No | Include |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_variables/?parent_id=123¶meter__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 |
| 400 | Bad Request - |
| 401 | Unauthorized - Invalid or missing |
| 404 | Not Found - Device with specified parent_id does not exist |
| 500 | Internal Server Error - |
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
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 |
| data | string | body | Yes | JSON |
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 - |
| 400 | Bad Request - Invalid |
| 401 | Unauthorized - Invalid or missing |
| 404 | Not Found - Device |
| 422 | Unprocessable Entity - |
| 500 | Internal Server Error - |
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¶meter__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.
FilterCache StrategicallyManagement: Use specificthe variableforce_update nameparameter filtersjudiciously ratheras thanit retrievingcan allimpact variablesperformance; whenprefer youcached only need specific parameters
pending=trueforce_update=true only when real-time accuracy is 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