Skip to main content

Inventory Device Log

Endpoints Summary

Method Path Swagger GET /inventory_device_log/ Swagger ↗ GET /inventory_device_log/{id}/ Swagger ↗

The Inventory Device Log API provides comprehensive access to device operation logslogs, settings changes, and settingscommand historyexecution within the Zequenze Control platform.history. These endpoints allow you to retrievetrack detailed logs ofall device actions,interactions, parametermonitor changes,pending commands, events,operations, and alerts with comprehensive filtering capabilities. Use these endpoints to monitor device operations, troubleshoot issues, and trackaudit configuration changes overacross time.your device inventory.

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 provides comprehensive access to device operational logs and settings history. This API is essential for monitoring and auditing device behavior,operations trackingwithin your network infrastructure. These endpoints provide detailed logging capabilities that track every interaction between your management system and devices, including configuration changes, command executions, alerts, and troubleshootingoperational device issues in managed network environments.events.

Key Features:

  • ActionComprehensive TrackingLogging: MonitorTrack all device actionsoperations including set/getsettings operations,changes, commands, events, and alerts
  • Parameter Management: Track parameter value changes and configuration updates
Status Monitoring: ViewMonitor operationalpending status with detailed error codesoperations and messagestheir completion status Time-basedFlexible Filtering: Query logs within specific date/time ranges using ISO format timestamps Device-specific Logs: Filter logs by specificdate devicesranges, ordevice parameterIDs, namesactions, and operational status OperationalAudit StatusTrail: TrackMaintain pendingcomplete operationsaudit trails for compliance and applied configurationstroubleshooting

Common Scenarios:Use Cases:

  • Audit trails forTroubleshooting device configuration issues by reviewing recent changes
Troubleshooting device connectivity and parameter issues Monitoring alertpending conditionsoperations and eventtheir patternssuccess/failure status TrackingGenerating commandcompliance executionreports andshowing completiondevice statusmanagement activities Analyzing device behavior overpatterns timeand periodsalert frequencies Tracking user actions and system-initiated changes

The API uses cursor-based pagination for efficient data retrieval and supports extensivecomprehensive filtering options to help you find specific log entries quickly.


Endpoints

GET /inventory_device_log/

Description: Retrieves a paginated list of device operation logs with comprehensive filtering options.capabilities. This endpoint is your primary toolessential for accessingmonitoring device operationalactivities, history,tracking including parameterconfiguration changes, commands, events, and alerts. Use the various filter parameters to narrow down results to specific devices, time periods, actions, oranalyzing operational states.patterns across your device inventory.

Use Cases:

  • Monitor recent device activityactivities and configuration changes
Track pending operations and their completion status Generate audit reports for specificcompliance time periodsrequirements TrackTroubleshoot pendingdevice operationsissues acrossby multiplereviewing devicesoperation history Analyze alert patterns and device eventsbehavior Troubleshoot parameter configuration issuestrends

Full URL Example:

https://control.zequenze.com/api/v1/inventory_device_log/?parent__id=123&action=sv&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 onwards. SupportsAccepts ISO formats:format: 2024-01-01, 2024-01-01 10:30:00, or 2024-01-01T10:30:00+00:00
datetime__lte string query No Filter logs up to this date/time. SupportsAccepts ISO formats:format: 2024-01-0131, 2024-01-0131 23:59:59, or 2024-01-01T23:31T23:59:59+00:00
parent__id string query No Filter logs byfor a specific device ID. Useby device identifier to get logs for a particular deviceID
action string query No Filter by action type: sv (Set), 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 status. true for operations awaitingthat execution,are falsestill forpending completed operationsexecution
is_applied boolean query No Filter byfor appliedoperations status.that truehave forbeen successfully applied operations, false for operations not yet applied
cursor string query No Pagination cursor for retrieving next/previous page results limit integer query No Number of results per page (default varies, typically 20-100) variable_name string query No Filter by specific parameter or variable name as expectedbycursor devicestring agentquery No Pagination cursor for retrieving next/previous pages limit integer query No Number of results per page (default: 100, max: 1000)

cURL Example:

curl -X GET "https://control.zequenze.com/api/v1/inventory_device_log/?parent__id=123&action=sv&datetime__gte=2024-01-01&action=sv&limit=20"50" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response:

{
  "next": "https://control.zequenze.com/api/v1/inventory_device_log/?cursor=eyJjcmVhdGVkIjoiMjAyNC0wMS0xNVQxMDozMDowMFoifQ%3D%cD0yMDI0LTA0LTI0KzAwJTNBMDA%3D",
  "previous": null,
  "results": [
    {
      "id": 1247,1001,
      "created": "2024-01-15T10:15T14:30:00Z",
      "last_change": "2024-01-15T10:15T14:30:15Z",
      "user": 42,5,
      "parent": 156,123,
      "type": "string",
      "action": "sv",
      "command": "Reconf",
      "name": "WiFi Configuration Update",
      "variable_name": "Device.WiFi.SSID.1.SSID",
      "value": "Corporate_Network_5G"CorporateNetwork_2024",
      "is_pending": false,
      "is_applied": true,
      "status": 200,
      "message": "ParameterConfiguration updatedapplied successfully"
    },
    {
      "id": 1246,1002,
      "created": "2024-01-15T09:15:15T14:25:00Z",
      "last_change": "2024-01-15T09:15:15T14:25:30Z",
      "user": 38,3,
      "parent": 156,124,
      "type": "boolean",
      "action": "sv"cm",
      "command": null,"Reboot",
      "name": "EnableScheduled Auto-Update"Device Reboot",
      "variable_name": null,
      "value": null,
      "is_pending": true,
      "is_applied": false,
      "status": 100,
      "message": "Reboot command sent to device"
    },
    {
      "id": 1003,
      "created": "2024-01-15T14:20:00Z",
      "last_change": "2024-01-15T14:20:05Z",
      "user": null,
      "parent": 125,
      "type": null,
      "action": "ar",
      "command": "Parameter Threshold",
      "name": "High CPU Usage Alert",
      "variable_name": "Device.ManagementServer.AutoUpdate.Enabled"DeviceInfo.ProcessStatus.Process.1.CPUUsage",
      "value": "true"89.5",
      "is_pending": false,
      "is_applied": true,
      "status": 200,
      "message": "Auto-updateCPU enabledusage successfully"exceeded },threshold {of 80%"id": 1245,
      "created": "2024-01-15T08:45:00Z",
      "last_change": "2024-01-15T08:45:00Z",
      "user": null,
      "parent": 203,
      "type": null,
      "action": "ev",
      "command": "Boot",
      "name": "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 list of device logs
with filteringapplied401 Unauthorized - Invalid or missing authentication token 403 Forbidden - Insufficient permissions to access device logs 400 Bad Request - Invalid filter parameters or date format 401 Unauthorized - Invalid or missing Bearer token 403 Forbidden - Insufficient permissions to access device logs

GET /inventory_device_log/{id}/

Description: Retrieves detailed information forabout a specific device log entry by its unique identifier.entry. This endpoint provides complete details about a single device operation, including parameter changes, command execution results,status, timestamps, and operationalany status.error Use this when you need comprehensive information about a specific log entry identified from the list endpoint.messages.

Use Cases:

  • Get completedetailed detailsinformation about a specific device operation
  • Investigate failed operations and error messages
Track the fullcomplete contextlifecycle of a failed configuration change RetrieveReview detailedspecific erroralert messagesdetails and resolution status information Audit specific parameter changes with full metadata

Full URL Example:

https://control.zequenze.com/api/v1/inventory_device_log/1247/1001/

Parameters:

Parameter Type In Required Description
id integer path Yes Unique identifier of the device log entry to retrieve
datetime__gte string query No Additional filter forby datetimedate range (typicallyrarely not neededused for single record retrieval)
datetime__lte string query No Additional filter forby datetimedate range (typicallyrarely not neededused for single record retrieval)
parent__id string query No Additional filter by device ID (typically not needed for single record retrieval)
variable_name string query No Additional filter by variable name (typically not needed for single record retrieval)
action string query No Additional filter by action type (typically not needed for single record retrieval)
is_pending boolean query No Additional filter by pending status (typically not needed for single record retrieval)
is_applied boolean query No Additional filter by applied status (typically not needed for single record retrieval)

cURL Example:

curl -X GET "https://control.zequenze.com/api/v1/inventory_device_log/1247/1001/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response:

{
  "id": 1247,1001,
  "created": "2024-01-15T10:15T14:30:00Z",
  "last_change": "2024-01-15T10:15T14:30:15Z",
  "user": 42,5,
  "parent": 156,123,
  "type": "string",
  "action": "sv",
  "command": "Reconf",
  "name": "WiFi Configuration Update",
  "variable_name": "Device.WiFi.SSID.1.SSID",
  "value": "Corporate_Network_5G"CorporateNetwork_2024",
  "is_pending": false,
  "is_applied": true,
  "status": 200,
  "message": "ParameterConfiguration updatedapplied successfully"
}

Response Codes:

Status Description
200 Success - Returns detailed information for the specifiedrequested device log entry
401 Unauthorized - Invalid or missing Bearerauthentication token
403 Forbidden - Insufficient permissions to access this log entry
404 Not Found - Log entry with specified ID does not exist

Data Models

Device Log Entry Fields

Field Type Description id integer Unique identifier for the log entry (read-only) created datetime Timestamp when the log entry was created last_change datetime Timestamp of the last status update (read-only) user integer ID of the user who initiated the action (null for system-initiated) parent integer ID of the device this log entry belongs to type string Data type of the parameter being modified action string Type of action performed (see Action Codes below) command string Specific command or event type (see Command Types below) name string Human-readable description of the operation variable_name string Technical parameter name as expected by the device value string Parameter value or command data is_pending boolean Whether the operation is awaiting execution is_applied boolean Whether the operation has been successfully applied status integer Operational status code (see Status Codes below) message string Detailed message from the device or system

Action Codes

Code Description Usage sv Set Value Setting a parameter value uv Unset Value Removing or clearing a parameter gv Get Value Retrieving a parameter value sa Set Attribute Modifying parameter attributes cr Create Creating new objects or instances de Delete Deleting objects or instances cm Command Executing device commands ev Event System or device events er Error Error conditions ar Alert Raised Alert notifications ac Alert Cleared Alert resolution

Status Codes

Code Description 0 Pending - Operation queued for execution 100 Sent - Command sent to device 200 OK - Operation completed successfully 400 Invalid Parameter - Parameter name or format invalid 401 Authentication Error - Device authentication failed 403 Forbidden - Operation not permitted 404 Invalid Request - Request format invalid 406 Invalid Value - Parameter value invalid 500 Error - General operation error 504 Timeout - Operation timed out

Common Use Cases

Use Case 1: Monitor Recent Device Configuration ChangesActivities

Track all parameterrecent changesoperations madeacross devices to devicesmaintain inoperational awareness.

# Get logs from the last 24 hours
tocurl ensure-X configurationGET compliance and detect unauthorized modifications.
# Get all parameter set operations from yesterday
"https://control.zequenze.com/api/v1/inventory_device_log/?datetime__gte=2024-01-1415T00:00:00Z&action=sv&is_applied=truelimit=100" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Use Case 2: Troubleshoot Failed Device Operations

Identify and analyze failed operations by filtering for error statuses and pendinginvestigate operations that haven'tfailed completedor successfully.are stuck in pending status.

# Find all failed operations with error (status >= 400)
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_log/?status=500&is_applied=false&datetime__gte=2024-01-15" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Use Case 3: Audit Device Alert Activity

Monitor alert patterns by tracking alert raised and cleared events across devices to identify recurring issues or maintenance needs.

# Get all alert-related events from the past week
https://control.zequenze.com/api/v1/inventory_device_log/?datetime__gte=2024-01-08&action=ar,ac

Use Case 4: Track Specific ParameterConfiguration Changes

MonitorGenerate reports of all configuration changes to critical device parameters like WiFi settings, security configurations, or network parameters across your device inventory.

# Monitor WiFi SSID changes across all devices
https://control.zequenze.com/api/v1/inventory_device_log/?variable_name=Device.WiFi.SSID.1.SSID&action=sv

Use Case 5: Generate Device Activity Reports

Create comprehensive activity reports for specific devices by combining device filtering with time-based queries for audit and compliance purposes.

# Get all activityconfiguration changes (set/unset actions)
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_log/?action=sv&datetime__gte=2024-01-01&datetime__lte=2024-01-31" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Use Case 4: Monitor Device Alerts

Track alert patterns and frequencies across your device fleet.

# Get all raised alerts in the last week
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_log/?action=ar&datetime__gte=2024-01-08" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Use Case 5: Track Specific Device History

Review complete operational history for a specific device.

# Get all logs for device ID 156123
incurl January-X 2024GET "https://control.zequenze.com/api/v1/inventory_device_log/?parent__id=156123&datetime__gte=2024-01-01&datetime__lte=2024-01-31limit=500" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response Field Reference

Action Types

    sv - Set: Parameter value assignment operations uv - Unset: Parameter value removal operations gv - Get: Parameter value retrieval operations sa - Set attribute: Parameter attribute modifications cr - Create: Object or instance creation de - Delete: Object or instance deletion cm - Command: Device command execution ev - Event: System or device events er - Error: Error conditions and failures ar - Alert raised: Alert condition triggered ac - Alert cleared: Alert condition resolved

    Status Codes

      0 - Pending: Operation queued for execution 100 - Sent: Operation transmitted to device 200 - Ok: Operation completed successfully 400 - Invalid parameter: Parameter name or format error 401 - Authentication error: Device authentication failed 403 - Forbidden: Operation not permitted 404 - Invalid request: Malformed request or unknown operation 406 - Invalid value: Parameter value validation failed 500 - Error: General operational error 504 - Timeout: Operation exceeded time limit

      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

      Efficient Filtering:

      • Use Date Filtering: Always applyuse date ranges (datetime__gte and datetime__lte) when possible to limit result sets
      Filter by specific devices (parent__id) when investigating device-specific issues Use action filters to focus on specific types of operations

      Pagination Management:

        Set appropriate limit values based on your use case (default: 100, max: 1000) Use cursor-based pagination for consistent results when data is being updated Store pagination cursors temporarily if you need to relevantnavigate back and forth

        Performance Optimization:

          Filter logs at the API level rather than retrieving all data and filtering locally Use specific time periodsranges andrather improvethan queryopen-ended performancequeries Combine Monitormultiple Pendingfilter Operations: Regularly check for operations with is_pending=trueparameters to identifyreduce stuckresult or delayed device communicationssets

          Implement Error HandlingHandling::

          Check
          bothAlways HTTP status codes andcheck the status field in log entries to properly handle operational failures Leverage Pagination: Use the cursor parameter for efficient pagination through large log datasets rather than high limit values Filter by Device: Use parent__id filtering when troubleshooting specific device issues to reduce noise from other devices Track Critical Parameters: Monitor sensitive parameters like security settings and network configurations using variable_name filtering Correlate Actions: Combine action filtering with status codes to identify patterns in successful vs. failed operations Review message fields for detailed error information Monitor is_pending and is_applied flags for operation status

          Security Considerations:

            Device logs may contain sensitive configuration data - handle accordingly Implement appropriate access controls based on user permissions Consider data retention policies for historical log data Be cautious when exposing device parameter names and values in client applications

            Monitoring and Alerting:

              Set up monitoring for high error rates in device operations Track trends in pending operations that may indicate connectivity issues Monitor alert frequencies to identify problematic devices Use log patterns to detect unusual device behavior or potential security issues