Skip to main content

Inventory Device Serial Headless Operation

Manage headless operations for inventory device serial numbers, including scheduled transactions and device status updates.

Base URL: https://control.zequenze.com/api/v1

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Endpoints

GET /inventory_device_serial_headless_operation/

Retrieve scheduled headless operations for inventory device serial numbers. Optionally update device status before returning information.

Parameters:

Parameter Type In Required Description
id string query No ID of the scheduled transaction
update_status boolean query No Use configured helpers to update device status before returning the information

Example Request:

GET /api/v1/inventory_device_serial_headless_operation/?id=txn_12345&update_status=true

Example Response:

{
  "count": 1,
  "results": [
    {
      "id": "txn_12345",
      "device_serial": "SN123456789",
      "operation_type": "firmware_update",
      "status": "scheduled",
      "scheduled_time": "2024-01-15T10:30:00Z",
      "created_at": "2024-01-14T14:22:00Z",
      "device_status": {
        "online": true,
        "last_seen": "2024-01-15T09:45:00Z",
        "firmware_version": "1.2.3"
      }
    }
  ]
}
Status Description
200 Successfully retrieved headless operations
401 Unauthorized
404 Transaction not found

POST /inventory_device_serial_headless_operation/

Create a new headless operation for an inventory device serial number.

Parameters:

Parameter Type In Required Description
data string body Yes JSON string containing the operation details

Example Request:

POST /api/v1/inventory_device_serial_headless_operation/
Content-Type: application/json

{
  "device_serial": "SN123456789",
  "operation_type": "configuration_update",
  "scheduled_time": "2024-01-16T02:00:00Z",
  "parameters": {
    "config_profile": "production_v2",
    "restart_required": true
  }
}

Example Response:

{
  "id": "txn_67890",
  "device_serial": "SN123456789",
  "operation_type": "configuration_update",
  "status": "scheduled",
  "scheduled_time": "2024-01-16T02:00:00Z",
  "created_at": "2024-01-15T11:30:00Z",
  "parameters": {
    "config_profile": "production_v2",
    "restart_required": true
  }
}
Status Description
201 Headless operation successfully created
400 Invalid request data
401 Unauthorized
404 Device serial number not found

Best Practices

  • Use the update_status parameter sparingly as it may increase response time due to real-time device queries
  • Schedule operations during maintenance windows when possible to minimize service disruption
  • Always verify device serial numbers exist in inventory before creating operations
  • Monitor operation status regularly using the GET endpoint with specific transaction IDs
  • Include all required parameters in the data payload when creating operations
  • Consider device timezone and connectivity patterns when scheduling operations