Inventory Device Serial Variables
The Inventory Device Serial Variables API provides
endpointsaccessfortomanaging and retrievingdevice-specific configuration parameters and variablesassociated with specificfor devices in your inventory. These endpoints allow you toquery device-specific settings by serial numberretrieve and update variable settings associated with specific deviceconfigurationsserialprogrammatically.numbers, enabling centralized device configuration management and monitoring of pending changes.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Inventory Device Serial Variables API iscategory designedmanages configuration variables and parameters for managingindividual device-specific configuration parameters and variablesdevices in your network inventory system. ThisEach APIdevice, categoryidentified focusesby onits device-level settings that are tied to specificunique serial numbers,number, allowingcan forhave granularmultiple controlconfigurable overparameters individualsuch deviceas configurations.network settings, operational thresholds, feature flags, and custom variables.
Key Concepts:
-
Device Serial
Variables:Variables: Configuration parametersandtiedsettings associated withto specific device serial numbers -
ParameterVariableFiltering:Names:AdvancedUniquefilteringidentifierscapabilities to retrieve specificfor configurationvariablesparametersby(e.g.,name,"network_timeout",short"max_connections")
Common Use Cases:Scenarios:
- Retrieving current configuration
settingsfor a specific device before maintenance - Bulk updating device
parameterssettings across multiplevariablesparameters - Monitoring which devices have pending configuration changes
before deployment AuditingFilteringdevice-devices by specificsettingsparameterfortypescomplianceorpurposesvaluesAutomating deviceImplementing configurationmanagementtemplatesworkflowsand standardized settings
TheThis API supports bothwildcard readsearching for flexible parameter queries and writeprovides operations,pagination enablingfor comprehensivehandling large numbers of device configurationvariables management through programmatic interfaces.efficiently.
Endpoints
GET /inventory_device_serial_variables/
Description: Retrieves a list of configuration variables and parameters for devices based on serial number filtering.and optional filtering criteria. This endpoint is essential for queryingviewing current device settings,configurations, monitoringchecking configurationfor states,pending changes, and retrievingfiltering specific parameter valuestypes foracross inventoryyour management.device inventory.
Use Cases:
AuditGet all configurationparametersvariables for a specific device before performing updatesRetrieveMonitor devices with pending configuration changesbeforethatdeploymentneed to be appliedQueryFilter specific parametervaluestypes (e.g., network settings) across multiple devicesMonitorAuditdevicecurrentsettingsconfiguration states for complianceverificationreporting
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_serial_variables/?parent__serial_number=SN123456789DEV-2024-001¶meter__variable_name=hostname,ip_addressnetwork_timeout,max_connections&pending=true&limit=5020
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| parent__serial_number | string | query | Yes | Filter |
| parameter__variable_name | string | query | No | Comma-separated list of |
| parameter__name | string | query | No | Comma-separated list of human-readable parameter |
| parameter__short_name | string | query | No | Comma-separated list of parameter short names for |
| limit | integer | query | No | Number of results |
| offset | integer | query | No | Starting index for pagination ( |
| pending | boolean | query | No | |
| wildcard | boolean | query | No | Enable wildcard (*) |
| extra | boolean | query | No | Include additional metadata and |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_serial_variables/?parent__serial_number=SN123456789DEV-2024-001¶meter__variable_name=hostname,ip_addressnetwork_timeout,max_connections&extra=true" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 15,3,
"next": "https://control.zequenze.com/api/v1/inventory_device_serial_variables/?limit=10&offset=10&parent__serial_number=SN123456789",null,
"previous": null,
"results": [
{
"id": 1001,
"parent_serial_number"name": "SN123456789"Network Timeout",
"parameter": {
"variable_name": "hostname"network_timeout",
"name"value": "Device30",
Hostname""type": "integer",
"short_name": "host"net_timeout",
"data_type": "string",
"category": "network"
},
"current_value": "switch-floor-2-rack-1",
"pending_value": "switch-floor-2-rack-1-updated",
"is_pending"extra": true,
"last_modified"extra_value": "2024-01-15T14:30:00Z"seconds",
"modified_by"pending": "admin@company.com"false
},
{
"id": 1002,
"parent_serial_number"name": "SN123456789"Maximum Connections",
"parameter": {
"variable_name": "ip_address"max_connections",
"name"value": "Management100",
IP"type": Address""integer",
"short_name": "mgmt_ip"max_conn",
"data_type"extra": "ipv4",false,
"category": "network"
},
"current_value": "192.168.1.100",
"pending_value"extra_value": null,
"is_pending"pending": false,true
},
{
"last_modified"id": 1003,
"name": "2024-01-10T09:15:00Z"Device Mode",
"modified_by"variable_name": "network@company.com"device_mode",
"value": "production",
"type": "string",
"short_name": "mode",
"extra": true,
"extra_value": "enum:production,staging,development",
"pending": false
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns the filtered device variables |
| 400 | Bad Request - |
| 401 | Unauthorized - Invalid or missing |
| 404 | Not Found - Device |
PUT /inventory_device_serial_variables/{parent__serial_number}/
Description: Updates configuration variables and parameters for a specific device identified by its serial number. This endpoint allows bulk updatingupdates of multiple device parameters in a single request, makingautomatically itmarking efficientchanges foras configurationpending managementuntil andthey deploymentcan workflows.be synchronized with the physical device.
Use Cases:
Deploy pendingApply configurationchangestemplates toanewlydeviceprovisioned devicesBulkUpdateupdatenetwork settings across multipledeviceparameters simultaneouslyApply standardizedImplement configurationtemplateschangestoasdevicespart of maintenance workflowsRollbackSynchronize deviceconfigurationssettingstowithpreviouscentralizedstatesconfiguration policies
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_serial_variables/SN123456789/DEV-2024-001/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| parent__serial_number | string | path | Yes | |
| data | string | body | Yes | JSON payload containing the |
Request Body Format:
{
"variables": [
{
"variable_name": "network_timeout",
"value": "45"
},
{
"variable_name": "max_connections",
"value": "150"
}
]
}
cURL Example:
curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_serial_variables/SN123456789/DEV-2024-001/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"parameters"variables": [
{
"variable_name": "hostname"network_timeout",
"value": "switch-floor-2-rack-1-new"45"
},
{
"variable_name": "ip_address"device_mode",
"value": "192.168.1.101"
},
{
"variable_name": "vlan_id",
"value": "100"staging"
}
],
"deploy_immediately": false,
"notes": "Monthly configuration update batch"
}'
Example Request Body:
{
"parameters": [
{
"variable_name": "hostname",
"value": "switch-floor-2-rack-1-new",
"validate": true
},
{
"variable_name": "ip_address",
"value": "192.168.1.101",
"validate": true
},
{
"variable_name": "snmp_community",
"value": "new_community_string",
"validate": false
}
],
"deploy_immediately": false,
"backup_current": true,
"notes": "Monthly configuration update - Network segment reorganization"
}
Example Response:
{
"success"id": true,1001,
"updated_parameters": 3,
"device_serial_number"name": "SN123456789"Network Timeout",
"changes": [
{
"variable_name": "hostname"network_timeout",
"previous_value"value": "switch-floor-2-rack-1"45",
"new_value"type": "switch-floor-2-rack-1-new"integer",
"status"short_name": "pending"
},
{
"variable_name": "ip_address"net_timeout",
"previous_value": "192.168.1.100",
"new_value": "192.168.1.101",
"status": "pending"
},
{
"variable_name": "snmp_community",
"previous_value": "[hidden]",
"new_value": "[hidden]",
"status": "pending"
}
],
"deployment_status": "pending",
"backup_created"extra": true,
"backup_id"extra_value": "backup_20240115_143000"seconds",
"timestamp"pending": "2024-01-15T14:30:00Z",
"modified_by": "api_user@company.com"true
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - |
| 400 | Bad Request - Invalid |
| 401 | Unauthorized - Invalid or missing |
| 404 | Not Found - Device |
| 422 |
Common Use Cases
Use Case 1: Device Configuration Audit
QueryRetrieve all configuration parametersvariables for a specific device to perform compliance auditing and verify current settings againstbefore organizationalperforming standards.maintenance or troubleshooting.
# Get all variables for device
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_serial_variables/?parent__serial_number=SN123456789DEV-2024-001&extra=truetrue" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Use Case 2: NetworkBulk ParameterConfiguration UpdatesUpdate
Update criticalmultiple networknetwork-related parameters (hostname, IP address, VLAN) for a device duringin preparation for a network reorganizationinfrastructure orchange.
# windows.Update network configuration
curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_serial_variables/DEV-2024-001/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"variables": [{"variable_name": "network_timeout", "value": "60"}, {"variable_name": "retry_attempts", "value": "5"}]}'
Use Case 3: Pending Changes ReviewMonitoring
MonitorIdentify all devices with pending configuration changes beforethat deploying updatesneed to productionbe environments.synchronized.
# Find devices with pending changes
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_serial_variables/?parent__serial_number=SN123456789DEV-2024-001&pending=truetrue" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Use Case 4: Bulk Parameter RetrievalType Filtering
Retrieve only specific types of configuration parameters acrossusing multiplewildcard APImatching.
# forGet reportingall andnetwork-related monitoringparameters
dashboards.curl -X GET "https://control.zequenze.com/api/v1/inventory_device_serial_variables/?parent__serial_number=DEV-2024-001¶meter__variable_name=network_*&wildcard=true" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Use Case 5: Configuration Template DeploymentApplication
Apply a standardized configuration templatestemplate to newa devicesnewly byprovisioned updatingdevice.
# parametersApply simultaneouslyproduction throughconfiguration thetemplate
curl -X PUT endpoint."https://control.zequenze.com/api/v1/inventory_device_serial_variables/DEV-2024-NEW/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"variables": [{"variable_name": "device_mode", "value": "production"}, {"variable_name": "log_level", "value": "warn"}, {"variable_name": "max_connections", "value": "200"}]}'
Best Practices
-
Pagination:Always specify the device serial number:UseThelimitparent__serial_numberparameter is required for all GET requests andoffsetshouldparametersbe the exact serial number as registered in the inventory system.
Use pagination for large result sets: toWhen improvequerying performancedevices with many variables, implement pagination using limit and reduceoffset response times
Validation:Handle pending status appropriately: UseAfter updating variables, they may remain in a "pending" state until synchronized with the validationphysical flagsdevice. inMonitor PUTthe requestspending tofield catchand configurationimplement errorsappropriate beforeretry deploymentlogic for critical updates.
BackupValidate Strategy:variable types and constraints: EnableBefore backup_currentsending whenupdates, makingensure significantvalues configurationmatch changesthe toexpected allowtype for(string, quickinteger, rollbacksboolean) and any constraints indicated in the extra_value field.
ErrorUse Handling:wildcard filtering judiciously: Wildcard searches can be powerful but may impact performance. Use specific parameter names when possible, and enable wildcards only when necessary.
Implement proper error handling: forCheck 422response codes and handle validation errors,errors especially(422) whenby updatingreviewing criticalthe networkerror parametersdetails and correcting invalid parameter values.
RateCache Limiting:frequently accessed variables: Space out API calls appropriately when processing multiple devices to avoid hitting rate limits
pending status for real-time accuracy.
WildcardBatch Usage:related updates: UseWhen wildcardsupdating sparinglymultiple related parameters, use a single PUT request rather than multiple individual requests to ensure consistency and withreduce specificAPI patternsload.