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 in your inventory system. These endpoints are essential for understanding the categorization and classification of devices, providing metadata about device profiles including their names, descriptions, and connection 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 different kinds of inventory devices in your system. These device types serve as templates or profiles that define the characteristics, connection requirements, and properties of physical devices in your inventory.

Key Concepts:

Common Scenarios:

The API supports pagination for large datasets and provides filtering capabilities to help you find specific device types efficiently.


Endpoints

GET /inventory_type/

Description: Retrieves a paginated list of all inventory device types in the system. This endpoint is primarily used to display available device categories, populate selection interfaces, and provide an overview of supported device types in your inventory management system.

Use Cases:

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 the '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 pagination limit applies if not specified
offset integer query No The initial index from which to return results. Used for pagination to skip a specified number of records

cURL Example:

curl -X GET "https://control.zequenze.com/api/v1/inventory_type/?name=switch&limit=10" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response:

{
  "count": 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 Layer 3 switch with PoE+ support and advanced routing capabilities"
    },
    {
      "id": 2,
      "name": "Dell PowerEdge Server",
      "short_name": "dell-poweredge-server",
      "connection_profile": 1,
      "description": "Rack-mounted server for virtualization and enterprise applications"
    },
    {
      "id": 3,
      "name": "Ubiquiti UniFi Access Point",
      "short_name": "ubiquiti-unifi-ap",
      "connection_profile": 2,
      "description": "Wireless access point for enterprise WiFi networks with centralized 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 identifier. This endpoint provides complete metadata for a single device type, including its connection profile and full description.

Use Cases:

Full URL Example:

https://control.zequenze.com/api/v1/inventory_type/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 Optional filter by device profile name field (typically used for additional validation)

cURL Example:

curl -X GET "https://control.zequenze.com/api/v1/inventory_type/1/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Example Response:

{
  "id": 1,
  "name": "Cisco Catalyst 2960-X Switch",
  "short_name": "cisco-catalyst-2960x",
  "connection_profile": 3,
  "description": "24-port Gigabit Ethernet switch with 4 SFP+ uplink ports. Supports PoE+, advanced QoS, and Layer 3 static routing. Ideal for enterprise access layer deployment with centralized management 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 Registration Interface

Retrieve all available device types to populate a dropdown menu when administrators add new devices to inventory. Use the list endpoint with pagination to handle large numbers of device types 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

Query device types to generate reports that group and categorize inventory devices, using the short_name field for consistent chart labels and the full name for detailed reports.

Use Case 4: Connection Profile Management

Retrieve device types with their associated connection profiles to understand network configuration requirements and automate device setup procedures.

Use Case 5: Administrative Device Type Search

Use the name filter parameter to quickly locate specific device types in administrative interfaces, especially useful in environments with many different device categories.


Best Practices



Revision #4
Created 2026-02-04 05:11:19 UTC by ipena@zequenze.com
Updated 2026-02-11 03:08:36 UTC by ipena@zequenze.com