Skip to main content

Inventory Parameter

ManageThe Inventory Parameter API provides access to configuration parameters used throughout the inventory parameterssystem. These endpoints allow you to retrieve parameter definitions, their allowed values, and theirgroup-based groupingsfiltering withinfor theorganizing system.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:

    Parameters - Configuration settings that define inventory item properties (e.g., device types, status options, location categories) Groups - Logical collections of related parameters for better organization and filtering Parameter Values - The allowed values or constraints for each parameter

    Common Use Cases:

      Retrieving available device types when creating new inventory items Getting status options for inventory item workflows Building dynamic forms with parameter-driven field options Validating inventory data against defined parameter constraints Organizing parameters by functional groups (hardware, software, location, etc.)

      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:

        Loading parameter options for inventory item creation forms Discovering available device types, status options, or location categories Building administrative interfaces for parameter management Filtering parameters by functional groups (e.g., only hardware-related parameters)

        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 nameID fieldto get only parameters belonging to a specific functional 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 theresults resultsfor pagination

        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
        403400 ForbiddenBad Request - Invalid query parameters (e.g., invalid group ID)

        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:

          Getting complete parameter definition before using it in inventory operations Validating parameter configuration and allowed values Building parameter-specific validation logic in client applications Retrieving parameter metadata for administrative interfaces

          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
          - Invalid 403or Forbiddenmissing API token 404 Not Found - Parameter with specified ID does not foundexist 400 Bad Request - Invalid parameter ID format

          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 theGroup groupFiltering: filter to organize parametersFilter by category for better management
          Implement pagination using limit and offset parameters for large datasets Cache parameter definitions when possiblegroups to reduce APIresponse callssize and improve performance when you only need specific types of parameters Validate Implement Caching: Cache parameter lists on the client side since they change infrequently, but refresh when inventory configuration is updated Validate Before Submission: Always fetch current parameter details to validate data types and requirements before submitting inventory dataitems, as allowed values may change Monitor Handle Pagination: Use appropriate limit values (20-50 items) when listing parameters to balance performance and usability Error Handling: Implement retry logic for network failures and graceful fallbacks when parameters are temporarily unavailable Security: Never expose parameter changesvalidation aslogic theythat maycould affectreveal existingbusiness inventoryrules; recordsuse these endpoints to get current constraints dynamically