Download OpenAPI specification:
Trial and query immutable, version-pinned object metrics.
| kn_id required | string |
| branch | string Default: "main" |
required | object A complete atomic, derived, or composite ObjectMetricDefinitionV1. Non-atomic dependencies must reference published immutable versions. |
required | object (ObjectMetricQuery) |
{- "definition": { },
- "query": {
- "filter": {
- "node_type": "predicate",
- "left": {
- "source": "property",
- "property_ref": {
- "object_type_id": "order_item",
- "property_name": "sku_id"
}
}, - "comparison_operator": "eq",
- "right": [
- {
- "source": "literal",
- "value_type": "int64",
- "value": 1
}
]
}, - "group_by": [
- {
- "object_type_id": "string",
- "property_name": "string",
- "relation_path_alias": "string"
}
], - "having": {
- "operator": "eq",
- "value": null,
- "unit_code": "string"
}, - "order_by": [
- {
- "field": "value",
- "dimension": {
- "object_type_id": "string",
- "property_name": "string",
- "relation_path_alias": "string"
}, - "direction": "asc"
}
], - "page_size": 1,
- "cursor": "string",
- "time": {
- "start": 0,
- "end": 0
}, - "bucket_selection": {
- "parent_query": { },
- "bucket_key": "string"
}
}
}{- "is_approximate": true,
- "model": { },
- "entries": [
- {
- "dimension_cells": [
- {
- "ref": {
- "object_type_id": "string",
- "property_name": "string",
- "relation_path_alias": "string"
}, - "value": null
}
], - "time": 0,
- "time_bucket": {
- "start": 0,
- "end": 0
}, - "value": null,
- "status": "ok",
- "bucket_key": "string",
- "available_actions": [
- "filter"
]
}
], - "status": "ok",
- "empty_reason": "filtered_out",
- "total_count": 0,
- "next_cursor": "string",
- "warnings": [
- "string"
], - "overall_ms": 0,
- "evaluated_at": 0,
- "effective_window": {
- "start": 0,
- "end": 0
}
}| kn_id required | string |
| metric_id required | string |
| branch | string Default: "main" |
| version required | integer >= 1 Immutable published metric version. Runtime never resolves an implicit latest version. |
(ObjectMetricScalarPredicate (object) or ObjectMetricMembershipPredicate (object) or ObjectMetricRangePredicate (object) or ObjectMetricUnaryPredicate (object)) or object or object (ObjectMetricCondition) | |
Array of objects (PropertyRef) Runtime dimensions selected from the metric definition's query_capabilities.analysis_dimensions. Fixed grain is always applied and cannot be removed. | |
object Filters final metric values after the complete atomic, derived, or composite result is computed. Rejected on partial results. | |
Array of objects Sorts final rows. Ties are broken by the stable result identity; nulls sort last. | |
| page_size | integer [ 1 .. 1000 ] Optional. Omit to return all rows. Paginated published queries and trials reuse a bounded process-local snapshot of the final ordered result when available; single-page results are not retained. Default snapshot limits are 10000 rows, 16 MiB per entry, 256 MiB/128 entries per process and 8 entries per caller, with a fixed 15-minute lease. |
| cursor | string Authenticated opaque next_cursor from the identical query and caller. Every page rechecks current permissions and row filters. A snapshot hit returns the original calculation even if source data changed. On expiry, eviction, restart, another replica, or changed authorization fingerprint, the service recomputes and compares the complete result hash; a changed result returns 409 and requires restarting from the first page. Snapshot expiry ends reuse, not authenticated hash-checked fallback. A persistent BKN_QUERY_CURSOR_KEY is required across restarts and replicas; Helm supplies a shared release Secret by default. Tampered or mismatched cursors are rejected; revoked access returns 403. |
object | |
object |
{- "filter": {
- "node_type": "predicate",
- "left": {
- "source": "property",
- "property_ref": {
- "object_type_id": "order_item",
- "property_name": "sku_id"
}
}, - "comparison_operator": "eq",
- "right": [
- {
- "source": "literal",
- "value_type": "int64",
- "value": 1
}
]
}, - "group_by": [
- {
- "object_type_id": "string",
- "property_name": "string",
- "relation_path_alias": "string"
}
], - "having": {
- "operator": "eq",
- "value": null,
- "unit_code": "string"
}, - "order_by": [
- {
- "field": "value",
- "dimension": {
- "object_type_id": "string",
- "property_name": "string",
- "relation_path_alias": "string"
}, - "direction": "asc"
}
], - "page_size": 1,
- "cursor": "string",
- "time": {
- "start": 0,
- "end": 0
}, - "bucket_selection": {
- "parent_query": { },
- "bucket_key": "string"
}
}{- "is_approximate": true,
- "model": { },
- "entries": [
- {
- "dimension_cells": [
- {
- "ref": {
- "object_type_id": "string",
- "property_name": "string",
- "relation_path_alias": "string"
}, - "value": null
}
], - "time": 0,
- "time_bucket": {
- "start": 0,
- "end": 0
}, - "value": null,
- "status": "ok",
- "bucket_key": "string",
- "available_actions": [
- "filter"
]
}
], - "status": "ok",
- "empty_reason": "filtered_out",
- "total_count": 0,
- "next_cursor": "string",
- "warnings": [
- "string"
], - "overall_ms": 0,
- "evaluated_at": 0,
- "effective_window": {
- "start": 0,
- "end": 0
}
}| kn_id required | string |
| metric_id required | string |
| version required | integer >= 1 |
| branch | string Default: "main" |
required | object (ObjectMetricQuery) |
| bucket_key required | string |
| page_size | integer [ 1 .. 100 ] |
| cursor | string |
{- "query": {
- "filter": {
- "node_type": "predicate",
- "left": {
- "source": "property",
- "property_ref": {
- "object_type_id": "order_item",
- "property_name": "sku_id"
}
}, - "comparison_operator": "eq",
- "right": [
- {
- "source": "literal",
- "value_type": "int64",
- "value": 1
}
]
}, - "group_by": [
- {
- "object_type_id": "string",
- "property_name": "string",
- "relation_path_alias": "string"
}
], - "having": {
- "operator": "eq",
- "value": null,
- "unit_code": "string"
}, - "order_by": [
- {
- "field": "value",
- "dimension": {
- "object_type_id": "string",
- "property_name": "string",
- "relation_path_alias": "string"
}, - "direction": "asc"
}
], - "page_size": 1,
- "cursor": "string",
- "time": {
- "start": 0,
- "end": 0
}, - "bucket_selection": {
- "parent_query": { },
- "bucket_key": "string"
}
}, - "bucket_key": "string",
- "page_size": 1,
- "cursor": "string"
}{- "participants": [
- {
- "instance_identity": { },
- "role": "string"
}
], - "next_cursor": "string",
- "bucket_value": null,
- "evaluated_at": 0,
- "status": "ok",
- "warnings": [
- "string"
]
}| kn_id required | string |
| branch | string Default: "main" |
required | object (ObjectMetricQuery) |
| bucket_key required | string |
| page_size | integer [ 1 .. 100 ] |
| cursor | string |
required | object |
{- "query": {
- "filter": {
- "node_type": "predicate",
- "left": {
- "source": "property",
- "property_ref": {
- "object_type_id": "order_item",
- "property_name": "sku_id"
}
}, - "comparison_operator": "eq",
- "right": [
- {
- "source": "literal",
- "value_type": "int64",
- "value": 1
}
]
}, - "group_by": [
- {
- "object_type_id": "string",
- "property_name": "string",
- "relation_path_alias": "string"
}
], - "having": {
- "operator": "eq",
- "value": null,
- "unit_code": "string"
}, - "order_by": [
- {
- "field": "value",
- "dimension": {
- "object_type_id": "string",
- "property_name": "string",
- "relation_path_alias": "string"
}, - "direction": "asc"
}
], - "page_size": 1,
- "cursor": "string",
- "time": {
- "start": 0,
- "end": 0
}, - "bucket_selection": {
- "parent_query": { },
- "bucket_key": "string"
}
}, - "bucket_key": "string",
- "page_size": 1,
- "cursor": "string",
- "definition": { }
}{- "participants": [
- {
- "instance_identity": { },
- "role": "string"
}
], - "next_cursor": "string",
- "bucket_value": null,
- "evaluated_at": 0,
- "status": "ok",
- "warnings": [
- "string"
]
}