{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/appian/main/json-schema/appian-export-deployment-result-schema.json",
  "title": "ExportDeploymentResult",
  "description": "Result of an export deployment operation, including URLs to download the exported artifacts such as packages, plug-ins, customization files, and database scripts.",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/appian-results-api-openapi.yml#/components/schemas/ExportDeploymentResult",
  "type": "object",
  "properties": {
    "status": {
      "$ref": "#/$defs/DeploymentStatus"
    },
    "packageZip": {
      "type": "string",
      "format": "uri",
      "description": "URL to download the exported package ZIP file."
    },
    "dataSource": {
      "type": "string",
      "description": "The data source name or UUID associated with the export."
    },
    "databaseScripts": {
      "type": "array",
      "description": "Array of database script objects included in the export.",
      "items": {
        "$ref": "#/$defs/DatabaseScript"
      }
    },
    "pluginsZip": {
      "type": "string",
      "format": "uri",
      "description": "URL to download the exported plug-ins ZIP file."
    },
    "customizationFile": {
      "type": "string",
      "format": "uri",
      "description": "URL to download the export customization file."
    },
    "customizationFileTemplate": {
      "type": "string",
      "format": "uri",
      "description": "URL to download a template customization file for the exported package."
    },
    "deploymentLogUrl": {
      "type": "string",
      "format": "uri",
      "description": "URL to retrieve the full deployment log."
    }
  },
  "required": [
    "status"
  ],
  "$defs": {
    "DatabaseScript": {
      "type": "object",
      "description": "Represents a database script included in an export or import deployment.",
      "properties": {
        "fileName": {
          "type": "string",
          "description": "The file name of the database script."
        },
        "orderId": {
          "type": "integer",
          "description": "The execution order of the database script, starting at 1.",
          "minimum": 1
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "URL to download the database script file."
        }
      }
    },
    "DeploymentStatus": {
      "type": "string",
      "description": "The current status of a deployment operation. IN_PROGRESS indicates the operation is still running. COMPLETED indicates success. Other statuses indicate various error or review states.",
      "enum": [
        "IN_PROGRESS",
        "COMPLETED",
        "COMPLETED_WITH_ERRORS",
        "COMPLETED_WITH_IMPORT_ERRORS",
        "COMPLETED_WITH_PUBLISH_ERRORS",
        "FAILED",
        "PENDING_REVIEW",
        "REJECTED"
      ]
    }
  }
}