Inventory Type
The Inventory Type API endpoints allow you to retrieve
andinformationmanageaboutdevicedifferenttypetypesdefinitionsofwithininventory devices in yourinventorysystem. These endpointshelpareyouessentialcategorizefor understanding what device types are available andorganizetheirdifferentspecifictypesconfigurations,ofmakingdevices,themproviding essential metadatauseful for building deviceclassificationmanagement interfaces andmanagementreportingworkflows.systems.
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 the various types of inventory devices managed in your system. These device types serve as templates or categoriesprofiles that define common characteristics, connection requirements, and properties for yoursimilar inventory management system. Device types define the characteristics, capabilities, and classifications that can be applied to physical devices in your inventory.devices.
Key Concepts:
-
Device Types: Predefined categories that
describeclassifydifferent kinds ofinventory devices (e.g., "Server", "Router", "Switch", "Laptop"Server") -
TypeConnection Profiles:EachAssociated configurations that define how to connect to devices of this typecontains metadata like name, description, and configuration parameters -
FilteringShort Names:SearchSlug-formatted identifiers used in reports, charts, andfilterUItypeselementsbywherenamespacetoisquickly find specific device categorieslimited
Common UseIntegration Cases:Scenarios:
- Populating dropdown menus
forwhen adding new inventory devices
These endpoints work together to provide both list views for browsing all available device types and detailed views of device types, supporting pagination for examininglarge specificinventories typeand configurations.filtering capabilities for targeted queries.
Endpoints
GET /inventory_type/
Description: Retrieves a paginated list of all available inventory device types.types in your system. This endpoint supports filtering by name and pagination controls, making itis ideal for buildingpopulating userselection interfacesinterfaces, thatgenerating needreports, toor displaygetting an overview of all available device categories. The response includes essential information about each device type optionsincluding ornames, forconnection administrativeprofiles, viewsand that manage device classifications.descriptions.
Use Cases:
PopulateLoading device type options for dropdown menus when creating newdevicesinventory itemsBuildGeneratingadministrativereportsinterfacesshowingforthemanagingdistribution of device types in your inventoryGenerateBuildingreportsfiltersonfor inventory management interfaces
Full URL Example:
https://control.zequenze.com/api/v1/inventory_type/?name=serverrouter&limit=20&offset=0
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| name | string | query | No | Filter device types by name field. Supports partial |
| limit | integer | query | No | Number of results to return per page. Default is typically |
| offset | integer | query | No | The |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_type/?name=serverswitch&limit=10&offset=0" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 45,25,
"next": "https://control.zequenze.com/api/v1/inventory_type/?limit=10&offset=10",
"previous": null,
"results": [
{
"id": 1,
"name": "DellCisco PowerEdgeCatalyst Server"Switch",
"category"short_name": "server"cisco-catalyst-switch",
"connection_profile": 3,
"description": "EnterpriseEnterprise-grade rack-mountedmanaged serverswitches hardware",with "manufacturer":advanced "Dell",Layer "specifications":2/3 {
"form_factor": "rack",
"power_consumption": "350W",
"dimensions": "1U"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"features"
},
{
"id": 2,
"name": "HPDell ProLiantPowerEdge Server",
"category"short_name": "dell-poweredge-server",
"connection_profile": 7,
"description": "High-performanceRack-mounted serverservers for data center and enterprise workloads"applications"
},
"manufacturer": "HP",
"specifications":
{
"form_factor"id": 3,
"name": "rack"Fortinet FortiGate Firewall",
"power_consumption"short_name": "400W"fortinet-fortigate-firewall",
"dimensions"connection_profile": 12,
"description": "2U"Next-generation },firewall "created_at":with "2024-01-14T15:20:00Z",integrated "updated_at":security "2024-01-14T15:20:00Z"features"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns paginated list of device types |
| 401 | Unauthorized - Invalid or missing API token |
| 400 | Bad Request - Invalid query parameters (e.g., negative offset) |
GET /inventory_type/{id}/
Description: Retrieves detailed information about a specific inventory device type by its unique identifier.ID. This endpoint returns comprehensive details aboutprovides the complete configuration and metadata for a single device type, including all specifications, metadata, and configuration options associated withfields that particularmight type.be truncated or summarized in the list view.
Use Cases:
DisplayGetting complete details when a user selects a specific device type
Full URL Example:
https://control.zequenze.com/api/v1/inventory_type/1/?name=server15/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | integer | path | Yes | The unique identifier of the device type to retrieve |
| name | string | query | No | Additional filter by |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_type/1/15/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"id": 1,15,
"name": "DellHPE PowerEdgeProCurve Server"Switch",
"category"short_name": "server"hpe-procurve-switch",
"connection_profile": 8,
"description": "EnterpriseHPE rack-mountednetworking serverswitches hardwaredesigned for small to medium business environments. Features include web-based management, VLAN support, and energy-efficient operation. Compatible with redundantHPE powerIntelligent suppliesManagement Center for centralized configuration and hot-swappable components",
monitoring."manufacturer": "Dell",
"model_series": "PowerEdge R740",
"specifications": {
"form_factor": "rack",
"rack_units": 2,
"power_consumption": "350W",
"max_power": "750W",
"dimensions": {
"height": "87mm",
"width": "482mm",
"depth": "625mm"
},
"weight": "18.5kg",
"operating_temperature": "10-35°C",
"supported_os": ["Windows Server", "Linux", "VMware ESXi"]
},
"default_configuration": {
"cpu_sockets": 2,
"max_memory": "512GB",
"storage_bays": 8,
"network_ports": 4
},
"compliance_standards": ["FCC", "CE", "ENERGY_STAR"],
"warranty_period": "3_years",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"created_by": {
"id": 12,
"username": "admin",
"email": "admin@company.com"
}
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns |
| 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 Creation FormsInterface
When building usera interfacesform forto addingadd new devicesinventory to inventory,devices, use theGET to populate a dropdown list endpoint/inventory_type/menusmenu with available device types. FilterUsers bycan nameselect tothe implementappropriate type-aheadtype, searchand functionality.
use GET /inventory_type/?name=cisco&limit=10{id}/ to display additional details or validation rules for the selected type.
Use Case 2: DeviceInventory TypeReporting Managementand DashboardAnalytics
Administrative users need to browse and manageRetrieve all device types. Use the list endpointtypes with paginationGET /inventory_type/ to buildgenerate managementreports interfaces,showing thendevice usedistribution. theThe detailshort_name endpointfield tois showparticularly comprehensiveuseful informationfor whenchart userslabels selectand specificcondensed types.report formats where space is limited.
Use Case 3: InventoryConnection ValidationProfile and ReportingManagement
BeforeUse creatingthese endpoints to understand which connection profiles are associated with different device types. This is essential before attempting to establish connections to inventory items,devices, validateas that the specified deviceeach type existsmay andrequire retrievespecific itsprotocols, specifications.ports, Useor theauthentication detail endpoint to ensure compatibility and generate detailed inventory reports with type specifications.methods.
Use Case 4: Device CatalogType GenerationFiltering
GenerateImplement publicsearch orfunctionality internalby using the name parameter in GET /inventory_type/ to help users quickly find specific device catalogstypes bywhen combiningworking bothwith endpointslarge -inventories containing many different equipment categories.
Use Case 5: Pagination for Large Inventories
For systems with many device types, implement pagination using the limit and offset parameters. Start with offset=0 and limit=20, then use the listnext URL from responses to getload alladditional types,pages thenas fetchusers detailsnavigate forthrough eachthe toavailable build comprehensive product catalogs with full specifications.types.
Best Practices
-
Implement Caching: Device types typically don't change
infrequently.frequently,Cachesolistconsiderresponsescachingforthe15-30resultsminutesfromGET /inventory_type/to reduce API calls and improveperformance, especially for dropdown populations.performance -
Use Pagination
Very large limits can slow down responsesEffectivelyWisely:When displaying large lists of device types, implement proper pagination withSet reasonablepagelimitsizesvalues (10-25 items)50) tomaintainbalancegoodperformance with user experience. -
Handle
indicate manual or undefined connection methodsFilteringConnectionGracefullyProfiles:WhenAlwaysimplementingchecksearchiffunctionality,adebounceconnection_profileuserisinputassociatedandwithprovideacleardevicefeedbacktypewhenbeforenoattemptingresultsdevicematchconnections.theNullfiltervaluescriteria. -
Leverage Short Names: Use the
short_namefield for UI elements with space constraints, file naming, or generating reports where readable but compact identifiers are needed
SecurityName ConsiderationsFiltering: EnsureThe APIname tokensfilter aresupports storedpartial securelymatching, andmaking neverit exposeduseful for implementing search-as-you-type functionality in client-sideuser code. Consider implementing token refresh mechanisms for long-running applications.
Performance Optimization: For applications that frequently access device type details, consider batching requests or implementing a local cache strategy to reduce API calls.