Skip to main content

Inventory Device Name Operation

Update device names in the inventory system.

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

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Endpoints

PUT /inventory_device_name_operation/{name}/

Update the name of a specific device in the inventory system. This endpoint allows you to modify device identification information while maintaining device associations and configuration.

Parameters:

Parameter Type In Required Description
name string path Yes Current name of the device to be updated
data string body Yes JSON string containing the new device name and related information

Example Request:

PUT /api/v1/inventory_device_name_operation/device-001/
Content-Type: application/json
Authorization: Bearer your-api-token

{
  "name": "device-001-updated",
  "display_name": "Updated Device 001",
  "description": "Production device with updated naming convention"
}

Example Response:

{
  "success": true,
  "message": "Device name updated successfully",
  "device": {
    "id": "12345",
    "name": "device-001-updated",
    "display_name": "Updated Device 001",
    "description": "Production device with updated naming convention",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
Status Description
200 Device name updated successfully
400 Invalid request data or malformed JSON
401 Unauthorized - invalid or missing Bearer token
404 Device with specified name not found
409 Conflict - new device name already exists

Best Practices

  • Unique naming: Ensure the new device name is unique within your inventory system
  • Naming conventions: Follow consistent naming patterns for easier device management
  • Validation: The data parameter should contain valid JSON with required fields
  • Error handling: Always check for 409 status codes when updating to names that might already exist
  • Backup references: Update any external references or documentation that use the old device name
  • Atomic operations: Device name updates are atomic - partial updates will not be applied if validation fails