Hierarchy

Index

Methods

Static createHistorianMetric

Static deleteHistorianRange

Static downloadHistorianMetrics

Static getHistorianMetricAdvancedRange

Static getHistorianMetricLast

Static getHistorianMetricLastAdvanced

Static getHistorianMetricRange

  • getHistorianMetricRange(__namedParameters: { agg: "none" | "count" | "distinct" | "integral" | "mean" | "median" | "mode" | "spread" | "stddev" | "sum" | "max" | "min"; assetName: string; endTime: Date; fields: string[]; fill: string; name: string; order: string; startTime: Date; timeBucket: string; timeShift: string }, options?: IKvHttpRequestOptions): Observable<StorageData[]>
  • Get Historian Metric Range Get Historian Metric Range Returns a list of recorded values or calculated statistics from the database for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/&#39; target='_blank'>Kelvin Assets</a> / <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/&#39; target='_blank'>Kelvin Metric</a> pair based on a time range. This does not rely on the workload (<a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-bridges/&#39; target='_blank'>Kelvin Bridge</a> or <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-apps/&#39; target='_blank'>Kelvin App</a>) that records the data to be online. Permission Required: `kelvin.permission.storage.read`

    Parameters

    • __namedParameters: { agg: "none" | "count" | "distinct" | "integral" | "mean" | "median" | "mode" | "spread" | "stddev" | "sum" | "max" | "min"; assetName: string; endTime: Date; fields: string[]; fill: string; name: string; order: string; startTime: Date; timeBucket: string; timeShift: string }
      • agg: "none" | "count" | "distinct" | "integral" | "mean" | "median" | "mode" | "spread" | "stddev" | "sum" | "max" | "min"

        Perform mathematical calculations on a group of data.</p> For numerical data there are twelve mathematical options available; `none` , `count`,`distinct`, `integral`, `mean`, `median`, `mode`, `spread`, `stddev`, `sum`, `max`, `min`.</p> For text based data there are three types of mathematical options available; `count`, `distinct`, `mode`. The default is `none`.</p> When using this parameter, you must also use the parameters `time_bucket` which defines how to group the data and `fields` which defines which payload data to use.

      • assetName: string

        Unique identifier name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-assets/&#39; target='blank'>Kelvin Assets</a>.</p> This must contain only lowercase alphanumeric characters. The `.`, `` and `-` characters are also allowed to separate words instead of a space BUT can not be at the beginning or end of the name.

      • endTime: Date

        End time of the recorded time to collect the payload data from the <a href='https://docs.kelvininc.com/latest/kelvin-overview/overview/#kelvin-platform&#39; target='_blank'>Kelvin Platform</a> in ISO 8601 UTC date/time format. Example; '2022-07-08T08:41:01.657916Z'.

      • fields: string[]

        Array of strings which each string representing one key inside the payload. Normally there will be only one key labeled `value`.

      • fill: string

        Fills any group of data, which is defined by the `time_bucket` parameter, with a calculated value when there is no data in the database.</p> There are five options available; `none`, `null`, `linear`, `previous`, fixed integer value.</p> `none` will ignore the group. `null`, `previous` and fixed integer value will be added as the value for the empty group. `linear` will perform a linear regression to calculated the groups' value.</p> The default is `none`.

      • name: string

        Unique identifier name for the <a href='https://docs.kelvininc.com/latest/kelvin-overview/kelvin-platform/kelvin-metrics/&#39; target='blank'>Kelvin Metric</a>.</p> This must contain only lowercase alphanumeric characters. The `.`, `` and `-` characters are also allowed to separate words instead of a space BUT can not be at the beginning or end of the name.

      • order: string

        Order of the results for the timestamp parameter.</p> There are two options available (capital letters is required); `ASC` for ascending and `DESC` for descending. The default is `ASC`.

      • startTime: Date

        Start time of the recorded time to collect the payload data from the <a href='https://docs.kelvininc.com/latest/kelvin-overview/overview/#kelvin-platform&#39; target='_blank'>Kelvin Platform</a> in ISO 8601 UTC date/time format. Example; '2022-07-08T08:41:01.657916Z'.

      • timeBucket: string

        Group the data by time frame for the `agg` parameter calculations.</p> The time can be adjusted with these time units `ns`, `ms`, `s`, `m`, `h`. e.g. `8765h` equates to is 8,765 hours which is approximately one year.

      • timeShift: string

        Shift the time buckets from the epoch. Every time bucket starts from epoch so, if you want to calculate the time bucket starting on a different date and time, you'll need to set this. Example: `5m`, `1h`, `1w`.

    • Optional options: IKvHttpRequestOptions

      Request optional parameters

    Returns Observable<StorageData[]>

Static getPaginator

Static listHistorianMetric

  • listHistorianMetric(__namedParameters?: { assetName: string[]; endingBefore: string; name: string[]; pageSize: number; search: string[]; sortAsc: boolean; sortBy: string; startingAfter: string }, options?: IKvHttpRequestOptions): Observable<StorageMetricListPaginated>

Static onError

Static request

Static requestUrl

  • requestUrl<T>(request: IKvHttpRequest, modelClass?: IModel, autenticated?: boolean): Observable<T>

Static updateHistorianMetric

Static uploadHistorianMetrics