Skip to main content

Inventory Metric

Endpoints Summary

Method Path Swagger GET /inventory_metric/ Swagger ↗ GET /inventory_metric/{id}/ Swagger ↗

The Inventory Metric API provides endpoints for retrieving informationand aboutmanaging inventory metrics usedwithin tothe monitorZequenze andControl track inventory items.system. These endpoints allow you to list all available metrics with filtering capabilities and retrieveaccess detailed information about specificvarious metrics.measurement Commonparameters useused casesto includetrack buildinginventory dashboards,performance, configuringresource monitoring systems,utilization, and analyzingoperational inventorystatistics performanceacross data.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:

  • DashboardMonitoring Creationand 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
Integration: Connecting yourConnect inventory systemmetrics towith external monitoring tools and alertingbusiness systems Reporting and Analytics: Extracting metric definitions for reporting tools and data analysisintelligence platforms ConfigurationOperational ManagementVisibility: UnderstandingGet availablereal-time metricsand whenhistorical settingdata up automatedabout inventory trackingoperations

The API supports three types of metrics:

    Absolute (a): Point-point-in-time measurements (e.g.values), current stock level) Counter (c): Cumulativecumulative values that only increase (e.g., total items sold) Delta (d): Change-based measurements (e.g., stock movement over time), and

    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 adashboards dropdownthat listallow ofusers to select from available metrics for dashboard configuration
    • SearchingCreating formonitoring metricsconfigurations withby specificdiscovering metric names orand patternstypes
    • RetrievingAuditing and documenting all metrics fortracked bulkin operationsyour orinventory synchronizationsystem
    • ImplementingFiltering metricmetrics discoveryby inname monitoringto applicationsfind 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 metricsresults by metric name. Supports partial ormatching exactfor namefinding match.metrics Case-sensitivecontaining searchspecific on the metric's name fieldkeywords
    limit integer query No Number of results to return per pagepage. (defaultDefault paginationis limittypically applies20, ifmaximum notvaries specified)by system configuration
    offset integer query No StartingThe positioninitial forindex results,from usedwhich to return results. Used for pagination (0-basedthrough indexing)large metric lists

    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
    400403 Bad RequestForbidden - InvalidInsufficient querypermissions parametersto (e.g.,access negativemetrics
    offset) 500 Internal Server Error - System error occurred

    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:

    • DisplayingGetting detailedcomplete details for a specific metric informationto display in configurationmonitoring interfaces
    • Validating metric propertiesconfiguration before using it in monitoringcalculations systemsor reports
    Understanding metric relationships and groupings for proper data interpretation Retrieving metric specificationsmetadata for documentation orand reporting Getting complete metric data forsystem integration with third-party toolspurposes

    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
    Forbidden - Insufficient permissions to access this metric 404 Not Found - Metric with specified ID does not exist 400500 BadInternal RequestServer Error - InvalidSystem IDerror formatoccurred

    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, implementuse proper pagination usingappropriate limit andvalues offset(typically parameters20-100) to avoidbalance performance issueswith anddata timeoutscompleteness
    • Cache Metric DefinitionsMetadata: Metric definitions typically don't change frequently,infrequently, so consider cachingcache the results to reduce API calls andwhen improvebuilding applicationapplications performancethat reference metrics repeatedly
    • Filter Earlyby Name Strategically: Use the name parameterfilter to filterfind metrics on the server sideefficiently rather than retrieving all metrics and filtering client-side
    • HandleUnderstand Metric Types Appropriately: UnderstandPay attention to the differencetype betweenfield absolute,(a/c/d) counter,as andit deltaaffects metricshow toyou properlyshould interpret and displayaggregate metric datavalues in your applications
    • Handle Group Relationships: Use the group field to organize related metrics together in user interfaces and reports
    Implement Proper Error Handling: Always implement proper error handlingcheck for 404 responses when requesting specific metricsmetric by ID,IDs, as metrics may be removed or renamedreorganized SecurityMonitor API Rate Limits: StoreBe APImindful tokensof securelyrequest and use environment variables rather than hardcoding tokens in your applications Rate Limiting: Implement appropriate rate limiting in your applications to avoid overwhelming the API,frequency, especially when makingiterating bulkthrough requestsmultiple individual metric endpoints