{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/engrate/json-schema/engrate-profile-response-schema.json",
  "title": "ProfileResponse",
  "description": "Full profile including timeseries values.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/engrate-profiles-api-openapi.yml#/components/schemas/ProfileResponse",
  "properties": {
    "created_at": {
      "description": "Timestamp when the profile was created.",
      "format": "date-time",
      "title": "Created At",
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional description.",
      "title": "Description"
    },
    "end_time": {
      "description": "End of the timeseries period (exclusive).",
      "format": "date-time",
      "title": "End Time",
      "type": "string"
    },
    "id": {
      "description": "Unique identifier for the profile.",
      "format": "uuid",
      "title": "Id",
      "type": "string"
    },
    "name": {
      "description": "Human-readable name.",
      "title": "Name",
      "type": "string"
    },
    "resolution": {
      "$ref": "#/$defs/Resolution",
      "description": "Temporal resolution of the values. May differ from native resolution if downsampled."
    },
    "scope": {
      "description": "Whether this is a global profile or owned by an organization.",
      "enum": [
        "global",
        "org"
      ],
      "title": "Scope",
      "type": "string"
    },
    "start_time": {
      "description": "Start of the timeseries period (inclusive).",
      "format": "date-time",
      "title": "Start Time",
      "type": "string"
    },
    "tags": {
      "description": "Tags for categorizing and filtering profiles.",
      "items": {
        "type": "string"
      },
      "title": "Tags",
      "type": "array"
    },
    "unit": {
      "$ref": "#/$defs/Unit",
      "description": "Unit of measurement for the values."
    },
    "values": {
      "description": "Timeseries values aligned to the resolution and time range. `null` entries represent missing data points.",
      "items": {
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "null"
          }
        ]
      },
      "title": "Values",
      "type": "array"
    }
  },
  "required": [
    "created_at",
    "end_time",
    "id",
    "name",
    "resolution",
    "scope",
    "start_time",
    "tags",
    "unit",
    "values"
  ],
  "type": "object",
  "$defs": {
    "Resolution": {
      "description": "Temporal resolution\n\n### Available resolutions\n\n- **quarter_hourly** — 15-minute resolution\n\n- **hourly** — 60-minute resolution\n\n- **daily** — Daily resolution in *calendar* days, not necessarily exactly 24 hours, depending on daylight savings etc\n\n- **weekly** — Weekly resolution in *calendar* weeks, not necessarily exactly 24 * 7 hours, depending on daylight savings etc\n\n- **monthly** — Monthly resolution in *calendar* months, taking into account things like daylight savings and leap year calculations\n\n- **yearly** — Annual resolution in *calendar* years, taking into account things like daylight savings and leap year calculations",
      "enum": [
        "quarter_hourly",
        "hourly",
        "daily",
        "weekly",
        "monthly",
        "yearly"
      ],
      "title": "Resolution",
      "type": "string"
    },
    "Unit": {
      "description": "Units indicate, well, the unit of values. These are used in places like [Datasets](/api-reference/cost-of-energy/models/dataset) and [Levels](/api-reference/cost-of-energy/models/level) to indicate the unit the data is in.\n\n### Available units\n\n- **A** — Current in Amperes\n\n- **kV** — Voltage in kilo volts\n\n- **kW** — Power in kilo watts\n\n- **kWh** — Energy in kilo watt hours\n\n- **hours** — Time in hours\n\n- **SEK** — Monetary amount in SEK\n\n- **NOK** — Monetary amount in NOK\n\n- **EUR** — Monetary amount in EUR\n\n- **SEK_per_kWh** — Monetary rate in SEK per kWh\n\n- **SEK_per_kW** — Monetary rate in SEK per kW\n\n- **NOK_per_kWh** — Monetary rate in NOK per kWh\n\n- **NOK_per_kW** — Monetary rate in NOK per kW\n\n- **EUR_per_kWh** — Monetary rate in EUR per kWh\n\n- **EUR_per_kW** — Monetary rate in EUR per kW\n\n- **%** — Percentage, as a float, where 1.0 represents 100%",
      "enum": [
        "A",
        "kV",
        "kW",
        "kWh",
        "hours",
        "SEK",
        "NOK",
        "EUR",
        "SEK_per_kWh",
        "SEK_per_kW",
        "NOK_per_kWh",
        "NOK_per_kW",
        "EUR_per_kWh",
        "EUR_per_kW",
        "%"
      ],
      "title": "Unit",
      "type": "string"
    }
  }
}