{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-create-archive-request-schema.json",
  "title": "CreateArchiveRequest",
  "description": "Request to create an archive",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-aem-assets-delivery-openapi.yml#/components/schemas/CreateArchiveRequest",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "description": "Assets to be included in the archive. By default, any [custom renditions generated via Processing Profiles](https://experienceleague.adobe.com/en/docs/experience-manager-learn/assets/configuring/processing-profiles) and [original rendition](https://experienceleague.adobe.com/en/docs/experience-manager-learn/assets/authoring/renditions) are included, and all others are excluded.\nThe request can optionally specify renditions that MUST be included-in or excluded-from the archive being requested.\n",
      "items": {
        "type": "object",
        "properties": {
          "assetId": {
            "$ref": "#/$defs/AssetId"
          },
          "repo:repositoryId": {
            "$ref": "#/$defs/RepositoryId"
          },
          "includeRenditions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Specifies the renditions of the asset to be included in the archive.\n"
          },
          "excludeRenditions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Specifies the renditions of the asset to be excluded from the archive. If a given rendition is specified in both includeRenditions and excludeRenditions, then the rendition will be excluded from the archive.\n"
          }
        },
        "required": [
          "assetId"
        ]
      },
      "minItems": 1
    },
    "format": {
      "$ref": "#/$defs/ArchiveFormat"
    },
    "namePrefix": {
      "type": "string",
      "description": "The name to use for the created archive file(s). Note that the API will treat this as a suggestion, and reserves the right to change the final archive name as needed. If not provided, the API will assign its own file name according to any logic it deems fit."
    },
    "organizeRenditions": {
      "type": "boolean",
      "description": "When multiple renditions of each asset being downloaded are to be included in the archive, this flag controls whether they'd be hierarchically organized.\nWhen `false`, assets and their renditions are available at the root level of the generated archive.\nWhen `true`, the renditions of individual assets will be organized in asset-specific folders in the archive.\n",
      "default": false
    }
  },
  "required": [
    "items"
  ],
  "$defs": {
    "ArchiveFormat": {
      "type": "string",
      "description": "The output format of the archive",
      "default": "zip",
      "enum": [
        "zip"
      ]
    },
    "AssetId": {
      "type": "string",
      "description": "ID of the asset",
      "minLength": 1
    },
    "RepositoryId": {
      "description": "The ID of the repository that contains the asset, link, folder or collection",
      "type": "string",
      "minLength": 1,
      "readOnly": true
    }
  }
}