Skip to main content

Inventory Device Operation

Endpoints Summary

Method Path Swagger PUT /inventory_device_operation/{id}/ Swagger ↗

The Inventory Device Operation API enables you to perform remote managementoperations and control ofon devices in your inventoryinventory, throughsuch standardizedas operations.rebooting, factory resetting, or syncing device configurations. This endpoint allows you to trigger critical device operations like reboots, factory resets, configuration synchronization, and device reconfiguration remotely. It'sis essential for maintainingdevice lifecycle management and troubleshooting network devices at scale across your infrastructure.remotely.

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 provides a unifiedcentralized interfaceway forto performingexecute remoteadministrative operations on network devices within your inventory management system.inventory. This API is designedparticularly valuable for systemnetwork administrators and DevOpsIT teams who need to manageperform devicesremote remotelydevice management tasks without physical access.access to the hardware.

Key Capabilities:capabilities include:

  • Remote DeviceRebooting: Control:Restart devices to resolve connectivity issues or apply configuration changes
Factory Reset: ExecuteReturn criticaldevices operationsto liketheir reboots andoriginal factory resetssettings withoutfor physicalredeployment access Device Factory Reset: Perform device-specific factory reset operations Configuration Management:Sync: Synchronize device configurations andwith triggerthe reconfigurationcentral processesmanagement system OperationalDevice Efficiency:Reconfiguration: StreamlineApply devicenew maintenanceconfiguration workflowssettings and reduce manual intervention Standardized Operations: Use consistent operation codes across different device types and models

Common Scenarios:

    Troubleshooting unresponsiveto devices by triggering remote reboots Preparing devices for redeployment through factory resets Ensuring device configurations are up-to-date across your infrastructure Performing bulk operations on multiple devices for maintenance windows

    This API integratesfollows seamlesslyan withupdate-based inventorypattern managementwhere workflows,you specify the operation to perform on a specific device by its ID. Operations are executed asynchronously, allowing you to performtrigger multiple device operations directlywithout onblocking devicesyour identifiedapplication byworkflow.

    their

    Common inventoryscenarios IDs.include Allbulk operationsdevice aremanagement asynchronousduring network maintenance windows, automated remediation of device issues, and providestreamlined statusdevice trackingprovisioning for monitoring completion.workflows.


    Endpoints

    PUT /inventory_device_operation/{id}/

    Description: Executes a specifiedspecific operation on aan inventory device inidentified yourby inventory.its ID. This endpoint allows you to triggerperform various remoteadministrative operationstasks remotely, including reboots,rebooting, factory resets,resetting, configurationsyncing synchronization,configurations, andor devicereconfiguring reconfiguration.devices. The operation is performedtypically executed asynchronously, andmaking theit device'ssuitable operationalfor statusautomation will be updated accordingly.workflows.

    Use Cases:

    • Remotely reboot anReboot unresponsive devicedevices during maintenance windows
    Factory reset devices before redeploying them to restoredifferent connectivitylocations Perform factory reset before reassigning aSync device toconfigurations aafter differentmaking locationchanges in the management system SynchronizeReconfigure devices with updated settings or firmware parameters Automate device configurationremediation afteras updatingpart policiesof ormonitoring settings Trigger device reconfiguration after network or security changesworkflows

    Full URL Example:

    https://control.zequenze.com/api/v1/inventory_device_operation/12345/
    

    Parameters:

    Parameter Type In Required Description
    id integer path Yes The unique identifier of the device in theyour inventory system
    data string body Yes JSON payload containing the operation to perform on the device

    Request Body Schema:

    Field Type Required Description Allowed Values
    operation string Yes OperationThe operation to performperform. onValid thevalues: device 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/12345/" \
        -H "Authorization: Bearer YOUR_API_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
          "operation": "reboot"
        }'
      

      Example Request Body:Examples:

      Reboot Device:

      {
        "operation": "reboot"
      }
      

      Factory Reset:

      {
        "operation": "factory"
      }
      

      Sync Configuration:

      {
        "operation": "sync"
      }
      

      Example Response:

      {
        "id": 12345,
        "operation": "sync",
        "status": "initiated",
        "device_id": 12345,
        "device_name": "Network Switch - Floor 3",
        "device_serial": "NS-2024-001-F3",
        "operation_timestamp": "2024-01-15T14:30:22Z",
        "estimated_completion": "2024-01-15T14:35:22Z",
        "initiated_by": "admin@company.com"reboot"
      }
      

      Operation Types:

      Operation Code Description Reboot reboot Restarts the device, useful for applying configuration changes or resolving connectivity issues Factory Reset factory Resets device to factory defaults, removing all custom configurations Device Factory Reset device_factory Performs a device-specific factory reset operation Device Config Sync sync Synchronizes the device configuration with the central management system Device Reconfigure reconf Applies new configuration settings to the device

      Response Codes:

      Status Description
      200 Success - Operation has been initiated successfully
      400 Bad Request - Invalid operation type or malformed request body
      401 Unauthorized - Invalid or missing authenticationAPI token
      404 Not Found - Device with specified ID does not exist
      409422 ConflictUnprocessable Entity - Device is currentlynot busyin witha anotherstate that allows the requested operation
      500 Internal Server Error - Operation could not be initiated

      Common Use Cases

      Use Case 1: EmergencyScheduled DeviceMaintenance RebootWindow

      WhenDuring aplanned networkmaintenance, deviceyou becomesmight unresponsiveneed butto isreboot stillmultiple reachabledevices viaafter applying configuration updates. Use the management interface, use the reboot operation to restorerestart normaldevices functionalityin withoutsequence, requiringensuring physicaleach access.

      device

      Endpoint:properly PUTapplies /inventory_device_operation/{id}/new withsettings operationand rebootreconnects to the network.

      Use Case 2: Device Preparation for Redeployment

      BeforeWhen moving adevices devicebetween to a new locationlocations or reassigning itthem to a different purpose,network performsegments, ause factory reset to ensure clean deployment and remove any previous configuration data.

      Endpoint: PUT /inventory_device_operation/{id}/ with operationthe factory operation to completely reset devices to their original state, then reconf to apply location-specific configurations.

      Use Case 3: Configuration SynchronizationDrift After Policy UpdatesRemediation

      AfterIf updatingmonitoring securitysystems policiesdetect orconfiguration networkdrift, configurationsuse centrally,the trigger a sync operation across affected devices to ensure all devices reflectmatch thetheir latestintended configuration state.

      state

      Endpoint:as PUTdefined /inventory_device_operation/{id}/in withyour operationmanagement syncsystem.

      Use Case 4: NetworkAutomated Infrastructure MaintenanceTroubleshooting

      DuringIntegrate scheduledwith maintenancemonitoring windows,tools performto bulkautomatically reconfigurationtrigger reboot operations when devices become unresponsive, providing a first-level automated remediation before escalating to updatemanual device settings, apply firmware updates, or modify network parameters across multiple devices.

      Endpoint: PUT /inventory_device_operation/{id}/ with operation reconfintervention.

      Use Case 5: TroubleshootingBulk ConfigurationDevice IssuesProvisioning

      WhenFor alarge device is experiencing configuration-related problems,deployments, use device-specific factory resetdevice_factory followed by reconfigurationreconf operations to restoreprepare propermultiple operation while maintaining device-specific settings.

      Endpoint: PUT /inventory_device_operation/{id}/devices with operationstandardized device_factoryconfigurations efficiently.


      Best Practices

      • Operation Timing:Timing: ScheduleAllow operationssufficient duringtime maintenance windows to minimize service disruption, especially for factory resets and reconfiguration operations
      Status Monitoring: Implement polling mechanisms to monitor operation completion status, as all operations are performed asynchronously Error Handling: Always check for HTTP 409 (Conflict) responses which indicate the device is busy with another operation before retrying Operation Sequencing: When performing multiplebetween operations on the same device, waitespecially forafter eachreboot operation to complete before initiating the next one Backup Considerations: Ensure device configurations are backed up before performingor factory reset operations, asto theseensure actionsthe aredevice irreversiblehas fully initialized Batch Operations:Operations: ForWhen large-scaleperforming operations acrosson multiple devices, implement ratedelays limitingbetween andrequests considerto theavoid impactoverwhelming onyour network infrastructure LoggingError Handling: Always check response codes and Auditing:implement retry logic for temporary failures, especially during network maintenance windows Operation Logging: Maintain detailed logs ofLog all device operations performed, including timestamps and operator information for complianceaudit trails and troubleshooting purposespurposes, including device ID, operation type, and timestamp Validation:Device State Validation: Verify device connectivity and operational statusstate before attemptingperforming critical operations tolike avoidfactory unnecessaryresets failures Rollback Planning: For configuration changes via reconf, maintain backup configurations and have rollback procedures in place