---
updatedAt: 2026-05-04T21:43:38.000Z
agentTools:
  projectIndex: https://docs.toqua.ai/llms.txt
---

# Retrieve the system oil consumption over time data for a ship

Retrieve the system oil consumption over time data for a ship.

Consumption is calculated as follows:
- If `sys_oil_consumption` is not null, use this value
- Otherwise, calculate based on how much system oil was used since the previous time period:
  `(previous_sys_oil_rob - current_sys_oil_rob) / time_period_days`
  where:
  - `previous_sys_oil_rob` and `current_sys_oil_rob` are in metric tons (mt)
  - `time_period_days` is the time difference between consecutive datetime_end values in days
  - Result is in mt/day

- **sensor_consumption_over_time**: The consumption over time data from the sensor data.
- **nr_consumption_over_time**: The consumption over time data from the noon report data.

Returns:
GetSystemOilConsumptionOverTimeResponse

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Toqua API",
    "contact": {
      "name": "Toqua",
      "url": "https://toqua.ai/",
      "email": "admin@toqua.ai"
    },
    "version": "0.26"
  },
  "servers": [
    {
      "url": "https://api.toqua.ai",
      "description": "Toqua API"
    }
  ],
  "paths": {
    "/performance/{imo_number}/lubrication/system-oil-consumption-over-time": {
      "get": {
        "tags": [
          "Performance"
        ],
        "summary": "Retrieve the system oil consumption over time data for a ship",
        "description": "Retrieve the system oil consumption over time data for a ship.\n\nConsumption is calculated as follows:\n- If `sys_oil_consumption` is not null, use this value\n- Otherwise, calculate based on how much system oil was used since the previous time period:\n  `(previous_sys_oil_rob - current_sys_oil_rob) / time_period_days`\n  where:\n  - `previous_sys_oil_rob` and `current_sys_oil_rob` are in metric tons (mt)\n  - `time_period_days` is the time difference between consecutive datetime_end values in days\n  - Result is in mt/day\n\n- **sensor_consumption_over_time**: The consumption over time data from the sensor data.\n- **nr_consumption_over_time**: The consumption over time data from the noon report data.\n\nReturns:\nGetSystemOilConsumptionOverTimeResponse",
        "operationId": "get_system_oil_consumption_over_time",
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "imo_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Imo Number"
            }
          },
          {
            "name": "start_datetime",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Datetime"
            }
          },
          {
            "name": "end_datetime",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Datetime"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sampling interval. 'raw' returns stored samples (subject to a max-points cap); a duration downsamples server-side. Allowed: auto, raw, 1m, 5m, 15m, 30m, 1h, 2h, 6h, 12h, 1d, 7d",
              "default": "auto",
              "title": "Interval"
            },
            "description": "Sampling interval. 'raw' returns stored samples (subject to a max-points cap); a duration downsamples server-side. Allowed: auto, raw, 1m, 5m, 15m, 30m, 1h, 2h, 6h, 12h, 1d, 7d"
          },
          {
            "name": "aggregation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Aggregation applied per bucket when interval != raw. Allowed: mean, min, max, median",
              "default": "median",
              "title": "Aggregation"
            },
            "description": "Aggregation applied per bucket when interval != raw. Allowed: mean, min, max, median"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSystemOilConsumptionOverTimeResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "501": {
            "description": "Not Implemented"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "GetSystemOilConsumptionOverTimeResponse": {
        "properties": {
          "interval": {
            "type": "string",
            "title": "Interval",
            "description": "Applied sampling interval: 'raw' (stored samples) or a duration like '1h'.",
            "default": "raw"
          },
          "aggregation": {
            "type": "string",
            "title": "Aggregation",
            "description": "Aggregation applied within each bucket when downsampled (mean/min/max/median).",
            "default": "mean"
          },
          "point_count": {
            "type": "integer",
            "title": "Point Count",
            "description": "Total number of points returned across all data sources.",
            "default": 0
          },
          "sensor_consumption_over_time": {
            "items": {
              "$ref": "#/components/schemas/GraphDataPoint_Annotated_datetime__BeforeValidator__PlainSerializer__float_"
            },
            "type": "array",
            "title": "Sensor System Oil Consumption Over Time",
            "description": "The system oil consumption over time data from the sensor data."
          },
          "nr_consumption_over_time": {
            "items": {
              "$ref": "#/components/schemas/GraphDataPoint_Annotated_datetime__BeforeValidator__PlainSerializer__float_"
            },
            "type": "array",
            "title": "NR System Oil Consumption Over Time",
            "description": "The system oil consumption over time data from the noon report data."
          },
          "earliest_datetime": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Earliest Datetime",
            "description": "The earliest datetime in the consumption over time data."
          },
          "upper_threshold": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Upper Threshold",
            "description": "The upper threshold for the system oil consumption over time data."
          }
        },
        "type": "object",
        "required": [
          "sensor_consumption_over_time",
          "nr_consumption_over_time",
          "earliest_datetime",
          "upper_threshold"
        ],
        "title": "GetSystemOilConsumptionOverTimeResponse"
      },
      "GraphDataPoint_Annotated_datetime__BeforeValidator__PlainSerializer__float_": {
        "properties": {
          "x": {
            "type": "string",
            "title": "X",
            "description": "The x-value of the data point."
          },
          "y": {
            "type": "number",
            "title": "Y",
            "description": "The y-value of the data point."
          }
        },
        "type": "object",
        "required": [
          "x",
          "y"
        ],
        "title": "GraphDataPoint[Annotated[datetime, BeforeValidator, PlainSerializer], float]"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      },
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "externalDocs": {
    "description": "API Documentation",
    "url": "https://docs.toqua.ai"
  }
}
```