{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-batch-patch-request-schema.json",
  "title": "batchPatchRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-aep-catalog-openapi.yml#/components/schemas/batchPatchRequest",
  "type": "object",
  "properties": {
    "externalId": {
      "type": "string",
      "description": "An externally generated identifier for this batch.",
      "readOnly": true
    },
    "started": {
      "type": "integer",
      "description": "The Unix timestamp (in milliseconds) when the Batch processing action was started.",
      "format": "int64"
    },
    "completed": {
      "type": "integer",
      "description": "The Unix timestamp (in milliseconds) when the Batch processing action was completed. Completed - Started should yield the total processing time.",
      "format": "int64"
    },
    "replay": {
      "type": "object",
      "properties": {
        "predecessors": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "One or more Batch Identifiers that this replay is replacing."
          }
        },
        "reason": {
          "type": "string",
          "description": "An optional commentary for the requester to describe the purpose for the replay (e.g. deletion of privacy data, fix, compaction, etc..)."
        }
      },
      "description": "Indicates that a batch was replayed or restated."
    },
    "status": {
      "type": "string",
      "description": "The current (mutable) status of this Batch.",
      "enum": [
        "processing",
        "success",
        "failure",
        "queued",
        "retrying",
        "stalled",
        "aborted",
        "abandoned",
        "inactive",
        "failed",
        "loading",
        "loaded",
        "staged",
        "active",
        "staging",
        "deleted"
      ]
    },
    "recordCount": {
      "type": "integer",
      "description": "The total number of data records (rows/documents) processed in this Batch.",
      "format": "int64"
    },
    "failedRecordCount": {
      "type": "integer",
      "description": "The number of records that could not be processed in this Batch.",
      "format": "int64"
    },
    "errors": {
      "type": "array",
      "description": "An array of objects that include the error code, rows the error appears, and a human-readable description of the error.",
      "items": {
        "$ref": "#/$defs/errors"
      }
    },
    "size": {
      "type": "integer",
      "description": "Number of bytes processed in this Batch.",
      "format": "int64"
    },
    "availableDates": {
      "type": "object",
      "properties": {
        "startDate": {
          "type": "integer",
          "description": "The Unix timestamp (in seconds) for the oldest data available in this Batch.",
          "format": "int64"
        },
        "endDate": {
          "type": "integer",
          "description": "The Unix timestamp (in seconds) for the most recent data available in this Batch.",
          "format": "int64"
        }
      },
      "description": "Describes what date range of data is available in the Batch. Null if dates aren't relevant for data related to this Batch."
    },
    "relatedObjects": {
      "type": "array",
      "description": "List of associated objects for this batch, such as datasets or other batches.",
      "items": {
        "$ref": "#/$defs/relatedObjects"
      }
    },
    "metrics": {
      "type": "object",
      "properties": {},
      "description": "Contains metrics related to this Batch. Metric names are determined by the producer of the object since each Batch may want to record metrics that are relevant to the process"
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "description": "Tags are values associated with a particular object, these are generally used by external systems for marking an object in a way that it understands.  Normally tags are not used for internal Catalog business logic"
    },
    "inputFormat": {
      "$ref": "#/$defs/inputFormat"
    }
  },
  "$defs": {
    "errors": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "An enumerated code that details the type of error encountered. This value should be understandable by the reader and writer and eventually allow for localized error message (and solution) descriptions."
        },
        "rows": {
          "type": "array",
          "description": "Indicates which rows exhibit this error. Could be a single number, or a hyphen-delimited range.",
          "items": {
            "type": "string",
            "description": "Row or range of rows this error was encountered on."
          }
        },
        "description": {
          "type": "string",
          "description": "A human-readable description of the error. This message may be transmitted to clients, but isn't meant for customer-facing UIS."
        }
      }
    },
    "inputFormat": {
      "type": "object",
      "properties": {
        "format": {
          "type": "string",
          "description": "The file format for data being submitted in the Batch.",
          "enum": [
            "csv",
            "parquet",
            "json",
            "avro"
          ]
        },
        "isMultiLineJson": {
          "type": "boolean",
          "description": "If the format is JSON and this is true then the JSON records are separated by a newline."
        },
        "delimiter": {
          "type": "string",
          "description": "Character used to separate fields."
        },
        "quote": {
          "type": "string",
          "description": "Character used to quote fields that contains spaces, tabs, and/or delimiter characters."
        },
        "escape": {
          "type": "string",
          "description": "Character used to escape other meta-characters.\""
        },
        "nullMarker": {
          "type": "string",
          "description": "Character/string used to indicate a null value. Any value matching this string will be set as nulls in Data Lake."
        },
        "header": {
          "type": "string",
          "description": "True if input files are expected to have a header row."
        },
        "charset": {
          "type": "string",
          "description": "The character encoding of the input files.",
          "enum": [
            "US-ASCII",
            "UTF-8",
            "ISO-8859-1"
          ]
        }
      },
      "description": "Metadata describing the INGEST format of the data being loaded (e.g. Parquet, CSV, JSON)."
    },
    "relatedObjects": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of object processed in this Batch.",
          "enum": [
            "batch",
            "dataSet",
            "dataSetFile",
            "dataSetView",
            "transform"
          ]
        },
        "id": {
          "type": "string",
          "description": "The ID for the relation the specified object had with this Batch operation."
        },
        "tag": {
          "type": "string",
          "description": "The name for the relation the specified object had with this Batch operation. Examples: input, output, trigger, etc."
        },
        "status": {
          "type": "string",
          "description": "The current (mutable) status of this dataset.",
          "enum": [
            "processing",
            "success",
            "failure",
            "queued",
            "retrying",
            "stalled"
          ]
        },
        "errors": {
          "type": "array",
          "description": "An array of objects that include the error code, rows the error appears, and a human-readable description of the error.",
          "items": {
            "$ref": "#/$defs/errors"
          }
        },
        "metrics": {
          "type": "object",
          "properties": {},
          "description": "Contains metrics related to this dataset."
        }
      }
    }
  }
}