Inventory Device Log
The Inventory Device Log
endpointsAPIprovideprovides access to device operationlogs,logs and settingschanges,historyandwithinauditthetrailsZequenzeforControlnetwork devices.platform. These endpoints allow you totrackretrieveconfigurationdetailed logs of device actions, parameter changes, commands, events, and alerts with comprehensive filtering capabilities. Use these endpoints to monitor device operations,andtroubleshootmaintain compliance through comprehensive loggingissues, andfilteringtrackcapabilities.configuration changes over time.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Inventory Device Log API category provides comprehensive access to device operationoperational logs and settings changehistory. trackingThis withinAPI your network infrastructure. These endpoints areis essential for network administrators who need to monitormonitoring device configurations,behavior, tracktracking changesconfiguration over time,changes, and maintaintroubleshooting auditdevice trailsissues forin compliancemanaged purposes.network environments.
Key Features:
-
AuditActionTrailTracking: Monitor all device actions including set/get operations, commands, events, and alerts
Common Integration Scenarios:
NetworkAuditmonitoringtrailsdashboards displaying recentfor device configuration changesComplianceTroubleshootingreportingdevicesystemsconnectivityrequiringanddetailedparameteraudit trailsissuesAutomatedMonitoringalertingalertsystemsconditionsforandfailedeventconfiguration deploymentspatternsTroubleshootingTrackingtoolscommandthatexecutioncorrelateand completion status
The API uses cursor-based pagination for efficient handlingdata of large log datasetsretrieval and supports ISO 8601 datetimeextensive filtering foroptions preciseto time-basedhelp queries.you find specific log entries quickly.
Endpoints
GET /inventory_device_log/
Description: Retrieves a paginated list of device operation logs andwith configurationcomprehensive changes.filtering options. This endpoint is theyour primary methodtool for accessing historical device activity,operational monitoringhistory, pendingincluding operations,parameter changes, commands, events, and generating audit reports.alerts. Use thisthe endpointvarious filter parameters to tracknarrow whatdown changesresults wereto made,specific whendevices, theytime occurred,periods, andactions, theiror currentoperational application status.states.
Use Cases:
Generate compliance reports showing all device changes within a specific timeframe
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_log/?parent__id=device-123&datetime__gte=2024-01-01&action=sv&is_pending=false&limit=50
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| datetime__gte | string | query | No | Filter logs from this date/time 2024-01-, 2024-01-01 , 2024-01- |
| datetime__lte | string | query | No | Filter logs up to this date/time. Supports ISO 2024-01-, 2024-01-01 , 2024-01- |
| parent__id | string | query | No | Filter logs by specific device |
| action | string | query | No | Filter by sv (uv (Unset), gv (Get), sa (Set attribute), cr (Create), de (Delete), cm (Command), ev (Event), er (Error), ar (Alert raised), ac (Alert cleared) |
| is_pending | boolean | query | No | Filter by pending true for false for completed operations |
| is_applied | boolean | query | No | Filter by true for successfully applied |
false for cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_log/?parent__id=device-123&datetime__gte=2024-01-15T00:00:00Z01&action=sv&limit=25"20" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 156,
"next": "https://control.zequenze.com/api/v1/inventory_device_log/?cursor=eyJpZCI6MTIzfQ%eyJjcmVhdGVkIjoiMjAyNC0wMS0xNVQxMDozMDowMFoifQ%3D%3D",
"previous": null,
"results": [
{
"id": 1001,1247,
"parent_id": "device-123",
"device_name": "core-switch-01",
"datetime"created": "2024-01-15T14:32:15T10:30:00Z",
"last_change": "2024-01-15T10:30:15Z",
"user": 42,
"parent": 156,
"type": "string",
"action": "update"sv",
"command": "Reconf",
"name": "WiFi Configuration Update",
"variable_name": "interface_vlan_config"Device.WiFi.SSID.1.SSID",
"old_value"value": "vlan 100",
"new_value": "vlan 200"Corporate_Network_5G",
"is_pending": false,
"is_applied": true,
"applied_at"status": 200,
"message": "2024-01-15T14:33:15Z",Parameter "user":updated "admin@company.com",
"operation_id": "op-789456",
"error_message": nullsuccessfully"
},
{
"id": 1000,1246,
"parent_id": "device-123",
"device_name": "core-switch-01",
"datetime"created": "2024-01-15T14:15T09:15:00Z",
"last_change": "2024-01-15T09:15:30Z",
"user": 38,
"parent": 156,
"type": "boolean",
"action": "create"sv",
"command": null,
"name": "Enable Auto-Update",
"variable_name": "snmp_community"Device.ManagementServer.AutoUpdate.Enabled",
"old_value": null,
"new_value"value": "monitoring_readonly"true",
"is_pending": true,false,
"is_applied": false,true,
"applied_at"status": 200,
"message": "Auto-update enabled successfully"
},
{
"id": 1245,
"created": "2024-01-15T08:45:00Z",
"last_change": "2024-01-15T08:45:00Z",
"user": null,
"user"parent": 203,
"type": null,
"action": "network.admin@company.com"ev",
"operation_id"command": "op-789455"Boot",
"error_message"name": null"Device Boot Event",
"variable_name": null,
"value": null,
"is_pending": false,
"is_applied": true,
"status": 200,
"message": "Device completed boot sequence"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns paginated |
GET /inventory_device_log/{id}/
Description: Retrieves detailed information for a specific device log entry by its unique ID.identifier. This endpoint provides complete details about a single operationdevice or configuration change,operation, including itsparameter currentchanges, status,command anyexecution error messages,results, and fulloperational before/after values.status. Use this for detailed investigation of specific operations or when you need completecomprehensive contextinformation about a particularspecific change.log entry identified from the list endpoint.
Use Cases:
- Get complete details about a specific device operation
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_log/1001/1247/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | integer | path | Yes | |
| datetime__gte | string | query | No | Additional filter |
| datetime__lte | string | query | No | Additional filter |
| parent__id | string | query | No | Additional filter by device ID (typically not needed for |
| variable_name | string | query | No | Additional filter by variable name (typically not needed for |
| action | string | query | No | Additional filter by action type (typically not needed for |
| is_pending | boolean | query | No | Additional filter by pending status (typically not needed for |
| is_applied | boolean | query | No | Additional filter by applied status (typically not needed for |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_log/1001/1247/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"id": 1001,1247,
"parent_id": "device-123",
"device_name": "core-switch-01",
"device_type": "cisco_ios",
"device_ip": "192.168.1.10",
"datetime"created": "2024-01-15T14:32:15T10:30:00Z",
"last_change": "2024-01-15T10:30:15Z",
"user": 42,
"parent": 156,
"type": "string",
"action": "update"sv",
"command": "Reconf",
"name": "WiFi Configuration Update",
"variable_name": "interface_vlan_config"Device.WiFi.SSID.1.SSID",
"variable_category"value": "network_interfaces",
"old_value": "interface GigabitEthernet0/1\n switchport mode access\n switchport access vlan 100",
"new_value": "interface GigabitEthernet0/1\n switchport mode access\n switchport access vlan 200"Corporate_Network_5G",
"is_pending": false,
"is_applied": true,
"applied_at"status": 200,
"message": "2024-01-15T14:33:15Z",Parameter "user":updated "admin@company.com",
"user_role": "network_administrator",
"operation_id": "op-789456",
"batch_id": "batch-456789",
"error_message": null,
"rollback_available": true,
"change_reason": "VLAN migration for security compliance",
"approval_required": true,
"approved_by": "manager@company.com",
"approved_at": "2024-01-15T14:31:45Z",
"metadata": {
"source_system": "network_automation",
"change_ticket": "CHG-2024-001234",
"estimated_impact": "low",
"maintenance_window": "2024-01-15T14:30:00Z to 2024-01-15T15:00:00Z"
}successfully"
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns detailed information for the specified log entry |
| 401 | Unauthorized - Invalid or missing |
| 403 | Forbidden - Insufficient permissions to access this log entry |
| 404 | Not Found - Log entry with specified ID does not exist |
Common Use Cases
Use Case 1: ComplianceMonitor AuditRecent ReportDevice Configuration Changes
Generate a comprehensive audit trail for a specific time period showingTrack all deviceparameter changes made to devices in the last 24 hours to ensure configuration changes. Use the list endpoint with date filters to extract all operations within your audit timeframe, then format the results for compliance reporting.and detect unauthorized modifications.
GET# Get all parameter set operations from yesterday
https://control.zequenze.com/api/v1/inventory_device_log/?datetime__gte=2024-01-0114&datetime__lte=2024-01-31action=sv&is_applied=true&limit=100
Use Case 2: MonitorTroubleshoot PendingFailed ConfigurationDevice ChangesOperations
TrackIdentify and analyze failed operations by filtering for error statuses and pending operations that arehaven't queuedcompleted but not yet deployed to devices. This helps identify potential bottlenecks in your configuration deployment pipeline and ensure changes are applied in a timely manner.successfully.
GET# Find all failed operations with error status
https://control.zequenze.com/api/v1/inventory_device_log/?is_pending=truestatus=500&is_applied=false
Use Case 3: Device-SpecificAudit ChangeDevice HistoryAlert Activity
ReviewMonitor allalert configurationpatterns changesby fortracking aalert specificraised networkand devicecleared whenevents troubleshootingacross devices to identify recurring issues or planning maintenance activities. Filter by device ID and recent timeframe.needs.
GET# Get all alert-related events from the past week
https://control.zequenze.com/api/v1/inventory_device_log/?parent__id=device-123&datetime__gte=2024-01-15T00:00:00Z08&action=ar,ac
Use Case 4: FailedTrack OperationSpecific InvestigationParameter Changes
Identify and investigate configurationMonitor changes that failed to applycritical properly.device Filterparameters forlike applied=falseWiFi operationssettings, andsecurity retrieveconfigurations, detailedor errornetwork information.parameters across your device inventory.
GET# Monitor WiFi SSID changes across all devices
https://control.zequenze.com/api/v1/inventory_device_log/?is_applied=falsevariable_name=Device.WiFi.SSID.1.SSID&is_pending=falseaction=sv
Use Case 5: Variable-SpecificGenerate ChangeDevice TrackingActivity Reports
MonitorCreate changescomprehensive toactivity criticalreports configurationfor variablesspecific acrossdevices allby devices,combining suchdevice asfiltering securitywith policiestime-based orqueries routingfor configurations.audit and compliance purposes.
GET# Get all activity for device ID 156 in January 2024
https://control.zequenze.com/api/v1/inventory_device_log/?variable_name=security_policyparent__id=156&datetime__gte=2024-01-01&datetime__lte=2024-01-31
Response Field Reference
Action Types
Status Codes
Parameter Types
Common parameter types you'll encounter in device logs include string, integer, boolean, datetime, select, and specialized types like password and deviceDash for dashboard configurations.
Best Practices
-
Use Date Filtering
Efficiently-: Alwaysincludeapplydatetimedatetime__gteanddatetime__ltefilterswhen possibleto limitresultresultssetsto relevant time periods and improve queryperformance. Use ISO 8601 format with timezone information for accuracy.performance -
Implement Proper Pagination- Use the cursor-based pagination for large datasets. Set appropriate limit values (recommended: 25-50 for UI displays, 100+ for bulk processing).
Monitor Pending Operations -: Regularly check for operations with is_pending=true to identify stuck deployments or configurationdelayed pipelinedevice issues.
CombineImplement Filters Strategically - Use multiple filter parameters together to create precise queries. For example, combine device ID with date range and action type for focused troubleshooting.
Error Handling: BestCheck Practicesboth -HTTP Alwaysstatus checkcodes and the is_appliedstatusand error_message fields when reviewing operation results. Implement retry logic for transient network issues.
Security Considerations - Log access should be restricted based on user roles. Sensitive configuration values may be maskedfield in log entries dependingto onproperly yourhandle systemoperational configuration.
PerformanceLeverage OptimizationPagination: -Use Cachethe frequentlycursor accessedparameter for efficient pagination through large log datadatasets andrather usethan thehigh limit values
parent__id filtering when troubleshooting specific variable_name filtering
Correlate Actions: Combine action filtering with status codes to identify patterns in successful vs. failed operations