{
  "openapi": "3.0.1",
  "info": {
    "title": "DFI API",
    "version": "v1"
  },
  "paths": {
    "/api/v1/Cds/Features": {
      "get": {
        "tags": [
          "Cds"
        ],
        "summary": "Get the CDS features, either for one vessel or all features.",
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "description": "The internal vessel ID. When left out, all features are returned.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/Cds/Data/MinMax": {
      "get": {
        "tags": [
          "Cds"
        ],
        "summary": "Get the first and last timestamp with CDS data for a vessel.",
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "description": "The internal vessel ID.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/Cds/Data": {
      "get": {
        "tags": [
          "Cds"
        ],
        "summary": "Get time-series data for one or more features on a vessel.",
        "description": "Data is a dictionary of timestamp → values, with one value per feature in the same order as featureIds.\r\nA value is null when the feature has no data at that timestamp.\r\n            \r\nFor downsampled data each timestamp is the start of a bucket, e.g. 12:15 covers 12:15 (inclusive) to\r\n12:30 (exclusive). Angular features (heading, course, wind and current direction) use a circular mean,\r\npositions and fuel type in use use the first sample in the bucket, and all other features use the mean.\r\nBuckets without samples are left out. The 15-second data is kept for 1 year.",
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "description": "The internal vessel ID.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "featureIds",
            "in": "query",
            "description": "Comma-separated feature IDs (from the /Features endpoint), e.g. \"12,45\".",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "description": "Data resolution (case-insensitive):\r\n             \"raw\" or \"15s\" returns the 15-second samples on their original timestamps.\r\n             \"1min\", \"5min\" and \"quarterHour\" downsample the 15-second samples into fixed UTC buckets.\r\n             \"hour\" returns the 1-hour aggregates.\r\n             \"day\" returns the mean of the 1-hour values per UTC day, or downsampled values when downsample is true.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "description": "Start of the time range (UTC, inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "description": "End of the time range (UTC, exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "filterOutliers",
            "in": "query",
            "description": "When true, outliers are removed using Chauvenet's criterion. Default: false.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "downsample",
            "in": "query",
            "description": "When true, \"day\" downsamples the 15-second samples into daily UTC buckets. Days older\r\n             than the 15-second retention period fall back to the mean of the 1-hour values. Ignored for other\r\n             granularities. Default: false.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DateTimeFeatureDataModel"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DateTimeFeatureDataModel"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/datafeature/featurevalues": {
      "get": {
        "tags": [
          "DataFeature"
        ],
        "summary": "Retrieves feature values based on IMO number, feature name, and date range.",
        "parameters": [
          {
            "name": "imoNumber",
            "in": "query",
            "description": "The IMO number of the ship.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "query",
            "description": "The name of the feature to retrieve values for.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "description": "The start date for the date range. Ex 2024-01-25T12:00:29.164Z",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "description": "The end date for the date range. Ex 2024-01-26T12:00:29.164Z",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the feature values."
          },
          "400": {
            "description": "If the request is invalid."
          }
        }
      }
    },
    "/api/v1/datafeature": {
      "get": {
        "tags": [
          "DataFeature"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "DataFeature"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataFeatureModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DataFeatureModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DataFeatureModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "DataFeature"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataFeatureModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DataFeatureModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DataFeatureModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/datafeature/Import": {
      "post": {
        "tags": [
          "DataFeature"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ImportDataFeatureRequest"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ImportDataFeatureRequest"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ImportDataFeatureRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/ActivatedVessels": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "summary": "Gets a list of vessels with supported data quality features.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/Outage/{imo}": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "summary": "Retrieves the outage result for a specific vessel based on IMO number.",
        "parameters": [
          {
            "name": "imo",
            "in": "path",
            "description": "The IMO number of the vessel.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/Outage/Find": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/Outage": {
      "post": {
        "tags": [
          "DataQuality"
        ],
        "summary": "Posts a new data quality outage record.",
        "requestBody": {
          "description": "The data quality outage model.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataQualityOutageModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DataQualityOutageModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DataQualityOutageModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "DataQuality"
        ],
        "summary": "Gets the latest outage state based on IMO number and feature name.",
        "requestBody": {
          "description": "Model containing IMO number and feature name and OutageDetectionTime.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LatestOutageStateModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LatestOutageStateModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LatestOutageStateModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/SpeedLog/SpeedThroughWater": {
      "post": {
        "tags": [
          "DataQuality"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": { },
              "example": {"imoNumber":"1234567","timestamp":"2024-11-28T10:00:00Z","unit":{"unitId":0,"name":"knots","caption":"Speed in knots"},"data":[{"timestamp":"2024-11-28T10:00:00Z","value":12.5},{"timestamp":"2024-11-28T10:10:00Z","value":15.3}]}
            },
            "text/json": {
              "schema": { },
              "example": {"imoNumber":"1234567","timestamp":"2024-11-28T10:00:00Z","unit":{"unitId":0,"name":"knots","caption":"Speed in knots"},"data":[{"timestamp":"2024-11-28T10:00:00Z","value":12.5},{"timestamp":"2024-11-28T10:10:00Z","value":15.3}]}
            },
            "application/*+json": {
              "schema": { },
              "example": {"imoNumber":"1234567","timestamp":"2024-11-28T10:00:00Z","unit":{"unitId":0,"name":"knots","caption":"Speed in knots"},"data":[{"timestamp":"2024-11-28T10:00:00Z","value":12.5},{"timestamp":"2024-11-28T10:10:00Z","value":15.3}]}
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "DataQuality"
        ],
        "parameters": [
          {
            "name": "imoNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/SpeedLog/DerivedSpeedThroughWater": {
      "post": {
        "tags": [
          "DataQuality"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": { },
              "example": {"imoNumber":"1234567","timestamp":"2024-11-28T10:00:00Z","unit":{"unitId":0,"name":"knots","caption":"Speed in knots"},"data":[{"timestamp":"2024-11-28T10:00:00Z","value":12.5},{"timestamp":"2024-11-28T10:10:00Z","value":15.3}]}
            },
            "text/json": {
              "schema": { },
              "example": {"imoNumber":"1234567","timestamp":"2024-11-28T10:00:00Z","unit":{"unitId":0,"name":"knots","caption":"Speed in knots"},"data":[{"timestamp":"2024-11-28T10:00:00Z","value":12.5},{"timestamp":"2024-11-28T10:10:00Z","value":15.3}]}
            },
            "application/*+json": {
              "schema": { },
              "example": {"imoNumber":"1234567","timestamp":"2024-11-28T10:00:00Z","unit":{"unitId":0,"name":"knots","caption":"Speed in knots"},"data":[{"timestamp":"2024-11-28T10:00:00Z","value":12.5},{"timestamp":"2024-11-28T10:10:00Z","value":15.3}]}
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "DataQuality"
        ],
        "parameters": [
          {
            "name": "imoNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/SpeedLog": {
      "post": {
        "tags": [
          "DataQuality"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataQualitySpeedLogModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DataQualitySpeedLogModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DataQualitySpeedLogModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "DataQuality"
        ],
        "parameters": [
          {
            "name": "imo",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "featureName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/Outliers": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "parameters": [
          {
            "name": "imo",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "featureName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "DataQuality"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataQualityOutliersModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DataQualityOutliersModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DataQualityOutliersModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/Outliers/TakeAction/Acknowledge": {
      "put": {
        "tags": [
          "DataQuality"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataQualityDataOutliersDto"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataQualityDataOutliersDto"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataQualityDataOutliersDto"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/Outliers/TakeAction/Delete": {
      "put": {
        "tags": [
          "DataQuality"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataQualityDataOutliersDto"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataQualityDataOutliersDto"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataQualityDataOutliersDto"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/Outliers/TakeAction/Clear": {
      "put": {
        "tags": [
          "DataQuality"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataQualityDataOutliersDto"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataQualityDataOutliersDto"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataQualityDataOutliersDto"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/Outliers/Config": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "DataQuality"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataOutliersConfigModel"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataOutliersConfigModel"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataOutliersConfigModel"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/Outliers/AutoRemove": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "DataQuality"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoRemoveConfigRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoRemoveConfigRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AutoRemoveConfigRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/Outliers/RecalculateAll": {
      "post": {
        "tags": [
          "DataQuality"
        ],
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fromDateTime",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "toDateTime",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/CompanyOutliers": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/DataOutage": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "summary": "Gets the availability data for all vessels in a company for identification of data outages.",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "description": "Optional ID of a company to retrieve the availability data for. Only available to administrator accounts",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/DataOutage/Configuration": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "summary": "Gets configuration of data availability warning/critical state thresholds for a company.",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "description": "Optional ID of a company to retrieve the availability configuration for. Only available to administrator accounts",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataQualityAvailabilityConfigModel"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataQualityAvailabilityConfigModel"
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "DataQuality"
        ],
        "summary": "Updates the configuration of data availability warning/critical state thresholds for a company.",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "description": "Optional ID of a company to update the availability configuration for. Only available to administrator accounts",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "List of the configuration that has been set for a company. Any feature that are not configured should be left out.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataQualityAvailabilityConfigModel"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataQualityAvailabilityConfigModel"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataQualityAvailabilityConfigModel"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/DataQuality/FleetOverview": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/DataAlignment": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/OutlierTimeline": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "featureName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/MigrateOutliersToSqlDatabase": {
      "post": {
        "tags": [
          "DataQuality"
        ],
        "summary": "ONE-TIME MIGRATION: Migrates all outlier data from Azure Table Storage to SQL database.\r\nWARNING: This is a one-time operation that should only be run once during deployment.\r\nThis endpoint will scan all existing outlier data from Azure and copy it to SQL database.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/MigrateOutliersToCds": {
      "post": {
        "tags": [
          "DataQuality"
        ],
        "summary": "ONE-TIME MIGRATION: Migrates all outlier data from Azure Table Storage to CDS (PostgreSQL).\r\nWARNING: This is a one-time operation that should only be run once during deployment.",
        "parameters": [
          {
            "name": "force",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/Features": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/company-features": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "summary": "Returns the union of all vessel features for a given company (all features that exist on at least one vessel).",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/availability-features": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "summary": "Returns the configured availability features for a company. Falls back to defaults if none are configured.",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "DataQuality"
        ],
        "summary": "Sets the availability features for a company, replacing any existing configuration.",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/DataQuality/outlier-features": {
      "get": {
        "tags": [
          "DataQuality"
        ],
        "summary": "Returns the configured outlier features for a company. Falls back to defaults if none are configured.",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "DataQuality"
        ],
        "summary": "Sets the outlier features for a company, replacing any existing configuration.",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/Vessels": {
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/ValidateExpression": {
      "post": {
        "tags": [
          "FeatureMapping"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateExpressionModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateExpressionModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateExpressionModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/TestExpression": {
      "post": {
        "tags": [
          "FeatureMapping"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestExpressionModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TestExpressionModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TestExpressionModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/LogVariables": {
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "imo",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/Expressions": {
      "post": {
        "tags": [
          "FeatureMapping"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddFeatureExpressionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddFeatureExpressionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddFeatureExpressionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "expressionId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "FeatureMapping"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFeatureExpressionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFeatureExpressionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFeatureExpressionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/Configuration": {
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/Configuration/DataTags": {
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "FeatureMapping"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkDataTagRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkDataTagRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LinkDataTagRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/Configuration/DataFeatures": {
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/DataTags": {
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/links": {
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "imoNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "FeatureMapping"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LogVariableToDataTagLinkRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LogVariableToDataTagLinkRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LogVariableToDataTagLinkRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/configurationGroup/configuration/links": {
      "put": {
        "tags": [
          "FeatureMapping"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/LogVariableToDataTagConfigurationGroupRequest"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/LogVariableToDataTagConfigurationGroupRequest"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/LogVariableToDataTagConfigurationGroupRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/configurationGroup/configuration/datafeatures": {
      "post": {
        "tags": [
          "FeatureMapping"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AddFeatureExpressionRequest"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AddFeatureExpressionRequest"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AddFeatureExpressionRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "vesselIds",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/calculationlinks": {
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "imoNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/configurationgroup": {
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "minCommonPercentage",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/configurationgroup/logvariables": {
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "vesselIds",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/configurationGroup/configuration/datatags": {
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "vesselIds",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/configurationGroup/configuration/datatags/commonmappings": {
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "vesselIds",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/configurationGroup/configuration/datafeatures/commonmappings": {
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "vesselIds",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/BackfillAll": {
      "post": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "featureName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/Units": {
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/Export": {
      "get": {
        "tags": [
          "FeatureMapping"
        ],
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/AutoMap": {
      "post": {
        "tags": [
          "FeatureMapping"
        ],
        "summary": "Automatically sets up a vessel's feature mapping using hardcoded name aliases.\r\nLinks LogVariables to DataTags and creates simple pass-through expressions to DataFeatures.\r\nSkips vessels that already have any existing DataTag mappings.",
        "parameters": [
          {
            "name": "vesselId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/FeatureMapping/Import": {
      "post": {
        "tags": [
          "FeatureMapping"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeatureMappingRelationshipsExportModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FeatureMappingRelationshipsExportModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FeatureMappingRelationshipsExportModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/Vessels/{id}": {
      "get": {
        "tags": [
          "Vessels"
        ],
        "summary": "Get a single vessel by its internal ID.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The internal vessel ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/Vessels": {
      "get": {
        "tags": [
          "Vessels"
        ],
        "summary": "Get all vessels accessible to the current user.",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "description": "Optional. Filter vessels by company ID (admin only).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "ignoreCompany",
            "in": "query",
            "description": "Optional. Set to true to return all vessels across all companies (admin only).",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/Vessels/Extended": {
      "get": {
        "tags": [
          "Vessels"
        ],
        "summary": "Get all vessels with extended details for the current user's company.",
        "description": "Returns vessels enriched with navigation data (position, speed, draft, trim),\r\nlong trend information, voyage details and feature availability.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/OutlierReasonCodes": {
      "get": {
        "tags": [
          "Vessels"
        ],
        "summary": "Get all available outlier reason codes.",
        "description": "Returns the full list of reason codes that can be assigned to data points\r\nflagged as outliers (e.g. PhysicalBounds, SmartOutliers).\r\nUse these codes to interpret the outlierReasonCode field in feature data responses.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/Vessels/{vesselId}/Features": {
      "get": {
        "tags": [
          "Vessels"
        ],
        "summary": "Get all available features for a vessel.",
        "description": "Each feature represents a data channel (e.g. Speed Through Water, ShaftPower).\r\nOutage details are always included: inOutage indicates current state, outageStartTime\r\nis when the data gap began, and lastAvailabilityCheckTime is the timestamp of the most\r\nrecent availability validation run (always populated, regardless of outage state).",
        "parameters": [
          {
            "name": "vesselId",
            "in": "path",
            "description": "The internal vessel ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/Vessels/{vesselId}/Features/{featureId}/Data": {
      "get": {
        "tags": [
          "Vessels"
        ],
        "summary": "Get time-series data for a specific feature on a vessel.",
        "description": "Returns a dictionary of timestamp → data point.\r\n            \r\nFor \"minute\", \"quarterHour\" and \"day\" with downsample=true, each timestamp is the start of a bucket, e.g. 12:00 covers\r\n12:00 (inclusive) to 12:01 (exclusive). All features use the same buckets, so data from different\r\nfeatures and sources can be joined on the timestamp. Angular features (heading, course, wind and current\r\ndirection) use a circular mean, positions and fuel type in use use the first sample in the bucket, and all\r\nother features use the mean. Buckets without samples are left out. The 15-second data is kept for 1 year.\r\n            \r\nFor hourly granularity, each data point may include an outlierReasonCode (integer)\r\nindicating why it was flagged. Use the /OutlierReasonCodes endpoint to look up code meanings.",
        "parameters": [
          {
            "name": "vesselId",
            "in": "path",
            "description": "The internal vessel ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "featureId",
            "in": "path",
            "description": "The feature ID (from the /Features endpoint).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Start of the time range (UTC, inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "End of the time range (UTC, exclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "description": "Data resolution. \"raw\" returns 15-second samples on their original timestamps.\r\n             \"hour\" returns the 1-hour aggregates. \"minute\", \"quarterHour\" and \"day\" return the 15-second samples,\r\n             or downsampled values when downsample is true. Default: raw.",
            "schema": {
              "$ref": "#/components/schemas/FeatureDataGranularity"
            }
          },
          {
            "name": "filterOutliers",
            "in": "query",
            "description": "When true (default), data points marked as removed are excluded from the response. Identified outliers that have not been removed are still returned (with an outlierReasonCode). Only applies when granularity is \"hour\"; the other granularities always include all points.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "downsample",
            "in": "query",
            "description": "When true, \"minute\", \"quarterHour\" and \"day\" downsample the 15-second samples into\r\n             fixed UTC buckets of that size. Ignored for \"raw\" and \"hour\". Default: false.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddFeatureExpressionRequest": {
        "type": "object",
        "properties": {
          "featureName": {
            "type": "string",
            "nullable": true
          },
          "featureMappingExpression": {
            "type": "string",
            "nullable": true
          },
          "vesselImoNumber": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "AuditLog": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "entityType": {
            "$ref": "#/components/schemas/AuditLogEntityType"
          },
          "entityId": {
            "maxLength": 128,
            "type": "string",
            "nullable": true
          },
          "action": {
            "$ref": "#/components/schemas/AuditLogAction"
          },
          "userId": {
            "maxLength": 128,
            "type": "string",
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "additionalInfo": {
            "maxLength": 256,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AuditLogAction": {
        "enum": [
          "Created",
          "Updated",
          "Deleted",
          "Acknowledged"
        ],
        "type": "string"
      },
      "AuditLogEntityType": {
        "enum": [
          "Outliers",
          "OutliersConfig",
          "Vessel"
        ],
        "type": "string"
      },
      "AutoRemoveConfigRequest": {
        "type": "object",
        "properties": {
          "vesselId": {
            "type": "integer",
            "format": "int32"
          },
          "enabled": {
            "type": "boolean"
          },
          "applyToExisting": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DataFeatureModel": {
        "type": "object",
        "properties": {
          "featureId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "unitId": {
            "type": "integer",
            "format": "int32"
          },
          "unit": {
            "$ref": "#/components/schemas/UnitModel"
          },
          "enumId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "enum": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataOutliersConfigModel": {
        "type": "object",
        "properties": {
          "vesselId": {
            "type": "integer",
            "format": "int32"
          },
          "featureName": {
            "type": "string",
            "nullable": true
          },
          "lowerBound": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "upperBound": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "auditLogs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditLog"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataQualityAvailabilityConfigModel": {
        "type": "object",
        "properties": {
          "featureName": {
            "type": "string",
            "nullable": true
          },
          "warningTimeSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "criticalTimeSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "defaultConfig": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DataQualityDataOutliersDataDto": {
        "type": "object",
        "properties": {
          "featureName": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "unmanagedCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "autoRemovedCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "physicalBoundsCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "smartOutliersCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detectionTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "outliers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataQualityDataOutliersValuesDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataQualityDataOutliersDto": {
        "type": "object",
        "properties": {
          "vesselId": {
            "type": "integer",
            "format": "int32"
          },
          "overallStatus": {
            "type": "integer",
            "format": "int32"
          },
          "autoRemoveEnabled": {
            "type": "boolean"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataQualityDataOutliersDataDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataQualityDataOutliersValuesDto": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "isDeleted": {
            "type": "boolean",
            "nullable": true
          },
          "isAcknowledged": {
            "type": "boolean",
            "nullable": true
          },
          "value": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "id": {
            "type": "string",
            "nullable": true
          },
          "reasonCode": {
            "$ref": "#/components/schemas/OutlierReasonCode"
          },
          "reviewedByName": {
            "type": "string",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataQualityOutageData": {
        "type": "object",
        "properties": {
          "inOutage": {
            "type": "boolean"
          },
          "outageStartTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataQualityOutageModel": {
        "type": "object",
        "properties": {
          "imoNumber": {
            "type": "string",
            "nullable": true
          },
          "featureName": {
            "type": "string",
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "$ref": "#/components/schemas/DataQualityOutageData"
          }
        },
        "additionalProperties": false
      },
      "DataQualityOutliersData": {
        "type": "object",
        "properties": {
          "percentOutliers": {
            "type": "number",
            "format": "double"
          },
          "outliers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataQualityOutliersDataOutliers"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataQualityOutliersDataOutliers": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "isDeleted": {
            "type": "boolean",
            "nullable": true
          },
          "isAcknowledged": {
            "type": "boolean",
            "nullable": true
          },
          "value": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "id": {
            "type": "string",
            "nullable": true
          },
          "reasonCode": {
            "$ref": "#/components/schemas/OutlierReasonCode"
          },
          "reviewedByName": {
            "type": "string",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataQualityOutliersModel": {
        "type": "object",
        "properties": {
          "imoNumber": {
            "type": "integer",
            "format": "int32"
          },
          "featureName": {
            "type": "string",
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "$ref": "#/components/schemas/DataQualityOutliersData"
          },
          "fromCalculationDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "toCalculationDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "reasonCode": {
            "$ref": "#/components/schemas/OutlierReasonCode"
          }
        },
        "additionalProperties": false
      },
      "DataQualitySpeedLogData": {
        "type": "object",
        "properties": {
          "timeStamp": {
            "type": "string",
            "format": "date-time"
          },
          "bias": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataQualitySpeedLogModel": {
        "type": "object",
        "properties": {
          "imoNumber": {
            "type": "integer",
            "format": "int32"
          },
          "featureName": {
            "type": "string",
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataQualitySpeedLogData"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DateTimeFeatureDataModel": {
        "type": "object",
        "properties": {
          "filter": {
            "$ref": "#/components/schemas/FeatureDataFilterModel"
          },
          "units": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UnitModel"
            },
            "nullable": true
          },
          "data": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "number",
                "format": "double"
              },
              "nullable": true
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FeatureDataFilterModel": {
        "type": "object",
        "properties": {
          "featureIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          },
          "fromDate": {
            "type": "string",
            "format": "date-time"
          },
          "toDate": {
            "type": "string",
            "format": "date-time"
          },
          "granularity": {
            "type": "string",
            "nullable": true
          },
          "downsample": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "FeatureDataGranularity": {
        "enum": [
          "Raw",
          "Hour",
          "Minute",
          "QuarterHour",
          "Day"
        ],
        "type": "string"
      },
      "FeatureMappingRelationshipsExportModel": {
        "type": "object",
        "properties": {
          "vesselImo": {
            "type": "integer",
            "format": "int32"
          },
          "vesselName": {
            "type": "string",
            "nullable": true
          },
          "relationships": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeatureMappingRelationshipsModel"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FeatureMappingRelationshipsModel": {
        "type": "object",
        "properties": {
          "featureName": {
            "type": "string",
            "nullable": true
          },
          "featureDescription": {
            "type": "string",
            "nullable": true
          },
          "featureUnit": {
            "type": "string",
            "nullable": true
          },
          "expression": {
            "type": "string",
            "nullable": true
          },
          "expressionExportable": {
            "type": "string",
            "nullable": true
          },
          "relatedFeatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelatedDataFeaturesModel"
            },
            "nullable": true
          },
          "relatedDataTags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelatedDataTagsModel"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ImportDataFeatureRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "nullable": true
          },
          "enum": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LatestOutageStateModel": {
        "type": "object",
        "properties": {
          "imoNumber": {
            "type": "string",
            "nullable": true
          },
          "featureName": {
            "type": "string",
            "nullable": true
          },
          "outageDetectionTime": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "LinkDataTagRequest": {
        "type": "object",
        "properties": {
          "imoNumber": {
            "type": "integer",
            "format": "int32"
          },
          "logVariableId": {
            "type": "integer",
            "format": "int32"
          },
          "dataTagId": {
            "type": "integer",
            "format": "int32"
          },
          "dataTagOffset": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LogVariableToDataTagConfigurationGroupRequest": {
        "type": "object",
        "properties": {
          "vesselId": {
            "type": "integer",
            "format": "int32"
          },
          "link": {
            "$ref": "#/components/schemas/LogVariableToDataTagLink"
          }
        },
        "additionalProperties": false
      },
      "LogVariableToDataTagLink": {
        "type": "object",
        "properties": {
          "logVariableId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "logVariableName": {
            "type": "string",
            "nullable": true
          },
          "dataTagId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "dataTagName": {
            "type": "string",
            "nullable": true
          },
          "dataTagOffset": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LogVariableToDataTagLinkRequest": {
        "type": "object",
        "properties": {
          "imoNumber": {
            "type": "integer",
            "format": "int32"
          },
          "links": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogVariableToDataTagLink"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OutlierReasonCode": {
        "enum": [
          "PhysicalBounds",
          "SmartOutliers"
        ],
        "type": "string"
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "RelatedDataFeaturesModel": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RelatedDataTagsModel": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "nullable": true
          },
          "logVariable": {
            "$ref": "#/components/schemas/RelatedLogVariablesModels"
          }
        },
        "additionalProperties": false
      },
      "RelatedLogVariablesModels": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "nullable": true
          },
          "dataTagOffset": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TestExpressionModel": {
        "type": "object",
        "properties": {
          "imoNumber": {
            "type": "string",
            "nullable": true
          },
          "featureName": {
            "type": "string",
            "nullable": true
          },
          "featureMappingExpression": {
            "type": "string",
            "nullable": true
          },
          "startTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "endTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UnitModel": {
        "type": "object",
        "properties": {
          "unitId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "caption": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateFeatureExpressionRequest": {
        "type": "object",
        "properties": {
          "featureName": {
            "type": "string",
            "nullable": true
          },
          "featureMappingExpression": {
            "type": "string",
            "nullable": true
          },
          "vesselImoNumber": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "ValidateExpressionModel": {
        "type": "object",
        "properties": {
          "featureMappingExpression": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "basic": {
        "type": "http",
        "description": "Basic Authentication using an email as the username and an API key as the password.",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basic": [ ]
    }
  ]
}