Statistics

The Statistics endpoint provides aggregated metrics calculated from time series data, over specified time windows. This allows you to query values such as averages, minima, maxima, counts, standard deviation, etc., instead of raw data points. It is useful for downsampling data or getting summary insights over time intervals.

Gets statistics from the ID domain

get
Authorizations
Path parameters
idsstringRequired

A comma-separated list of one or more GUIDs.

Example: ba529839-8179-40e2-b3fb-5da01a8d76e8,e8317666-77f2-4185-ae48-847af57563db
Query parameters
formatstring · enumOptional

Desired output format of the data. You can also specify the response format via the HTTP Accept Header instead of the format query parameter.

Default: jsonPossible values:
Responses
200

Response from the route

get
/statistics/id/{ids}
GET /{ENVIRONMENT}/statistics/id/{ids} HTTP/1.1
Host: prism.raalabs.io/{ENVIRONMENT}
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "00000000-0000-4000-8000-000000000000:avg": 1.2499918981481482,
    "timestamp": "2025-01-01T00:00:00.000000Z"
  },
  {
    "00000000-0000-4000-8000-000000000000:min": 0.1,
    "timestamp": "2025-01-01T00:00:00.000000Z"
  },
  {
    "00000000-0000-4000-8000-000000000000:max": 1.5,
    "timestamp": "2025-01-01T00:00:00.000000Z"
  }
]

Get statistics from the JSMEA domain

get
Authorizations
Path parameters
vesselstringOptional

The vessel to retrieve from.

Example: IMO1000002
short_naming_rulestringOptional

The short naming rule to retrieve from.

Example: jsmea_mac
categorystringOptional

The category to retrieve from.

Example: MainEngine
sub_categorystringOptional

The sub category to retrieve from.

Example: Fuel
contentstringOptional

The content to retrieve from.

Example: Input
positionstringOptional

The position to retrieve from.

Example: Inlet
itemstringOptional

The item to retrieve from.

Example: Energy
modifierstringOptional

The modifier to retrieve from.

Query parameters
fromstring · date-timeOptional

From date-time

Example: 2025-01-01T00:00:00.000000Z
tostring · date-timeOptional

To date-time

Example: 2025-01-01T00:00:10.000000Z
from_epochintegerOptional

From epoch. ex: 0

to_epochintegerOptional

To epoch. ex: 100000

sincestringOptional

Since returns data going back. ex: '1day' from now

laststringOptional

Last returns data going back. ex: '1day' from the last full day

yearnumberOptional

Sets the year for which data should be retrieved. ex: 2025

monthnumberOptional

Sets the month for which data should be retrieved. ex: 8

daynumberOptional

Sets the day for which data should be retrieved. ex: 1

aggregationsstringOptional

A comma-separated list of aggregation functions to compute for each time window. You can request multiple metrics at once. Valid values: min, max, mean, count, sum, stddev, var, skewness, kurtosis, avg, first_val, last_val, integral, first_time, last_time

Default: avgExample: avg,min,max
windowstringOptional

The duration of each aggregation window. This is given as a time interval literal, e.g., 1m (1 minute), 2h (2 hours), 2d (2 days), etc. All data within each window will be used to calculate the aggregations.

Default: 1monthExample: 1month
formatstring · enumOptional

Desired output format of the data. You can also specify the response format via the HTTP Accept Header instead of the format query parameter.

Default: jsonPossible values:
Responses
200

Response from the route

get
/statistics/jsmea/{vessel}/{short_naming_rule}/{category}/{sub_category}/{content}/{position}/{item}/{modifier}
GET /{ENVIRONMENT}/statistics/jsmea/{vessel}/{short_naming_rule}/{category}/{sub_category}/{content}/{position}/{item}/{modifier} HTTP/1.1
Host: prism.raalabs.io/{ENVIRONMENT}
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "IMO1000017/jsmea_mac/MainEngine/Fuel/Input/Inlet/Energy//Avg": 3042.1666666666665,
    "timestamp": "2025-01-01T00:00:00.000000Z"
  },
  {
    "IMO1000017/jsmea_mac/MainEngine/Fuel/Input/Inlet/Energy//Min": 1,
    "timestamp": "2025-01-01T00:00:00.000000Z"
  },
  {
    "IMO1000017/jsmea_mac/MainEngine/Fuel/Input/Inlet/Energy//Max": 23467,
    "timestamp": "2025-01-01T00:00:00.000000Z"
  }
]

Retrieve multiple series

post

Used to retrieve multiple series in one request (you provide a list of domain/expression queries in the JSON body).

Authorizations
Query parameters
fromstring · date-timeOptional

From date-time

Example: 2025-01-01T00:00:00.000000Z
tostring · date-timeOptional

To date-time

Example: 2025-01-01T00:00:10.000000Z
from_epochintegerOptional

From epoch. ex: 0

to_epochintegerOptional

To epoch. ex: 100000

sincestringOptional

Since returns data going back. ex: '1day' from now

laststringOptional

Last returns data going back. ex: '1day' from the last full day

yearnumberOptional

Sets the year for which data should be retrieved. ex: 2025

monthnumberOptional

Sets the month for which data should be retrieved. ex: 8

daynumberOptional

Sets the day for which data should be retrieved. ex: 1

aggregationsstringOptional

A comma-separated list of aggregation functions to compute for each time window. You can request multiple metrics at once. Valid values: min, max, mean, count, sum, stddev, var, skewness, kurtosis, avg, first_val, last_val, integral, first_time, last_time

Default: avgExample: avg,min,max
windowstringOptional

The duration of each aggregation window. This is given as a time interval literal, e.g., 1m (1 minute), 2h (2 hours), 2d (2 days), etc. All data within each window will be used to calculate the aggregations.

Default: 1monthExample: 1month
formatstring · enumOptional

Desired output format of the data. You can also specify the response format via the HTTP Accept Header instead of the format query parameter.

Default: jsonPossible values:
Bodystring[]
string[] · min: 1OptionalExample: ["raalabs/IMO1000001/ME FuelEnergy_1","id/00000000-0000-4000-8000-000000000000"]
Responses
200

Batch statistics data

post
/statistics/query
POST /{ENVIRONMENT}/statistics/query HTTP/1.1
Host: prism.raalabs.io/{ENVIRONMENT}
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 80

[
  "raalabs/IMO1000001/ME FuelEnergy_1",
  "id/00000000-0000-4000-8000-000000000000"
]
[
  {
    "IMO1000017/ME FuelEnergy_1/Avg": 3042.1666666666665,
    "timestamp": "2025-01-01T00:00:00.000000Z"
  },
  {
    "IMO1000017/ME FuelEnergy_1/Min": 1,
    "timestamp": "2025-01-01T00:00:00.000000Z"
  },
  {
    "IMO1000017/ME FuelEnergy_1/Max": 23467,
    "timestamp": "2025-01-01T00:00:00.000000Z"
  },
  {
    "00000000-0000-4000-8000-000000000000:avg": 1.2499918981481482,
    "timestamp": "2025-01-01T00:00:00.000000Z"
  },
  {
    "00000000-0000-4000-8000-000000000000:min": 0.1,
    "timestamp": "2025-01-01T00:00:00.000000Z"
  },
  {
    "00000000-0000-4000-8000-000000000000:max": 1.5,
    "timestamp": "2025-01-01T00:00:00.000000Z"
  }
]

Get statistics from the raalabs domain

get
Authorizations
Path parameters
imo_numberstringRequired

The IMO number of the vessel

Example: IMO1000001
tag_namestringRequired

Short descriptive tag. May include wildcard (*)

Example: ME FuelEnergy*
Query parameters
fromstring · date-timeOptional

From date-time

Example: 2025-01-01T00:00:00.000000Z
tostring · date-timeOptional

To date-time

Example: 2025-01-01T00:00:10.000000Z
from_epochintegerOptional

From epoch. ex: 0

to_epochintegerOptional

To epoch. ex: 100000

sincestringOptional

Since returns data going back. ex: '1day' from now

laststringOptional

Last returns data going back. ex: '1day' from the last full day

yearnumberOptional

Sets the year for which data should be retrieved. ex: 2025

monthnumberOptional

Sets the month for which data should be retrieved. ex: 8

daynumberOptional

Sets the day for which data should be retrieved. ex: 1

aggregationsstringOptional

A comma-separated list of aggregation functions to compute for each time window. You can request multiple metrics at once. Valid values: min, max, mean, count, sum, stddev, var, skewness, kurtosis, avg, first_val, last_val, integral, first_time, last_time

Default: avgExample: avg,min,max
windowstringOptional

The duration of each aggregation window. This is given as a time interval literal, e.g., 1m (1 minute), 2h (2 hours), 2d (2 days), etc. All data within each window will be used to calculate the aggregations.

Default: 1monthExample: 1month
formatstring · enumOptional

Desired output format of the data. You can also specify the response format via the HTTP Accept Header instead of the format query parameter.

Default: jsonPossible values:
Responses
200

Response from the route

get
/statistics/raalabs/{imo_number}/{tag_name}
GET /{ENVIRONMENT}/statistics/raalabs/{imo_number}/{tag_name} HTTP/1.1
Host: prism.raalabs.io/{ENVIRONMENT}
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "IMO1000001/ME ShaftPower/Avg": 13.12,
    "timestamp": "2025-09-10T09:00:00.000000Z"
  },
  {
    "IMO1000001/ME ShaftPower/Max": 15.47,
    "timestamp": "2025-09-10T09:00:00.000000Z"
  },
  {
    "IMO1000001/ME ShaftPower/Min": 10.85,
    "timestamp": "2025-09-10T09:00:00.000000Z"
  },
  {
    "IMO1000001/ME ShaftPower/Count": 3600,
    "timestamp": "2025-09-10T09:00:00.000000Z"
  }
]