Inventory Device Serial Variables
ManageThe Inventory Device Serial Variables API provides endpoints for managing and retrieving configuration parameters and variables associated with specific devices in your inventory. These endpoints allow you to query device-specific settings by serial number and update deviceserialconfigurationsvariables and parameters for inventory devices.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 Serial Variables API is designed for managing device-specific configuration parameters and variables in your network inventory system. This API category focuses on device-level settings that are tied to specific serial numbers, allowing for granular control over individual device configurations.
Key Concepts:
Common Use Cases:
The API supports both read and write operations, enabling comprehensive device configuration management through programmatic interfaces.
Endpoints
GET /inventory_device_serial_variables/
RetrieveDescription: deviceRetrieves serialconfiguration variables and parameters filteredfor bydevices devicebased on serial number.number filtering. This endpoint allowsis youessential tofor fetchquerying current device settings, monitoring configuration variablesstates, and theirretrieving specific parameter values for inventory management.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_serial_variables/?parent__serial_number=SN123456789¶meter__variable_name=hostname,ip_address&limit=50
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| parent__serial_number | string | query | Yes | Filter settings by |
| parameter__variable_name | string | query | No | Comma-separated list of parameter variable names to retrieve (e.g., "hostname,ip_address,vlan_id") |
| parameter__name | string | query | No | Comma-separated list of parameter display names to retrieve (e.g., "Device Hostname,IP Address") |
| parameter__short_name | string | query | No | Comma-separated list of parameter short names |
| limit | integer | query | No | Number of results to return per page (default: 20, max: 100) |
| offset | integer | query | No | |
| pending | boolean | query | No | |
| wildcard | boolean | query | No | Enable wildcard ( |
| extra | boolean | query | No | Include additional metadata and extended parameter information in the response |
ExamplecURL Request:Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_serial_variables/?parent__serial_number=ABC123456SN123456789¶meter__variable_name=firmware_version,device_namehostname,ip_address&extra=truetrue" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 2,15,
"next": null,"https://control.zequenze.com/api/v1/inventory_device_serial_variables/?limit=10&offset=10&parent__serial_number=SN123456789",
"previous": null,
"results": [
{
"id": 1,1001,
"parent_serial_number": "ABC123456"SN123456789",
"parameter": {
"variable_name": "firmware_version"hostname",
"name": "FirmwareDevice Version"Hostname",
"short_name": "fw_ver"host",
"data_type": "string",
"description"category": "Current firmware version"network"
},
"value"current_value": "2.1.4"switch-floor-2-rack-1",
"pending"pending_value": false,"switch-floor-2-rack-1-updated",
"last_updated"is_pending": true,
"last_modified": "2024-01-15T10:15T14:30:00Z",
"modified_by": "admin@company.com"
},
{
"id": 2,1002,
"parent_serial_number": "ABC123456"SN123456789",
"parameter": {
"variable_name": "device_name"ip_address",
"name": "DeviceManagement Name"IP Address",
"short_name": "name"mgmt_ip",
"data_type": "string"ipv4",
"description"category": "Human readable device name"network"
},
"value"current_value": "Production Router 01"192.168.1.100",
"pending"pending_value": true,null,
"last_updated"is_pending": false,
"last_modified": "2024-01-15T11:45:10T09:15:00Z",
"modified_by": "network@company.com"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | |
| 400 | |
| 401 | Unauthorized - |
| 404 | Not Found - Device with specified serial number not found |
PUT /inventory_device_serial_variables/{parent__serial_number}/
UpdateDescription: deviceUpdates serialconfiguration variables and parameters for a specific device.device identified by its serial number. This endpoint allows bulk updating of multiple device parameters in a single request, making it efficient for configuration variablesmanagement and deployment workflows.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_serial_variables/SN123456789/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| parent__serial_number | string | path | Yes | Serial number of the |
| data | string | body | Yes | JSON |
ExamplecURL Request:Example:
curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_serial_variables/ABC123456/SN123456789/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/jsonjson" \
-d '{
"variables"parameters": [
{
"variable_name": "device_name"hostname",
"value": "Updated Router Name"switch-floor-2-rack-1-new"
},
{
"variable_name": "location"ip_address",
"value": "Data Center A - Rack 15"192.168.1.101"
},
{
"variable_name": "maintenance_window"vlan_id",
"value": "Sunday 02:00-04:00 UTC"100"
}
],
"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:
{
"updated"success": true,
"updated_parameters": 3,
"results"device_serial_number": "SN123456789",
"changes": [
{
"variable_name": "device_name"hostname",
"value"previous_value": "Updatedswitch-floor-2-rack-1",
Router"new_value": Name""switch-floor-2-rack-1-new",
"status": "updated",
"pending": true
},
{
"variable_name": "location"ip_address",
"value"previous_value": "Data192.168.1.100",
Center"new_value": A - Rack 15""192.168.1.101",
"status": "updated",
"pending": true
},
{
"variable_name": "maintenance_window"snmp_community",
"value"previous_value": "Sunday[hidden]",
02:00-04:00"new_value": UTC""[hidden]",
"status": "updated",
"pending": true
}
],
"message"deployment_status": "Devicepending",
variables"backup_created": updatedtrue,
successfully""backup_id": "backup_20240115_143000",
"timestamp": "2024-01-15T14:30:00Z",
"modified_by": "api_user@company.com"
}
Response Codes:
| Status | Description |
|---|---|
| 200 | |
| 400 | Bad Request - Invalid |
| 401 | Unauthorized - |
| 404 | Not Found - Device with specified serial number not found |
| 422 | Unprocessable Entity - Validation errors in |
Common Use Cases
Use Case 1: Device Configuration Audit
Query all configuration parameters for a specific device to perform compliance auditing and verify current settings against organizational standards.
https://control.zequenze.com/api/v1/inventory_device_serial_variables/?parent__serial_number=SN123456789&extra=true
Use Case 2: Network Parameter Updates
Update critical network parameters (hostname, IP address, VLAN) for a device during network reorganization or maintenance windows.
Use Case 3: Pending Changes Review
Monitor devices with pending configuration changes before deploying updates to production environments.
https://control.zequenze.com/api/v1/inventory_device_serial_variables/?parent__serial_number=SN123456789&pending=true
Use Case 4: Bulk Parameter Retrieval
Retrieve specific configuration parameters across multiple API calls for reporting and monitoring dashboards.
Use Case 5: Configuration Template Deployment
Apply standardized configuration templates to new devices by updating multiple parameters simultaneously through the PUT endpoint.
Best Practices
-
Pagination: Use
specific filters: When retrieving variables, useparameter__variable_nameorparameter__namefilters tolimitresults to only the variables you need
wildcard=truependinglimitoffset parameters pending