Skip to main content

Inventory Type

The Inventory Type API endpoints allow you to retrieve andinformation manageabout devicedifferent typetypes definitionsof withininventory devices in your inventory system. These endpoints helpare youessential categorizefor understanding what device types are available and organizetheir differentspecific typesconfigurations, ofmaking devices,them providing essential metadatauseful for building device classificationmanagement interfaces and managementreporting workflows.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 describeclassify different kinds ofinventory devices (e.g., "Server", "Router", "Switch", "Laptop"Server")
  • TypeConnection Profiles: EachAssociated configurations that define how to connect to devices of this type contains metadata like name, description, and configuration parameters
  • FilteringShort Names: SearchSlug-formatted identifiers used in reports, charts, and filterUI typeselements bywhere namespace tois quickly find specific device categorieslimited

Common UseIntegration Cases:Scenarios:

  • Populating dropdown menus forwhen adding new inventory devices
Generating reports and analytics grouped by device creation formstype ValidatingFiltering and searching inventory based on device assignmentscategories againstUnderstanding availableconnection typesrequirements before attempting device communication Building devicedashboards catalogsthat and inventory reports Managingdisplay device classificationdistribution standardsby across your organizationtype

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 new devicesinventory items
  • BuildGenerating administrativereports interfacesshowing forthe managingdistribution of device types in your inventory
  • GenerateBuilding reportsfilters onfor inventory management interfaces
Auditing available device categories Implement search functionality for device type selectionconfigurations

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 ormatching exactto matchfind ondevice types containing the 'name'specified field. Case-insensitive search.text
limit integer query No Number of results to return per page. Default is typically 20.10-50 Maximumdepending recommendedon issystem 100.configuration
offset integer query No The initialstarting index from which to returnfor results. UsedUse with limit for pagination (e.g., offset=20 for page 2 with limit=20).10 gets results 21-30)

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
Validating device type configuration before creating new inventory items Displaying detailed device type information in administrativemanagement panelsinterfaces ValidateRetrieving connection profile associations for device specificationscommunication before creating inventory items Retrieve type-specific configuration templates Build device comparison toolssetup

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 device profile name field (typically usedredundant when using ID but available for validation or cross-reference)consistency)

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 detailedthe requested device type informationdetails
401 Unauthorized - Invalid or missing API token
404 Not Found - Device type with specified ID does not exist
400 Bad Request - Invalid ID format

Common Use Cases

Use Case 1: Building Device Creation FormsInterface

When building usera interfacesform forto addingadd new devicesinventory to inventory,devices, use theGET list endpoint/inventory_type/ to populate a dropdown menusmenu with available device types. FilterUsers bycan nameselect tothe implementappropriate type-aheadtype, searchand functionality.

then
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, Cacheso listconsider responsescaching forthe 15-30results minutesfrom GET /inventory_type/ to reduce API calls and improve performance, especially for dropdown populations.

    performance
  • Use Pagination EffectivelyWisely: When displaying large lists of device types, implement proper pagination withSet reasonable pagelimit sizesvalues (10-25 items)50) to maintainbalance goodperformance with user experience.

    Very large limits can slow down responses
  • Handle FilteringConnection GracefullyProfiles: WhenAlways implementingcheck searchif functionality,a debounceconnection_profile useris inputassociated andwith providea cleardevice feedbacktype whenbefore noattempting resultsdevice matchconnections. theNull filtervalues criteria.

    indicate manual or undefined connection methods
  • 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: Always check forhandle 404 responses gracefully when fetchingrequesting specific device types by ID,types, as typesIDs may bebecome removedinvalid if types are deleted or archived. Implement fallback behavior for missing types. reorganized

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.

interfaces