{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instana/json-schema/instana-custom-dashboard-schema.json",
  "title": "CustomDashboard",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/instana-custom-dashboards-api-openapi.yml#/components/schemas/CustomDashboard",
  "type": "object",
  "properties": {
    "accessRules": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AccessRule"
      },
      "maxItems": 64,
      "minItems": 1
    },
    "id": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "widgets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Widget"
      },
      "maxItems": 128,
      "minItems": 0,
      "uniqueItems": true
    }
  },
  "required": [
    "accessRules",
    "id",
    "title",
    "widgets"
  ],
  "$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"
      ]
    },
    "Widget": {
      "type": "object",
      "properties": {
        "config": {
          "type": "object"
        },
        "height": {
          "type": "integer",
          "format": "int32",
          "minimum": 1
        },
        "id": {
          "type": "string",
          "maxLength": 64,
          "minLength": 0
        },
        "title": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "width": {
          "type": "integer",
          "format": "int32",
          "maximum": 12,
          "minimum": 1
        },
        "x": {
          "type": "integer",
          "format": "int32",
          "maximum": 11,
          "minimum": 0
        },
        "y": {
          "type": "integer",
          "format": "int32",
          "minimum": 0
        }
      },
      "required": [
        "config",
        "id",
        "type"
      ]
    }
  }
}