Skip to main content

GET /metrics

Retrieve account-level metrics for your S2 account. This endpoint allows you to query different metric sets with optional time ranges and aggregation intervals.

Query Parameters

string
required
Metric set to return. Available values:
  • active-basins - Set of all basins that had at least one stream during the specified period
  • account-ops - Count of append RPC operations, per interval
integer
Start timestamp as Unix epoch seconds. Required for timeseries metric sets.
integer
End timestamp as Unix epoch seconds. Required for timeseries metric sets.
string
Interval to aggregate over for timeseries metric sets. Available values:
  • minute
  • hour
  • day

Response

Returns a MetricSetResponse object containing the requested metrics.
array
Array of metrics comprising the set. Each metric can be one of four types:

Error Responses

Bad Request
Invalid query parameters or malformed request
Forbidden
Invalid or missing authentication token
Request Timeout
Request took too long to process