Inventory Device Name Operation
UpdateThe inventory devicenamesnameinoperation endpoint allows you to update device information by referencing theinventorydevice'ssystem.name. This is particularly useful for batch operations or when you need to modify device data without knowing the specific device ID.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Inventory Device Name Operation API provides functionality to update device records in your inventory management system using the device name as the identifier. This approach is especially valuable in scenarios where device names are unique and well-known identifiers within your organization, eliminating the need to first retrieve device IDs.
This endpoint is commonly used for:
The API follows RESTful principles and accepts JSON-formatted data for device updates. All operations require proper authentication and return detailed response information to help with error handling and confirmation of successful updates.
Endpoints
PUT /inventory_device_name_operation/{name}/
UpdateDescription: theUpdates namean of a specificexisting device record in the inventory system.system using the device name as the identifier. This endpoint allows you to modify device identificationattributes such as status, location, configuration, or metadata without needing to know the device's internal ID.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_name_operation/server-web-01/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| name | string | path | Yes | |
| data | string | body | Yes | JSON string containing the |
ExamplecURL Request:Example:
curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_name_operation/device-001/server-web-01/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/jsonjson" Authorization:\
Bearer-d your-api-token'{
"status": "maintenance",
"location": "Data Center B - Rack 15",
"last_maintenance": "2024-01-15T14:30:00Z",
"notes": "Scheduled maintenance completed",
"configuration": {
"name"cpu_cores": 16,
"memory_gb": 64,
"storage_type": "device-001-updated",
"display_name": "Updated Device 001",
"description": "Production device with updated naming convention"SSD"
}
}'
Example Response:
{
"success": true,
"message": "Device name updated successfully",
"device": {
"id": "12345",1247,
"name": "device-001-updated"server-web-01",
"display_name"status": "Updated Device 001"maintenance",
"description"device_type": "Productionserver",
device"serial_number": with"SRV2024-001247",
updated"location": naming"Data convention"Center B - Rack 15",
"organization": "IT Department",
"last_maintenance": "2024-01-15T14:30:00Z",
"notes": "Scheduled maintenance completed",
"configuration": {
"cpu_cores": 16,
"memory_gb": 64,
"storage_type": "SSD",
"network_ports": 4
},
"created_at": "2023-08-10T09:15:00Z",
"updated_at": "2024-01-15T10:30:00Z"15T14:35:22Z",
}"is_active": true
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Device |
| 400 | Bad Request - Invalid |
| 401 | Unauthorized - |
| 404 | Not Found - Device with the specified name does not |
Common Use Cases
Use Case 1: Scheduled Maintenance Updates
When performing routine maintenance on devices, use this endpoint to update the device status and maintenance records. This helps track maintenance history and current device availability.
Use Case 2: Location Tracking
As devices are moved between locations (data centers, offices, storage facilities), update their location information to maintain accurate inventory records for asset management and support purposes.
Use Case 3: Configuration Management
After hardware upgrades or configuration changes, update the device specifications to reflect current capabilities. This is essential for capacity planning and resource allocation.
Use Case 4: External System Integration
Synchronize device information between your inventory management system and external tools like monitoring systems, CMDB platforms, or asset management solutions that reference devices by name.
Use Case 5: Batch Processing
Process multiple device updates in automated workflows where device names follow predictable patterns, enabling efficient bulk operations for large-scale infrastructure management.
Best Practices
-
Unique
namingDevice Names: Ensurethe newdevicenamenamesisare uniquewithinacross your inventory to prevent accidental updates to wrong devices
databulk