Skip to main content

Inventory Type

Endpoints Summary

Method Path Swagger 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 devices in your inventory system. These endpoints are essential for understanding whatthe categorization and classification of devices, providing metadata about device typesprofiles areincluding availabletheir names, descriptions, and theirconnection specific 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 thatfor defineeach how to connect to devices of thisdevice type
  • Short Names: Slug-formatted identifiers used in reports, charts, and UIsystem elementsreferences
where spaceFiltering: isQuery limitedcapabilities to find specific device types by name or other criteria

Common Integration Scenarios:

  • PopulatingRetrieving dropdownavailable menusdevice whentypes adding newfor inventory devicesmanagement interfaces
Building device categorization dropdowns in user interfaces Generating reports andthat analyticsgroup groupeddevices by device type FilteringSetting andup searchingnew inventory baseddevices onby deviceselecting categoriesfrom available types Understanding connection requirements beforefor attemptingdifferent device communication Building dashboards that display device distribution by typecategories

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 when creatingadding new inventory itemsdevices
Building administrative interfaces for device type management Generating reports showingthat thecategorize distributiondevices ofby device types in your inventory Building filters for inventory management interfacestype Auditing available device typecategories configurationsin the system

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 namethe 'name' field. Supports partial matching to find device types containing the specified text
limit integer query No Number of results to return per page. Default ispagination typicallylimit 10-50applies dependingif onnot system configurationspecified
offset integer query No The startinginitial index forfrom which to return results. Use with limitUsed for pagination (e.g.,to offset=20skip witha limit=10specified getsnumber resultsof 21-30)records

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 (e.g., negative offset)

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:

    Getting complete details when a user selects a specific device type Validating device type configuration before creating new inventory items Displaying detailed device type information in management interfaces Retrieving specific device type data when configuring new inventory items Getting connection profile associationsinformation for device communicationsetup setupprocedures Validating device type details before device registration

    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 AdditionalOptional filter by device profile name field (typically redundant when using ID but availableused for consistency)additional validation)

    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
    400 Bad Request - Invalid ID format or query parameters

    Common Use Cases

    Use Case 1: Building Device CreationRegistration Interface

    WhenRetrieve buildingall aavailable formdevice to add new inventory devices, use GET /inventory_type/types to populate a dropdown menu when administrators add new devices to inventory. Use the list endpoint with 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 GET /inventory_type/ to generate reports 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 the limit and offset parameters 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_name valuesfield (10-50)for database keys, URL slugs, and report identifiers to balanceensure performanceconsistent withreferences useracross experience.your Veryapplication.

    large limits can slow down responses

    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.

    Leverage Short Names: Use the short_name field for UI elements with space constraints, file naming, or generating reports where readable but compact identifiers are needed

    Error 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

    the system. Name Filtering: The name filter supports partial matching, making it useful for implementing search-as-you-type functionality in user interfaces