Inventory Type
Endpoints Summary
GET
/inventory_type/
Swagger ↗
GET
/inventory_type/{id}/
Swagger ↗
The Inventory Type API endpoints allow you to retrieve information about different device types
of inventory devicesin your inventory system. These endpoints are essential for understandingwhatthe categorization and classification of devices, providing metadata about devicetypesprofilesareincludingavailabletheir names, descriptions, andtheirconnectionspecific configurations, making them useful for building device management interfaces and reporting systems.requirements.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Inventory Type API provides access to device type definitions that categorize and describe thedifferent various typeskinds of inventory devices managed in your system. These device types serve as templates or profiles that define commonthe characteristics, connection requirements, and properties forof similarphysical devices.devices in your inventory.
Key Concepts:
- Device Types: Predefined categories that classify inventory devices (e.g., "Router", "Switch", "Server")
-
Connection Profiles: Associated network or interface configurations
thatfordefineeachhow to connect to devices of thisdevice type -
Short Names: Slug-formatted identifiers used in reports, charts, and
UIsystemelementsreferences
Common Integration Scenarios:
PopulatingRetrievingdropdownavailablemenusdevicewhentypesadding newfor inventorydevicesmanagement interfaces
TheseThe endpointsAPI work together to provide both list and detailed views of device types, supportingsupports pagination for large inventoriesdatasets and provides filtering capabilities forto targetedhelp queries.you find specific device types efficiently.
Endpoints
GET /inventory_type/
Description: Retrieves a paginated list of all inventory device types in yourthe system. This endpoint is idealprimarily forused populatingto display available device categories, populate selection interfaces, generatingand reports, or gettingprovide an overview of all availablesupported device categories.types Thein responseyour includesinventory essentialmanagement information about each device type including names, connection profiles, and descriptions.system.
Use Cases:
Loading device type options forPopulating dropdown menus whencreatingadding new inventoryitemsdevices
Full URL Example:
https://control.zequenze.com/api/v1/inventory_type/?name=router&limit=20&offset=0
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| name | string | query | No | Filter device types by |
| limit | integer | query | No | Number of results to return per page. Default |
| offset | integer | query | No | The |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_type/?name=switch&limit=10&offset=0"10" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 25,15,
"next": "https://control.zequenze.com/api/v1/inventory_type/?limit=10&offset=10",
"previous": null,
"results": [
{
"id": 1,
"name": "Cisco Catalyst Switch",
"short_name": "cisco-catalyst-switch",
"connection_profile": 3,
"description": "Enterprise-grade managedLayer switches3 switch with PoE+ support and advanced Layerrouting 2/3 features"capabilities"
},
{
"id": 2,
"name": "Dell PowerEdge Server",
"short_name": "dell-poweredge-server",
"connection_profile": 7,1,
"description": "Rack-mounted serversserver for data centervirtualization and enterprise applications"
},
{
"id": 3,
"name": "FortinetUbiquiti FortiGateUniFi Firewall"Access Point",
"short_name": "fortinet-fortigate-firewall"ubiquiti-unifi-ap",
"connection_profile": 12,2,
"description": "Next-generationWireless firewallaccess point for enterprise WiFi networks with integratedcentralized security features"management"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns paginated list of inventory device types |
| 401 | Unauthorized - Invalid or missing API token |
| 400 | Bad Request - Invalid query parameters |
GET /inventory_type/{id}/
Description: Retrieves detailed information about a specific inventory device type by its unique ID.identifier. This endpoint provides the complete configuration and metadata for a single device type, including allits fieldsconnection thatprofile mightand befull truncated or summarized in the list view.description.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_type/15/1/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | integer | path | Yes | The unique identifier of the inventory device type to retrieve |
| name | string | query | No |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_type/15/1/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"id": 15,1,
"name": "HPECisco ProCurveCatalyst 2960-X Switch",
"short_name": "hpe-procurve-switch"cisco-catalyst-2960x",
"connection_profile": 8,3,
"description": "HPE24-port networkingGigabit switchesEthernet designedswitch with 4 SFP+ uplink ports. Supports PoE+, advanced QoS, and Layer 3 static routing. Ideal for smallenterprise toaccess mediumlayer business environments. Features include web-based management, VLAN support, and energy-efficient operation. Compatibledeployment with HPE Intelligent Management Center for centralized configurationmanagement and monitoring.capabilities."
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns the requested device type details |
| 401 | Unauthorized - Invalid or missing API token |
| 404 | Not Found - Device type with specified ID does not exist |
Common Use Cases
Use Case 1: Building Device CreationRegistration Interface
WhenRetrieve buildingall aavailable formdevice to add new inventory devices, use types to populate a dropdown menu when administrators add new devices to inventory. Use the list endpoint with GET /inventory_type/availablepagination to handle large numbers of device types.types Users can select the appropriate type, and then use GET /inventory_type/{id}/ to display additional details or validation rules for the selected type.efficiently.
Use Case 2: Device Type Validation
Before registering a new device, fetch specific device type details to validate connection requirements and ensure proper categorization in the inventory system.
Use Case 3: Inventory Reporting and Analytics
Retrieve allQuery device types with to generate reports GET /inventory_type/showingthat devicegroup distribution.and Thecategorize inventory devices, using the short_name field isfor particularly useful forconsistent chart labels and condensedthe reportfull formatsname wherefor spacedetailed is limited.reports.
Use Case 3:4: Connection Profile Management
UseRetrieve thesedevice endpointstypes with their associated connection profiles to understand whichnetwork connectionconfiguration profilesrequirements areand associated with differentautomate device types.setup This is essential before attempting to establish connections to inventory devices, as each type may require specific protocols, ports, or authentication methods.
Use Case 4: Device Type Filtering
Implement search functionality by using the name parameter in GET /inventory_type/ to help users quickly find specific device types when working with large inventories containing many different equipment categories.procedures.
Use Case 5: PaginationAdministrative forDevice LargeType InventoriesSearch
ForUse systemsthe name filter parameter to quickly locate specific device types in administrative interfaces, especially useful in environments with many different device types, implement pagination using the limit and offset parameters. Start with offset=0 and limit=20, then use the next URL from responses to load additional pages as users navigate through the available types.categories.
Best Practices
-
Implement
CachingPagination: Use thelimitandoffsetparameters to handle large inventories efficiently. Start with reasonable page sizes (20-50 items) to balance performance and user experience.
Cache Device Types: Device types typically don't change frequently,infrequently, somaking considerthem cachingexcellent candidates for client-side caching. Cache the resultsfull from GET /inventory_type/ to reduce API callslist and improverefresh performanceperiodically or when modifications are made.
Use PaginationShort WiselyNames for Consistency: SetLeverage reasonablethe limitshort_namevaluesfield (10-50)for database keys, URL slugs, and report identifiers to balanceensure performanceconsistent withreferences useracross experience.your Veryapplication.
Filter Strategically: Use the name parameter for user-driven searches rather than loading all device types, especially in environments with extensive device catalogs.
Handle Connection Profiles: Always checkaccount iffor athe connection_profile isfield associatedwhen working with a device typetypes, beforeas attemptingthis deviceaffects connections.how Nulldevices valuescan indicatebe manualconfigured orand undefinedmanaged connectionin methodsyour network infrastructure.
short_nameError Handling: AlwaysImplement handleproper error handling for 404 responses gracefully when requesting specific device types, as IDs may become invalid if device types are deletedremoved orfrom reorganized
name