Inventory Device Operation
The Inventory Device Operation API
providesenablesendpointsremotefor managing operational changesmanagement andupdatescontroltoof deviceswithinin your inventorysystem.throughThesestandardizedendpointsoperations.handleThis endpoint allows you to trigger critical devicestateoperationsmodifications,like reboots, factory resets, configurationupdates,synchronization, andoperationaldevicestatusreconfigurationchanges,remotely.enablingIt'sreal-timeessentialmanagementforofmaintaining and troubleshooting devices at scale across yourdeviceinfrastructure.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Inventory Device Operation API categoryprovides a unified interface for performing remote operations on devices within your inventory management system. This API is designed for managingsystem operationaladministrators aspectsand ofDevOps teams who need to manage devices inremotely yourwithout inventoryphysical system. This API enables you to update device configurations, modify operational states, change device assignments, and manage device lifecycle events.access.
CommonKey use cases include:Capabilities:
UpdatingRemote Device Control: Execute critical operations like reboots and factory resets without physical access
Common Scenarios:
This API worksintegrates in conjunctionseamlessly with the broader inventory management system,workflows, allowing you to maintainperform real-timeoperations operationaldirectly visibilityon devices identified by their inventory IDs. All operations are asynchronous and controlprovide overstatus yourtracking device infrastructure. Operations performed through these endpoints typically trigger audit logs and may affect devicefor monitoring and alerting systems.completion.
Key concepts:
Endpoints
PUT /inventory_device_operation/{id}/
Description: Updates operational parameters and status forExecutes a specificspecified operation on a device in theyour inventory. This endpoint allows you to modifytrigger various remote operations including reboots, factory resets, configuration synchronization, and device configurations,reconfiguration. changeThe operation is performed asynchronously, and the device's operational status,status updatewill assignments,be andupdated manage device lifecycle states. Use this endpoint when you need to reflect real-world changes to device operations, maintenance status, or configuration parameters.accordingly.
Use Cases:
UpdatingRemotely reboot an unresponsive device to restore connectivity
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_operation/123/12345/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | integer | path | Yes | |
| data | string | body | Yes | JSON payload containing the |
Request Body Schema:
reboot, factory, device_factory, sync, reconf
Operation Types:
reboot - Performs a standard device reboot
factory - Executes a factory reset operation
device_factory - Performs a device-specific factory reset
sync - Synchronizes device configuration with current policies
reconf - Triggers a complete device reconfiguration
cURL Example:
curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_operation/123/12345/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operational_status"operation": "maintenance",reboot"
}'
Example Request Body:
{
"location"operation": "Building A - Floor 2",
"assigned_user": "john.doe@company.com",
"maintenance_notes": "Scheduled firmware update completed",
"configuration": {
"network_profile": "production",
"monitoring_enabled": true,
"alert_level": "standard"sync"
},
"next_maintenance": "2024-04-15T09:00:00Z"
}'
Example Response:
{
"id": 123,12345,
"operation": "sync",
"status": "initiated",
"device_id": 12345,
"device_name": "Network Switch - NS-001"Floor 3",
"serial_number"device_serial": "NS001-ABC123"NS-2024-001-F3",
"device_type": "network_switch",
"operational_status": "maintenance",
"location": "Building A - Floor 2",
"assigned_user": "john.doe@company.com",
"organization": "IT Infrastructure",
"configuration": {
"network_profile": "production",
"monitoring_enabled": true,
"alert_level": "standard",
"firmware_version": "2.1.4"
},
"maintenance_notes": "Scheduled firmware update completed",
"next_maintenance": "2024-04-15T09:00:00Z",
"last_updated"operation_timestamp": "2024-01-15T14:30:00Z"22Z",
"updated_by": "admin@company.com",
"operational_history": [
{
"timestamp"estimated_completion": "2024-01-15T14:30:00Z"35:22Z",
"action": "status_change",
"from_status": "active",
"to_status": "maintenance",
"performed_by"initiated_by": "admin@company.com"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - |
| 400 | Bad Request - Invalid |
| 401 | Unauthorized - Invalid or missing |
| 404 | Not Found - Device with specified ID does not exist |
Common Use Cases
Use Case 1: Emergency Device Maintenance WorkflowReboot
When takinga anetwork device offlinebecomes forunresponsive maintenance,but is still reachable via the management interface, use the PUTreboot endpointoperation to updaterestore thenormal operationalfunctionality statuswithout torequiring "maintenance",physical addaccess.
Endpoint: notes,PUT and/inventory_device_operation/{id}/schedulewith theoperation next maintenance window. This ensures proper tracking of device availability and maintenance history.reboot
Use Case 2: Device RelocationPreparation for Redeployment
WhenBefore moving devicesa device to a new locations, update the location fieldor reassigning it to a different purpose, perform a factory reset to ensure clean deployment and remove any associatedprevious configuration changesdata.
Endpoint: asPUT network/inventory_device_operation/{id}/profileswith oroperation monitoring settings) that may be required for the new environment.factory
Use Case 3: UserConfiguration AssignmentSynchronization ChangesAfter Policy Updates
WhenAfter employeesupdating changesecurity rolespolicies or leavenetwork theconfigurations organization,centrally, usetrigger thisa endpointsync tooperation reassignacross affected devices to newensure users,all updatedevices accessreflect permissions,the and modify any user-specificlatest configuration parameters.state.
Endpoint: PUT /inventory_device_operation/{id}/ with operation sync
Use Case 4: ConfigurationNetwork ManagementInfrastructure Maintenance
AfterDuring scheduled maintenance windows, perform bulk reconfiguration operations to update device settings, apply firmware updatesupdates, or configurationmodify changes,network useparameters thisacross endpointmultiple todevices.
Endpoint: thePUT new/inventory_device_operation/{id}/configurationwith state,operation update version information, and document any operational changes that result from the updates.reconf
Use Case 5: DeviceTroubleshooting LifecycleConfiguration ManagementIssues
TrackWhen devicesa throughdevice theiris operationalexperiencing lifecycleconfiguration-related problems, use device-specific factory reset followed by updating status from "active"reconfiguration to "maintenance"restore toproper "decommissioned",operation while maintaining adevice-specific completesettings.
Endpoint: trailPUT of/inventory_device_operation/{id}/devicewith operationaloperation history.device_factory
Best Practices
-
ValidateOperationdataTiming: Schedule operations during maintenance windows to minimize service disruption, especially for factory resets and reconfiguration operations
Use meaningful operational notes: Include detailed descriptions of changes, reasons for updates, and any relevant context that will help with future maintenance and troubleshooting.
Implement proper error handling: Always check response status codes and handle different error scenarios appropriately, especially for 404 (device not found) and 403 (permission denied) responses.
Track operational history: The API maintains an operational history for audit purposes. Use this information to understand device lifecycle patterns and maintenance trends.
Coordinate with monitoring systems: Status changes may affect monitoring and alerting systems. Ensure your operational procedures account for these dependencies.
Security considerations: Only update devices that your API token has permissions to modify. Device operations may trigger security audits, so ensure all changes are properly authorized and documented.
Batch operations: For multiple device updates, consider implementing retry logic and rate limiting to avoid overwhelming the API while maintaining data consistency.