{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scale-ai/json-schema/scale-ai-agentex-cloud-deploy-logs-response-schema.json",
  "title": "AgentexCloudDeployLogsResponse",
  "description": "Response containing structured deployment log lines with cursor-based pagination.\n\nThe CLI can poll this endpoint to stream logs incrementally:\n1. First call: no after_id\n2. Subsequent calls: after_id=next_cursor from previous response\n3. Stop polling when has_more is False and the deployment reaches a terminal status",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scale-ai-agentex-cloud-deploy-api-openapi.yml#/components/schemas/AgentexCloudDeployLogsResponse",
  "properties": {
    "deployment_id": {
      "type": "string",
      "title": "Deployment Id",
      "description": "The deployment ID"
    },
    "lines": {
      "items": {
        "$ref": "#/$defs/AgentexCloudDeployLog"
      },
      "type": "array",
      "title": "Lines",
      "description": "Structured log lines"
    },
    "next_cursor": {
      "type": "string",
      "title": "Next Cursor",
      "description": "Cursor for the next page. Pass this as the after_id query parameter to get subsequent logs.",
      "default": ""
    },
    "has_more": {
      "type": "boolean",
      "title": "Has More",
      "description": "True if there may be more lines beyond this page (len(lines) == limit)."
    }
  },
  "type": "object",
  "required": [
    "deployment_id",
    "has_more"
  ],
  "$defs": {
    "AgentexCloudDeployLog": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "Unique log line identifier (time-ordered)"
        },
        "timestamp": {
          "title": "Timestamp",
          "description": "Parsed K8s log timestamp",
          "type": "string",
          "format": "date-time"
        },
        "log_level": {
          "type": "string",
          "title": "Log Level",
          "description": "Parsed log level (INFO, ERROR, WARN, DEBUG, FATAL)",
          "default": "INFO"
        },
        "message": {
          "type": "string",
          "title": "Message",
          "description": "Log line content after the K8s timestamp"
        }
      },
      "type": "object",
      "required": [
        "id",
        "message"
      ],
      "title": "AgentexCloudDeployLog",
      "description": "A single structured log line from the deployment process."
    }
  }
}