Skip to main content

Inventory Parameter

Manage inventory parameters and their groupings within the system.

Base URL: https://control.zequenze.com/api/v1

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Endpoints

GET /inventory_parameter/

Retrieve a paginated list of inventory parameters with optional filtering by group.

Parameters:

Parameter Type In Required Description
group integer query No Filter parameters by group name field
limit integer query No Number of results to return per page
offset integer query No The initial index from which to return the results

Example Request:

GET /api/v1/inventory_parameter/?group=1&limit=20&offset=0

Example Response:

{
  "count": 45,
  "next": "https://control.zequenze.com/api/v1/inventory_parameter/?limit=20&offset=20",
  "previous": null,
  "results": [
    {
      "id": 1,
      "name": "CPU Cores",
      "description": "Number of CPU cores available",
      "group": 1,
      "data_type": "integer",
      "default_value": null,
      "is_required": false,
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    },
    {
      "id": 2,
      "name": "Memory Size",
      "description": "Total system memory in GB",
      "group": 1,
      "data_type": "decimal",
      "default_value": "8.0",
      "is_required": true,
      "created_at": "2024-01-15T11:00:00Z",
      "updated_at": "2024-01-15T11:00:00Z"
    }
  ]
}
Status Description
200 Success
401 Unauthorized
403 Forbidden

GET /inventory_parameter/{id}/

Retrieve detailed information about a specific inventory parameter by its ID.

Parameters:

Parameter Type In Required Description
id integer path Yes Unique identifier of the inventory parameter
group integer query No Filter parameters by group name field

Example Request:

GET /api/v1/inventory_parameter/1/

Example Response:

{
  "id": 1,
  "name": "CPU Cores",
  "description": "Number of CPU cores available",
  "group": 1,
  "group_name": "Hardware Specifications",
  "data_type": "integer",
  "default_value": null,
  "is_required": false,
  "validation_rules": {
    "min_value": 1,
    "max_value": 64
  },
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}
Status Description
200 Success
401 Unauthorized
403 Forbidden
404 Parameter not found

Best Practices

  • Use the group filter to organize parameters by category for better management
  • Implement pagination using limit and offset parameters for large datasets
  • Cache parameter definitions when possible to reduce API calls
  • Validate parameter data types and requirements before submitting inventory data
  • Monitor parameter changes as they may affect existing inventory records