Inventory Device Name Headless Operation
The Inventory Device Name Headless Operation
API providesendpointsforenablemanagingautomated management and monitoringautomatedofdevicenetworkoperationsdevicesthatthroughrunprogrammaticwithout direct user interface interaction.operations. These endpoints allow you toretrieve information about scheduledperform device operations like getting parameters, setting configurations, adding objects, andcreatedeletingnewobjectsheadlesswithoutoperationsmanual intervention, making them ideal forinventorybulk device management and automated workflows.
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 Headless Operation API iscategory provides functionality for executing automated operations on network devices in your inventory. These endpoints are designed for automatedscenarios where you need to perform bulk operations across multiple devices or integrate device management scenariosinto whereautomated operations need to run independently without user intervention. This API category is particularly useful for:
These endpoints work together to provide complete lifecycle management of headless operations - from creation and scheduling to monitoring and status updates. The API supports both real-time status updates and background processing, making it ideal for enterprise-scale device management scenarios.workflows.
Key concepts to understand:Concepts:
-
Headless Operations: Automated
tasksdevice operations that run without userinterfaceinteraction -
ScheduledDeviceTransactionsVariables:Time-basedTR-069/CWMPoperationsparameters thatexecutecanaccordingbetoretrieved,predefinedmodified,schedules
get: Retrieve parameter values from set: Update parameter values on devices
add.obj: Create new object instances on devices
del.obj: Remove object instances from devices
Common Use Cases:
The API supports complex variable operations with type validation and provides real-time status updates to completionhelp andmonitor monitoringoperation progress.
Endpoints
GET /inventory_device_name_headless_operation/
Description: Retrieves a list of scheduled or completed headless operations for inventorydevices devices.in your inventory. This endpoint allows you to monitor the status of automated operations, filter by specific transaction IDs, and optionally triggerupdate real-timedevice status updates using configured helpersinformation before returning the data.results.
Use Cases:
- Monitor the progress
andof bulk device operations
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_name_headless_operation/?id=txn_1234512345&update_status=true
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | string | query | No | ID of the scheduled transaction to filter |
| update_status | boolean | query | No |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_name_headless_operation/?update_status=true" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
[
{
"count": 15,
"next"name": "https://control.zequenze.com/api/v1/inventory_device_name_headless_operation/?limit=10&offset=10"router-branch-01",
"previous"operation": null,"get",
"results"variables": [
{
"id"variable_name": "txn_12345",
"device_name": "WS-001-LAB-PC",
"operation_type": "inventory_sync",
"status": "running",
"scheduled_at": "2024-01-15T10:30:00Z",
"started_at": "2024-01-15T10:30:15Z",
"progress": 75,
"device_details": {
"serial_number": "SN123456789",
"model": "OptiPlex 7090",
"manufacturer": "Dell",
"location": "Building A, Floor 2",
"last_seen": "2024-01-15T10:45:30Z"
},
"operation_details": {
"total_tasks": 8,
"completed_tasks": 6,
"current_task": "updating_software_inventory"
}Device.ManagementServer.PeriodicInformInterval"
},
{
"id"variable_name": "txn_12346",
"device_name": "SRV-002-DB-01",
"operation_type": "health_check",
"status": "completed",
"scheduled_at": "2024-01-15T09:00:00Z",
"started_at": "2024-01-15T09:00:05Z",
"completed_at": "2024-01-15T09:15:22Z",
"progress": 100,
"device_details": {
"serial_number": "SN987654321",
"model": "PowerEdge R740",
"manufacturer": "Dell",
"location": "Data Center Rack 15",
"last_seen": "2024-01-15T09:15:22Z"
},
"result": {
"status": "healthy",
"checks_passed": 12,
"checks_failed": 0,
"warnings": 1
}Device.WiFi.SSID.1.Stats.BytesReceived"
}
]
},
{
"name": "switch-floor-02",
"operation": "set",
"variables": [
{
"variable_name": "Device.ManagementServer.PeriodicInformInterval",
"value": "300",
"value_type": "integer"
},
{
"variable_name": "Device.ManagementServer.PeriodicInformEnable",
"value": "1",
"value_type": "boolean"
}
]
}
]
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns list of headless operations |
| 401 | Unauthorized - Invalid or missing |
POST /inventory_device_name_headless_operation/
Description: Creates a new headless operation for inventoryone deviceor management.more devices in your inventory. This endpoint allows you to schedule automated tasksoperations such as inventoryparameter synchronization,retrieval, configuration updates, object creation, or object deletion across your device health checks, or batch updates that will run without user intervention. The operation data should be provided in the request body.fleet.
Use Cases:
- Execute bulk configuration changes across multiple devices
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_name_headless_operation/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| data | string | body | Yes | JSON |
Request Body Schema:
{
"name": "string (required)",
"operation": "string (required, one of: get, set, add.obj, del.obj)",
"variables": [
{
"variable_name": "string (required)",
"value": "string (optional, required for 'set' operations)",
"value_type": "string (optional, one of: string, integer, boolean)"
}
]
}
cURL Example:Example - Get Operation:
curl -X POST "https://control.zequenze.com/api/v1/inventory_device_name_headless_operation/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operation_type"name": "inventory_sync"router-main-office",
"device_targets"operation": "get",
"variables": ["WS-001-LAB-PC", "WS-002-LAB-PC"],
"schedule":
{
"type"variable_name": "immediate"Device.ManagementServer.PeriodicInformInterval"
},
"parameters": {
"sync_software": true,
"sync_hardware": true,
"update_location": false,
"timeout_minutes": 30
},
"notification": {
"on_completion": true,
"on_failure": true,
"email"variable_name": "admin@company.com"Device.WiFi.SSID.1.Stats.BytesReceived"
}
]
}'
cURL Example Request- Body:Set Operation:
{curl "operation_type":-X "health_check",
"device_targets": ["SRV-001-DB-01", "SRV-002-DB-01"],
"schedule": {
"type": "recurring",
"cron": "0 2 * * 1",
"timezone": "UTC"
},
"parameters": {
"check_disk_space": true,
"check_memory_usage": true,
"check_network_connectivity": true,
"check_running_services": true,
"disk_threshold_percent": 85,
"memory_threshold_percent": 90,
"timeout_minutes": 15
},
"notification": {
"on_completion": false,
"on_failure": true,
"webhook_url":POST "https://monitoring.company.control.zequenze.com/webhook/device-alerts"api/v1/inventory_device_name_headless_operation/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "router-branch-network",
"operation": "set",
"variables": [
{
"variable_name": "Device.ManagementServer.PeriodicInformInterval",
"value": "300",
"value_type": "integer"
},
"retry_policy": {
"max_attempts"variable_name": 3,"Device.ManagementServer.PeriodicInformEnable",
"retry_delay_minutes"value": 5"true",
"value_type": "boolean"
}
]
}'
Example Response:
{
"id"name": "txn_12347"router-main-office",
"operation": "get",
"variables": [
{
"variable_name": "Device.ManagementServer.PeriodicInformInterval"
},
{
"variable_name": "Device.WiFi.SSID.1.Stats.BytesReceived"
}
],
"transaction_id": "op_67890",
"status": "scheduled",
"operation_type": "health_check",
"device_targets": ["SRV-001-DB-01", "SRV-002-DB-01"],
"created_at": "2024-01-15T11:20:15T14:30:00Z",
"scheduled_for": "2024-01-22T02:00:00Z",
"estimated_duration_minutes": 30,
"parameters": {
"check_disk_space": true,
"check_memory_usage": true,
"check_network_connectivity": true,
"check_running_services": true,
"disk_threshold_percent": 85,
"memory_threshold_percent": 90,
"timeout_minutes": 15
},
"schedule": {
"type": "recurring",
"cron": "0 2 * * 1",
"timezone": "UTC",
"next_execution": "2024-01-22T02:00:00Z"
},
"monitoring_url": "https://control.zequenze.com/api/v1/inventory_device_name_headless_operation/?id=txn_12347"
}
Response Codes:
| Status | Description |
|---|---|
| 201 | Created - |
| 400 | Bad Request - Invalid operation |
| 401 | Unauthorized - Invalid or missing |
Common Use Cases
Use Case 1: AutomatedBulk NightlyWiFi InventoryConfiguration SyncUpdate
Schedule recurringset operations toacross synchronizemultiple deviceaccess inventory information every night, ensuring accurate asset tracking and compliance reporting. Use POSTpoints to createupdate theWiFi recurringsettings operationlike andchannel, GETpower, toor monitorsecurity dailyconfigurations executionduring status.maintenance windows.
Use Case 2: Real-timeNetwork OperationHealth Monitoring Dashboard
BuildUse get operations to collect statistics and performance metrics from devices on a dashboardscheduled thatbasis pollsfor thenetwork GET endpoint with update_status=true to display real-time progress of running operations, allowing IT teams to monitor automation workflowsmonitoring and quicklyreporting identify issues.dashboards.
Use Case 3: MaintenanceService Window AutomationProvisioning
CreateImplement batchadd.obj operations during scheduled maintenance windows to updatecreate devicenew configurations,service installinstances software,(like VLANs, SSIDs, or performport healthconfigurations) checkswhen acrossonboarding multiplenew devicescustomers simultaneouslyor without manual intervention.locations.
Use Case 4: Automated Compliance and Audit ReportingChecking
SetRegularly upexecute weekly headlessget operations to collectverify device configurations meet compliance data, security status,requirements and configuration drift information, automatically generating reports forgenerate audit and governance purposes.reports.
Use Case 5: ProactiveCleanup Deviceand Health MonitoringMaintenance
ImplementUse continuous monitoring by creating recurring health checkdel.obj operations thatto automaticallyremove detectunused deviceconfigurations, issues,expired performance degradation,certificates, or connectivitydecommissioned problemsservice beforeinstances theyduring impactroutine business operations.maintenance.
Best Practices
Operation SchedulingPlanning:: Use appropriate scheduling strategies - immediate execution for urgent tasks, recurring schedules for routine maintenance, and maintenance windows for resource-intensive operations.
Errorthe Handling:update_status=true Alwaysparameter implementwhen retryyou logicneed andcurrent monitordevice information
Variable Management:
value_type for set operations to Error Handling:
Security Considerations:
Performance OptimizationOptimization::
update_statusSecurityrate Considerations: Ensure API tokens have appropriate scope limitations. Store operation configurations securely and avoid exposing sensitive device credentialslimiting in operationyour parameters.
Resource Management: Set appropriate timeout values for operations and limit concurrent executions to prevent overwhelming target devices. Monitor system resources during bulk operations.
Notification Strategy: Configure notifications for operation failures but consider using webhooks instead of email for high-frequency operationsscripts to avoid spamoverwhelming and improve integration with monitoring systems.