{
  "openapi": "3.1.0",
  "info": {
    "description": "The Excessive Usage API exposes Trackunit's excessive-usage analytics data. Excessive usage represents the portion of an asset's operating time that exceeds the configured usage thresholds.",
    "title": "Excessive Usage API",
    "version": "1.0"
  },
  "externalDocs": {
    "description": "Trackunit Developer Hub",
    "url": "https://developers.trackunit.com/"
  },
  "servers": [
    {
      "description": "Endpoint for production",
      "url": "https://iris.trackunit.com/api/excessive-usage"
    }
  ],
  "security": [
    {
      "authorizationBearer": []
    }
  ],
  "tags": [
    {
      "description": "Excessive-usage data for individual assets, including day-by-day breakdowns and aggregated summaries over a date range.",
      "name": "Asset"
    },
    {
      "description": "Excessive-usage data aggregated per customer, with drill-down into the customer's underlying assets.",
      "name": "Customer"
    }
  ],
  "paths": {
    "/assets/summary": {
      "get": {
        "description": "Returns a paginated list of assets with their total excessive-usage hours for the requested date range.",
        "operationId": "getAssetsExcessiveUsage",
        "parameters": [
          {
            "description": "Start date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to 7 days before today when omitted.",
            "example": "2025-01-01",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Start date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to 7 days before today when omitted.",
              "example": "2025-01-01"
            }
          },
          {
            "description": "End date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to today when omitted.",
            "example": "2025-01-31",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "End date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to today when omitted.",
              "example": "2025-01-31"
            }
          },
          {
            "description": "IANA time zone identifier used to interpret `from`/`to` and to aggregate per-day results. Defaults to `UTC` when omitted.",
            "example": "Europe/Copenhagen",
            "in": "query",
            "name": "zoneId",
            "required": false,
            "schema": {
              "type": "string",
              "default": "UTC",
              "description": "IANA time zone identifier used to interpret `from`/`to` and to aggregate per-day results. Defaults to `UTC` when omitted.",
              "example": "Europe/Copenhagen"
            }
          },
          {
            "description": "Zero-based page index (0..N)",
            "example": 0,
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0,
              "minimum": 0
            }
          },
          {
            "description": "The size of the page to be returned",
            "example": 20,
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20,
              "minimum": 1
            }
          },
          {
            "description": "Sort order: `property` (ascending by default), `+property` (ascending), `-property` (descending).",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "AssetsExcessiveUsageSummary": {
                    "description": "AssetsExcessiveUsageSummary",
                    "value": {
                      "content": [
                        {
                          "assetId": "9b2f1c7a-4d2e-4d4d-9c8e-1a1f0a8b7c01",
                          "totalHours": 12.5
                        },
                        {
                          "assetId": "5a8c4f12-9b1e-4e6f-8a7b-3c2d1e0f9a02",
                          "totalHours": 4.25
                        }
                      ],
                      "number": 0,
                      "numberOfElements": 2,
                      "size": 20,
                      "totalElements": 2,
                      "totalPages": 1
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAssetExcessiveUsageSummaryRepresentation"
                }
              }
            },
            "description": "Paginated list of asset excessive-usage summaries."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "List assets by excessive usage",
        "tags": [
          "Asset"
        ]
      }
    },
    "/assets/{assetId}": {
      "get": {
        "description": "Returns the day-by-day excessive-usage hours for a single asset within the requested date range. The response contains one entry per calendar day in the range, including days with zero excessive usage.",
        "operationId": "getAssetExcessiveUsage",
        "parameters": [
          {
            "description": "Identifier of the asset to fetch excessive-usage data for.",
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Start date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to 7 days before today when omitted.",
            "example": "2025-01-01",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Start date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to 7 days before today when omitted.",
              "example": "2025-01-01"
            }
          },
          {
            "description": "End date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to today when omitted.",
            "example": "2025-01-31",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "End date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to today when omitted.",
              "example": "2025-01-31"
            }
          },
          {
            "description": "IANA time zone identifier used to interpret `from`/`to` and to aggregate per-day results. Defaults to `UTC` when omitted.",
            "example": "Europe/Copenhagen",
            "in": "query",
            "name": "zoneId",
            "required": false,
            "schema": {
              "type": "string",
              "default": "UTC",
              "description": "IANA time zone identifier used to interpret `from`/`to` and to aggregate per-day results. Defaults to `UTC` when omitted.",
              "example": "Europe/Copenhagen"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "AssetDailyExcessiveUsage": {
                    "description": "Includes `2025-01-02` with `0.0` hours to illustrate that days with no excessive usage are still returned.",
                    "value": {
                      "assetId": "9b2f1c7a-4d2e-4d4d-9c8e-1a1f0a8b7c01",
                      "values": [
                        {
                          "date": "2025-01-01",
                          "excessiveUsage": 1.5
                        },
                        {
                          "date": "2025-01-02",
                          "excessiveUsage": 0.0
                        },
                        {
                          "date": "2025-01-03",
                          "excessiveUsage": 3.25
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ExcessiveUsageRepresentation"
                }
              }
            },
            "description": "Day-by-day excessive-usage hours for the requested asset."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get daily excessive usage for an asset",
        "tags": [
          "Asset"
        ]
      }
    },
    "/assets/{assetId}/summary": {
      "get": {
        "description": "Returns total excessive-usage hours for a single asset within the requested date range, broken down by violation type.",
        "operationId": "getAssetExcessiveUsageSummary",
        "parameters": [
          {
            "description": "Identifier of the asset to fetch the excessive-usage summary for.",
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Start date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to 7 days before today when omitted.",
            "example": "2025-01-01",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Start date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to 7 days before today when omitted.",
              "example": "2025-01-01"
            }
          },
          {
            "description": "End date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to today when omitted.",
            "example": "2025-01-31",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "End date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to today when omitted.",
              "example": "2025-01-31"
            }
          },
          {
            "description": "IANA time zone identifier used to interpret `from`/`to` and to aggregate per-day results. Defaults to `UTC` when omitted.",
            "example": "Europe/Copenhagen",
            "in": "query",
            "name": "zoneId",
            "required": false,
            "schema": {
              "type": "string",
              "default": "UTC",
              "description": "IANA time zone identifier used to interpret `from`/`to` and to aggregate per-day results. Defaults to `UTC` when omitted.",
              "example": "Europe/Copenhagen"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "AssetExcessiveUsageSummary": {
                    "description": "AssetExcessiveUsageSummary",
                    "value": {
                      "assetId": "9b2f1c7a-4d2e-4d4d-9c8e-1a1f0a8b7c01",
                      "totalHours": 12.5,
                      "excessiveUsageByViolationType": {
                        "EXCEEDS_DAILY_LIMIT": 8.0,
                        "OUTSIDE_TIME_INTERVAL": 4.5
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ExtendedAssetExcessiveUsageSummaryRepresentation"
                }
              }
            },
            "description": "Excessive-usage summary for the requested asset, broken down by violation type."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get excessive-usage summary for an asset",
        "tags": [
          "Asset"
        ]
      }
    },
    "/customers/summary": {
      "get": {
        "description": "Returns a paginated list of customers with the excessive-usage summary of their assets for the requested date range.",
        "operationId": "getCustomersExcessiveUsage",
        "parameters": [
          {
            "description": "Start date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to 7 days before today when omitted.",
            "example": "2025-01-01",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Start date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to 7 days before today when omitted.",
              "example": "2025-01-01"
            }
          },
          {
            "description": "End date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to today when omitted.",
            "example": "2025-01-31",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "End date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to today when omitted.",
              "example": "2025-01-31"
            }
          },
          {
            "description": "IANA time zone identifier used to interpret `from`/`to` and to aggregate per-day results. Defaults to `UTC` when omitted.",
            "example": "Europe/Copenhagen",
            "in": "query",
            "name": "zoneId",
            "required": false,
            "schema": {
              "type": "string",
              "default": "UTC",
              "description": "IANA time zone identifier used to interpret `from`/`to` and to aggregate per-day results. Defaults to `UTC` when omitted.",
              "example": "Europe/Copenhagen"
            }
          },
          {
            "description": "Zero-based page index (0..N)",
            "example": 0,
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0,
              "minimum": 0
            }
          },
          {
            "description": "The size of the page to be returned",
            "example": 20,
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20,
              "minimum": 1
            }
          },
          {
            "description": "Sort order: `property` (ascending by default), `+property` (ascending), `-property` (descending).",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "CustomersExcessiveUsageSummary": {
                    "description": "CustomersExcessiveUsageSummary",
                    "value": {
                      "content": [
                        {
                          "customerId": "7f1c0e5a-2b3c-4d5e-9f10-2a3b4c5d6e07",
                          "assetSummary": [
                            {
                              "assetId": "9b2f1c7a-4d2e-4d4d-9c8e-1a1f0a8b7c01",
                              "totalHours": 12.5
                            },
                            {
                              "assetId": "5a8c4f12-9b1e-4e6f-8a7b-3c2d1e0f9a02",
                              "totalHours": 4.25
                            }
                          ]
                        }
                      ],
                      "number": 0,
                      "numberOfElements": 1,
                      "size": 20,
                      "totalElements": 1,
                      "totalPages": 1
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCustomerExcessiveUsageSummaryRepresentation"
                }
              }
            },
            "description": "Paginated list of customer excessive-usage summaries."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "List customers by excessive usage",
        "tags": [
          "Customer"
        ]
      }
    },
    "/customers/{customerId}": {
      "get": {
        "description": "Returns the day-by-day excessive-usage hours per asset for a single customer within the requested date range. Each asset's `values` array contains one entry per calendar day in the range, including days with zero excessive usage.",
        "operationId": "getCustomerExcessiveUsage",
        "parameters": [
          {
            "description": "Identifier of the customer to fetch excessive-usage data for.",
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Start date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to 7 days before today when omitted.",
            "example": "2025-01-01",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Start date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to 7 days before today when omitted.",
              "example": "2025-01-01"
            }
          },
          {
            "description": "End date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to today when omitted.",
            "example": "2025-01-31",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "End date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to today when omitted.",
              "example": "2025-01-31"
            }
          },
          {
            "description": "IANA time zone identifier used to interpret `from`/`to` and to aggregate per-day results. Defaults to `UTC` when omitted.",
            "example": "Europe/Copenhagen",
            "in": "query",
            "name": "zoneId",
            "required": false,
            "schema": {
              "type": "string",
              "default": "UTC",
              "description": "IANA time zone identifier used to interpret `from`/`to` and to aggregate per-day results. Defaults to `UTC` when omitted.",
              "example": "Europe/Copenhagen"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "CustomerDailyExcessiveUsage": {
                    "description": "The second asset reports `0.0` hours on `2025-01-01` to illustrate that days with no excessive usage are still returned for every asset.",
                    "value": {
                      "excessiveUsageAssets": [
                        {
                          "assetId": "9b2f1c7a-4d2e-4d4d-9c8e-1a1f0a8b7c01",
                          "values": [
                            {
                              "date": "2025-01-01",
                              "excessiveUsage": 1.5
                            },
                            {
                              "date": "2025-01-02",
                              "excessiveUsage": 3.25
                            }
                          ]
                        },
                        {
                          "assetId": "5a8c4f12-9b1e-4e6f-8a7b-3c2d1e0f9a02",
                          "values": [
                            {
                              "date": "2025-01-01",
                              "excessiveUsage": 0.0
                            },
                            {
                              "date": "2025-01-02",
                              "excessiveUsage": 2.0
                            }
                          ]
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CustomerExcessiveUsageRepresentation"
                }
              }
            },
            "description": "Day-by-day excessive-usage hours per asset for the requested customer."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get excessive usage for a customer",
        "tags": [
          "Customer"
        ]
      }
    },
    "/customers/{customerId}/summary": {
      "get": {
        "description": "Returns total excessive-usage hours per asset for a single customer within the requested date range.",
        "operationId": "getCustomerExcessiveUsageSummary",
        "parameters": [
          {
            "description": "Identifier of the customer to fetch the excessive-usage summary for.",
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Start date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to 7 days before today when omitted.",
            "example": "2025-01-01",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Start date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to 7 days before today when omitted.",
              "example": "2025-01-01"
            }
          },
          {
            "description": "End date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to today when omitted.",
            "example": "2025-01-31",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "description": "End date (inclusive) of the search interval, interpreted in the time zone given by `zoneId`. Defaults to today when omitted.",
              "example": "2025-01-31"
            }
          },
          {
            "description": "IANA time zone identifier used to interpret `from`/`to` and to aggregate per-day results. Defaults to `UTC` when omitted.",
            "example": "Europe/Copenhagen",
            "in": "query",
            "name": "zoneId",
            "required": false,
            "schema": {
              "type": "string",
              "default": "UTC",
              "description": "IANA time zone identifier used to interpret `from`/`to` and to aggregate per-day results. Defaults to `UTC` when omitted.",
              "example": "Europe/Copenhagen"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "CustomerExcessiveUsageSummary": {
                    "description": "CustomerExcessiveUsageSummary",
                    "value": {
                      "customerId": "7f1c0e5a-2b3c-4d5e-9f10-2a3b4c5d6e07",
                      "assetSummary": [
                        {
                          "assetId": "9b2f1c7a-4d2e-4d4d-9c8e-1a1f0a8b7c01",
                          "totalHours": 12.5
                        },
                        {
                          "assetId": "5a8c4f12-9b1e-4e6f-8a7b-3c2d1e0f9a02",
                          "totalHours": 4.25
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CustomerExcessiveUsageSummaryRepresentation"
                }
              }
            },
            "description": "Excessive-usage summary per asset for the requested customer."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConstraintViolationError"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Invalid or missing bearer token in Authorization header"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "User not allowed to make this request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Resource not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultError"
                }
              }
            },
            "description": "Internal server error"
          }
        },
        "summary": "Get excessive-usage summary for a customer",
        "tags": [
          "Customer"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AssetExcessiveUsageSummaryRepresentation": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "format": "uuid",
            "description": "Identifier of the asset this summary refers to."
          },
          "totalHours": {
            "type": "number",
            "format": "double",
            "description": "Total excessive-usage hours for the asset across the requested date range."
          }
        }
      },
      "ConstraintViolationError": {
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Alphanumeric code (snake case) describing use case specific error"
          },
          "message": {
            "type": "string",
            "description": "Detailed description of error"
          },
          "properties": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {},
            "description": "Additional properties to be included in the error response"
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "HTTP status code"
          },
          "violations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Violation"
            }
          }
        }
      },
      "CustomerExcessiveUsageRepresentation": {
        "type": "object",
        "properties": {
          "excessiveUsageAssets": {
            "type": "array",
            "description": "Per-asset day-by-day excessive-usage breakdown for the customer.",
            "items": {
              "$ref": "#/components/schemas/ExcessiveUsageRepresentation"
            }
          }
        }
      },
      "CustomerExcessiveUsageSummaryRepresentation": {
        "type": "object",
        "properties": {
          "assetSummary": {
            "type": "array",
            "description": "Per-asset excessive-usage summary for the customer across the requested date range.",
            "items": {
              "$ref": "#/components/schemas/AssetExcessiveUsageSummaryRepresentation"
            }
          },
          "customerId": {
            "type": "string",
            "format": "uuid",
            "description": "Identifier of the customer this summary refers to."
          }
        }
      },
      "DayUsageRepresentation": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "description": "Calendar day of the excessive-usage value, in the time zone given by the `zoneId` query parameter (defaults to `UTC`)."
          },
          "excessiveUsage": {
            "type": "number",
            "format": "double",
            "description": "Excessive-usage hours recorded on this day."
          }
        }
      },
      "DefaultError": {
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Alphanumeric code (snake case) describing use case specific error"
          },
          "message": {
            "type": "string",
            "description": "Detailed description of error"
          },
          "properties": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {},
            "description": "Additional properties to be included in the error response"
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "HTTP status code"
          }
        }
      },
      "ExcessiveUsageRepresentation": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "format": "uuid",
            "description": "Identifier of the asset this day-by-day breakdown refers to."
          },
          "values": {
            "type": "array",
            "description": "Day-by-day excessive-usage hours for the asset across the requested date range.",
            "items": {
              "$ref": "#/components/schemas/DayUsageRepresentation"
            }
          }
        }
      },
      "ExtendedAssetExcessiveUsageSummaryRepresentation": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "format": "uuid",
            "description": "Identifier of the asset this summary refers to."
          },
          "excessiveUsageByViolationType": {
            "type": "object",
            "additionalProperties": {
              "type": "number",
              "format": "double"
            },
            "description": "Total excessive-usage hours grouped by violation type. Each key is a value of the `ViolationType` enum.",
            "propertyNames": {
              "$ref": "#/components/schemas/ViolationType"
            }
          },
          "totalHours": {
            "type": "number",
            "format": "double",
            "description": "Total excessive-usage hours for the asset across the requested date range."
          }
        }
      },
      "PaginatedAssetExcessiveUsageSummaryRepresentation": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "description": "The page content as a list.",
            "items": {
              "$ref": "#/components/schemas/AssetExcessiveUsageSummaryRepresentation"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32",
            "description": "The number of the current page."
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32",
            "description": "The number of elements currently on this page."
          },
          "size": {
            "type": "integer",
            "format": "int32",
            "description": "The size of the page."
          },
          "totalElements": {
            "type": "integer",
            "format": "int64",
            "description": "The total number of elements."
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "description": "The number of total pages."
          }
        }
      },
      "PaginatedCustomerExcessiveUsageSummaryRepresentation": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "description": "The page content as a list.",
            "items": {
              "$ref": "#/components/schemas/CustomerExcessiveUsageSummaryRepresentation"
            }
          },
          "number": {
            "type": "integer",
            "format": "int32",
            "description": "The number of the current page."
          },
          "numberOfElements": {
            "type": "integer",
            "format": "int32",
            "description": "The number of elements currently on this page."
          },
          "size": {
            "type": "integer",
            "format": "int32",
            "description": "The size of the page."
          },
          "totalElements": {
            "type": "integer",
            "format": "int64",
            "description": "The total number of elements."
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "description": "The number of total pages."
          }
        }
      },
      "Violation": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ViolationType": {
        "type": "string",
        "enum": [
          "OUTSIDE_ALLOWED_DAYS",
          "OUTSIDE_TIME_INTERVAL",
          "EXCEEDS_DAILY_LIMIT",
          "EXCEEDS_WEEKLY_LIMIT"
        ]
      }
    },
    "securitySchemes": {
      "authorizationBearer": {
        "bearerFormat": "JWT",
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
