Inventory Metric
Endpoints Summary
GET
/inventory_metric/
Swagger ↗
GET
/inventory_metric/{id}/
Swagger ↗
The Inventory Metric API provides endpoints for retrieving
informationandaboutmanaging inventory metricsusedwithintothemonitorZequenzeandControltrack inventory items.system. These endpoints allow you tolist all available metrics with filtering capabilities and retrieveaccess detailed information aboutspecificvariousmetrics.measurementCommonparametersuseusedcasestoincludetrackbuildinginventorydashboards,performance,configuringresourcemonitoring systems,utilization, andanalyzingoperationalinventorystatisticsperformanceacrossdata.your infrastructure.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Inventory Metric API categoryis enablesdesigned to help you to access and manage inventorythe various metrics within your monitoring and tracking system. Inventory metrics are measurements that help you track various aspects of your inventory items, such as stock levels,system's performance indicators,and orstatus. Metrics are essential measurement points that provide insights into resource utilization, operational statistics.efficiency, and system health across your infrastructure.
These endpoints are essentialcommonly used for:
-
DashboardMonitoringCreationand Analytics:Building custom dashboards that display real-time inventoryRetrieve metrics data for dashboards, reports, and monitoring systems -
MonitoringPerformance Tracking: Access specific metrics to analyze trends and identify optimization opportunities
The API supports three types of metrics:
Delta (change values between measurements). Each metric can be associatedorganized withinto a group for organizationgroups and maylinked includeto specific parameters for customization.structured data organization.
Endpoints
GET /inventory_metric/
Description: Retrieves a paginated list of all inventory metrics available in theyour system. This endpoint supportsis filtering by metric name and includes pagination controlsessential for handling large datasets. Use this endpoint when you need to browsediscovering available metrics, searchbuilding formetric specificcatalogs, metricsand by name, or buildimplementing metric selection interfaces.interfaces in applications.
Use Cases:
- Building
adashboardsdropdownthatlistallowofusers to select from available metricsfor dashboard configuration SearchingCreatingformonitoringmetricsconfigurationswithbyspecificdiscovering metric namesorandpatternstypesRetrievingAuditing and documenting all metricsfortrackedbulkinoperationsyourorinventorysynchronizationsystemImplementingFilteringmetricmetricsdiscoverybyinnamemonitoringtoapplicationsfind specific measurement categories
Full URL Example:
https://control.zequenze.com/api/v1/inventory_metric/?name=stock_levelcpu_usage&limit=2520&offset=0
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| name | string | query | No | Filter |
| limit | integer | query | No | Number of results to return per |
| offset | integer | query | No |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_metric/?name=stockstorage&limit=10&offset=0" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 25,45,
"next": "https://control.zequenze.com/api/v1/inventory_metric/?limit=10&offset=10",
"previous": null,
"results": [
{
"id": 1,101,
"name": "stock_level_current"storage_utilization_percent",
"group": 2,5,
"description": "CurrentPercentage inventoryof stockstorage levelspace forcurrently items"utilized across all storage devices",
"type": "a",
"parameter": 1011001
},
{
"id": 2,102,
"name": "stock_movement_delta"storage_capacity_gb",
"group": 2,5,
"description": "ChangeTotal storage capacity in stockgigabytes levelsavailable overin specifiedthe time period"inventory",
"type": "d"a",
"parameter": 1021002
},
{
"id": 3,103,
"name": "total_items_processed"storage_requests_total",
"group": 1,5,
"description": "Cumulative count of itemsstorage processedallocation throughrequests inventory"processed",
"type": "c",
"parameter": null1003
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns paginated list of inventory metrics |
| 401 | Unauthorized - Invalid or missing Bearer token |
GET /inventory_metric/{id}/
Description: Retrieves detailed information about a specific inventory metric by its unique ID.identifier. This endpoint returnsprovides complete metric informationconfiguration details including its type, description, groupassociated association,group, and parameter configuration. Use this endpoint when you need full details about a specific metric for configuration or display purposes.relationships.
Use Cases:
DisplayingGettingdetailedcomplete details for a specific metricinformationto display inconfigurationmonitoring interfaces- Validating metric
propertiesconfiguration before using it inmonitoringcalculationssystemsor reports
Full URL Example:
https://control.zequenze.com/api/v1/inventory_metric/1/101/
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | integer | path | Yes | Unique identifier of the inventory metric to retrieve |
| name | string | query | No | Additional filter by metric name (typically not needed when using specific ID) |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_metric/1/101/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"id": 1,101,
"name": "warehouse_capacity_utilization"cpu_utilization_percent",
"group": 3,
"description": "PercentageAverage ofCPU warehouseutilization capacity currently being utilizedpercentage across all inventorycompute locations"resources in inventory",
"type": "a",
"parameter": 2052001
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns the requested inventory metric details |
| 401 | Unauthorized - Invalid or missing Bearer token |
| 403 |
Common Use Cases
Use Case 1: Building a MonitoringMetrics Dashboard
Retrieve all available metrics using the list endpoint, then fetch detailedspecific informationmetric for selected metricsdetails to buildpopulate comprehensivedashboard monitoringconfiguration dashboards.options. Filter by metric typename to separatefind real-timemetrics valuesrelated (absolute)to fromspecific cumulativecategories counterslike and"cpu", change"memory", indicators.or "network".
Use Case 2: ConfiguringMonitoring InventorySystem AlertsIntegration
Use theboth list endpointendpoints to discover available metrics and their types (Absolute, Counter, Delta) to properly configure external monitoring tools that need to understand how to aggregate and display the data correctly.
Use Case 3: Metric Validation and Documentation
Fetch individual metrics by ID to validate their current configuration, understand their parameter relationships, and generate documentation about what metrics are available in your inventory system.
Use Case 4: Performance Analysis Setup
Query metrics by name patterns to find all performance-related metrics, then retrieveuse specificthe metricdetailed detailsendpoint to understand their types and parametersdescriptions for setting up automated alertsperformance whenanalysis inventory thresholds are reached.workflows.
Use Case 3:5: MetricAudit Discoveryand forCompliance Third-Party IntegrationReporting
ProgrammaticallyRetrieve discovercomprehensive lists of all available inventory metrics using the list endpoint with pagination, then use the detail endpoint to gather complete specifications needed for integrating with external monitoring or analytics platforms.
Use Case 4: Inventory Reporting Setup
Search for specific metrics by name pattern using the name filter, then retrieve detailed information about selectedtracked metrics to configureensure automatedcompliance with monitoring requirements and to document what operational data is being collected from your inventory reports that track stock levels, movement, and performance indicators.systems.
Best Practices
-
Use Pagination Effectively: When retrieving large numbers of metrics,
implementuseproper pagination usingappropriate limitandvaluesoffset(typicallyparameters20-100) toavoidbalance performanceissueswithanddatatimeoutscompleteness -
Cache Metric
DefinitionsMetadata: Metric definitionstypically don'tchangefrequently,infrequently, soconsider cachingcache the results to reduce API callsandwhenimprovebuildingapplicationapplicationsperformancethat reference metrics repeatedly -
Filter
Earlyby Name Strategically: Use the nameparameterfilter tofilterfind metricson the server sideefficiently rather than retrieving all metrics and filtering client-side -
HandleUnderstand Metric TypesAppropriately:UnderstandPay attention to thedifferencetypebetweenfieldabsolute,(a/c/d)counter,asanditdeltaaffectsmetricshowtoyouproperlyshould interpret anddisplayaggregate metricdatavalues in your applications - Handle Group Relationships: Use the group field to organize related metrics together in user interfaces and reports