{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/WorkspaceDurationMetricsResponse",
  "title": "WorkspaceDurationMetricsResponse",
  "type": "object",
  "required": [
    "workspaceId"
  ],
  "properties": {
    "workspaceId": {
      "type": "string",
      "example": "Y2lzY29zcGFyazovL3VzL09SR0FOSVpBVElPTi85NmFiYzJhYS0zZGNjLTExZTUtYTE1Mi1mZTM0ODE5Y2RjOWE"
    },
    "aggregation": {
      "type": "string",
      "enum": [
        "hourly",
        "daily"
      ]
    },
    "measurement": {
      "type": "string",
      "enum": [
        "timeUsed",
        "timeBooked"
      ]
    },
    "from": {
      "type": "string",
      "example": "2020-10-21T13:33:37.789Z"
    },
    "to": {
      "type": "string",
      "example": "2020-10-31T16:00:00.532Z"
    },
    "unit": {
      "type": "string",
      "example": "minutes",
      "description": "The time unit."
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/DurationMetric"
      }
    }
  }
}