Inventory Device Serial
ManageTheinventoryInventorydevicesDevice Serial API provides comprehensive device management capabilities through serial number-based operations. These endpoints enable you to manage network devices, monitor their status in real-time, and perform full CRUD operationsusingon your device inventory using serial numbers as unique identifiers.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Inventory Device Serial API category is designed for managing network devices through their serial numbers, providing a robust interface for device inventory management, status monitoring, and configuration tracking. This API is particularly useful for network administrators, IT teams, and organizations that need to maintain comprehensive device inventories.
Key Features:
Common Use Cases:
The serial number serves as the primary identifier for individual device operations, making it ideal for hardware-based device management where serial numbers provide reliable unique identification.
Endpoints
GET /inventory_device_serial/
RetrieveDescription: Retrieves a paginated list of all inventory devices with optionalextensive filtering capabilities. This endpoint supports real-time status updates and comprehensive filtering options for efficient device discovery and monitoring across your infrastructure.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_serial/?organization=123&status=true&limit=50&offset=0
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| type | integer | query | No | Filter |
| status | string | query | No | Filter by device |
| last_status_change_from | string | query | No | Filter |
| organization | integer | query | No | Filter |
| limit | integer | query | No | Number of results |
| 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_serial/?organization=123&status=true&organization=1pending=true&limit=1025" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 25,247,
"next": "https://control.zequenze.com/api/v1/inventory_device_serial/?limit=1025&offset=10"25&organization=123&status=true&pending=true",
"previous": null,
"results": [
{
"serial_number": "ABC123DEF456"SN123456789",
"name": "Office Router Main"Core-Switch-01",
"type": 1,{
"id": 3,
"name": "Network Switch",
"model": "Cisco Catalyst 9300"
},
"organization": 1,{
"id": 123,
"name": "Acme Corp IT"
},
"status": true,
"last_status_change": "2024-01-15T10:15T14:30:00Z"22Z",
"pending_settings"ip_address": false,"192.168.1.10",
"location": "Data Center A - Rack 15",
"pending_changes": true,
"created_at": "2024-01-10T09:01T09:00:00Z",
"updated_at": "2024-01-15T10:15T14:30:00Z"22Z"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns paginated device list |
| 401 | Unauthorized - Invalid or missing API token |
POST /inventory_device_serial/
CreateDescription: Creates a new device record in the inventory device.system. This endpoint allows you to register new devices with complete configuration details, automatically generating tracking records for lifecycle management.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_serial/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| data | body | Yes |
ExamplecURL Request:Example:
curl -X POST "https://control.zequenze.com/api/v1/inventory_device_serial/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/jsonjson" \
-d '{
"serial_number": "XYZ789GHI012"SN987654321",
"name": "New Branch Router"Edge-Router-05",
"type": 2,1,
"organization": 1,123,
"ip_address": "192.168.2.5",
"location": "Branch Office B",
"status": truetrue,
"description": "Primary edge router for branch connectivity"
}'
Example Response:
{
"serial_number": "XYZ789GHI012"SN987654321",
"name": "New Branch Router"Edge-Router-05",
"type": 2,{
"id": 1,
"name": "Router",
"model": "Cisco ISR 4331"
},
"organization": 1,{
"id": 123,
"name": "Acme Corp IT"
},
"ip_address": "192.168.2.5",
"location": "Branch Office B",
"status": true,
"last_status_change"description": "2024-01-16T14:20:00Z"Primary edge router for branch connectivity",
"pending_settings"pending_changes": false,
"created_at": "2024-01-16T14:20:00Z"16T10:15:30Z",
"updated_at": "2024-01-16T14:20:00Z"16T10:15:30Z"
}
Response Codes:
| Status | Description |
|---|---|
| 201 | Created - Device successfully registered |
| 400 | Bad |
GET /inventory_device_serial/{serial_number}/
RetrieveDescription: detailsRetrieves ofdetailed information for a specific inventory device identified by its serial number. Supports optional real-time status updates and pending configuration reporting for comprehensive device monitoring.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_serial/SN123456789/?update_status=true&pending=true
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| serial_number | 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_serial/ABC123DEF456/SN123456789/?update_status=true&pending=true" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"serial_number": "ABC123DEF456"SN123456789",
"name": "Office Router Main"Core-Switch-01",
"type": 1,{
"id": 3,
"name": "Network Switch",
"model": "Cisco Catalyst 9300",
"manufacturer": "Cisco"
},
"organization": 1,{
"id": 123,
"name": "Acme Corp IT",
"code": "ACME-IT"
},
"status": true,
"last_status_change": "2024-01-15T10:15T14:30:00Z"22Z",
"pending_settings"ip_address": "192.168.1.10",
"mac_address": "00:1B:44:11:3A:B7",
"location": "Data Center A - Rack 15",
"description": "Primary core switch for data center connectivity",
"firmware_version": "16.12.05",
"pending_changes": true,
"pending_details": {
"configuration_updates": 3,
"firmware_update": false,
"last_pending_change": "2024-01-16T08:45:00Z"
},
"created_at": "2024-01-10T09:01T09:00:00Z",
"updated_at": "2024-01-15T10:30:16T08:45:00Z"
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns complete device information |
| 404 | |
| 401 | Unauthorized - Invalid or missing API token |
PUT /inventory_device_serial/{serial_number}/
CompletelyDescription: Performs a complete update anof existinga device record, replacing all modifiable fields with the provided data. This endpoint is ideal for comprehensive device updates during major configuration changes or asset management updates.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_serial/SN123456789/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| serial_number | string | path | Yes | |
| data | body | Yes |
ExamplecURL Request:Example:
curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_serial/ABC123DEF456/SN123456789/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/jsonjson" \
-d '{
"serial_number": "ABC123DEF456",
"name": "Updated Office Router"Core-Switch-01-Updated",
"type": 1,3,
"organization": 2,123,
"ip_address": "192.168.1.15",
"location": "Data Center A - Rack 16",
"status": falsetrue,
"description": "Updated primary core switch with new configuration",
"firmware_version": "16.12.06"
}'
Example Response:
{
"serial_number": "ABC123DEF456"SN123456789",
"name": "Updated Office Router"Core-Switch-01-Updated",
"type": 1,{
"id": 3,
"name": "Network Switch",
"model": "Cisco Catalyst 9300"
},
"organization": 2,{
"id": 123,
"name": "Acme Corp IT"
},
"ip_address": "192.168.1.15",
"location": "Data Center A - Rack 16",
"status": false,true,
"last_status_change"description": "2024-01-16T15:45:00Z"Updated primary core switch with new configuration",
"pending_settings": true,
"created_at"firmware_version": "2024-01-10T09:00:00Z"16.12.06",
"pending_changes": false,
"updated_at": "2024-01-16T15:45:00Z"16T11:20:15Z"
}
Response Codes:
| Status | Description |
|---|---|
| 200 |
PATCH /inventory_device_serial/{serial_number}/
PartiallyDescription: Performs a partial update anof existinga inventorydevice device.record, modifying only the specified fields while leaving other attributes unchanged. This endpoint is perfect for targeted updates like status changes, location updates, or individual field modifications.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_serial/SN123456789/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| serial_number | string | path | Yes | |
| data | body | Yes |
ExamplecURL Request:Example:
curl -X PATCH "https://control.zequenze.com/api/v1/inventory_device_serial/ABC123DEF456/SN123456789/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/jsonjson" \
-d '{
"name": "Partially Updated Router",
"status": truefalse,
"description": "Device offline for scheduled maintenance"
}'
Example Response:
{
"serial_number": "ABC123DEF456"SN123456789",
"name": "Partially Updated Router"Core-Switch-01-Updated",
"type": 1,{
"id": 3,
"name": "Network Switch",
"model": "Cisco Catalyst 9300"
},
"organization": 2,{
"id": 123,
"name": "Acme Corp IT"
},
"ip_address": "192.168.1.15",
"location": "Data Center A - Rack 16",
"status": true,false,
"description": "Device offline for scheduled maintenance",
"firmware_version": "16.12.06",
"pending_changes": false,
"last_status_change": "2024-01-16T16:00:00Z",
"pending_settings": false,
"created_at": "2024-01-10T09:00:00Z"16T12:05:33Z",
"updated_at": "2024-01-16T16:00:00Z"16T12:05:33Z"
}
Response Codes:
| Status | Description |
|---|---|
| 200 |
DELETE /inventory_device_serial/{serial_number}/
DeleteDescription: anPermanently existingremoves a device record from the inventory device.system. This operation is irreversible and should be used when devices are decommissioned, disposed of, or no longer part of the managed infrastructure.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_serial/SN123456789/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| serial_number | string | path | Yes |
ExamplecURL Request:Example:
curl -X DELETE "https://control.zequenze.com/api/v1/inventory_device_serial/ABC123DEF456/SN123456789/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Response Codes:
| Status | Description |
|---|---|
| 204 | |
| 404 | Not Found - Device with specified serial number not found |
Common Use Cases
Use Case 1: Real-time Infrastructure Monitoring
Monitor device status across your network infrastructure by combining the list endpoint with status filtering and live updates. Use GET /inventory_device_serial/?status=false&update_status=true to identify offline devices and trigger automated alerts or maintenance workflows.
Use Case 2: Multi-tenant Device Management
Manage devices across multiple organizations by leveraging organization filtering. Use GET /inventory_device_serial/?organization={org_id} to segment device management for different clients or business units while maintaining centralized control.
Use Case 3: Automated Device Provisioning
Integrate device registration into your provisioning workflow using POST operations to automatically register new devices as they're deployed, followed by PATCH operations to update status and configuration as provisioning progresses.
Use Case 4: Maintenance Window Management
Use the PATCH endpoint to update device status and descriptions during maintenance windows, providing clear visibility into which devices are offline for scheduled maintenance versus unexpected outages.
Use Case 5: Configuration Change Tracking
Leverage the pending=true parameter to monitor devices with pending configuration changes, enabling proactive management of configuration deployment and validation workflows.
Best Practices
-
Pagination: Always use appropriate
limitvalues (recommended: 25-100) for list operations to ensure optimal performance and prevent timeouts
update_statusupdate_status=true limitoffsetpending_settingsLimiting: