smplkit Metrics API
The Metrics API from smplkit — 4 operation(s) for metrics.
The Metrics API from smplkit — 4 operation(s) for metrics.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/smplkit-com:smplkit-com-metrics-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: smplkit Metrics API
description: API for the smplkit platform.
version: 0.1.0
tags:
- name: Metrics
paths:
/api/v1/metric_names:
get:
tags:
- Metrics
summary: List Metric Names
description: 'Return distinct metric names recorded for the account, each with a
representative unit. Plain-JSON response (not JSON:API) — this is
metadata for discovery, not a metric resource.
Default sort is `name` ascending.'
operationId: list_metric_names
security:
- HTTPBearer: []
parameters:
- name: sort
in: query
required: false
schema:
type: string
description: 'Field to sort by. Prefix with `-` for descending order. Default: `name`. Allowed values: `name`, `-name`.'
enum:
- name
- -name
default: name
title: Sort
description: 'Field to sort by. Prefix with `-` for descending order. Default: `name`. Allowed values: `name`, `-name`.'
- name: page[number]
in: query
required: false
schema:
type: integer
description: 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
default: 1
title: Page[Number]
description: 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
- name: page[size]
in: query
required: false
schema:
type: integer
description: Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
default: 1000
title: Page[Size]
description: Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
- name: meta[total]
in: query
required: false
schema:
type: boolean
description: When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
default: false
title: Meta[Total]
description: When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
responses:
'200':
description: Successful Response
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/MetricNamesResponse'
'400':
description: Validation error or malformed request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Missing or invalid authentication
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Resource not found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limit exceeded
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/v1/metrics/bulk:
post:
tags:
- Metrics
summary: Bulk Ingest Metrics
description: Ingest pre-aggregated metric data points. Returns 202 Accepted with no response body.
operationId: bulk_ingest_metrics
requestBody:
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/MetricBulkRequest'
required: true
responses:
'202':
description: Accepted
content: {}
'400':
description: Validation error or malformed request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Missing or invalid authentication
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Resource not found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limit exceeded
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- HTTPBearer: []
/api/v1/metrics:
get:
tags:
- Metrics
summary: List Metrics
description: Query raw metric rows with filtering by name, time range, and dimensions.
operationId: list_metrics
security:
- HTTPBearer: []
parameters:
- name: filter[name]
in: query
required: true
schema:
type: string
title: Filter[Name]
- name: filter[recorded_at]
in: query
required: false
schema:
type:
- string
- 'null'
title: Filter[Recorded At]
- name: sort
in: query
required: false
schema:
type: string
description: 'Field to sort by. Prefix with `-` for descending order. Default: `-recorded_at`. Allowed values: `recorded_at`, `-recorded_at`, `value`, `-value`.'
enum:
- recorded_at
- -recorded_at
- value
- -value
default: -recorded_at
title: Sort
description: 'Field to sort by. Prefix with `-` for descending order. Default: `-recorded_at`. Allowed values: `recorded_at`, `-recorded_at`, `value`, `-value`.'
- name: page[number]
in: query
required: false
schema:
type: integer
description: 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
default: 1
title: Page[Number]
description: 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
- name: page[size]
in: query
required: false
schema:
type: integer
description: Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
default: 1000
title: Page[Size]
description: Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
- name: meta[total]
in: query
required: false
schema:
type: boolean
description: When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
default: false
title: Meta[Total]
description: When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
responses:
'200':
description: Successful Response
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/MetricListResponse'
'400':
description: Validation error or malformed request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Missing or invalid authentication
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Resource not found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limit exceeded
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/v1/metric_rollups:
get:
tags:
- Metrics
summary: List Metric Rollups
description: Query aggregated metric rollups. Requires filter[rollup] for the aggregation interval.
operationId: list_metric_rollups
security:
- HTTPBearer: []
parameters:
- name: filter[name]
in: query
required: true
schema:
type: string
title: Filter[Name]
- name: filter[rollup]
in: query
required: true
schema:
type: string
title: Filter[Rollup]
- name: filter[recorded_at]
in: query
required: false
schema:
type:
- string
- 'null'
title: Filter[Recorded At]
- name: sort
in: query
required: false
schema:
type: string
description: 'Field to sort by. Prefix with `-` for descending order. Default: `bucket`. Allowed values: `bucket`, `-bucket`.'
enum:
- bucket
- -bucket
default: bucket
title: Sort
description: 'Field to sort by. Prefix with `-` for descending order. Default: `bucket`. Allowed values: `bucket`, `-bucket`.'
- name: page[number]
in: query
required: false
schema:
type: integer
description: 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
default: 1
title: Page[Number]
description: 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
- name: page[size]
in: query
required: false
schema:
type: integer
description: Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
default: 1000
title: Page[Size]
description: Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
- name: meta[total]
in: query
required: false
schema:
type: boolean
description: When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
default: false
title: Meta[Total]
description: When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
responses:
'200':
description: Successful Response
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/MetricRollupListResponse'
'400':
description: Validation error or malformed request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Missing or invalid authentication
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Resource not found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limit exceeded
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
MetricBulkRequest:
properties:
data:
items:
$ref: '#/components/schemas/MetricResource'
type: array
title: Data
description: Metric data points to ingest in a single request.
type: object
required:
- data
title: MetricBulkRequest
description: Bulk-ingest request envelope for metric data points.
example:
data:
- attributes:
dimensions:
environment: production
name: flags.evaluations
period_seconds: 60
recorded_at: '2026-04-10T18:00:00Z'
unit: evaluations
value: 1482
type: metric
ListMeta:
properties:
pagination:
$ref: '#/components/schemas/PaginationMeta'
type: object
required:
- pagination
title: ListMeta
description: Top-level ``meta`` block included on every JSON:API list response.
MetricNamesResponse:
properties:
data:
items:
$ref: '#/components/schemas/MetricNameItem'
type: array
title: Data
meta:
$ref: '#/components/schemas/ListMeta'
type: object
required:
- data
- meta
title: MetricNamesResponse
description: Plain-JSON response listing distinct metric names for the account.
ErrorResponse:
properties:
errors:
items:
$ref: '#/components/schemas/Error'
type: array
title: Errors
type: object
required:
- errors
title: ErrorResponse
description: JSON:API error response envelope.
MetricRollupAttributes:
properties:
name:
type: string
title: Name
description: Metric series name the rollup is computed from.
value:
type: string
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
title: Value
description: Sum of the underlying metric values over the bucket.
unit:
type:
- string
- 'null'
title: Unit
description: Unit the value is expressed in.
bucket:
type: string
format: date-time
title: Bucket
description: Start of the time bucket this rollup covers.
rollup:
type: string
title: Rollup
description: Rollup interval. One of `1m`, `5m`, `15m`, `1h`, `6h`, `1d`.
type: object
required:
- name
- value
- bucket
- rollup
title: MetricRollupAttributes
description: An aggregated metric value over a fixed-size time bucket.
MetricListResponse:
properties:
data:
items:
$ref: '#/components/schemas/MetricResource'
type: array
title: Data
meta:
$ref: '#/components/schemas/ListMeta'
type: object
required:
- data
- meta
title: MetricListResponse
description: JSON:API collection response for metric data points.
MetricNameItem:
properties:
name:
type: string
title: Name
description: Distinct metric series name.
unit:
type:
- string
- 'null'
title: Unit
description: Representative unit observed for this series.
type: object
required:
- name
title: MetricNameItem
description: One distinct metric name with a representative unit.
MetricAttributes:
properties:
name:
type: string
title: Name
description: Metric series name, e.g. `flags.evaluations`. Dot-separated.
value:
anyOf:
- type: number
- type: string
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
title: Value
description: Aggregated value for this data point over `period_seconds`.
unit:
type:
- string
- 'null'
title: Unit
description: Unit the value is expressed in, e.g. `evaluations`, `ms`, `bytes`.
period_seconds:
type: integer
title: Period Seconds
description: Length of the aggregation window in seconds (e.g. `60` for a one-minute roll-up).
dimensions:
additionalProperties:
type: string
type: object
title: Dimensions
description: Optional dimension keys that scope the data point, e.g. `environment`, `service`. Used as filter targets on the list endpoint via `filter[dimensions.<key>]=...`.
recorded_at:
type: string
format: date-time
title: Recorded At
description: Start of the aggregation window this data point covers.
created_at:
type:
- string
- 'null'
format: date-time
title: Created At
description: When the data point was ingested.
readOnly: true
type: object
required:
- name
- value
- period_seconds
- recorded_at
title: MetricAttributes
description: A pre-aggregated metric data point recorded for the account.
Error:
properties:
status:
type: string
title: Status
title:
type: string
title: Title
detail:
type:
- string
- 'null'
title: Detail
source:
additionalProperties: true
type:
- object
- 'null'
title: Source
type: object
required:
- status
- title
title: Error
description: Single JSON:API error object.
MetricResource:
properties:
id:
type:
- string
- 'null'
title: Id
type:
type: string
enum:
- metric
title: Type
attributes:
$ref: '#/components/schemas/MetricAttributes'
type: object
required:
- type
- attributes
title: MetricResource
description: 'JSON:API resource envelope for a metric data point.
`id` must not be specified for create requests (the server assigns it).'
example:
attributes:
created_at: '2026-04-10T18:00:01Z'
dimensions:
environment: production
service: user-service
name: flags.evaluations
period_seconds: 60
recorded_at: '2026-04-10T18:00:00Z'
unit: evaluations
value: 1482
id: a1b2c3d4-5678-90ab-cdef-1234567890ab
type: metric
PaginationMeta:
properties:
page:
type: integer
title: Page
description: 1-based page number returned.
size:
type: integer
title: Size
description: Number of items per page.
total:
type:
- integer
- 'null'
title: Total
description: Total number of matching items across all pages. Present only when the request included `meta[total]=true`.
total_pages:
type:
- integer
- 'null'
title: Total Pages
description: Total number of pages at the requested page size. Present only when the request included `meta[total]=true`.
type: object
required:
- page
- size
title: PaginationMeta
description: 'Pagination block returned inside ``meta`` on every list response.
``page`` and ``size`` are always present and echo the parameters that
served the response (their defaults when the client omitted them).
``total`` and ``total_pages`` are present only when the request included
``meta[total]=true``.'
MetricRollupListResponse:
properties:
data:
items:
$ref: '#/components/schemas/MetricRollupResource'
type: array
title: Data
meta:
$ref: '#/components/schemas/ListMeta'
type: object
required:
- data
- meta
title: MetricRollupListResponse
description: JSON:API collection response for metric rollups.
MetricRollupResource:
properties:
type:
type: string
enum:
- metric_rollup
title: Type
attributes:
$ref: '#/components/schemas/MetricRollupAttributes'
type: object
required:
- type
- attributes
title: MetricRollupResource
description: JSON:API resource envelope for a metric rollup.
example:
attributes:
bucket: '2026-04-10T15:00:00Z'
name: flags.evaluations
rollup: 1h
unit: evaluations
value: 87420
type: metric_rollup
securitySchemes:
HTTPBearer:
type: http
description: JWT access token or API key (sk_api_*)
scheme: bearer