S2 Dev metrics API

Usage metrics and data.

Operations 3

GET /metrics Account-level metrics. #
GET /metrics/{basin} Basin-level metrics. #
GET /metrics/{basin}/{stream} Stream-level metrics. #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/s2-dev-metrics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

s2-dev-metrics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: S2, the durable streams access-tokens Metrics API
  description: Streams as a cloud storage primitive.
  termsOfService: https://s2.dev/terms
  contact:
    email: support@s2.dev
  license:
    name: MIT
  version: 1.0.0
servers:
- url: https://a.s2.dev/v1
security:
- access_token: []
tags:
- name: metrics
  description: Usage metrics and data.
paths:
  /metrics:
    get:
      tags:
      - metrics
      summary: Account-level metrics.
      operationId: account_metrics
      parameters:
      - name: set
        in: query
        description: Metric set to return.
        required: true
        schema:
          $ref: '#/components/schemas/AccountMetricSet'
      - name: start
        in: query
        description: Start timestamp as Unix epoch seconds, if applicable for the metric set.
        required: false
        schema:
          type: integer
          format: int32
          minimum: 0
      - name: end
        in: query
        description: End timestamp as Unix epoch seconds, if applicable for the metric set.
        required: false
        schema:
          type: integer
          format: int32
          minimum: 0
      - name: interval
        in: query
        description: Interval to aggregate over for timeseries metric sets.
        required: false
        schema:
          $ref: '#/components/schemas/TimeseriesInterval'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricSetResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
        '408':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
  /metrics/{basin}:
    get:
      tags:
      - metrics
      summary: Basin-level metrics.
      operationId: basin_metrics
      parameters:
      - name: set
        in: query
        description: Metric set to return.
        required: true
        schema:
          $ref: '#/components/schemas/BasinMetricSet'
      - name: start
        in: query
        description: Start timestamp as Unix epoch seconds, if applicable for the metric set.
        required: false
        schema:
          type: integer
          format: int32
          minimum: 0
      - name: end
        in: query
        description: End timestamp as Unix epoch seconds, if applicable for the metric set.
        required: false
        schema:
          type: integer
          format: int32
          minimum: 0
      - name: interval
        in: query
        description: Interval to aggregate over for timeseries metric sets.
        required: false
        schema:
          $ref: '#/components/schemas/TimeseriesInterval'
      - name: basin
        in: path
        description: Basin name.
        required: true
        schema:
          $ref: '#/components/schemas/BasinNameStr'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricSetResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
        '408':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
  /metrics/{basin}/{stream}:
    get:
      tags:
      - metrics
      summary: Stream-level metrics.
      operationId: stream_metrics
      parameters:
      - name: set
        in: query
        description: Metric set to return.
        required: true
        schema:
          $ref: '#/components/schemas/StreamMetricSet'
      - name: start
        in: query
        description: Start timestamp as Unix epoch seconds, if applicable for the metric set.
        required: false
        schema:
          type: integer
          format: int32
          minimum: 0
      - name: end
        in: query
        description: End timestamp as Unix epoch seconds, if applicable for metric set.
        required: false
        schema:
          type: integer
          format: int32
          minimum: 0
      - name: interval
        in: query
        description: Interval to aggregate over for timeseries metric sets.
        required: false
        schema:
          $ref: '#/components/schemas/TimeseriesInterval'
      - name: basin
        in: path
        description: Basin name.
        required: true
        schema:
          $ref: '#/components/schemas/BasinNameStr'
      - name: stream
        in: path
        description: Stream name.
        required: true
        schema:
          $ref: '#/components/schemas/StreamNameStr'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricSetResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
        '408':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
components:
  schemas:
    ErrorInfo:
      type: object
      required:
      - code
      - message
      properties:
        code:
          type: string
        message:
          type: string
    BasinMetricSet:
      type: string
      enum:
      - storage
      - append-ops
      - read-ops
      - read-throughput
      - append-throughput
      - basin-ops
    StreamMetricSet:
      type: string
      enum:
      - storage
    GaugeMetric:
      type: object
      required:
      - name
      - unit
      - values
      properties:
        name:
          type: string
          description: Timeseries name.
        unit:
          $ref: '#/components/schemas/MetricUnit'
          description: Unit of the metric.
        values:
          type: array
          items:
            type: array
            items: false
            prefixItems:
            - type: integer
              format: int32
              minimum: 0
            - type: number
              format: double
          description: 'Timeseries values.

            Each element is a tuple of a timestamp in Unix epoch seconds and a data point.

            The data point represents the value at the instant of the timestamp.'
    StreamNameStr:
      type: string
      maxLength: 512
      minLength: 1
    Metric:
      oneOf:
      - type: object
        description: Single named value.
        required:
        - scalar
        properties:
          scalar:
            $ref: '#/components/schemas/ScalarMetric'
            description: Single named value.
      - type: object
        description: Named series of `(timestamp, value)` points representing an accumulation over a specified interval.
        required:
        - accumulation
        properties:
          accumulation:
            $ref: '#/components/schemas/AccumulationMetric'
            description: Named series of `(timestamp, value)` points representing an accumulation over a specified interval.
      - type: object
        description: Named series of `(timestamp, value)` points each representing an instantaneous value.
        required:
        - gauge
        properties:
          gauge:
            $ref: '#/components/schemas/GaugeMetric'
            description: Named series of `(timestamp, value)` points each representing an instantaneous value.
      - type: object
        description: Set of string labels.
        required:
        - label
        properties:
          label:
            $ref: '#/components/schemas/LabelMetric'
            description: Set of string labels.
    AccountMetricSet:
      type: string
      enum:
      - active-basins
      - account-ops
    LabelMetric:
      type: object
      required:
      - name
      - values
      properties:
        name:
          type: string
          description: Label name.
        values:
          type: array
          items:
            type: string
          description: Label values.
    BasinNameStr:
      type: string
      maxLength: 48
      minLength: 8
    MetricUnit:
      type: string
      enum:
      - bytes
      - operations
    MetricSetResponse:
      type: object
      required:
      - values
      properties:
        values:
          type: array
          items:
            $ref: '#/components/schemas/Metric'
          description: Metrics comprising the set.
    TimeseriesInterval:
      type: string
      enum:
      - minute
      - hour
      - day
    AccumulationMetric:
      type: object
      required:
      - name
      - unit
      - interval
      - values
      properties:
        interval:
          $ref: '#/components/schemas/TimeseriesInterval'
          description: The interval at which data points are accumulated.
        name:
          type: string
          description: Timeseries name.
        unit:
          $ref: '#/components/schemas/MetricUnit'
          description: Unit of the metric.
        values:
          type: array
          items:
            type: array
            items: false
            prefixItems:
            - type: integer
              format: int32
              minimum: 0
            - type: number
              format: double
          description: 'Timeseries values.

            Each element is a tuple of a timestamp in Unix epoch seconds and a data point.

            The data point represents the accumulated value for the time period starting at the timestamp, spanning one `interval`.'
    ScalarMetric:
      type: object
      required:
      - name
      - unit
      - value
      properties:
        name:
          type: string
          description: Metric name.
        unit:
          $ref: '#/components/schemas/MetricUnit'
          description: Unit of the metric.
        value:
          type: number
          format: double
          description: Metric value.
  securitySchemes:
    access_token:
      type: http
      scheme: bearer
      description: Bearer authentication header of the form `Bearer <token>`, where `<token>` is your access token.