Skip to main content
POST
/
{account_id}
/
kalman
curl --request POST \
  --url https://api.luna-modelling.com/v1/{account_id}/kalman \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "results": [
    [
      10.2,
      10.5,
      10.1,
      9.8,
      10.3
    ]
  ],
  "save": false
}
'
{
  "filtered_data": [
    10.2,
    10.35,
    10.25,
    10.02,
    10.15,
    10.08,
    10.01,
    10.22
  ],
  "raw_state": [
    10.2,
    10.35,
    10.25,
    10.02,
    10.15,
    10.08,
    10.01,
    10.22
  ],
  "smooth_state": [
    10.2,
    10.33,
    10.27,
    10.05,
    10.13,
    10.09,
    10.03,
    10.2
  ],
  "input_data": [
    [
      10.2,
      10.5,
      10.1,
      9.8,
      10.3,
      10,
      9.9,
      10.4
    ]
  ]
}
Submit one or more time series to Luna’s Kalman filter. Set save to true and include a unique_identifier to accumulate historical observations across requests.

Authorizations

X-API-Key
string
header
required

API key for authentication

Path Parameters

account_id
integer
required

The account ID associated with your API key

Body

application/json
results
number<float>[][]
required

A 2D array where each inner list contains time series values

Example:
[[10.2, 10.5, 10.1, 9.8, 10.3]]
save
boolean
default:false

Whether to save the results to the database

unique_identifier
string | null

The unique identifier for the data (required when save is true)

Example:

"sensor-001-2024"

Response

Successfully processed the Kalman filter

filtered_data
number<float>[]

The filtered time series values after applying the Kalman filter

raw_state
number<float>[]

The raw state values from the Kalman filter

smooth_state
number<float>[]

The smoothed state values from the Kalman filter

input_data
number<float>[][]

The original input data