{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nexusai-run/json-schema/nexusai-run-deployment-list-response-schema.json",
  "title": "DeploymentListResponse",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nexusai-run-openapi.yaml#/components/schemas/DeploymentListResponse",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DeploymentListItem"
      }
    },
    "total": {
      "type": "integer",
      "description": "Total deployments matching the filter"
    },
    "limit": {
      "type": "integer",
      "description": "Limit used for pagination"
    },
    "offset": {
      "type": "integer",
      "description": "Offset used for pagination"
    }
  },
  "$defs": {
    "DeploymentListItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Unique deployment ID"
        },
        "status": {
          "$ref": "#/$defs/DeploymentStatus"
        },
        "name": {
          "type": "string",
          "description": "Deployment name"
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "Public URL (available when running)"
        },
        "provider": {
          "type": "string",
          "description": "Cloud provider used"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the deployment was created"
        },
        "startedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When the container started running"
        },
        "autoDestroyAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When the deployment will be auto-destroyed"
        }
      }
    },
    "DeploymentStatus": {
      "type": "string",
      "enum": [
        "queued",
        "deploying",
        "running",
        "failed",
        "terminated"
      ],
      "description": "Current deployment status:\n- queued: Waiting to be processed\n- deploying: Container is being built/started\n- running: Container is running and accessible\n- failed: Deployment failed (check error field)\n- terminated: Container was stopped or destroyed\n"
    }
  }
}