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

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

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

Consumption is calculated as follows:
- If `cyl_oil_consumption` is not null, use this value
- Otherwise, calculate based on how much cylinder oil was used since the previous time period:
  `((previous_cyl_oil_rob - current_cyl_oil_rob) * 1000000) / (me_power * time_period_hours)`
  where:
  - `previous_cyl_oil_rob` and `current_cyl_oil_rob` are in metric tons (mt)
  - `me_power` is in kW
  - `time_period_hours` is the time difference between consecutive datetime_end values in hours
  - Result is in g/kWh

- **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.
- **at_sea_periods**: The periods when the ship was at sea.

Returns:
GetCylinderOilConsumptionOverTimeResponse

# 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/cylinder-oil-consumption-over-time": {
      "get": {
        "tags": [
          "Performance"
        ],
        "summary": "Retrieve the cylinder oil consumption over time data for a ship",
        "description": "Retrieve the cylinder oil consumption over time data for a ship.\n\nConsumption is calculated as follows:\n- If `cyl_oil_consumption` is not null, use this value\n- Otherwise, calculate based on how much cylinder oil was used since the previous time period:\n  `((previous_cyl_oil_rob - current_cyl_oil_rob) * 1000000) / (me_power * time_period_hours)`\n  where:\n  - `previous_cyl_oil_rob` and `current_cyl_oil_rob` are in metric tons (mt)\n  - `me_power` is in kW\n  - `time_period_hours` is the time difference between consecutive datetime_end values in hours\n  - Result is in g/kWh\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- **at_sea_periods**: The periods when the ship was at sea.\n\nReturns:\nGetCylinderOilConsumptionOverTimeResponse",
        "operationId": "get_cylinder_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/GetCylinderOilConsumptionOverTimeResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "501": {
            "description": "Not Implemented"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "GetCylinderOilConsumptionOverTimeResponse": {
        "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 Cylinder Oil Consumption Over Time",
            "description": "The cylinder 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 Cylinder Oil Consumption Over Time",
            "description": "The cylinder 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 cylinder oil consumption over time data."
          },
          "lower_threshold": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lower Threshold",
            "description": "The lower threshold for the cylinder oil consumption over time data."
          }
        },
        "type": "object",
        "required": [
          "sensor_consumption_over_time",
          "nr_consumption_over_time",
          "earliest_datetime",
          "upper_threshold",
          "lower_threshold"
        ],
        "title": "GetCylinderOilConsumptionOverTimeResponse"
      },
      "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"
  }
}
```