{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instana/json-schema/instana-get-mobile-app-metrics-v2-schema.json",
  "title": "GetMobileAppMetricsV2",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/instana-mobile-app-metrics-api-openapi.yml#/components/schemas/GetMobileAppMetricsV2",
  "type": "object",
  "properties": {
    "metrics": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MobileAppMonitoringMetricsConfiguration"
      },
      "maxItems": 5,
      "minItems": 1
    },
    "tagFilterExpression": {
      "$ref": "#/$defs/TagFilterExpressionElement"
    },
    "timeFrame": {
      "$ref": "#/$defs/TimeFrame"
    },
    "type": {
      "type": "string",
      "enum": [
        "SESSION_START",
        "HTTP_REQUEST",
        "CRASH",
        "CUSTOM",
        "VIEW_CHANGE",
        "DROP_BEACON",
        "PERF"
      ]
    }
  },
  "required": [
    "metrics",
    "type"
  ],
  "$defs": {
    "MobileAppMonitoringMetricsConfiguration": {
      "type": "object",
      "properties": {
        "aggregation": {
          "type": "string",
          "description": "Set aggregation that can be applied to a series of values. Eg: `MEAN`.",
          "enum": [
            "SUM",
            "MEAN",
            "MAX",
            "MIN",
            "P25",
            "P50",
            "P75",
            "P90",
            "P95",
            "P98",
            "P99",
            "P99_9",
            "P99_99",
            "DISTINCT_COUNT",
            "SUM_POSITIVE",
            "PER_SECOND",
            "INCREASE"
          ]
        },
        "granularity": {
          "type": "integer",
          "format": "int32",
          "description": "If the granularity is set you will get data points with the specified granularity in seconds. Default: `1000` milliseconds"
        },
        "metric": {
          "type": "string",
          "description": "Set a particular metric, eg: `latency`."
        },
        "numeratorTagFilterExpression": {
          "$ref": "#/$defs/TagFilterExpressionElement"
        }
      },
      "required": [
        "aggregation",
        "metric"
      ]
    },
    "TagFilterExpressionElement": {
      "type": "object",
      "description": "Boolean expression of tag filters to define the scope of relevant calls.",
      "properties": {
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ]
    },
    "TimeFrame": {
      "type": "object",
      "description": "Time range for which the data should be retrieved.",
      "properties": {
        "to": {
          "type": "integer",
          "format": "int64",
          "description": "end of timeframe expressed as the Unix epoch time in milliseconds. Eg: `ISO 8601` standard time `2024-06-27T05:05:55.615Z` can be represented as `1719464755615` in Unix epoch time in milliseconds."
        },
        "windowSize": {
          "type": "integer",
          "format": "int64",
          "description": "windowSize in milliseconds",
          "maximum": 2678400000,
          "minimum": 0
        }
      }
    }
  }
}