{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eightfold-ai/json-schema/eightfold-ai-foundational-data-create-request-schema-schema.json",
  "title": "FoundationalDataCreateRequestSchema",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eightfold-ai-foundational-data-api-openapi.yml#/components/schemas/FoundationalDataCreateRequestSchema",
  "type": "object",
  "properties": {
    "externalId": {
      "type": "string",
      "description": "External ID of the foundational data"
    },
    "status": {
      "type": "string",
      "description": "Status of the foundational data"
    },
    "parents": {
      "minItems": 1,
      "description": "List of parent org units; must contain at least one {externalId, viewId} pair",
      "type": "array",
      "items": {
        "$ref": "#/$defs/ParentOrgUnitSchema"
      }
    },
    "type": {
      "type": "string",
      "description": "Type of the foundational data"
    },
    "users": {
      "description": "List of users",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/FoundationalDataUserSchema"
      }
    },
    "attributes": {
      "description": "List of attributes",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/FoundationalDataAttributeSchema"
      }
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Description of the foundational data"
    },
    "title": {
      "type": "string",
      "description": "Title of the foundational data"
    }
  },
  "required": [
    "externalId",
    "parents",
    "status",
    "title",
    "type"
  ],
  "$defs": {
    "FoundationalDataAttributeSchema": {
      "type": "object",
      "properties": {
        "value": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 1000,
          "description": "Attribute value"
        },
        "attributeId": {
          "type": "string",
          "maxLength": 1000,
          "description": "Attribute ID"
        }
      },
      "required": [
        "attributeId"
      ]
    },
    "FoundationalDataUserSchema": {
      "type": "object",
      "properties": {
        "role": {
          "type": "string",
          "maxLength": 1000,
          "description": "User role"
        },
        "email": {
          "type": "string",
          "maxLength": 1000,
          "description": "User email"
        }
      },
      "required": [
        "email",
        "role"
      ]
    },
    "ParentOrgUnitSchema": {
      "type": "object",
      "properties": {
        "externalId": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 1000,
          "description": "External ID; null or omitted signals a root node in the given view"
        },
        "viewId": {
          "type": "string",
          "maxLength": 1000,
          "description": "View ID"
        }
      },
      "required": [
        "viewId"
      ]
    }
  }
}