{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instana/json-schema/instana-get-services-schema.json",
  "title": "GetServices",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/instana-application-metrics-api-openapi.yml#/components/schemas/GetServices",
  "type": "object",
  "properties": {
    "applicationBoundaryScope": {
      "type": "string",
      "description": "Use when querying calls of an application:\n `INBOUND`: only inbound calls \n `ALL`: all the calls to that application (inbound + internal)",
      "enum": [
        "ALL",
        "INBOUND"
      ]
    },
    "applicationId": {
      "type": "string",
      "description": "An Instana generated unique identifier for an Application. If specified, the list of results will be filtered for the specified Application ID. Eg: `Av62RoIKQv-A3n6DbMQh9g`.\nOne can see the application id from Instana UI by going to an Application Perspective page. In the URL, there will be `appId=Av62RoIKQv-A3n6DbMQh9g`.\nAlternatively, one can use `Get applications` API endpoint to get the application id in `id` parameter.\n",
      "maxLength": 64,
      "minLength": 0
    },
    "contextScope": {
      "type": "string",
      "description": "separate filtering and group by service id field\n - upstream is filtered on destination service and groups on source service\n - downstream is filtered on source service and groups on destination service\n - none is filtered on destination service and no grouping",
      "enum": [
        "NONE",
        "UPSTREAM",
        "DOWNSTREAM"
      ]
    },
    "metrics": {
      "type": "array",
      "description": "A list of objects each of which defines a metric and the (statistical) aggregation -- MEAN, SUM, MAX, etc -- that should be used to summarize it for the defined time frame. Eg: `[{ 'metric': 'latency', 'aggregation': 'MEAN'}]`. To know more about supported metrics and its aggregation, See `Get Metric catalog`.",
      "items": {
        "$ref": "#/$defs/AppDataMetricConfiguration"
      },
      "maxItems": 5,
      "minItems": 1
    },
    "nameFilter": {
      "type": "string",
      "description": "filter by name with `contains` semantic. Eg: Let's say there are 2 service names `ecomm-order` and `ecomm-deliver`, you can set `ecomm-` here to include the two Services.",
      "maxLength": 256,
      "minLength": 0
    },
    "order": {
      "$ref": "#/$defs/Order"
    },
    "pagination": {
      "$ref": "#/$defs/Pagination"
    },
    "serviceId": {
      "type": "string",
      "description": "An Instana generated unique identifier for a Service. If specified, the list of results will be filtered for the specified Service ID. Eg: `3feb3dcd206c166ef2b41c707e0cd38d7cd325aa`.\nOne can see the service id from Instana UI by going to a Service page. In the URL, there will be `serviceId=3feb3dcd206c166ef2b41c707e0cd38d7cd325aa`.\nAlternatively, one can use `Get services` API endpoint to get the service id in `id` parameter.\n",
      "maxLength": 64,
      "minLength": 0
    },
    "technologies": {
      "type": "array",
      "description": "A list of technologies to be used for filtering data. For example, technologies could include AWS ECS, Cassandra, DB2, JVM, Kafka, etc. A full list of available technologies can be found in X.",
      "items": {
        "type": "string",
        "description": "A list of technologies to be used for filtering data. For example, technologies could include AWS ECS, Cassandra, DB2, JVM, Kafka, etc. A full list of available technologies can be found in X."
      },
      "maxItems": 20,
      "minItems": 0,
      "uniqueItems": true
    },
    "timeFrame": {
      "$ref": "#/$defs/TimeFrame"
    }
  },
  "required": [
    "metrics"
  ],
  "$defs": {
    "AppDataMetricConfiguration": {
      "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"
      ]
    },
    "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
        }
      }
    }
  }
}