Domain Model
Metric Snapshot
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string.uuid | Yes | — | Id |
| createdAt | string.date-time | Yes | — | Created at |
| updatedAt | string.date-time | Yes | — | Updated at |
| metricId | string | Yes | — | ID of the associated metric |
| workspaceId | string.uuid | Yes | — | ID of the associated workspace |
| grain | enum(daily, weekly, monthly) | Yes | — | Grain |
| periodStart | string.date-time | Yes | — | Period start |
| periodEnd | string.date-time | Yes | — | Period end |
| value | number | Yes | — | Value |
| dimensions | unknown | Yes | — | Dimensions |
| computedAt | string.date-time | Yes | — | Computed at |
Create Schema
Fields accepted when creating a new record:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| metricId | string | Yes | — | ID of the associated metric |
| workspaceId | string.uuid | Yes | — | ID of the associated workspace |
| grain | enum(daily, weekly, monthly) | Yes | — | Grain |
| periodStart | string.date-time | Yes | — | Period start |
| periodEnd | string.date-time | Yes | — | Period end |
| value | number | Yes | — | Value |
| dimensions | object | No | — | Dimensions |