{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instana/json-schema/instana-new-application-config-schema.json",
  "title": "NewApplicationConfig",
  "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/NewApplicationConfig",
  "type": "object",
  "properties": {
    "accessRules": {
      "type": "array",
      "description": "Defines permissions and access relationships.\n",
      "items": {
        "$ref": "#/$defs/AccessRule"
      },
      "maxItems": 64,
      "minItems": 1
    },
    "boundaryScope": {
      "type": "string",
      "description": "**INBOUND**: Inbound calls are calls initiated from outside the application and where the destination service is part of the selected application perspective.\n\n**ALL**: Results and metrics for not only calls at the application perspective boundary, but also those occurring within the application perspective.\n\n**DEFAULT**: Default value, for Application Perspectives created before the introduction of `ALL` and `INBOUND`.\nAt present, whenever new Application Perspectives are created, there are only 2 options to select: `ALL` or `INBOUND`.\nIt is recommended to use either `ALL` or `INBOUND` as `DEFAULT` is deprecated. `DEFAULT` is treated as `INBOUND`.\n",
      "enum": [
        "ALL",
        "INBOUND",
        "DEFAULT"
      ]
    },
    "label": {
      "type": "string",
      "description": "Name of the Application Perspective. Eg: `app1`.",
      "maxLength": 128,
      "minLength": 1
    },
    "matchSpecification": {
      "$ref": "#/$defs/MatchExpressionDTO"
    },
    "scope": {
      "type": "string",
      "description": "**INCLUDE_NO_DOWNSTREAM** : Only the selected services from the filters are included (call this the core set).\nThis is useful when you treat the services as opaque.\nAn example would be the services that represent 3rd party APIs.\n\n**INCLUDE_IMMEDIATE_DOWNSTREAM_DATABASE_AND_MESSAGING** : Include the core set of services from the filters and then expand this core set to include the database and messaging services that the core set directly interacts with.\nThis is useful if you are want to monitor a set of services and their direct dependencies.\nFor example, a development team responsible for several micro-services.\n\n**INCLUDE_ALL_DOWNSTREAM** : It effortlessly and automatically includes all the services that form the entire end-to-end dependency chain of the core set of services.\nThis is useful if the AP will be used for troubleshooting.\n",
      "enum": [
        "INCLUDE_NO_DOWNSTREAM",
        "INCLUDE_IMMEDIATE_DOWNSTREAM_DATABASE_AND_MESSAGING",
        "INCLUDE_ALL_DOWNSTREAM"
      ]
    },
    "tagFilterExpression": {
      "$ref": "#/$defs/TagFilterExpressionElement"
    }
  },
  "required": [
    "accessRules",
    "boundaryScope",
    "label",
    "scope"
  ],
  "$defs": {
    "AccessRule": {
      "type": "object",
      "properties": {
        "accessType": {
          "type": "string",
          "description": "Specifies the type of access permitted. \n\n`READ`: Only viewing Application Perspective is allowed. \n\n`READ_WRITE`: Both viewing and modifying Application Perspective are permitted. \n\n",
          "enum": [
            "READ",
            "READ_WRITE"
          ]
        },
        "relatedId": {
          "type": "string",
          "description": "An identifier that connects the access rule to a specific entity.\nFor example, if the `relationType` is `USER`, the corresponding `relatedId` would be a user id. \n\n**Note**: when `relationType` is `GLOBAL`, `relatedId` is `null`.\n",
          "maxLength": 64,
          "minLength": 0
        },
        "relationType": {
          "type": "string",
          "description": "Defines the type of relationship or subject to which the access rule applies. \n\n`USER`: Access is granted to an individual user. \n\n`API_TOKEN`: Access is granted to a specific API token. \n\n`ROLE`: Access is granted based on a user role, applying to any user with that role. \n\n`TEAM`: Access is granted to a team, likely applying to all team members. \n\n`GLOBAL`: Access is granted to every user or service.\n",
          "enum": [
            "USER",
            "API_TOKEN",
            "ROLE",
            "TEAM",
            "GLOBAL"
          ]
        }
      },
      "required": [
        "accessType",
        "relationType"
      ]
    },
    "MatchExpressionDTO": {
      "type": "object",
      "description": " Specify the expression to match, For example, `endpoint.name contains health`.",
      "properties": {
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ]
    },
    "TagFilterExpressionElement": {
      "type": "object",
      "description": "Boolean expression of tag filters to define the scope of relevant calls.",
      "properties": {
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ]
    }
  }
}