post
https://{app-url}{}/api/v2/stream-schemas
Use this request to create a new schema
Request Arguments
| Argument | Type | Description |
|---|---|---|
| version | string | (Optional) Schema version. |
| name | string | Required. Schema name (maximum 200 characters). This name is later used as the stream name. |
| dimensions | array | Required. List of dimensions (maximum 30). Each dimension name must be unique and up to 30 characters long. |
| measurements | array | Required. List of measurements (maximum 200). Each measurement name can be up to 50 characters long. |
Measurement Configuration
| Field | Type | Description |
|---|---|---|
| units | string | (Optional) Unit of the measurement. Used for display in Anodot. |
| aggregation | string | Required. Aggregation function for the measurement. Valid values: average, sum. |
| countby | string | Required. Defines how data points are counted. Currently, only None is supported (each bucket counts as 1). |
Missing Dimension Policy
| Field | Type | Description |
|---|---|---|
| missingDimPolicy | section | Defines how missing dimension values are handled in posted data. |
| action | string | Valid values: fill, fail, ignore. |
| fill | string | Fill value used when action is set to fill. |
action Values
action Valuesfill— Missing dimension values are replaced with the value specified in thefillfield.fail— The data point is rejected.ignore— Missing dimension values are allowed. Such dimensions may be omitted from the metric.
DVP Configuration
| Field | Type | Description |
|---|---|---|
| dvpconfig | section | (Optional) Defines how missing data points are completed for this schema. |
| baseRollup | enum | Minimal Anodot rollup for completing missing data points. Valid values: SHORTROLLUP (1 minute), MEDIUMROLLUP (5 minutes), LONGROLLUP (1 hour), LONGLONGROLLUP (1 day), WEEKLY (1 week). |
| maxDVPDurationHours | integer | Maximum number of hours Anodot will complete missing data points for a metric. Limits depend on stream interval: daily streams up to 31 days (744 hours), hourly streams up to 7 days (168 hours), and sub-hourly streams up to 24 hours. |
| preventNoData | boolean | Keep this value set to true. |
Gauge / Counter Value Configuration
| Field | Type | Description |
|---|---|---|
| gaugeValue / counterValue | section | Configuration for gauge (average) or counter (sum) aggregation types in the stream associated with this schema. |
| keepLastValue | boolean | If true, the last received value is used for completion. If false, a manual completion value is used. |
| value | float | Completion value used when keepLastValue is false. |
