Inventory Device Name
ManageThe Inventory Device Name API provides endpoints for managing network device inventorydevicesthroughinname-based operations. These endpoints enable full CRUD functionality for device management, status monitoring, and organizational filtering, making it easy to maintain an up-to-date inventory of your networkinfrastructure through CRUD operations with filtering and status monitoring capabilities.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 Name API category is designed for comprehensive device inventory management within network infrastructure systems. This API allows you to perform complete lifecycle management of network devices, from initial registration to ongoing monitoring and maintenance.
Key Features:
Common Integration Scenarios:
The endpoints work together to provide a complete device management workflow: list and filter devices, retrieve detailed information, update configurations, and remove decommissioned equipment.
Endpoints
GET /inventory_device_name/
RetrieveDescription: Retrieves a paginated list of all inventory devices with optionalcomprehensive filtering capabilities.options. This endpoint serves as the primary entry point for device discovery and bulk operations, allowing you to filter by device characteristics, organizational boundaries, and operational status.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_name/?organization=5&status=true&limit=50&offset=0
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| type | integer | query | No | Filter |
| status | string | query | No | Filter |
| last_status_change_from | string | query | No | Filter |
| organization | integer | query | No | Filter |
| limit | integer | query | No | Number of results to return per page (default: 20, max: 100) |
| offset | integer | query | No | |
| pending | boolean | query | No | |
| update_status | boolean | query | No |
ExamplecURL Request:Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_name/?organization=5&status=true&limit=1020&offset=0pending=true" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 25,156,
"next": "https://control.zequenze.com/api/v1/inventory_device_name/?limit=1020&offset=10"20&organization=5&status=true",
"previous": null,
"results": [
{
"id": 1,
"name": "router-core-switch-01",
"type": 2,
"status"type_name": true,"Core Switch",
"organization": 1,5,
"ip_address"organization_name": "192.168.1.1"IT Operations",
"last_status_change": "2024-01-15T10:30:00Z",
"pending_settings": false
},
{
"id": 2,
"name": "switch-02",
"type": 3,
"status": true,
"organization": 1,
"ip_address": "192.168.1.10",
"serial_number": "CS-2024-001",
"model": "Cisco Catalyst 9500",
"last_seen": "2024-01-15T14:30:22Z",
"last_status_change": "2024-01-14T14:22:10T09:15:00Z",
"pending_settings"pending_changes": truetrue,
"location": "Data Center Rack 4A",
"firmware_version": "16.12.05"
},
{
"name": "edge-router-02",
"type": 1,
"type_name": "Edge Router",
"organization": 5,
"organization_name": "IT Operations",
"status": true,
"ip_address": "10.0.1.1",
"serial_number": "ER-2024-002",
"model": "Juniper MX204",
"last_seen": "2024-01-15T14:29:45Z",
"last_status_change": "2024-01-12T16:20:30Z",
"pending_changes": false,
"location": "Network Closet B",
"firmware_version": "21.2R3.8"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns paginated list of devices |
| 401 | Unauthorized - Invalid or missing authentication token |
POST /inventory_device_name/
CreateDescription: Creates a new inventorydevice deviceentry in the inventory system. This endpoint is typically used during device onboarding, network expansion, or when integrating with automated discovery tools that identify new hardware on the network.
Parameters:Use Cases:
- Automated network
ParameterdiscoveryTypetoolsInregisteringRequirednewlyDescriptiondetected devices - Manual device registration
dataduringobjectinfrastructurebodydeploymentsYes - Bulk
Deviceimportdataoperationsobjectfrom
ExampleFull Request:URL Example:
POST https://control.zequenze.com/api/v1/inventory_device_name/
cURL Example:
curl -X POST "https://control.zequenze.com/api/v1/inventory_device_name/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/jsonjson" \
-d '{
"name": "new-firewall-03",
"type": 1,3,
"organization": 1,5,
"ip_address": "192.168.1.254"50",
"serial_number": "FW-2024-003",
"model": "Fortinet FortiGate 200F",
"location": "DMZ Rack 1B",
"firmware_version": "7.2.3",
"status": true,false
}'
Example Request Body:
{
"name": "new-firewall-03",
"type": 3,
"organization": 5,
"ip_address": "192.168.1.50",
"serial_number": "FW-2024-003",
"model": "Fortinet FortiGate 200F",
"location": "DMZ Rack 1B",
"firmware_version": "7.2.3",
"status": false,
"description": "MainEdge firewall device"for DMZ protection",
"purchase_date": "2024-01-10",
"warranty_expiry": "2027-01-10"
}
Example Response:
{
"id": 3,
"name": "new-firewall-03",
"type": 1,3,
"status"type_name": true,"Firewall",
"organization": 1,5,
"organization_name": "IT Operations",
"ip_address": "192.168.1.254"50",
"serial_number": "FW-2024-003",
"model": "Fortinet FortiGate 200F",
"location": "DMZ Rack 1B",
"firmware_version": "7.2.3",
"status": false,
"description": "MainEdge firewall device"for DMZ protection",
"purchase_date": "2024-01-10",
"warranty_expiry": "2027-01-10",
"created_at": "2024-01-15T15:45:15T14:35:00Z",
"last_status_change"updated_at": "2024-01-15T15:45:15T14:35:00Z",
"pending_settings"pending_changes": false
}
Response Codes:
| Status | Description |
|---|---|
| 201 | Created - Device |
| 400 | Bad Request - Invalid |
| 401 | Unauthorized - Invalid or missing authentication token |
GET /inventory_device_name/{name}/
RetrieveDescription: Retrieves detailed information aboutfor a specific inventorydevice deviceidentified by its unique name. This endpoint provides comprehensive device details and is commonly used for device-specific operations, monitoring dashboards, and detailed configuration management.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_name/core-switch-01/?pending=true&update_status=true
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| name | string | path | Yes | |
| pending | boolean | query | No | |
| update_status | boolean | query | No |
ExamplecURL Request:Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_name/router-core-switch-01/?pending=true&update_status=truetrue" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"id": 1,
"name": "router-core-switch-01",
"type": 2,
"status"type_name": true,"Core Switch",
"organization": 1,5,
"organization_name": "IT Operations",
"status": true,
"ip_address": "192.168.1.1"10",
"serial_number": "CS-2024-001",
"model": "Cisco Catalyst 9500",
"location": "Data Center Rack 4A",
"firmware_version": "16.12.05",
"description": "Primary gatewaycore router"switch for data center traffic",
"purchase_date": "2023-06-15",
"warranty_expiry": "2026-06-15",
"last_seen": "2024-01-15T14:30:22Z",
"last_status_change": "2024-01-15T10:30:10T09:15:00Z",
"pending_settings"created_at": false,"2023-06-20T10:00:00Z",
"configuration"updated_at": "2024-01-15T14:30:22Z",
"pending_changes": true,
"pending_details": {
"model"config_changes": 3,
"firmware_update": true,
"last_config_push": "Cisco2024-01-14T16:45:00Z"
ISR 4321"},
"firmware_version"interfaces": [
{
"name": "16.09.04"GigabitEthernet1/0/1",
"status": "up",
"speed": "1000Mbps"
}
],
"uptime": "15 days, 8 hours, 22 minutes"
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success |
PUT /inventory_device_name/{name}/
UpdateDescription: anCompletely entirereplaces inventoryall device record,information replacingwith the provided data. This endpoint performs a full update operation, requiring all fields.device fields to be specified. Use this when you need to update multiple device attributes or when integrating with systems that provide complete device records.
Parameters:Use Cases:
- Bulk synchronization
ParameterfromTypeexternalIninventoryRequiredmanagementDescriptionsystems
ExampleFull Request:URL Example:
PUT https://control.zequenze.com/api/v1/inventory_device_name/router-core-switch-01/
cURL Example:
curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_name/core-switch-01/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/jsonjson" \
-d '{
"name": "router-01-updated"core-switch-01",
"type": 2,
"organization": 1,5,
"ip_address": "192.168.1.2"10",
"serial_number": "CS-2024-001",
"model": "Cisco Catalyst 9500",
"location": "Data Center Rack 4A",
"firmware_version": "16.12.06",
"status": true,
"description": "Updated primary gatewaycore router"switch with latest firmware",
"purchase_date": "2023-06-15",
"warranty_expiry": "2026-06-15"
}'
ExampleResponse Response:Codes:
{
"id": 1,
"name": "router-01-updated",
"type": 2,
"status": true,
"organization": 1,
"ip_address": "192.168.1.2",
"description": "Updated primary gateway router",
"last_status_change": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T16:20:00Z",
"pending_settings": false
}
| Status | Description |
|---|---|
| 200 | Success - Device information completely updated |
| 400 | Bad Request - Invalid |
PATCH /inventory_device_name/{name}/
PartiallyDescription: Performs a partial update specificof device information, modifying only the specified fields ofwhile anleaving inventoryother device.attributes unchanged. This endpoint is ideal for targeted updates like status changes, firmware updates, or location modifications without affecting other device data.
Parameters:Use Cases:
- Status updates
ParameterfromTypemonitoringInsystemsRequiredDescription
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_name/core-switch-01/
cURL Example:
curl -X PATCH "https://control.zequenze.com/api/v1/inventory_device_name/core-switch-01/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"firmware_version": "16.12.06",
"status": true,
"location": "Data Center Rack 4B"
}'
Example Request:Request Body:
PATCH{
/api/v1/inventory_device_name/router-01/"firmware_version": Content-Type: application/json
{"16.12.06",
"status": false,true,
"location": "Data Center Rack 4B",
"description": "RouterRelocated temporarilyand offlineupdated forwith maintenance"latest firmware"
}
ExampleResponse Response:Codes:
{
"id": 1,
"name": "router-01",
"type": 2,
"status": false,
"organization": 1,
"ip_address": "192.168.1.1",
"description": "Router temporarily offline for maintenance",
"last_status_change": "2024-01-15T16:25:00Z",
"updated_at": "2024-01-15T16:25:00Z",
"pending_settings": false
}
| Status | Description |
|---|---|
| 200 | Success - Device information partially updated |
| 400 | Bad Request - Invalid |
DELETE /inventory_device_name/{name}/
RemoveDescription: anPermanently inventoryremoves a device from the systeminventory permanently.system. This endpoint should be used when devices are decommissioned, replaced, or no longer part of the managed infrastructure. The operation is irreversible and will remove all associated device data.
Parameters:Use Cases:
- Decommissioning old
ParameterhardwareTypethat'sInbeenRequiredreplacedDescription - Removing
ExampleFull Request:URL Example:
DELETE https://control.zequenze.com/api/v1/inventory_device_name/old-device/router-05/
cURL Example:
curl -X DELETE "https://control.zequenze.com/api/v1/inventory_device_name/old-router-05/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Response Codes:
| Status | Description |
|---|---|
| 204 | No Content - Device successfully deleted |
Common Use Cases
Use Case 1: Network Dashboard Integration
Build a real-time network monitoring dashboard by first calling GET /inventory_device_name/ with update_status=true to get current device states, then use GET /inventory_device_name/{name}/ for detailed views when users click on specific devices. Filter by organization to scope the dashboard to specific network segments.
Use Case 2: Automated Device Discovery and Registration
Network discovery tools can integrate by first checking if devices exist using GET /inventory_device_name/ with IP address or serial number filters, then calling POST /inventory_device_name/ to register new devices. Use PATCH /inventory_device_name/{name}/ to update device status and firmware information as discovered.
Use Case 3: Maintenance and Compliance Tracking
Generate maintenance reports by filtering devices using last_status_change_from parameter to identify devices that haven't been updated recently. Use the pending=true parameter to find devices with configuration changes awaiting application. Update device information with PATCH operations as maintenance is completed.
Use Case 4: Device Lifecycle Management
Track devices from procurement to decommissioning: create devices with POST when they arrive, update locations and configurations with PATCH during deployment, monitor status with filtered GET requests, and remove with DELETE when decommissioned.
Use Case 5: Multi-Organization Infrastructure Management
Use the organization filter parameter to separate device management for different business units or customers. This enables service providers or large organizations to maintain separate device inventories while using a single API instance.
Best Practices
-
Pagination Strategy:
UseAlways uselimitandoffsetparameters for largedatasetsdevice inventories. Start with smaller page sizes (20-50 items) toimproveensureperformanceresponsive API calls, especially when usingupdate_status=true. -
Status
FilteringUpdate Performance:Leverage thestatusparameter with boolean values or strings for flexible filtering
update_status=true Error Handling: Implement retry logic for 5xx errors and respect rate limits. When creating devices, handle 409 conflicts gracefully by checking if the device already exists with the same serial number or name.
Filtering Optimization: Use specific filters like organization and type to reduce response payload size. Combine multiple filters to create precise device queries rather than filtering large result sets client-side.
Date Format Consistency: Always use ISO format for datetime parameters (2024-01-15T14:30:00Z). Include timezone information to avoid ambiguity in multi-region deployments.
Partial Updates: Prefer PATCH over PUT whenfor updatingmost onlyupdate specificoperations to avoid accidentally clearing fields that weren't intended to reducebe bandwidthmodified. Reserve PUT for complete data synchronization scenarios.
ErrorSecurity HandlingConsiderations: AlwaysStore checkAPI responsetokens status codessecurely and handlerotate 404them errors for non-existent devices
last_status_change_frompending_settings