{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-log-analytics/json-schema/azure-log-analytics-table-schema.json",
  "title": "Table",
  "description": "Workspace table definition.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-log-analytics-tables-api-openapi.yml#/components/schemas/Table",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "readOnly": true
    },
    "name": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "readOnly": true
    },
    "properties": {
      "$ref": "#/$defs/TableProperties"
    }
  },
  "$defs": {
    "TableColumn": {
      "type": "object",
      "description": "Table column definition.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Column name."
        },
        "type": {
          "type": "string",
          "description": "Column data type.",
          "enum": [
            "string",
            "int",
            "long",
            "real",
            "boolean",
            "dateTime",
            "guid",
            "dynamic"
          ]
        },
        "description": {
          "type": "string",
          "description": "Column description."
        }
      }
    },
    "TableProperties": {
      "type": "object",
      "description": "Table properties.",
      "properties": {
        "retentionInDays": {
          "type": "integer",
          "format": "int32",
          "description": "The table retention in days."
        },
        "totalRetentionInDays": {
          "type": "integer",
          "format": "int32",
          "description": "The table total retention in days."
        },
        "archiveRetentionInDays": {
          "type": "integer",
          "format": "int32",
          "description": "The table archive retention in days.",
          "readOnly": true
        },
        "plan": {
          "type": "string",
          "description": "The table plan.",
          "enum": [
            "Analytics",
            "Basic"
          ]
        },
        "schema": {
          "$ref": "#/$defs/TableSchema"
        },
        "provisioningState": {
          "type": "string",
          "readOnly": true,
          "enum": [
            "Succeeded",
            "InProgress",
            "Deleting",
            "Updating"
          ]
        }
      }
    },
    "TableSchema": {
      "type": "object",
      "description": "Schema of a workspace table.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Table name."
        },
        "columns": {
          "type": "array",
          "description": "A list of table custom columns.",
          "items": {
            "$ref": "#/$defs/TableColumn"
          }
        }
      }
    }
  }
}