{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thousandeyes/json-schema/thousandeyes-dashboards-api-clone-dashboard-request-schema.json",
  "title": "Dashboards_API_CloneDashboardRequest",
  "description": "Optional values that override settings inherited from the source dashboard. Omit the request body or send an empty object (`{}`) to clone the dashboard without overrides.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thousandeyes-dashboards-api-openapi.yml#/components/schemas/Dashboards_API_CloneDashboardRequest",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Title of the cloned dashboard. If omitted, the API generates a unique title."
    },
    "tagIds": {
      "description": "Dashboard tag identifiers. An empty array clears tags from the clone; omission preserves the source dashboard's tags.",
      "allOf": [
        {
          "$ref": "#/$defs/Dashboards_API_TagIds"
        }
      ]
    },
    "description": {
      "type": "string",
      "maxLength": 1000,
      "description": "Description for the cloned dashboard."
    },
    "layout": {
      "$ref": "#/$defs/Dashboards_API_DashboardLayout"
    },
    "defaultTimespan": {
      "$ref": "#/$defs/Dashboards_API_DefaultTimespan"
    },
    "isGlobalOverride": {
      "type": "boolean",
      "description": "If `true`, the dashboard time range overrides local widget time settings."
    },
    "refreshRate": {
      "$ref": "#/$defs/Dashboards_API_CloneDashboardRefreshRate"
    },
    "globalFilterId": {
      "type": "string",
      "description": "Global filter applied to the cloned dashboard. If omitted, the source dashboard's filter is preserved when cloning within the same account group. When cloning across account groups, the filter is cleared."
    },
    "sharedAccountIds": {
      "type": "array",
      "uniqueItems": true,
      "description": "Account group IDs with which to share the cloned dashboard. An empty array limits sharing to current account group. Omission does not share with other account groups. The `isPrivate` setting controls visibility within the current account group. Cannot be used together with `isSharedWithAllAccountGroups=true`",
      "items": {
        "$ref": "#/$defs/Dashboards_API_AccountGroupId"
      }
    },
    "isSharedWithAllAccountGroups": {
      "type": "boolean",
      "description": "When `true`, shares the cloned dashboard with all account groups available to the user. Cannot be used together with `sharedAccountIds`."
    },
    "isPrivate": {
      "type": "boolean",
      "description": "When `true`, only the creator can view the cloned dashboard. Combining this property with `sharedAccountIds` or `isSharedWithAllAccountGroups=true` returns `400 Bad Request`. Defaults to `false`.",
      "default": false
    },
    "isDefaultForUser": {
      "type": "boolean",
      "description": "When `true`, sets the cloned dashboard as the current user's default dashboard."
    },
    "isDefaultForAccount": {
      "type": "boolean",
      "description": "When `true`, sets the cloned dashboard as the current account group's default dashboard."
    }
  },
  "$defs": {
    "Dashboards_API_AccountGroupId": {
      "type": "string",
      "description": "A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint."
    },
    "Dashboards_API_ApiDefaultTimespan": {
      "type": "object",
      "properties": {
        "duration": {
          "type": "integer",
          "format": "int64",
          "description": "Relative timespan in seconds."
        },
        "start": {
          "type": "string",
          "format": "date-time",
          "description": "UTC start date of the timespan range (ISO date-time format)."
        },
        "end": {
          "type": "string",
          "format": "date-time",
          "description": "UTC end date of the timespan range (ISO date-time format)."
        }
      }
    },
    "Dashboards_API_CloneDashboardRefreshRate": {
      "type": "string",
      "enum": [
        "off",
        "2m",
        "5m",
        "10m",
        "15m",
        "30m",
        "60m"
      ],
      "description": "Auto-refresh interval for the cloned dashboard. If omitted, the clone inherits the source dashboard's refresh rate."
    },
    "Dashboards_API_DashboardLayout": {
      "description": "Dashboard layout configuration for arranging widgets.",
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "layoutId": {
          "type": "string",
          "description": "Unique identifier for the layout."
        },
        "type": {
          "$ref": "#/$defs/Dashboards_API_DashboardLayoutType"
        },
        "details": {
          "$ref": "#/$defs/Dashboards_API_DashboardLayoutDetails"
        }
      }
    },
    "Dashboards_API_DashboardLayoutDetails": {
      "description": "Layout details including widget positioning.",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "widgetPositioning": {
          "type": "array",
          "description": "List of widget positions within the layout.",
          "items": {
            "$ref": "#/$defs/Dashboards_API_WidgetPosition"
          }
        }
      }
    },
    "Dashboards_API_DashboardLayoutType": {
      "type": "string",
      "description": "Type of the layout.",
      "enum": [
        "grid",
        "vertical"
      ]
    },
    "Dashboards_API_DefaultTimespan": {
      "allOf": [
        {
          "$ref": "#/$defs/Dashboards_API_LegacyDefaultTimespan"
        },
        {
          "$ref": "#/$defs/Dashboards_API_ApiDefaultTimespan"
        }
      ]
    },
    "Dashboards_API_LegacyDefaultTimespan": {
      "type": "object",
      "deprecated": true,
      "properties": {
        "timespanDuration": {
          "deprecated": true,
          "type": "integer",
          "format": "int64",
          "description": "Relative timespan in seconds."
        },
        "timespanStart": {
          "deprecated": true,
          "type": "string",
          "description": "UTC start date of the timespan range."
        },
        "timespanEnd": {
          "deprecated": true,
          "type": "string",
          "description": "UTC end date of the timespan range."
        }
      }
    },
    "Dashboards_API_TagIds": {
      "type": "array",
      "description": "List of tag IDs (obtained from `/tags` endpoint).",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "Dashboards_API_WidgetPosition": {
      "description": "Position and size of a widget in the layout grid.",
      "type": "object",
      "required": [
        "x",
        "y",
        "w",
        "h"
      ],
      "properties": {
        "x": {
          "type": "integer",
          "format": "int32",
          "description": "Horizontal position."
        },
        "y": {
          "type": "integer",
          "format": "int32",
          "description": "Vertical position."
        },
        "w": {
          "type": "integer",
          "format": "int32",
          "description": "Width in grid units."
        },
        "h": {
          "type": "integer",
          "format": "int32",
          "description": "Height in grid units."
        },
        "id": {
          "type": "string",
          "description": "Identifier of the widget this position applies to."
        }
      }
    }
  }
}