Inventory Parameter
ManageThe Inventory Parameter API provides access to configuration parameters used throughout the inventoryparameterssystem. These endpoints allow you to retrieve parameter definitions, their allowed values, andtheirgroup-basedgroupingsfilteringwithinfortheorganizingsystem.configuration options across your inventory management workflows.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Inventory Parameter endpoints manage configuration parameters that define how inventory items are categorized, configured, and managed within the system. These parameters serve as the foundation for inventory item attributes, validation rules, and organizational structures.
Key Concepts:
Common Use Cases:
How These Endpoints Work Together: Use the list endpoint to browse all available parameters with optional group filtering, then use the detail endpoint to get comprehensive information about specific parameters including their validation rules and allowed values.
Endpoints
GET /inventory_parameter/
RetrieveDescription: Retrieves a paginated list of all inventory parameters with optional filtering by parameter group. This endpoint is essential for discovering available configuration options and building dynamic inventory management interfaces.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_parameter/?group=1&limit=20&offset=0
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| group | integer | query | No | Filter parameters by group |
| limit | integer | query | No | Number of results to return per page (default: 20, max: 100) |
| offset | integer | query | No | The initial index from which to return |
ExamplecURL Request:Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_parameter/?group=1&limit=20&offset=010" \
-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=1&limit=2010&offset=20"10",
"previous": null,
"results": [
{
"id": 1,
"name": "CPUdevice_type",
Cores""display_name": "Device Type",
"description": "NumberCategorizes ofinventory CPUitems coresby available"device type",
"group": {
"id": 1,
"name": "hardware",
"display_name": "Hardware Parameters"
},
"data_type": "integer"choice",
"required": true,
"allowed_values": ["laptop", "desktop", "server", "network_device", "mobile"],
"default_value": null,
"is_required": false,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:20T14:45:00Z"
},
{
"id": 2,
"name": "Memorydevice_status",
Size""display_name": "Device Status",
"description": "TotalCurrent systemoperational memorystatus inof GB"the device",
"group": {
"id": 1,
"name": "hardware",
"display_name": "Hardware Parameters"
},
"data_type": "decimal"choice",
"required": true,
"allowed_values": ["active", "inactive", "maintenance", "retired", "pending"],
"default_value": "8.0"pending",
"is_required": true,
"created_at": "2024-01-15T11:00:15T10:31:00Z",
"updated_at": "2024-01-15T11:00:18T09:20:00Z"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns paginated list of inventory parameters |
| 401 | Unauthorized - Invalid or missing API token |
GET /inventory_parameter/{id}/
RetrieveDescription: Retrieves detailed information about a specific inventory parameter by its ID. This endpoint provides comprehensive parameter details including validation rules, allowed values, and usage constraints.
Use Cases:
Full URL Example:
https://control.zequenze.com/api/v1/inventory_parameter/1/?group=1
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | integer | path | Yes | Unique identifier of the inventory parameter to retrieve |
| group | integer | query | No | Filter parameters by group name field (additional context filtering) |
ExamplecURL Request:Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_parameter/1/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"id": 1,
"name": "CPUdevice_type",
Cores""display_name": "Device Type",
"description": "NumberCategorizes ofinventory CPUitems coresby available"device type for proper management and reporting",
"group": {
"id": 1,
"group_name"name": "hardware",
"display_name": "Hardware Specifications"Parameters",
"description": "Parameters related to physical hardware configuration"
},
"data_type": "integer"choice",
"required": true,
"allowed_values": [
"laptop",
"desktop",
"server",
"network_device",
"mobile",
"tablet",
"printer",
"monitor"
],
"default_value": null,
"is_required": false,
"validation_rules": {
"min_value"min_length": 1,null,
"max_value"max_length": 64null,
"pattern": null,
"custom_validation": "device_type_validator"
},
"usage_count": 1247,
"is_active": true,
"created_by": {
"id": 5,
"username": "admin",
"email": "admin@company.com"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:20T14:45:00Z",
"last_used": "2024-01-22T16:20:00Z"
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns detailed parameter information |
| 401 | Unauthorized |
Common Use Cases
Use Case 1: Building Dynamic Inventory Forms
Retrieve all parameters for a specific group to populate form fields when creating new inventory items, ensuring users can only select valid parameter values.
# Get all hardware parameters for device creation form
GET https://control.zequenze.com/api/v1/inventory_parameter/?group=1&limit=50
Use Case 2: Parameter Validation
Before submitting inventory data, fetch specific parameter details to validate user input against allowed values and requirements.
# Validate device type parameter
GET https://control.zequenze.com/api/v1/inventory_parameter/1/
Use Case 3: Administrative Parameter Management
List all parameters with pagination to build administrative interfaces for managing inventory configuration options.
# Get paginated list of all parameters for admin panel
GET https://control.zequenze.com/api/v1/inventory_parameter/?limit=25&offset=0
Use Case 4: Group-Based Parameter Discovery
Filter parameters by specific groups to load only relevant configuration options for different inventory workflows.
# Get only software-related parameters
GET https://control.zequenze.com/api/v1/inventory_parameter/?group=2
Best Practices
-
Use
theGroupFiltering:groupfilter to organize parametersFilter bycategory for better management
limitoffset