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

Documentation Index

Fetch the complete documentation index at: https://s2.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

Metrics concepts

Review metric sets, parameters, scopes, and response types.

Metric sets

storage

gauge of cumulative stored bytes, per hour, aggregated across all streams within the basin. Requires a start and end timestamp.

append-ops

Returns accumulation of append operations aggregated across all streams within the basin, grouped by storage class. An append operation is defined as one minute of appends to a single stream, using a single TCP connection. For instance, 10 unary appends to stream X, each initializing a new connection, would be 10 append operations. 10 unary or streaming session appends to stream X, on a single TCP connection, within a single minute, would be 1 append operation. Requires a start and end timestamp. Accepts an optional interval parameter for minute / hour / day aggregations.

read-ops

Returns two accumulation metrics of read operations, aggregated across all streams within the basin: one for unary reads, and another for streaming reads. A streaming read operation is defined as up to one minute of a streaming read response, from a single stream, using a single TCP connection. A unary read operation is a single read request that does not return a streaming body. Requires a start and end timestamp. Accepts an optional interval parameter for minute / hour / day aggregations.

read-throughput

accumulation of read throughput in bytes, aggregated across all streams within the basin. Requires a start and end timestamp. Accepts an optional interval parameter for minute / hour / day aggregations.
This metric set does not currently separate egress traffic by client origin, which will be a dimension for billing.

append-throughput

Returns two accumulation metrics of appended throughput in bytes, aggregated across all streams within the basin: one for appends against express storage class streams, and another for appends against standard storage class streams. Requires a start and end timestamp. Accepts an optional interval parameter for minute / hour / day aggregations.

basin-ops

Set of accumulation metrics, one per basin operation. Each basin-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.

Authorizations

Authorization
string
header
required

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

Path Parameters

basin
string
required

Basin name.

Required string length: 8 - 48

Query Parameters

set
enum<string>
required

Metric set to return.

Available options:
storage,
append-ops,
read-ops,
read-throughput,
append-throughput,
basin-ops
start
integer<int32>

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

Required range: x >= 0
end
integer<int32>

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

values
object[]
required

Metrics comprising the set.

Single named value.