{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instana/json-schema/instana-get-activities-schema.json",
  "title": "GetActivities",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/instana-business-monitoring-api-openapi.yml#/components/schemas/GetActivities",
  "type": "object",
  "properties": {
    "order": {
      "$ref": "#/$defs/Order"
    },
    "pagination": {
      "$ref": "#/$defs/Pagination"
    },
    "tagFilterExpression": {
      "$ref": "#/$defs/TagFilterExpressionElement"
    },
    "timeFrame": {
      "$ref": "#/$defs/TimeFrame"
    },
    "timeframe": {
      "$ref": "#/$defs/TimeFrame"
    }
  },
  "required": [
    "order",
    "pagination",
    "timeFrame"
  ],
  "$defs": {
    "Order": {
      "type": "object",
      "description": "Specifies the ordering of the results.\nIt contains fields that define the sorting criteria, the collation for sorting, and the direction in which the results should be ordered.\n",
      "properties": {
        "by": {
          "type": "string",
          "description": "If the granularity is set to `1` you can use the metric name eg. `latency.p95` to order by that value."
        },
        "collation": {
          "type": "string",
          "description": "Language code used for sorting. Ignored for infrastructure queries."
        },
        "direction": {
          "type": "string",
          "description": "The order in which results will be sorted, either `ASC` for ascending or `DESC` for descending.",
          "enum": [
            "ASC",
            "DESC"
          ]
        }
      },
      "required": [
        "by",
        "direction"
      ]
    },
    "Pagination": {
      "type": "object",
      "properties": {
        "page": {
          "type": "integer",
          "format": "int32",
          "description": "Page number for a specific page in the results. For example, if you'd like to retrieve the 5th page out of 10 pages, the value would be 5.",
          "minimum": 1
        },
        "pageSize": {
          "type": "integer",
          "format": "int32",
          "description": "Set the number of items you want to return with one query. Eg: if you want to retrieve 10 items, the value would be 10.",
          "maximum": 200,
          "minimum": 1
        }
      }
    },
    "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
        }
      }
    }
  }
}