Inventory Device Name
The
Inventory Device Nameinventory_device_name APIprovidesendpointsendpointsprovide comprehensive device management capabilities formanagingnetworkdeviceinventorythrough name-based operations.systems. These endpoints enablefullyou to perform complete CRUDfunctionalityoperationsforon network devices, including retrieving devicemanagement,listsstatuswithmonitoring,advanced filtering, creating new device entries, updating device configurations, andorganizationalmanagingfiltering,devicemakinglifecycleitoperationseasyliketorebootsmaintainandanfactoryup-to-date inventory of your network infrastructure.resets.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Inventory Device Nameinventory_device_name API category is designed for comprehensivemanaging network devices within an organization's infrastructure. These endpoints serve as the core interface for device inventory managementmanagement, within network infrastructure systems. This API allowsallowing you to perform complete lifecycle management of network devices, from initial registration to ongoing monitoring and maintenance.
Key Features:to:
-
DeviceTrackDiscoverydevice inventory across multiple organizations andRegistration:Add new devices to your inventory with detailed specificationslocations -
Status Monitoring:TrackMonitor deviceoperationalstatus andhistoricalhealthchangeswith real-time updates -
OrganizationalManageManagement:device configurationsFilterincluding firmware updates andorganizesettingsdevices by organizational unitssynchronization -
Real-time Updates:Get currentControl devicestatusoperationswithsuchoptionalaslivereboots,statusfactorychecksresets, and configuration reapplication -
Pending Configuration Tracking:Monitor devices that have configuration changes awaiting application
Common Integration Scenarios:
The endpointsAPI worksupports togetherboth to provide a completeindividual device managementoperations workflow:(by listname) and filterbulk devices,operations retrieveacross detaileddevice information,collections. updateEach configurations,device is uniquely identified by its name and removecontains decommissionedcomprehensive equipment.metadata including hardware/software versions, serial numbers, location data, and operational status.
Key concepts include device types (configuration templates), organizations (for multi-tenant environments), firmware management, and various operational states that control device behavior and connectivity.
Endpoints
GET /inventory_device_name/
Description: Retrieves a paginated list of all devices in your inventory devices with comprehensive filtering options.capabilities. This endpoint servesis as the primary entry pointessential for device discoverydiscovery, monitoring dashboards, and bulk operations,operations. allowingIt yousupports toreal-time filterstatus by device characteristics, organizational boundaries,updates and operationalcan status.report pending configuration changes.
Use Cases:
DashboardBuildingdisplaysdeviceshowingmonitoringalldashboards
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_name/?organization=5123&status=true&limit=50&offset=0
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| type | integer | query | No | Filter devices by device type ID ( |
| status | string | query | No | Filter by |
| last_status_change_from | string | query | No | Filter devices |
| organization | integer | query | No | Filter devices by organization ID |
| limit | integer | query | No | Number of results |
| offset | integer | query | No | Starting index for pagination |
| pending | boolean | query | No | |
| update_status | boolean | query | No |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_name/?organization=5123&status=true&limit=20&pending=true" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 156,150,
"next": "https://control.zequenze.com/api/v1/inventory_device_name/?limit=20&offset=20&organization=5&status=true"20",
"previous": null,
"results": [
{
"id": 1,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"name": "core-switch-01"router-hq-001",
"customer_id": "CUST-001",
"is_active": true,
"status": "Up",
"status_change": "2024-01-15T10:30:00Z",
"type": 2,5,
"type_name"type_short_name": "Core Switch"enterprise-router",
"organization": 5,
"organization_name"software_version": "IT Operations"1.4.2",
"status": true,
"ip_address"hardware_version": "192.168.1.10"Rev-C",
"manufacturer": "Cisco",
"serial_number": "CS-2024-001"SN123456789",
"model"description": "CiscoMain Catalystheadquarters 9500"router",
"last_seen"organization_id": 123,
"location_name": "Headquarters - Server Room",
"location_short_name": "HQ-SR",
"latitude": "40.7128",
"longitude": "-74.0060",
"address": "192.168.1.1",
"last_connection": "2024-01-15T14:30:22Z"22:00Z",
"last_status_change"last_configuration": "2024-01-10T09:14T09:15:00Z",
"pending_changes": true,
"location"pending_settings": "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"firmware_update,reboot_pending"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns paginated device list |
| 401 | Unauthorized - Invalid or missing |
| 403 | Forbidden - Insufficient permissions |
POST /inventory_device_name/
Description: Creates a new device entry in the inventory system. This endpoint is typically used duringwhen onboarding new network devices or registering devices that will connect via CWMP/TR-069 protocols. The device onboarding,name networkmust expansion,be orunique when integrating with automated discovery tools that identify new hardware onwithin the network.system.
Use Cases:
AutomatedOnboarding new networkdiscovery tools registering newly detected devicesequipmentManualPre-registeringdevicedevicesregistrationbeforeduringphysicalinfrastructure deploymentsinstallation- Bulk
importdeviceoperationsprovisioningfromforexistingnewinventory systemssites IntegrationSettingwithupprocurementdevicesystemsauthenticationwhen new hardware arrivescredentials
Full URL Example:
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/json" \
-d '{
"name": "new-firewall-03"router-branch-005",
"customer_id": "CUST-005",
"is_active": true,
"type": 3,
"organization": 5,
"ip_address": "192.168.1.50",
"serial_number": "FW-2024-003"SN987654321",
"model": "Fortinet FortiGate 200F",
"location": "DMZ Rack 1B",
"firmware_version": "7.2.3",
"status": 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": "EdgeBranch firewalloffice forrouter DMZ- protection"Site 005",
"purchase_date"organization_id": 123,
"location_name": "2024-01-10"Branch Office 005",
"warranty_expiry"latitude": "2027-01-10"42.3601",
"longitude": "-71.0589",
"username": "device_005",
"password": "secure_password_123"
}'
Example Response:
{
"id": 156,
"uuid": "660f9511-f3ac-52e5-b827-557766551111",
"name": "new-firewall-03"router-branch-005",
"customer_id": "CUST-005",
"is_active": true,
"status": "Down",
"status_change": "2024-01-15T15:45:00Z",
"type": 3,5,
"type_name"type_short_name": "Firewall",
"organization": 5,
"organization_name": "IT Operations",
"ip_address": "192.168.1.50"enterprise-router",
"serial_number": "FW-2024-003"SN987654321",
"model": "Fortinet FortiGate 200F",
"location": "DMZ Rack 1B",
"firmware_version": "7.2.3",
"status": false,
"description": "EdgeBranch firewalloffice forrouter DMZ- protection"Site 005",
"purchase_date"organization_id": 123,
"location_name": "Branch Office 005",
"latitude": "42.3601",
"longitude": "-71.0589",
"username": "device_005",
"created": "2024-01-10",
"warranty_expiry": "2027-01-10",
"created_at": "2024-01-15T14:35:15T15:45:00Z",
"updated_at"pending_settings": "2024-01-15T14:35:00Z",
"pending_changes": falsenull
}
Response Codes:
| Status | Description |
|---|---|
| 201 | Created - Device successfully |
| 400 | Bad Request - Invalid data |
| 401 | Unauthorized - Invalid or missing |
GET /inventory_device_name/{name}/
Description: Retrieves detailed information forabout a specific device identified by its unique name. This endpoint provides comprehensivecomplete device detailsmetadata, current status, and isconfiguration commonlydetails. usedIt's essential for device-specific operations, monitoring dashboards,operations and detailed configuration management.monitoring.
Use Cases:
DeviceGettingdetailcompletepagesdeviceindetails for management interfacesConfiguration management systems retrieving currentChecking devicestatestatus before performing operations
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_name/core-switch-01/router-hq-001/?pending=true&update_status=true
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| name | string | path | Yes | |
| pending | boolean | query | No | Include |
| update_status | boolean | query | No |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_device_name/core-switch-01/router-hq-001/?pending=true&update_status=true" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"id": 1,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"name": "core-switch-01"router-hq-001",
"customer_id": "CUST-001",
"is_active": true,
"status": "Up",
"status_change": "2024-01-15T10:30:00Z",
"type": 2,5,
"type_name"type_short_name": "Core Switch"enterprise-router",
"organization": 5,
"organization_name"software_version": "IT Operations"1.4.2",
"status": true,
"ip_address"hardware_version": "192.168.1.10"Rev-C",
"manufacturer": "Cisco",
"unique_identifier": "cisco-1841-router",
"product_class": "Router",
"serial_number": "CS-2024-001"SN123456789",
"model"serial_number_alt": "Cisco Catalyst 9500",
"location": "Data Center Rack 4A",
"firmware_version": "16.12.05"ALT-SN-001",
"description": "PrimaryMain coreheadquarters switch for data center traffic"router",
"purchase_date"organization_id": 123,
"firmware_image": 15,
"firmware_image_is_pending": true,
"location_name": "2023-06-15"Headquarters - Server Room",
"warranty_expiry"location": 45,
"location_short_name": "2026-06-15"HQ-SR",
"last_seen"latitude": "40.7128",
"longitude": "-74.0060",
"username": "admin_hq_001",
"update_frequency": 300,
"address": "192.168.1.1",
"last_connection": "2024-01-15T14:30:22Z"22:00Z",
"last_status_change"last_configuration": "2024-01-10T09:14T09:15:00Z",
"created_at"last_change": "2023-06-20T10:2024-01-14T09:15:00Z",
"created": "2024-01-01T08:00:00Z",
"updated_at"debug": false,
"pending_settings": "2024-01-15T14:30:22Z",
"pending_changes": true,
"pending_details": {
"config_changes": 3,
"firmware_update": true,
"last_config_push": "2024-01-14T16:45:00Z"
},
"interfaces": [
{
"name": "GigabitEthernet1/0/1",
"status": "up",
"speed": "1000Mbps"
}
],
"uptime": "15 days, 8 hours, 22 minutes"firmware_update,configuration_sync"
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns |
| 401 | Unauthorized - Invalid or missing |
| 404 | Not Found - Device with specified name does not exist |
PUT /inventory_device_name/{name}/
Description: CompletelyPerforms replacesa complete update of a device's configuration, replacing all devicemodifiable informationfields with the provided data. This endpoint performsis aused fullfor update operation, requiring allcomprehensive device fieldsreconfiguration, toincluding be specified. Use this when you need to update multiplechanging device attributesprofiles, orlocations, whencredentials, integratingand withoperational systems that provide complete device records.settings.
Use Cases:
Bulk synchronization from external inventory management systems
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_name/core-switch-01/router-hq-001/
cURL Example:
curl -X PUT "https://control.zequenze.com/api/v1/inventory_device_name/core-switch-01/router-hq-001/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "core-switch-01"router-hq-001",
"customer_id": "CUST-001-UPDATED",
"is_active": true,
"type": 2,
"organization": 5,
"ip_address": "192.168.1.10",7,
"serial_number": "CS-2024-001"SN123456789",
"model": "Cisco Catalyst 9500",
"location": "Data Center Rack 4A",
"firmware_version": "16.12.06",
"status": true,
"description": "Updated primaryheadquarters coremain switch with latest firmware"router",
"purchase_date"organization_id": 123,
"location_name": "2023-06-15"Headquarters - New Server Room",
"warranty_expiry"latitude": "2026-06-15"40.7128",
"longitude": "-74.0060",
"username": "admin_hq_001_new",
"password": "updated_secure_password",
"update_frequency": 600,
"debug": true,
"sync": true
}'
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Device |
| 400 | Bad Request - Invalid data format or |
| 401 | Unauthorized - Invalid or missing |
| 404 | Not Found - Device with specified name does not exist |
PATCH /inventory_device_name/{name}/
Description: Performs a partial update of devicea information,device's configuration, modifying only the specified fields while leaving other attributesothers unchanged. This endpoint is ideal for targeted updates like statuschanging changes,device firmwarestatus, updates,triggering operations, or locationupdating modificationsspecific withoutconfiguration affecting other device data.parameters.
Use Cases:
Status updates from monitoring systems detectingTriggering devicestateoperationschanges(reboot, factory reset, sync)LocationUpdatingupdatesspecificwhenconfigurationdevicesfieldsarewithoutphysicallyfullrelocatedreconfigurationFirmwareEnabling/disablingversiondebugtracking after upgrade operationsmodeIncrementalChangingdatafirmwareupdatesupdatefrom automated discovery toolssettings
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_name/core-switch-01/router-hq-001/
cURL Example:
curl -X PATCH "https://control.zequenze.com/api/v1/inventory_device_name/core-switch-01/router-hq-001/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"firmware_version"description": "16.12.06"Updated device description",
"status"debug": true,
"location"reboot": true,
"Datafirmware_image": Center18,
Rack"firmware_image_is_pending": 4B"true
}'
ExampleDevice RequestOperation Body:Examples:
Reboot Device:
{curl -X PATCH "firmware_version"https://control.zequenze.com/api/v1/inventory_device_name/router-hq-001/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"reboot": "16.12.06",true}'
Factory Reset:
curl -X PATCH "status"https://control.zequenze.com/api/v1/inventory_device_name/router-hq-001/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"factory": true,true}'
Sync Configuration:
curl -X PATCH "location"https://control.zequenze.com/api/v1/inventory_device_name/router-hq-001/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"sync": "Data Center Rack 4B",
"description": "Relocated and updated with latest firmware"
}true}'
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Device |
| 400 | Bad Request - Invalid |
| 401 | Unauthorized - Invalid or missing |
| 404 | Not Found - Device with specified name does not exist |
DELETE /inventory_device_name/{name}/
Description: Permanently removes a device from the inventory 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 removedelete all associated device data.data, configuration history, and relationships. Use with caution, especially in production environments.
Use Cases:
- Decommissioning
oldretiredhardwarenetworkthat's been replacedequipment - Removing test devices
thatfromareproductionno longer part of the managed networkinventory CleanupCleaning up duplicate or incorrectly created device entries
Full URL Example:
https://control.zequenze.com/api/v1/inventory_device_name/old-router-05/decommissioned/
cURL Example:
curl -X DELETE "https://control.zequenze.com/api/v1/inventory_device_name/old-router-05/decommissioned/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Response Codes:
| Status | Description |
|---|---|
| 204 | No Content - Device successfully deleted |
| 401 | Unauthorized - Invalid or missing |
| 404 | Not Found - Device with specified name does not exist |
Common Use Cases
Use Case 1: NetworkDevice Status Monitoring Dashboard Integration
BuildMonitor adevice real-timehealth across your network monitoring dashboard by firstregularly callingpolling the GET endpoint with GET /inventory_device_name/update_status=true toand get current device states, then use GET /inventory_device_name/{name}/ for detailed views when users click on specific devices. Filterfiltering by organizationorganization. Use status filters to scopeidentify problematic devices and the dashboardpending parameter to specificdetect networkconfiguration segments.drift.
Use Case 2: Automated Device Discovery and RegistrationOnboarding
NetworkStreamline discoverynew toolsdevice can integratedeployment by first checking if devices exist using GET /inventory_device_name/ with IP address or serial number filters, then callingPOST to pre-register POST /inventory_device_name/newdevices devices.with Usetheir serial numbers and credentials, then use PATCH operations to update /inventory_device_name/{name}/deviceconfigurations statusas devices come online and firmwarereport informationtheir as discovered.capabilities.
Use Case 3: MaintenanceFirmware andUpdate Compliance TrackingManagement
GenerateManage maintenancefirmware reportsdeployments by filtering devices using last_status_change_from parameterGET to identify devices thatneeding haven'tupdates, beenPATCH updatedto recently.set Usefirmware_image and firmware_image_is_pending=true, then monitor the pending=truepending_settingsparameterfield to findtrack devicesupdate withprogress configurationacross changes awaiting application. Updateyour device information with PATCH operations as maintenance is completed.fleet.
Use Case 4: Bulk Device Lifecycle ManagementOperations
TrackPerform maintenance operations across multiple devices fromby procurementfirst using GET with appropriate filters to decommissioning:identify createtarget devicesdevices, withthen iterate through the results using PATCH to trigger operations like , POSTrebootsync, or reconf whenbased theyon arrive,your updatemaintenance locations and configurations with PATCH during deployment, monitor status with filtered GET requests, and remove with DELETE when decommissioned.requirements.
Use Case 5: Multi-Organization InfrastructureDevice Management
UseIn multi-tenant environments, use the organization filter parameteron GET requests to separatescope device management for different business units or customers. This enables service providers or large organizationsoperations to maintainspecific separatecustomers, deviceensuring inventoriesproper data isolation while usingmaintaining acentralized singlemanagement API instance.capabilities.
Best Practices
-
PaginationUseStrategypagination wisely:AlwaysWhenuseretrieving large device inventories, implement proper pagination with reasonablelimitandoffsetparameters for large device inventories. Start with smaller page sizesvalues (20-50 items)50-100) toensureavoidresponsivetimeoutAPIissuescalls,andespeciallyimprovewhenresponseusingupdate_status=true.times. -
StatusLeverageUpdatefilteringPerformanceeffectively:TheAlwaysuseupdate_status=trueparameterspecificperformsfiltersreal-time(organization,devicetype,checksstatus) rather than retrieving all devices andcanfilteringsignificantlyclient-side.increaseThisresponsereducestime. Use it judiciously for critical operationsbandwidth andconsiderimprovescaching results for dashboard displays.performance. -
ErrorHandleHandlingdevice operations carefully:ImplementOperationsretrylikelogicreboot,for 5xx errorsfactory, andrespectdevice_factoryratearelimits.immediateWhenandcreatingirreversible.devices,Alwayshandle 409 conflicts gracefully by checking if theverify devicealreadynamesexistsandwithconsiderthemaintenancesamewindowsserialbeforenumbertriggeringorthesename.operations. -
FilteringMonitorOptimizationpending settings:UseRegularspecificpollingfiltersoflikethefield helps track configuration synchronization andorganizationpending_settingsidentifytypetodevicesreducewithresponsestalepayloadconfigurationssize.thatCombinemaymultipleneedfilters to create precise device queries rather than filtering large result sets client-side.attention. -
DateImplementFormatproperConsistencyerror handling:AlwaysDeviceuseoperationsISOcanformatfail due to connectivity issues, device states, or conflicts. Implement retry logic with exponential backoff fordatetimetransientparameters (2024-01-15T14:30:00Z). Include timezone information to avoid ambiguity in multi-region deployments.failures. -
PartialUseUpdatesmeaningful device names:PreferDevicenamesPATCHoverserveas the primary identifier throughout the API. Use consistent naming conventions that include location, function, and sequence information forPUTmosteasierupdate operations to avoid accidentally clearing fields that weren't intended to be modified. ReservePUTfor complete data synchronization scenarios.management. -
SecuritySecureConsiderationscredential management:StoreWhenAPIcreatingtokensor updating devices with authentication credentials, ensure passwords are generated securely androtatestoredthemappropriatelyregularly.inUseyourorganization-basedmanagementfiltering to ensure users only access devices within their scope of responsibility.systems.