{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sap-btp/json-schema/sap-btp-ai-deployment-response-with-details-schema.json",
  "title": "AiDeploymentResponseWithDetails",
  "description": "Detail properties of the deployment",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sap-btp-ai-core-openapi.yml#/components/schemas/AiDeploymentResponseWithDetails",
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/$defs/AiDeploymentId"
    },
    "deploymentUrl": {
      "$ref": "#/$defs/AiDeploymentUrl"
    },
    "configurationId": {
      "$ref": "#/$defs/AiConfigurationId"
    },
    "configurationName": {
      "$ref": "#/$defs/AiConfigurationName"
    },
    "executableId": {
      "$ref": "#/$defs/AiExecutableId"
    },
    "scenarioId": {
      "$ref": "#/$defs/AiScenarioId"
    },
    "status": {
      "$ref": "#/$defs/AiDeploymentStatus"
    },
    "statusMessage": {
      "$ref": "#/$defs/AiDeploymentStatusMessage"
    },
    "targetStatus": {
      "type": "string",
      "description": "Deployment target status",
      "enum": [
        "RUNNING",
        "STOPPED",
        "DELETED"
      ]
    },
    "lastOperation": {
      "type": "string",
      "description": "Last operation applied to this deployment.",
      "anyOf": [
        {
          "enum": [
            "CREATE",
            "UPDATE",
            "DELETE",
            "CASCADE-UPDATE"
          ]
        },
        {}
      ]
    },
    "latestRunningConfigurationId": {
      "type": "string",
      "pattern": "^[\\w.-]{4,64}$",
      "description": "configurationId that was running before a PATCH operation has modified the configurationId of the deployment. This can be used for a manual rollback in case the new configurationId results in a DEAD deployment"
    },
    "ttl": {
      "$ref": "#/$defs/AiDeploymentTimeToLive"
    },
    "details": {
      "$ref": "#/$defs/AiDeploymentDetails"
    },
    "createdAt": {
      "type": "string",
      "description": "Timestamp of resource creation",
      "format": "date-time"
    },
    "modifiedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp of latest resource modification"
    },
    "submissionTime": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp of job submitted"
    },
    "startTime": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp of job status changed to RUNNING"
    },
    "completionTime": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp of job status changed to COMPLETED/DEAD/STOPPED"
    },
    "statusDetails": {
      "$ref": "#/$defs/AiDeploymentStatusDetails"
    }
  },
  "required": [
    "id",
    "configurationId",
    "status",
    "createdAt",
    "modifiedAt"
  ],
  "$defs": {
    "AiBackendDetails": {
      "type": "object",
      "description": "backend-specific details of the deployment"
    },
    "AiConfigurationId": {
      "type": "string",
      "pattern": "^[\\w.-]{4,64}$",
      "description": "ID of the configuration"
    },
    "AiConfigurationName": {
      "type": "string",
      "pattern": "^[\\w\\s.!?,;:\\[\\](){}<>\"'=+*/\\\\^&%@~$#|-]*$",
      "maxLength": 256,
      "description": "Name of the configuration"
    },
    "AiDeploymentDetails": {
      "type": "object",
      "description": "Detail information about a deployment (including predefined sections: `scaling` and `resources`).\nJSON String representation of this object is limited to 5000 characters\n",
      "properties": {
        "scaling": {
          "$ref": "#/$defs/AiScalingDetails"
        },
        "resources": {
          "$ref": "#/$defs/AiResourcesDetails"
        }
      }
    },
    "AiDeploymentId": {
      "type": "string",
      "pattern": "^[\\w.-]{4,64}$",
      "description": "ID of the deployment"
    },
    "AiDeploymentStatus": {
      "type": "string",
      "description": "Deployment status",
      "enum": [
        "PENDING",
        "RUNNING",
        "COMPLETED",
        "DEAD",
        "STOPPING",
        "STOPPED",
        "UNKNOWN"
      ]
    },
    "AiDeploymentStatusDetails": {
      "type": "object",
      "description": "Current status details of the deployment"
    },
    "AiDeploymentStatusMessage": {
      "type": "string",
      "description": "Deployment status message",
      "maxLength": 256
    },
    "AiDeploymentTimeToLive": {
      "type": [
        "string",
        "null"
      ],
      "description": "Time to live for a deployment. Its value can be either null or a number followed by the unit (any of following values, minutes(m|M), hours(h|H) or days(d|D))",
      "pattern": "^[0-9]+[m,M,h,H,d,D]$"
    },
    "AiDeploymentUrl": {
      "description": "Consumption URL of the deployment",
      "type": "string",
      "format": "url"
    },
    "AiExecutableId": {
      "type": "string",
      "pattern": "^[\\w.-]{4,64}$",
      "description": "ID of the executable"
    },
    "AiResourcesDetails": {
      "type": "object",
      "description": "Resources details of a deployment",
      "properties": {
        "backendDetails": {
          "$ref": "#/$defs/AiBackendDetails"
        }
      }
    },
    "AiScalingDetails": {
      "type": "object",
      "description": "Scaling details of a deployment",
      "properties": {
        "backendDetails": {
          "$ref": "#/$defs/AiBackendDetails"
        }
      }
    },
    "AiScenarioId": {
      "type": "string",
      "pattern": "^[\\w.-]{4,64}$",
      "description": "ID of the scenario"
    }
  }
}