{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instana/json-schema/instana-http-endpoint-config-schema.json",
  "title": "HttpEndpointConfig",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/instana-application-settings-api-openapi.yml#/components/schemas/HttpEndpointConfig",
  "type": "object",
  "properties": {
    "endpointNameByCollectedPathTemplateRuleEnabled": {
      "type": "boolean",
      "description": "The highest default precedence of endpoint rule is creating endpoint is based on path template. For example,\n```\n/hospital/1948/patient/291148\n/hospital/728/patient/924892\n/hospital/47/patient/25978\n/hospital/108429/patient/1847\n```\ncan be considered as `/hospital/{hid}/patient/{pid}` if this rule is enabled. For most of the use cases, this rule should be enabled.\n"
    },
    "endpointNameByFirstPathSegmentRuleEnabled": {
      "type": "boolean",
      "description": "There are endpoint extraction rules in Instana which take the first path segment from the HTTP request and turn this into an endpoint name.\nFor example, given the following URLs `/users/123/profile` and `/users/123/settings`, the extraction rule will only take the first segment. As a result endpoint name will be `users`.\nAlthough this is useful in cases where broad overview of monitoring is required, lot of use cases are more specified.\nConsidering the above example, if this rule is enabled, Instana can't distinguish between `profile` or `settings` as endpoints.\nFor use cases where endpoints has to be monitored at fine granular level, this flag should be set to `false`.\n"
    },
    "rules": {
      "type": "array",
      "description": "Specify custom rule configuration apart from Instana predefined rules. This rule has the highest precedence. This is only available for HTTP endpoints.",
      "items": {
        "$ref": "#/$defs/HttpEndpointRule"
      },
      "maxItems": 500,
      "minItems": 0
    },
    "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"
    }
  },
  "required": [
    "rules",
    "serviceId"
  ],
  "$defs": {
    "HttpEndpointRule": {
      "type": "object",
      "description": "Specify custom rule configuration apart from Instana predefined rules. This rule has the highest precedence. This is only available for HTTP endpoints.",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Set this flag to `true` if custom rule configurations has to be considered."
        },
        "pathSegments": {
          "type": "array",
          "description": "A list of path segment matching rules, each defining how a segment of the HTTP path should be matched.\nEach object in this array represents a segment rule, allowing for fixed segments, dynamic parameters, wildcards, or unsupported segments. \n\n**UNSUPPORTED**: A path segment that is not recognized by the system. \n\n**FIXED**: This type represents a static, unchanging part of the URL path.\nFor example, `/api/{version}/users`, `api` and `users` would be `FIXED` segment. \n\n**PARAMETER**: This type represents a variable part of the URL path, often used to capture specific parameters or IDs that change with each request.\nFor example, `/api/{version}/users`, `version` would be `PARAMETER` segment. `version` can be `v1`, `v2`, `v3` etc. \n\n**MATCH_ALL**: This type represents a wildcard, capturing all remaining segments from this point onward in the URL path.\nFor example, `/api/{version}/users/*` — Matches all paths like `/api/v1/users/123`. `/api/v3/users/456` etc. \n\n",
          "items": {
            "$ref": "#/$defs/HttpPathSegmentMatchingRule"
          },
          "maxItems": 16,
          "minItems": 1
        },
        "testCases": {
          "type": "array",
          "description": "To validate whether the the defined custom endpoint rule configuration is working as expected.\nFor example, given a query `/api/*/{version}`, the following test case `/api/anyName/123` will match, while `/otherApi/anyName/123` will not.\n",
          "items": {
            "type": "string",
            "description": "To validate whether the the defined custom endpoint rule configuration is working as expected.\nFor example, given a query `/api/*/{version}`, the following test case `/api/anyName/123` will match, while `/otherApi/anyName/123` will not.\n"
          },
          "maxItems": 32,
          "minItems": 0
        }
      },
      "required": [
        "pathSegments"
      ]
    },
    "HttpPathSegmentMatchingRule": {
      "type": "object",
      "description": "A list of path segment matching rules, each defining how a segment of the HTTP path should be matched.\nEach object in this array represents a segment rule, allowing for fixed segments, dynamic parameters, wildcards, or unsupported segments. \n\n**UNSUPPORTED**: A path segment that is not recognized by the system. \n\n**FIXED**: This type represents a static, unchanging part of the URL path.\nFor example, `/api/{version}/users`, `api` and `users` would be `FIXED` segment. \n\n**PARAMETER**: This type represents a variable part of the URL path, often used to capture specific parameters or IDs that change with each request.\nFor example, `/api/{version}/users`, `version` would be `PARAMETER` segment. `version` can be `v1`, `v2`, `v3` etc. \n\n**MATCH_ALL**: This type represents a wildcard, capturing all remaining segments from this point onward in the URL path.\nFor example, `/api/{version}/users/*` — Matches all paths like `/api/v1/users/123`. `/api/v3/users/456` etc. \n\n",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "UNSUPPORTED",
            "FIXED",
            "PARAMETER",
            "MATCH_ALL"
          ]
        }
      },
      "required": [
        "type"
      ]
    }
  }
}