{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/linkbreakers-com/json-schema/linkbreakers-com-get-grouped-time-series-request-schema.json",
  "title": "GetGroupedTimeSeriesRequest fetches time-bucketed event data grouped by a dimension",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/linkbreakers-com-analytics-data-api-openapi.yml#/components/schemas/GetGroupedTimeSeriesRequest",
  "properties": {
    "countries": {
      "items": {
        "type": "string"
      },
      "title": "Optional country filter: visits from any of these countries (ISO 3166-1\nalpha-2 codes, e.g. \"FR\"). Combines with the link, directory or tag filter",
      "type": "array"
    },
    "directoryId": {
      "title": "Optional directory filter (UUID): the links of this directory and of every\ndirectory below it. Send link_id or directory_id, not both; when both are\nomitted aggregates workspace-wide",
      "type": "string"
    },
    "endDate": {
      "format": "date-time",
      "type": "string"
    },
    "groupBy": {
      "$ref": "#/$defs/GroupByDimension",
      "title": "Dimension to group by"
    },
    "intervalInMinutes": {
      "format": "int32",
      "type": "integer"
    },
    "limit": {
      "description": "Max number of groups to return (top N by volume). Default 5.",
      "format": "int32",
      "type": "integer"
    },
    "linkId": {
      "title": "Optional link filter (UUID); when omitted aggregates workspace-wide",
      "type": "string"
    },
    "startDate": {
      "format": "date-time",
      "type": "string"
    },
    "tagId": {
      "title": "Optional tag filter (UUID): every link carrying this tag. Send at most one\nof link_id, directory_id and tag_id",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "GroupByDimension": {
      "default": "GROUP_BY_DIMENSION_UNSPECIFIED",
      "description": "GroupByDimension defines the available dimensions for grouping analytics data.\nAdd new dimensions here as the platform grows.",
      "enum": [
        "GROUP_BY_DIMENSION_UNSPECIFIED",
        "GROUP_BY_DIMENSION_COUNTRY",
        "GROUP_BY_DIMENSION_CITY",
        "GROUP_BY_DIMENSION_DEVICE_TYPE",
        "GROUP_BY_DIMENSION_VISIT_TYPE",
        "GROUP_BY_DIMENSION_BROWSER",
        "GROUP_BY_DIMENSION_PLATFORM"
      ],
      "type": "string"
    }
  }
}