Inventory Parameter
The Inventory Parameter API endpoints allow you to retrieve and manage parameter definitions that describe the configurable and monitorable attributes of devices in your inventory. These endpoints are essential for understanding what parameters are available for device configuration, monitoring, and data collection across your managed infrastructure.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Inventory Parameter API provides access to parameter definitions that serve as templates for device configuration and monitoring. These parameters define the structure and behavior of data fields that can be applied to devices in your inventory system.
Each inventory parameter includes essential metadata such as:
- Parameter identification (name, variable name, short name)
- Data type specification (string, integer, boolean, select, etc.)
- Behavioral flags (required, read-only, metric tracking)
- Group association for logical organization
- Position ordering for consistent UI presentation
Key Concepts:
- Parameter Types: Determine how data is displayed and validated (string, integer, boolean, select, etc.)
- Metric Parameters: When enabled, the system stores historical data for trend analysis
- Read-only Parameters: Used for storing data captured from devices, not for configuration
- Parameter Groups: Logical collections that organize related parameters together
- Discovery Groups: Special groups containing parameters automatically discovered by the system
Common Integration Scenarios:
- Building dynamic configuration forms based on available parameters
- Retrieving parameter definitions before creating device configurations
- Understanding which parameters support historical tracking for monitoring dashboards
- Filtering parameters by group to organize configuration workflows
Endpoints
GET /inventory_parameter/
Description: Retrieves a paginated list of all inventory parameter definitions. This endpoint is typically used to build dynamic configuration interfaces, understand available parameter types, or sync parameter definitions with external systems.
Use Cases:
- Building dynamic device configuration forms in a web application
- Synchronizing parameter definitions with external configuration management systems
- Auditing available parameters across different device groups
- Creating parameter selection interfaces for reporting tools
Full URL Example:
https://control.zequenze.com/api/v1/inventory_parameter/?group=5&limit=50&offset=0
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| group | integer | query | No | Filter parameters by group ID to retrieve only parameters belonging to a specific parameter group |
| limit | integer | query | No | Number of results to return per page (default pagination applies if not specified) |
| offset | integer | query | No | The initial index from which to return results for pagination |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_parameter/?group=5&limit=20&offset=0" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 45,
"next": "https://control.zequenze.com/api/v1/inventory_parameter/?group=5&limit=20&offset=20",
"previous": null,
"results": [
{
"id": 12,
"name": "Device Hostname",
"short_name": "hostname",
"variable_name": "device_hostname",
"type": "string",
"position": 1,
"required": true,
"read_only": false,
"metric": false,
"group": {
"id": 5,
"name": "Network Configuration",
"service": "network-mgmt",
"discovery_group": false,
"title": "Network Settings"
}
},
{
"id": 13,
"name": "DHCP Enabled",
"short_name": "dhcp-enabled",
"variable_name": "dhcp_enabled",
"type": "boolean",
"position": 2,
"required": false,
"read_only": false,
"metric": true,
"group": {
"id": 5,
"name": "Network Configuration",
"service": "network-mgmt",
"discovery_group": false,
"title": "Network Settings"
}
},
{
"id": 14,
"name": "CPU Usage",
"short_name": "cpu-usage",
"variable_name": "cpu_usage_percent",
"type": "decimal",
"position": 3,
"required": false,
"read_only": true,
"metric": true,
"group": {
"id": 5,
"name": "Network Configuration",
"service": "network-mgmt",
"discovery_group": false,
"title": "Network Settings"
}
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns paginated list of inventory parameters |
| 400 | Bad Request - Invalid query parameters |
| 401 | Unauthorized - Invalid or missing authentication token |
| 403 | Forbidden - Insufficient permissions to access inventory parameters |
GET /inventory_parameter/{id}/
Description: Retrieves detailed information about a specific inventory parameter by its ID. This endpoint provides complete parameter definition including all metadata, type information, and group associations needed for implementation.
Use Cases:
- Retrieving detailed parameter specifications before creating device configurations
- Validating parameter constraints and types during form validation
- Understanding parameter relationships and group associations
- Implementing parameter-specific UI components based on type and flags
Full URL Example:
https://control.zequenze.com/api/v1/inventory_parameter/12/?group=5
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | integer | path | Yes | The unique identifier of the inventory parameter to retrieve |
| group | integer | query | No | Filter by group ID - useful for validation when working within specific parameter groups |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_parameter/12/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"id": 12,
"name": "Device Hostname",
"short_name": "hostname",
"variable_name": "device_hostname",
"type": "string",
"position": 1,
"required": true,
"read_only": false,
"metric": false,
"group": {
"id": 5,
"name": "Network Configuration",
"service": "network-mgmt",
"discovery_group": false,
"title": "Network Settings"
}
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns the requested inventory parameter details |
| 401 | Unauthorized - Invalid or missing authentication token |
| 403 | Forbidden - Insufficient permissions to access this parameter |
| 404 | Not Found - Parameter with specified ID does not exist |
Common Use Cases
Use Case 1: Building Dynamic Configuration Forms
Retrieve all parameters for a specific group to dynamically generate device configuration forms with proper field types, validation rules, and required field indicators.
# Get all parameters for network configuration group
curl -X GET "https://control.zequenze.com/api/v1/inventory_parameter/?group=5" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Use Case 2: Parameter Validation Before Device Updates
Before updating device configurations, retrieve specific parameter details to validate data types, required fields, and read-only restrictions.
# Validate parameter constraints before configuration update
curl -X GET "https://control.zequenze.com/api/v1/inventory_parameter/12/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Use Case 3: Monitoring Dashboard Setup
Identify parameters marked as metrics to build monitoring dashboards and historical trend analysis interfaces.
# Filter and identify metric parameters for dashboard creation
curl -X GET "https://control.zequenze.com/api/v1/inventory_parameter/?limit=100" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Use Case 4: Configuration Template Creation
Retrieve parameter definitions to create reusable configuration templates that can be applied across multiple devices of the same type.
Use Case 5: Discovery Parameter Management
Identify parameters in discovery groups that contain automatically detected device information, which can be promoted to regular configuration groups.
Best Practices
- Use Group Filtering: When building configuration interfaces, filter parameters by group to organize related settings and improve user experience
-
Respect Parameter Types: Always validate input data according to the parameter's
typefield before submitting configuration changes -
Handle Read-Only Parameters: Parameters with
read_only: trueshould be displayed for information only and excluded from configuration forms -
Implement Metric Tracking: Parameters with
metric: trueare suitable for historical data collection and trend monitoring - Cache Parameter Definitions: Parameter definitions change infrequently, making them excellent candidates for client-side caching to improve performance
-
Pagination Strategy: Use appropriate
limitvalues (20-100) when retrieving large parameter sets to balance performance and usability -
Required Field Validation: Always check the
requiredflag when building forms to ensure proper validation before submission -
Position-Based Ordering: Use the
positionfield to maintain consistent parameter ordering across different interfaces