{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-archive-status-schema.json",
  "title": "ArchiveStatus",
  "description": "Read-only metadata properties associated with the 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/ArchiveStatus",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/CommandResult"
    },
    {
      "type": "object",
      "properties": {
        "operation": {
          "type": "string",
          "enum": [
            "aem.assets.archives.createArchive"
          ]
        },
        "data": {
          "allOf": [
            {
              "$ref": "#/$defs/ArchiveMetadata"
            },
            {
              "type": "object",
              "description": "Assets Archive Command Result",
              "properties": {
                "status": {
                  "type": "string",
                  "description": "The status of the archive creation process",
                  "minLength": 1,
                  "enum": [
                    "PROCESSING",
                    "COMPLETED",
                    "FAILED"
                  ]
                },
                "completionDate": {
                  "type": "string",
                  "format": "date-time",
                  "description": "The date and time the archive request was completed. Available when the status is 'COMPLETED'"
                },
                "files": {
                  "type": "array",
                  "description": "Full URLs to the locations where the archive files' binaries can be retrieved. Available when the status is 'COMPLETED'",
                  "items": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              },
              "required": [
                "status"
              ]
            }
          ]
        }
      }
    }
  ],
  "$defs": {
    "ArchiveFormat": {
      "type": "string",
      "description": "The output format of the archive",
      "default": "zip",
      "enum": [
        "zip"
      ]
    },
    "ArchiveId": {
      "type": "string",
      "description": "Identifier for the archive under-process/processed by the service",
      "minLength": 1
    },
    "ArchiveMetadata": {
      "properties": {
        "id": {
          "$ref": "#/$defs/ArchiveId"
        },
        "format": {
          "$ref": "#/$defs/ArchiveFormat"
        },
        "submittedBy": {
          "type": "string",
          "description": "The user who submitted the archive request",
          "minLength": 1,
          "readOnly": true
        },
        "submittedDate": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time the archive creation request was submitted",
          "readOnly": true,
          "minLength": 19
        }
      },
      "required": [
        "id",
        "format",
        "submittedBy",
        "submittedDate"
      ]
    },
    "CommandResult": {
      "description": "The result of a command. A command is an operation that changes a system in a different way than via a CRUD\nrequest to a resource.\n",
      "type": "object",
      "properties": {
        "operation": {
          "type": "string",
          "description": "The operation that was performed.",
          "minLength": 1
        },
        "status": {
          "type": "integer",
          "format": "int32",
          "description": "The HTTP status code ([RFC9110, Section 15](https://www.rfc-editor.org/rfc/rfc9110.html#section-15))\ngenerated by the origin server corresponding to this operation.\n"
        },
        "description": {
          "type": "string",
          "description": "A human-readable explanation specific to this command, explaining the status.",
          "minLength": 1
        },
        "data": {
          "type": "object",
          "description": "The data returned by the operation, which will vary by the implementing command. Each command\nMUST provide its own schema definition for this object, by defining all the properties a client is\nexpected to encounter.\n"
        },
        "errors": {
          "type": "array",
          "description": "An optional array of errors that occurred during the operation.",
          "items": {
            "$ref": "#/$defs/CommandResultMessage"
          }
        },
        "warnings": {
          "type": "array",
          "description": "An optional array of warnings that occurred during the operation.",
          "items": {
            "$ref": "#/$defs/CommandResultMessage"
          }
        }
      },
      "required": [
        "operation",
        "status",
        "description"
      ]
    },
    "CommandResultMessage": {
      "description": "CommandResultMessage Object to encapsulate the result of a command.",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "A URI reference [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) that identifies the message type.",
          "minLength": 1
        },
        "title": {
          "type": "string",
          "description": "A short, human-readable summary of the problem type.",
          "minLength": 1
        },
        "detail": {
          "type": "string",
          "description": "A human-readable explanation specific to this occurrence of the problem."
        },
        "context": {
          "type": "object",
          "description": "An optional object containing additional context information about the problem.\n\nEach command MUST provide its own schema definition for this object, by defining all the properties a client is\nexpected to encounter.\n"
        }
      },
      "required": [
        "type",
        "title"
      ]
    }
  }
}