Skip to main content

Inventory Device Operation

The Inventory Device Operation API providesenables endpointsremote for managing operational changesmanagement and updatescontrol toof devices withinin your inventory system.through Thesestandardized endpointsoperations. handleThis endpoint allows you to trigger critical device stateoperations modifications,like reboots, factory resets, configuration updates,synchronization, and operationaldevice statusreconfiguration changes,remotely. enablingIt's real-timeessential managementfor ofmaintaining and troubleshooting devices at scale across your device infrastructure.

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:

  • Updating Remote Device Control: Execute critical operations like reboots and factory resets without physical access
Configuration Management: Synchronize device operationalconfigurations statusand (active,trigger maintenance,reconfiguration decommissioned)processes Modifying deviceOperational configurationEfficiency: parameters Changing device assignments to different locations or users Updating device metadata and operational properties ManagingStreamline device maintenance schedulesworkflows and operationalreduce notesmanual intervention Standardized Operations: Use consistent operation codes across different device types and models

Common Scenarios:

    Troubleshooting unresponsive 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 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:

      Device Operations: Structured updates that modify device state or configuration Operational Status: Current state of device availability and functionality Device Assignments: Location, user, or organizational unit associations Configuration Updates: Changes to device-specific operational parameters

      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
      Perform factory reset before reassigning a device from "active" to "maintenance"a statusdifferent during scheduled downtimelocation Changing device location assignments when equipment is moved ModifyingSynchronize device configuration parametersafter updating policies or settings Trigger device reconfiguration after firmwarenetwork updatesor Recordingsecurity operational notes and maintenance information Updating device user assignments and access permissionschanges

      Full URL Example:

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

      Parameters:

      Parameter Type In Required Description
      id integer path Yes UniqueThe unique identifier of the device toin updatethe inventory system
      data string body Yes JSON payload containing the operational updatesoperation to applyperform toon the device

      Request Body Schema:

      Field Type Required Description Allowed Values operation string Yes Operation to perform on the 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/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 - DeviceOperation operationhas updatedbeen initiated successfully
        400 Bad Request - Invalid dataoperation formattype or missingmalformed required fieldsrequest
        401 Unauthorized - Invalid or missing APIauthentication token
        404 Not Found - Device with specified ID does not exist
        403409 ForbiddenConflict - InsufficientDevice permissionsis tocurrently modifybusy thiswith deviceanother operation
        422500 UnprocessableInternal EntityServer Error - ValidationOperation errorscould innot thebe request datainitiated

        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.

        maintenance

        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.

        (such

        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.

        record

        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.

        audit

        Endpoint: trailPUT of/inventory_device_operation/{id}/ devicewith operationaloperation history.device_factory


        Best Practices

        • ValidateOperation dataTiming: Schedule operations during 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 submissionretrying Operation Sequencing:: When performing multiple operations on the same device, wait for each operation to complete before initiating the next one Backup Considerations: Ensure alldevice required fieldsconfigurations are includedbacked up before performing factory reset operations, as these actions are irreversible Batch Operations: For large-scale operations across multiple devices, implement rate limiting and data types matchconsider the expectedimpact formaton network infrastructure Logging and Auditing: Maintain detailed logs of all operations performed, including timestamps and operator information for compliance and troubleshooting purposes Validation: Verify device connectivity and operational status before attempting operations to avoid validationunnecessary errors.

        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.

        failures