Inventory Device Name Variables
The Inventory Device Name Variables API provides
endpointsaccess tomanage and retrievedevice configuration parameters and settingsforwithinspecificthedevicesZequenzeincontrolyour inventory.system. These endpoints allow you toqueryretrievedeviceand update device-specific variables by devicename and update device configurations,name, making itessentialeasyfortodevice management,manage configurationautomation, and monitoring pending changesparameters across yourinfrastructure.device inventory programmatically.
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 Variables API enables comprehensive management of device-specificdevice configuration parameterssettings and variablesparameters withinthrough youra networkdevice-centric inventory.approach. This API category is specifically designed for scenarios where you need to interact with device settings using the device name as the primary identifier.
Key Capabilities:to:
-
DeviceRetrieveParameterdeviceRetrievalsettings:QuerybyspecificdeviceconfigurationnamevariablesratherandthanparametersdeviceforID,namedmakingdevicesintegration easier when you know device names but not internal IDs -
ConfigurationManageManagementconfiguration parameters:Updateincludingdevicevariablesettingsnames, values, types, andmonitor pending configuration changesmetadata -
FlexibleMonitorFilteringpending changes:Filtertoparametersdevicebyconfigurationsvariablebeforenames,theyparameterarenames, or short namesapplied -
Real-timeBulkStatusparameter operations:Checkusing comma-separated lists forpendingefficientsettingsdataand force updates when neededretrieval -
DetailedTrackMetadataconfiguration history:Accesswithadditional parameterdate informationincluding timestampsand extradetails
Common Integration Scenarios:
ThisThe APIendpoints iswork particularlytogether usefulto provide a complete device configuration management workflow. The GET endpoint allows you to query current device settings with flexible filtering options, while the PUT endpoint enables updates to device configurations. Both endpoints support advanced features like wildcard matching, forced updates, and detailed metadata retrieval.
Key concepts include:
Endpoints
GET /inventory_device_name_variables/
Description: Retrieves device configuration parameters and variables for devices in your inventory,settings filtered by device name. This endpoint is essential for querying current device settings,configurations, checking formonitoring pending configuration changes, and retrievingextracting detailedspecific parameter metadata.sets. It supports flexible filtering optionsby toparameter targetnames, specificvariable parametersnames, or parametershort types.names, with optional wildcard matching for pattern-based queries.
Use Cases:
MonitorRetrieve all configurationstatusparameters for a specific device by name
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_name_variables/?parent__name=router-01¶meter__variable_name=hostname,interface_confignetwork_config,snmp_community&pending=extra=true&limit=50dates=true
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| parent__name | string | query | Yes | |
| parameter__variable_name | string | query | No | Comma-separated list of parameter variable names to retrieve (e.g., " |
| parameter__name | string | query | No | Comma-separated list of human-readable parameter names to retrieve |
| parameter__short_name | string | query | No | Comma-separated list of parameter short names for |
| limit | integer | query | No | Number of results to return per page (default |
| offset | integer | query | No | Starting index for |
| pending | boolean | query | No | |
| wildcard | boolean | query | No | |
| force_update | boolean | query | No | |
| extra | boolean | query | No | |
| dates | boolean | query | No |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_name_variables/?parent__name=router-01¶meter__variable_name=hostname,interface_speednetwork_config,device_name&extra=true&dates=true" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 25,15,
"next": "https://control.zequenze.com/api/v1/inventory_device_name_variables/?limit=2010&offset=2010&parent__name=router-01",
"previous": null,
"results": [
{
"id": 1247,
"device_name"name": "router-01",Network "parameter_name": "System Hostname",
"parameter_short_name": "hostname"Configuration",
"variable_name": "hostname"network_config",
"current_value"value": "router-01.datacenter.company.com"192.168.1.100/24",
"pending_value": null,
"data_type"type": "string"ipv4_network",
"is_pending": false,
"last_updated"short_name": "2024-01-15T10:30:00Z"net_cfg",
"created_at"extra": true,
"extra_value": "2024-01-10T09:15:00Z"gateway=192.168.1.1,dns=8.8.8.8",
"extra_info"pending": {
"validation_rule": "^[a-zA-Z0-9\\.-]+$",
"restart_required": false,
"category": "system"
}false
},
{
"id": 1248,
"name": "Device Name",
"variable_name": "device_name",
"value": "router-01",
"parameter_name"type": "Interface Speed"string",
"parameter_short_name"short_name": "int_speed"name",
"extra": false,
"extra_value": null,
"pending": false
},
{
"id": 1249,
"name": "SNMP Community",
"variable_name": "interface_speed"snmp_community",
"current_value"value": "1000"private_updated",
"pending_value"type": "10000"string",
"data_type"short_name": "integer"snmp",
"is_pending"extra": true,false,
"last_updated"extra_value": "2024-01-16T14:22:00Z",null,
"created_at"pending": "2024-01-10T09:15:00Z",
"extra_info": {
"unit": "Mbps",
"valid_values": [100, 1000, 10000],
"restart_required": true,
"category": "network"
}true
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns |
| 400 | Bad Request - Missing required parent__name parameter or invalid query parameters |
| 401 | Unauthorized - Invalid or missing authentication token |
| 404 | Not Found - |
PUT /inventory_device_name_variables/{parent__name}/
Description: Updates device configuration parameters and variables for athe specificspecified device identified by name. This endpoint allows you to modify device settings,settings applyby sending parameter data in the request body. The operation updates existing parameters or creates new ones as needed, with changes typically marked as pending configurations,until andapplied bulkto the actual device.
Use Cases:
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_name_variables/router-01/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| parent__name | string | path | Yes | The |
| data | string | body | Yes | JSON payload containing |
cURL Example:
curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_name_variables/router-01/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"parameters": [
{
"variable_name": "hostname"snmp_community",
"value": "router-01.newdomain.com"new_community_string"
},
{
"variable_name": "interface_speed"poll_interval",
"value": "10000"
},
{
"variable_name": "snmp_community",
"value": "production_read_v2"300"
}
],
"apply_immediately": false,
"validate_only": false
}'
Example Request Body:
{
"parameters": [
{
"variable_name": "hostname",
"value": "router-01.production.company.com",
"force_update": false
},
{
"variable_name": "interface_speed",
"value": "10000",
"force_update": true
},
{
"variable_name": "vlan_config",
"value": "100,200,300",
"force_update": false
}
],
"apply_immediately": false,
"validate_only": false,
"backup_current": true
}
Example Response:
{
"status"id": 1249,
"name": "success"SNMP Community",
"device_name": "router-01",
"updated_parameters": [
{
"variable_name": "hostname"snmp_community",
"previous_value"value": "router-01.staging.company.com"new_community_string",
"new_value"type": "router-01.production.company.com"string",
"status"short_name": "pending"snmp",
"requires_restart"extra": false
},
{false,
"variable_name"extra_value": "interface_speed",null,
"previous_value": "1000",
"new_value": "10000",
"status": "applied",
"requires_restart"pending": true
},
{
"variable_name": "vlan_config",
"previous_value": "100,200",
"new_value": "100,200,300",
"status": "pending",
"requires_restart": false
}
],
"summary": {
"total_parameters": 3,
"applied_immediately": 1,
"pending_application": 2,
"validation_errors": 0,
"restart_required": true
},
"backup_id": "backup_router-01_20240116_142500",
"timestamp": "2024-01-16T14:25:00Z"
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Parameters updated successfully |
| 400 | Bad Request - Invalid parameter data or |
| 401 | Unauthorized - Invalid or missing authentication token |
| 404 | Not Found - Device with specified name does not exist |
Common Use Cases
Use Case 1: Device Configuration Compliance MonitoringAudit
MonitorQuery deviceall configurationsparameters acrossfor yourspecific infrastructuredevices to ensureperform configuration audits or compliance with organizational standards.checks. Use the GETextra endpointand withdates specific parameter filtersparameters to checkget criticalcomplete settingsconfiguration like SNMP communities, NTP servers, and security policies across all devices.history.
#curl Check SNMP configuration across devices-X GET "https://control.zequenze.com/api/v1/inventory_device_name_variables/?parameter__variable_name=snmp_community,snmp_versionparent__name=critical-router&extra=true&dates=true"
Use Case 2: AutomatedBulk DeviceNetwork DeploymentConfiguration Updates
DuringUpdate network settings across multiple devices by iterating through device provisioning,names useand the PUT endpoint to apply standardized configurations to new devices. This ensuresapplying consistent setup across your infrastructure and reduces manual configuration errors.parameters.
Use Case 3: Pending ChangeChanges ManagementMonitoring
Before maintenance windows, use the GET endpoint with pending=true to identify allMonitor devices with pending configuration changes,changes thento coordinatetrack thedeployment applicationstatus ofand theseensure changes duringare scheduledproperly maintenance.applied.
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_name_variables/?parent__name=router-01&pending=true"
Use Case 4: ConfigurationParameter DriftPattern DetectionMatching
RegularlyUse querywildcard devicefiltering to find all parameters andmatching comparespecific againstpatterns, youruseful for discovering related configuration management database to detect unauthorized changes or configuration driftsettings across your network infrastructure.devices.
Use Case 5: BulkConfiguration ParameterTemplate UpdatesDeployment
UseApply standardized configuration templates to devices by updating multiple parameters simultaneously through the PUT endpoint to update multiple related parameters simultaneously, such as updating VLAN configurations, routing parameters, and security settings as part of a coordinated network change.endpoint.
Best Practices
-
Use
PaginationdeviceEffectivelynames consistently:- Ensure device names in your API calls match exactly with those stored in the system, as the parent__name parameter is case-sensitive
limitpending field in responses to understand which changes haven't been applied to physical devices yet
Leverage wildcard filtering - Use the wildcard parameter LeverageValidate Filteringparameter types: - Check the type field in responses to ensure you're sending appropriately formatted values in PUT requests
- Instead of retrieving all parameters, use parameter__variable_nameor parameter__nameHandle Pending Changes: Always check the is_pending field in responses and consider using the pending=true query parameter to identify devices requiring attention before making new changes.
Force Updates Judiciously: Use force_update=true sparingly as it triggers real-time device communication, which can impact performance. Reserve it for critical operations where you need the absolute latest data.
Implement Properretry Errorlogic Handling:- Always handle 404 responses when querying by device name, asNetwork devices may be renamed, decommissioned, or temporarily unavailable.
Use Validation Mode: When updating parameters, consider using validate_only=true in your request to test parameter changes before applying them, especially in production environments.
Monitor Rate Limits: Be mindful of API rate limits when making bulk operations. Implementimplement exponential backoff andfor respectfailed any rate limiting headers in responses.
Backup Before Changes: Always set backup_current=true when updating critical device parameters to enable quick rollback if issues occur.