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
]
]
}{
"detail": "unique_identifier is required when save is True"
}{
"detail": "Quota exceeded. Please upgrade your plan."
}{
"detail": "Account not found."
}{
"detail": "An unexpected error occurred"
}Endpoint Examples
Run Kalman Filter
Processes time series data using a Kalman filter to reduce noise and provide smoothed predictions. Optionally saves results to the database with a unique identifier.
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
]
]
}{
"detail": "unique_identifier is required when save is True"
}{
"detail": "Quota exceeded. Please upgrade your plan."
}{
"detail": "Account not found."
}{
"detail": "An unexpected error occurred"
}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
API key for authentication
Path Parameters
The account ID associated with your API key
Body
application/json
A 2D array where each inner list contains time series values
Example:
[[10.2, 10.5, 10.1, 9.8, 10.3]]
Whether to save the results to the database
The unique identifier for the data (required when save is true)
Example:
"sensor-001-2024"
Response
Successfully processed the Kalman filter