{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instana/json-schema/instana-service-map-schema.json",
  "title": "ServiceMap",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/instana-application-topology-api-openapi.yml#/components/schemas/ServiceMap",
  "type": "object",
  "properties": {
    "connections": {
      "type": "array",
      "description": "A list which indicates which services are consumers and which are providers in the communication chain.",
      "items": {
        "$ref": "#/$defs/ServiceMapConnection"
      },
      "uniqueItems": true
    },
    "services": {
      "type": "array",
      "description": "List of services in the topology.",
      "items": {
        "$ref": "#/$defs/ExtendedService"
      },
      "uniqueItems": true
    }
  },
  "required": [
    "connections",
    "services"
  ],
  "$defs": {
    "ExtendedService": {
      "type": "object",
      "description": "List of services in the topology.",
      "properties": {
        "applications": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        },
        "entityType": {
          "type": "string",
          "description": "Since, this is a Service, it will be of type `SERVICE`.",
          "enum": [
            "APPLICATION",
            "SERVICE",
            "ENDPOINT"
          ]
        },
        "id": {
          "type": "string",
          "description": "Unique ID of the Service. Eg: `3feb3dcd206c166ef2b41c707e0cd38d7cd325aa`."
        },
        "label": {
          "type": "string",
          "description": "Name of the Service. Eg: `payment`."
        },
        "maxSeverity": {
          "type": "number",
          "format": "double",
          "maximum": 10,
          "minimum": 0
        },
        "numberOfOpenIssues": {
          "type": "integer",
          "format": "int32",
          "minimum": 0
        },
        "snapshotIds": {
          "type": "array",
          "description": "A unique identifier the metrics are assigned to.",
          "items": {
            "type": "string",
            "description": "A unique identifier the metrics are assigned to."
          },
          "uniqueItems": true
        },
        "technologies": {
          "type": "array",
          "description": "List of technologies: `Eg:[\"springbootApplicationContainer\"]`",
          "items": {
            "type": "string",
            "description": "List of technologies: `Eg:[\"springbootApplicationContainer\"]`"
          },
          "uniqueItems": true
        },
        "types": {
          "type": "array",
          "description": "Shows types of Endpoints a Service can consist of. It may be one or more. Eg: `HTTP` `OPENTELEMETRY` can be in 1 Service.",
          "items": {
            "type": "string",
            "description": "Shows types of Endpoints a Service can consist of. It may be one or more. Eg: `HTTP` `OPENTELEMETRY` can be in 1 Service.",
            "enum": [
              "UNDEFINED",
              "RPC",
              "EVENT",
              "GRAPHQL",
              "BATCH",
              "SHELL",
              "HTTP",
              "SDK",
              "OPENTELEMETRY",
              "INTERNAL",
              "DATABASE",
              "MESSAGING",
              "PAGE",
              "PAGE_RESOURCE"
            ]
          },
          "uniqueItems": true
        }
      },
      "required": [
        "applications",
        "id",
        "label",
        "snapshotIds",
        "technologies",
        "types"
      ]
    },
    "ServiceMapConnection": {
      "type": "object",
      "description": "A list which indicates which services are consumers and which are providers in the communication chain.",
      "properties": {
        "calls": {
          "type": "integer",
          "format": "int64",
          "description": "The number of calls between the 2 services.\nEg: The number of calls from `24558242fdeb52571cfb9fa42f1b334aa65d7e61` service to `3feb3dcd206c166ef2b41c707e0cd38d7cd325aa` service over the mentioned timeframe is `200`. \n\nIf no timeframe (`to` and `windowSize` in query paramter) is mentioned, the timeframe is taken as last hour.\n",
          "minimum": 0
        },
        "errorRate": {
          "type": "number",
          "format": "double",
          "description": "The error rate of the calls between the 2 services.\nEg: The error rate of calls from `24558242fdeb52571cfb9fa42f1b334aa65d7e61` service to `3feb3dcd206c166ef2b41c707e0cd38d7cd325aa` service over the mentioned timeframe is `0.1`. \n\nThe value is between 0 and 1. \n\nIf no timeframe (`to` and `windowSize` in query paramter) is mentioned, the timeframe is taken as last hour.\n",
          "maximum": 1,
          "minimum": 0
        },
        "from": {
          "type": "string",
          "description": "The service that initiates a request to another service.\nIt contains a unique service id. Eg: `24558242fdeb52571cfb9fa42f1b334aa65d7e61`.\n"
        },
        "latency": {
          "type": "number",
          "format": "double",
          "description": "The mean latency of the calls between the 2 services.\nEg: The mean latency of calls from `24558242fdeb52571cfb9fa42f1b334aa65d7e61` service to `3feb3dcd206c166ef2b41c707e0cd38d7cd325aa` service over the mentioned timeframe is `4.46`. \n\nThe value is in milliseconds. \n\nIf no timeframe (`to` and `windowSize` in query paramter) is mentioned, the timeframe is taken as last hour.\n",
          "minimum": 0
        },
        "to": {
          "type": "string",
          "description": "The service that receives the request sent by the source service.\nIt contains a unique service id. Eg: `3feb3dcd206c166ef2b41c707e0cd38d7cd325aa`.\n"
        }
      },
      "required": [
        "from",
        "to"
      ]
    }
  }
}