GET
/
metrics
curl --request GET \
  --url https://aws.s2.dev/v1/metrics \
  --header 'Authorization: Bearer <token>'
{
  "values": [
    {
      "scalar": {
        "name": "<string>",
        "unit": "bytes",
        "value": 123
      }
    }
  ]
}

Metric sets

active-basins

Returns a label metric representing all basins which had at least one stream within the specified period.

This can be used to determine which basins to request basin-specific metrics for, when attempting to summarize account-level metrics for a period.

Requires a start and end timestamp.

account-ops

Returns a set of accumulation metrics, one per account operation. Each account-level request is a single operation, and this endpoint will return as many timeseries as there are distinct basin operations with non-zero values within the specified period.

Requires a start and end timestamp. Accepts an optional interval parameter for minute / hour / day aggregations.

Requests for account-metrics, basin-metrics, and stream-metrics are also account operations that are metered the same way!

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

set
enum<string>
required

Metric set to return.

Available options:
active-basins,
account-ops
start
integer

Start timestamp as Unix epoch seconds, if applicable for the metric set.

Required range: x >= 0
end
integer

End timestamp as Unix epoch seconds, if applicable for the metric set.

Required range: x >= 0
interval
enum<string>

Interval to aggregate over for timeseries metric sets.

Available options:
minute,
hour,
day

Response

200
application/json

The response is of type object.