Inventory Device
Endpoints Summary
GET
/inventory_device/
Swagger ↗
POST
/inventory_device/
Swagger ↗
GET
/inventory_device/{id}/
Swagger ↗
PUT
/inventory_device/{id}/
Swagger ↗
PATCH
/inventory_device/{id}/
Swagger ↗
DELETE
/inventory_device/{id}/
Swagger ↗
The Inventory Device API provides
comprehensivecompletedeviceCRUDmanagementoperationscapabilities,forallowingmanaging network devices in your infrastructure. These endpoints allow you toperformcreate,CRUDretrieve,operationsupdate,onandnetworkdeletedevices,devicemonitorrecords, including theirstatus,configuration profiles, location data, firmware management, andexecuteoperational status. Common use cases include deviceoperationsonboarding,likebulkrebootsdevice management, status monitoring, andfactoryconfigurationresets. These endpoints are essential for managing device inventories, tracking device health, and performing remote device administration in network management systems.synchronization.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Inventory Device API is the core of device management operations, providing full lifecycle managementinterface for managing network devices.devices in the control platform. This API category enableshandles youall to:aspects of device lifecycle management, from initial registration through ongoing configuration and monitoring.
Key Capabilities:
-
Device
Inventory ManagementManagement::Create,read,update, and delete device records with comprehensive metadataincluding serial numbers, locations, firmware versions, and organizational assignments -
Status
MonitoringMonitoring::Track device operational status, connection history, and configuration stateswith real-time updates -
RemoteOrganizationDevice&OperationsLocation::ExecuteOrganizecriticaldevices by organization and geographical location
Device Lifecycle: Devices typically follow a lifecycle of registration → configuration → monitoring → maintenance. These endpoints support each phase with appropriate status tracking, pending settings management, and operational controls like reboot, sync, and factory reset capabilities.
Integration Points: The APIdevice supportsinventory bothintegrates bulkwith operationsdevice profiles (types), organizations, locations, and firmware images through thereference listfields, endpointenabling with advanced filtering, and individualcomprehensive device management through the detail endpoints. Device operations are designed to work with CWMP/TR-069 protocols for remote device management, making it ideal for ISP and enterprise network management scenarios.
Key concepts include device types (profiles/templates), pending settings tracking, firmware management, and comprehensive audit trails for all device interactions.workflows.
Endpoints
GET /inventory_device/
Description: Retrieves a paginated list of inventory devices with comprehensive filtering capabilities.options. This endpoint is essential for device discovery, status monitoring, and bulk device management operations. It supports real-timefiltering statusby updatesorganization, device type, status, and pendingrecent settingschanges, detection.making it ideal for dashboard displays and automated monitoring systems.
Use Cases:
DashboardDisplaydisplaysdeviceshowinginventoryallin management dashboards
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device/?organization=123&status=1&organization=5true&limit=50&update_status=trueoffset=0
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| type | integer | query | No | Filter devices by device type/profile ID |
| status | string | query | No | Filter by |
| last_status_change_from | string | query | No | Filter |
| organization | integer | query | No | Filter devices by organization ID |
| limit | integer | query | No | Number of results per page ( |
| offset | integer | query | No | Starting index for |
| pending | boolean | query | No | Include information about pending device settings |
| update_status | boolean | query | No |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_device/?organization=123&status=1&organization=5true&limit=25&update_status=true"25" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 150,245,
"next": "https://control.zequenze.com/api/v1/inventory_device/?limit=25&offset=25&organization=5123&status=1&update_status=true",
"previous": null,
"results": [
{
"id": 1001,
"uuid": "550e8400-e29b-41d4-a716-446655440001"f47ac10b-58cc-4372-a567-0e02b2c3d479",
"name": "Router-Branch-Office-001"Main-Office",
"customer_id": "CUST-2024-001",
"is_active": true,
"status": "Up",
"status_change": "2024-01-15T09:30:15Z"00Z",
"type": 12,15,
"type_short_name": "enterprise_router"enterprise-router",
"software_version": "2.4.1",
"hardware_version": "v1.2"v3.0",
"manufacturer": "Zequenze Systems"Networks",
"serial_number": "ZEQ240100001"ZN2024001001",
"description": "Main branchoffice officegateway router",
"organization_id": 5,123,
"location_name": "New York Branch Office",
"location": 25,
"location_short_name": "ny_branch",45,
"latitude": "40.7128",
"longitude": "-74.0060",
"address": "192.168.1.1",
"last_connection": "2024-01-15T14:22:30Z"15T10:45:00Z",
"last_configuration": "2024-01-14T10:15:14T16:20:00Z",
"created": "2024-01-10T08:01T08:00:00Z",
"pending_settings": "firmware_update,reboot_scheduled"none"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns paginated device list |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Insufficient permissions for |
POST /inventory_device/
Description: Creates a new inventory device record in the inventory system. This endpoint is used forduring device onboarding,onboarding bulkto establish the device imports,profile, authentication credentials, and integratinginitial newconfiguration. networkThe equipmentsystem intowill generate a unique UUID for the device and set up the basic management platform.structure.
Use Cases:
AddingOnboard new devices duringnetwork expansiondeployment- Bulk
importingdevicedevicesregistration fromspreadsheetsCSVor other systemsimports Pre-configuringAutomated devicerecordsprovisioning in workflows
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device/
Request Body Example:
{
"name": "Router-Branch-Office-Seattle",
"customer_id": "CUST-045",
"is_active": true,
"type": 15,
"serial_number": "ZN2024001156",
"description": "Seattle branch office gateway",
"organization_id": 123,
"location_name": "Seattle Branch",
"location": 67,
"latitude": "47.6062",
"longitude": "-122.3321",
"username": "device-seattle-001",
"password": "SecurePassword123!",
"update_frequency": 300
}
cURL Example:
curl -X POST "https://control.zequenze.com/api/v1/inventory_device/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Router-Branch-Office-002"Seattle",
"customer_id": "CUST-2024-002"045",
"type": 15,
"serial_number": "ZEQ240100002"ZN2024001156",
"type": 12,
"organization_id": 5,
"location_name": "Boston Branch Office",
"description": "Secondary branch office router",123,
"username": "device_admin"device-seattle-001",
"password": "secure_password_123",
SecurePassword123!"update_frequency": 300
}'
Example Request Body:
{
"name": "Router-Branch-Office-002",
"customer_id": "CUST-2024-002",
"serial_number": "ZEQ240100002",
"serial_number_alt": "ALT-ZEQ240100002",
"type": 12,
"organization_id": 5,
"location_name": "Boston Branch Office",
"latitude": "42.3601",
"longitude": "-71.0589",
"description": "Secondary branch office router",
"username": "device_admin",
"password": "secure_password_123",
"update_frequency": 300
}
Example Response:
{
"id": 1002,1156,
"uuid": "550e8400-e29b-41d4-a716-446655440002"a1b2c3d4-5678-9abc-def0-123456789abc",
"name": "Router-Branch-Office-002"Seattle",
"customer_id": "CUST-2024-002"045",
"is_active": false,true,
"status": "Down",
"status_change": "2024-01-15T15:15T14:30:00Z",
"type": 12,15,
"type_short_name": "enterprise_router"enterprise-router",
"software_version": null,
"hardware_version": null,
"manufacturer": null,
"serial_number": "ZEQ240100002",
"serial_number_alt": "ALT-ZEQ240100002"ZN2024001156",
"description": "SecondarySeattle branch office router"gateway",
"organization_id": 5,123,
"location_name": "BostonSeattle Branch Office"Branch",
"latitude": "42.3601"47.6062",
"longitude": "-71.0589"122.3321",
"username": "device_admin"device-seattle-001",
"update_frequency": 300,
"created": "2024-01-15T15:15T14:30:00Z",
"pending_settings": null"initial"
}
Response Codes:
| Status | Description |
|---|---|
| 201 | Created - Device successfully created |
| 400 | Bad Request - Invalid |
| 401 | Unauthorized - Invalid or missing API token |
GET /inventory_device/{id}/
Description: Retrieves detailed information aboutfor a specific inventory device by its ID. This endpoint provides complete device metadata, operational status, and configuration detailsstate. Use this for individual device management.detail views, configuration management interfaces, and troubleshooting workflows.
Use Cases:
DeviceDisplaydetaildeviceviewsdetails in management interfacesRetrievingRetrieve deviceinformationinfoforbefore configurationoperationschangesChecking specificCheck device status and connection history
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device/1001/?pending=true&update_status=true
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | integer | path | Yes | Unique device |
| pending | boolean | query | No | Include |
| update_status | boolean | query | No |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_device/1001/?pending=true&update_status=true" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"id": 1001,
"uuid": "550e8400-e29b-41d4-a716-446655440001"f47ac10b-58cc-4372-a567-0e02b2c3d479",
"name": "Router-Branch-Office-001"Main-Office",
"customer_id": "CUST-2024-001",
"is_active": true,
"status": "Up",
"status_change": "2024-01-15T09:30:15Z"00Z",
"type": 12,15,
"type_short_name": "enterprise_router"enterprise-router",
"software_version": "2.4.1",
"hardware_version": "v1.2"v3.0",
"manufacturer": "Zequenze Systems"Networks",
"unique_identifier": "ZEQ:ENT:RTR:240100001"ZN-ENT-RTR-001",
"product_class": "EnterpriseRouter"Enterprise Router",
"serial_number": "ZEQ240100001"ZN2024001001",
"serial_number_alt": "ALT-ZEQ240100001"ZN001001",
"description": "Main branch office router"gateway router with redundant WAN",
"organization_id": 5,123,
"firmware_image": 45,25,
"firmware_image_is_pending": true,false,
"location_name": "New York Branch Office",
"location": 25,45,
"location_short_name": "ny_branch"NYC-Main",
"latitude": "40.7128",
"longitude": "-74.0060",
"username": "device_admin"main-office-gw",
"update_frequency": 300,
"address": "192.168.1.1",
"last_connection": "2024-01-15T14:22:30Z"15T10:45:00Z",
"last_configuration": "2024-01-14T10:15:14T16:20:00Z",
"last_change": "2024-01-15T12:45:20Z"14T16:20:00Z",
"created": "2024-01-10T08:01T08:00:00Z",
"debug": false,
"pending_settings": "firmware_update:pending,reboot_scheduled:2024-01-16T02:00:00Z"wifi_config,port_forwarding"
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns device details |
| 401 | Unauthorized - Invalid or missing API token |
PUT /inventory_device/{id}/
Description: UpdatesCompletely all fields ofupdates an existing inventory device record.record with new data. This endpoint performsreplaces aall completedevice replacementfields ofwith the deviceprovided recordvalues, andmaking isit usedsuitable for comprehensive device updates, configuration changes, and administrative modifications. Use PATCH for partial updates and bulk data corrections.instead.
Use Cases:
- Complete device reconfiguration
during network changes UpdatingUpdate deviceprofiles whenafter hardwareis replacedreplacement- Bulk device updates from external
inventorysystems CorrectingAdministrative changes to deviceinformation after physical auditsprofiles
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device/1001/
Request Body Example:
{
"name": "Router-Main-Office-Updated",
"customer_id": "CUST-001",
"is_active": true,
"type": 15,
"serial_number": "ZN2024001001",
"description": "Updated main office gateway with new configuration",
"organization_id": 123,
"location_name": "New York Office - Floor 5",
"location": 45,
"latitude": "40.7128",
"longitude": "-74.0060",
"username": "main-office-gw",
"password": "NewSecurePassword456!",
"update_frequency": 600,
"debug": false,
"sync": true
}
cURL Example:
curl -X PUT "https://control.zequenze.com/api/v1/inventory_device/1001/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Router-Branch-Main-Office-001-Updated",
"customer_id": "CUST-2024-001",
"serial_number"is_active": "ZEQ240100001",true,
"type": 15,
"organization_id": 5,123,
"location_name"sync": true
}'
Example Response:
{
"id": 1001,
"uuid": "Newf47ac10b-58cc-4372-a567-0e02b2c3d479",
York"name": Main"Router-Main-Office-Updated",
Office""customer_id": "CUST-001",
"is_active": true,
"status": "Up",
"type": 15,
"type_short_name": "enterprise-router",
"serial_number": "ZN2024001001",
"description": "Updated main office routergateway with new configuration",
"latitude"organization_id": 123,
"location_name": "40.7589",New "longitude":York "Office -73.9851" Floor 5",
"update_frequency": 180600,
"last_change": "2024-01-15T14:45:00Z",
"pending_settings": "sync_requested"
}'
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Device updated successfully |
| 400 | Bad Request - Invalid |
| 401 | Unauthorized - Invalid or missing API token |
PATCH /inventory_device/{id}/
Description: Performs partialPartially updates onspecific fields of an existing inventory device record. This endpoint allowsis youideal tofor updatetargeted specificchanges fieldslike status updates, configuration flags, or operational commands without affecting other device propertiesproperties. Use this for incremental updates and isdevice ideal for targeted operations like status changes, configuration updates, or devicemanagement operations.
Use Cases:
TriggeringToggle deviceoperationsdebug(reboot,modefactoryorreset,administrativesync)stateUpdatingUpdate device location or descriptionwithout changing credentialsSettingSetfirmwareoperational flags (reboot, sync, factory reset)
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device/1001/
Request Body Example:
{
"description": "Updated description after maintenance",
"debug": true,
"reboot": true
}
cURL Example for Device Reboot:Example:
curl -X PATCH "https://control.zequenze.com/api/v1/inventory_device/1001/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"debug": true,
"reboot": true,
"debug"description": true"Rebooting for maintenance"
}'
cURL Example for Firmware Update:Response:
curl -X PATCH "https://control.zequenze.com/api/v1/inventory_device/1001/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"firmware_image"id": 47,1001,
"firmware_image_is_pending"uuid": true
}'
cURL Example for Configuration Sync:
curl -X PATCH"f47ac10b-58cc-4372-a567-0e02b2c3d479",
"https://control.zequenze.com/api/v1/inventory_device/1001/" \
-Hname": "Authorization: Bearer YOUR_API_TOKEN" \
-HRouter-Main-Office",
"Content-Type: application/json" \
-d '{customer_id": "sync"CUST-001",
"is_active": true,
"reconf"status": true"Up",
"description": "Rebooting for maintenance",
"debug": true,
"reboot": true,
"last_change": "2024-01-15T15:00:00Z",
"pending_settings": "reboot_requested"
}'
Device Operation Parameters:
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Device partially updated |
| 400 | Bad Request - Invalid |
| 401 | Unauthorized - Invalid or missing API token |
DELETE /inventory_device/{id}/
Description: Permanently removes an inventorya device record from the inventory system. This operationendpoint isshould irreversiblebe used carefully as it completely deletes the device and will delete all associated deviceconfiguration data,data. configurations,Consider anddeactivating history.devices Useinstead withof cautiondeletion infor productionaudit environments.trail purposes.
Use Cases:
RemovingRemove decommissioned devices from inventoryCleaningClean up test or duplicate devicerecords
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device/1001/
Parameters:
cURL Example:
curl -X DELETE "https://control.zequenze.com/api/v1/inventory_device/1001/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Response Codes:
| Status | Description |
|---|---|
| 204 | No Content - Device successfully deleted |
| 401 | Unauthorized - Invalid or missing API token |
Common Use Cases
Use Case 1: Device Health Monitoring Dashboard
Create a real-time monitoring dashboard by using the list endpoint with status filtering and automatic updates. Combine GET /inventory_device/ with status=1&update_status=true to show all active devices, then use status=0 to identify down devices requiring attention.
Use Case 2: Remote Device Operations
Execute remote device management by using PATCH operations to trigger device actions. Use the detail endpoint to check pending operations, then PATCH with specific operation flags like reboot=true or sync=true to perform maintenance tasks.
Use Case 3: Firmware ManagementOnboarding Workflow
ImplementWhen firmwaredeploying updatesnew bynetwork firstequipment, using GET to identify devices needing updates, then PATCH to set firmware_image and firmware_image_is_pending=true flags. Monitor the process through the pending_settings field in subsequent GET requests.
Use Case 4: Multi-Tenant Device Management
Manage devices across multiple organizations using the organization filter parameter. Combine with proper API token scoping to ensure users only access devices within their authorized organizations.
Use Case 5: Device Onboarding Automation
Automate device deployment by usinguse POST to create device records with pre-configuredinitial credentialsconfiguration, then PATCH to update status and settings,settings as devices come online and are configured.
Use Case 2: Status Dashboard
Use GET with organization and status filters to build real-time dashboards showing device health across different locations and organizations, with pagination for large deployments.
Use Case 3: Bulk Device Management
Combine GET for device discovery with PATCH operations to perform bulk updates like firmware scheduling, configuration synchronization, or maintenance mode activation across multiple devices.
Use Case 4: Device Maintenance Operations
Use PATCH with operational flags (reboot, sync, factory) to perform remote device management tasks, then monitorGET firstwith connectionupdate_status=true throughto theverify operation last_connectionfieldcompletion.
Use Case 5: Inventory Cleanup
Use GET requests with update_status=true.appropriate filters to identify inactive or obsolete devices, then DELETE to remove decommissioned equipment from active inventory management.
Best Practices
-
avoid timeoutsPagination ManagementPagination::Always uselimitandlimit/offsetparameters for large deviceinventories. Start with reasonable page sizes (25-50 devices)inventories tobalancemaintain API performance andusability. -
Status
Update OptimizationUpdates::Useupdate_status=truejudiciouslyparameter sparingly as it triggers real-time devicequeries.communicationEnableanditmayforimpactcriticalresponsemonitoring but avoid it in high-frequency polling scenarios to prevent network overhead.times -
DeviceOperationalOperationsFlags::Whenperformingusingdeviceoperationaloperationscommandsvia(reboot,PATCH,sync, factory), monitor thepending_settingsfield to track operationcompletion. Operations are asynchronous and may take time to complete.status -
BatchFilteringOperationsEfficiency::ForUsebulkorganization-leveldevicefilteringmanagement,whenimplementpossiblepropertoerrorreducehandlingdata transfer andretryimprovelogic.responseUse the list endpoint with appropriate filters to identify target devices before performing batch updates.times -
SecurityErrorConsiderationsHandling::Implement retry logic for device operations as network devices may be temporarily unreachable
ErrorBulk HandlingOperations:: ImplementFor comprehensivelarge-scale errorupdates, handlingimplement forbatch deviceprocessing operations,with especiallyappropriate fordelays remotebetween operationsAPI that may fail duecalls to networkavoid connectivityrate or device state issues.