Interface Metrics

All Known Implementing Classes:
MetricsImpl

public interface Metrics
Client interface for the Equinix Fabric Metrics API (POST /fabric/v4/metrics/search). It replaces the per-asset GET /{asset}/{id}/metrics and the /ports/{id}/stats and /connections/{id}/stats statistics endpoints, which spec 4.34.0 deprecates and this SDK no longer calls.

The search requires exactly one /subject and at least one /name (live-verified 2026-11-11). Build the filter with MetricQuery, or use the typed helpers.

Author:
ianjones
See Also:
  • Method Details

    • search

      Searches metrics with a filter built by a MetricQuery.
      Parameters:
      query - the query (one subject, at least one metric name)
      Returns:
      a paginated, filtered list of matching metrics
    • search

      Searches metrics with a hand-built filter.
      Parameters:
      filter - the filter; it must contain one /subject and a /name expression
      sort - the sort criteria, or null
      Returns:
      a paginated, filtered list of matching metrics
      Throws:
      IllegalArgumentException - when the filter lacks the required expressions
    • forConnection

      List<Metric> forConnection(String connectionUuid, LocalDateTime fromDateTime, LocalDateTime toDateTime, String... names)
      Returns every page of the named metrics of one connection over a time range.
      Parameters:
      connectionUuid - the connection uuid
      fromDateTime - start of the range, UTC wall clock
      toDateTime - end of the range, UTC wall clock
      names - the metric names, for example equinix.fabric.connection.bandwidth_tx.usage
      Returns:
      the metrics
    • forPort

      List<Metric> forPort(String portUuid, LocalDateTime fromDateTime, LocalDateTime toDateTime, String... names)
      Returns every page of the named metrics of one port over a time range.
      Parameters:
      portUuid - the port uuid
      fromDateTime - start of the range, UTC wall clock
      toDateTime - end of the range, UTC wall clock
      names - the metric names, for example equinix.fabric.port.bandwidth_rx.usage
      Returns:
      the metrics
    • forMetro

      List<Metric> forMetro(String metroCode, LocalDateTime fromDateTime, LocalDateTime toDateTime, String... names)
      Returns every page of the named metrics of one metro over a time range.
      Parameters:
      metroCode - the metro code, for example SV
      fromDateTime - start of the range, UTC wall clock
      toDateTime - end of the range, UTC wall clock
      names - the metric names, for example equinix.fabric.metro.sv_dc.latency
      Returns:
      the metrics
    • getMetricsByName

      List<Metric> getMetricsByName(String name, String value)
      Retrieves metrics by wildcard metric name (GET /fabric/v4/metrics). Only the wildcard metro metric types are supported (for example equinix.fabric.metro.*.latency or equinix.fabric.metro.*.jitter_avg). This endpoint does not support time-range filtering.
      Parameters:
      name - the wildcard metric name (required)
      value - which value to retrieve (for example last; required)
      Returns:
      the list of matching metrics