{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fleetai-com/json-schema/fleetai-com-instance-response-schema.json",
  "title": "InstanceResponse",
  "description": "Model for instance response data.",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fleetai-com-openapi.yml#/components/schemas/InstanceResponse",
  "properties": {
    "instance_id": {
      "type": "string",
      "title": "Instance Id"
    },
    "env_key": {
      "type": "string",
      "title": "Env Key"
    },
    "version": {
      "type": "string",
      "title": "Version"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "subdomain": {
      "type": "string",
      "title": "Subdomain"
    },
    "created_at": {
      "type": "string",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "title": "Updated At"
    },
    "terminated_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Terminated At"
    },
    "team_id": {
      "type": "string",
      "title": "Team Id"
    },
    "region": {
      "type": "string",
      "title": "Region"
    },
    "cluster_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cluster Name"
    },
    "image_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Image Url"
    },
    "environment_version_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Environment Version Id"
    },
    "review_environment_version_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Review Environment Version Id"
    },
    "env_variables": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Env Variables"
    },
    "data_key": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Data Key"
    },
    "data_version": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Data Version"
    },
    "multi_app_seed_versions": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Multi App Seed Versions"
    },
    "multi_app_seed_bindings": {
      "anyOf": [
        {
          "additionalProperties": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Multi App Seed Bindings"
    },
    "seed_config": {
      "anyOf": [
        {
          "additionalProperties": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Seed Config"
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expires At"
    },
    "profile_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Profile Id"
    },
    "task_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Id"
    },
    "heartbeat_region": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Heartbeat Region"
    },
    "heartbeat_interval": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Heartbeat Interval"
    },
    "arq_job_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Arq Job Id"
    },
    "warm_pool_hit": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Warm Pool Hit"
    },
    "created_from": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created From"
    },
    "urls": {
      "$ref": "#/$defs/InstanceURLs"
    },
    "health": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Health"
    },
    "warm": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Warm"
    },
    "multi_env_list": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Multi Env List"
    },
    "runtime_failure": {
      "anyOf": [
        {
          "$ref": "#/$defs/InstanceRuntimeFailure"
        },
        {
          "type": "null"
        }
      ]
    },
    "startup": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Startup"
    },
    "runtime_config": {
      "anyOf": [
        {
          "$ref": "#/$defs/RuntimeConfigReceipt"
        },
        {
          "type": "null"
        }
      ]
    },
    "run_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Run Id",
      "description": "Return the namespace value as run_id in API responses.",
      "readOnly": true
    }
  },
  "type": "object",
  "required": [
    "instance_id",
    "env_key",
    "version",
    "status",
    "subdomain",
    "created_at",
    "updated_at",
    "team_id",
    "region",
    "urls",
    "run_id"
  ],
  "$defs": {
    "HealthURLs": {
      "properties": {
        "backend_health": {
          "type": "string",
          "title": "Backend Health"
        },
        "runner_health": {
          "type": "string",
          "title": "Runner Health"
        },
        "mcp_health": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Mcp Health"
        }
      },
      "type": "object",
      "required": [
        "backend_health",
        "runner_health"
      ],
      "title": "HealthURLs",
      "description": "Strict model for health endpoints."
    },
    "InstanceRuntimeFailure": {
      "properties": {
        "reason": {
          "type": "string",
          "title": "Reason"
        },
        "message": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Message"
        },
        "failed_at": {
          "type": "string",
          "title": "Failed At"
        },
        "container": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Container"
        },
        "exit_code": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Exit Code"
        }
      },
      "type": "object",
      "required": [
        "reason",
        "failed_at"
      ],
      "title": "InstanceRuntimeFailure",
      "description": "Structured runtime failure diagnostic for an environment instance."
    },
    "InstanceURLs": {
      "properties": {
        "root": {
          "type": "string",
          "title": "Root"
        },
        "app": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "App"
        },
        "api": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Api"
        },
        "health": {
          "anyOf": [
            {
              "$ref": "#/$defs/HealthURLs"
            },
            {
              "type": "null"
            }
          ]
        },
        "api_docs": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Api Docs"
        },
        "manager": {
          "$ref": "#/$defs/ManagerURLs"
        }
      },
      "type": "object",
      "required": [
        "root",
        "app",
        "manager"
      ],
      "title": "InstanceURLs",
      "description": "Model for instance URLs."
    },
    "ManagerURLs": {
      "properties": {
        "api": {
          "type": "string",
          "title": "Api"
        },
        "docs": {
          "type": "string",
          "title": "Docs"
        },
        "reset": {
          "type": "string",
          "title": "Reset"
        },
        "diff": {
          "type": "string",
          "title": "Diff"
        },
        "snapshot": {
          "type": "string",
          "title": "Snapshot"
        },
        "execute_verifier_function": {
          "type": "string",
          "title": "Execute Verifier Function"
        },
        "execute_verifier_function_with_upload": {
          "type": "string",
          "title": "Execute Verifier Function With Upload"
        }
      },
      "type": "object",
      "required": [
        "api",
        "docs",
        "reset",
        "diff",
        "snapshot",
        "execute_verifier_function",
        "execute_verifier_function_with_upload"
      ],
      "title": "ManagerURLs",
      "description": "Model for manager API URLs."
    },
    "RuntimeConfigReceipt": {
      "properties": {
        "schema": {
          "type": "string",
          "const": "fleet.runtime-config/1",
          "title": "Schema"
        },
        "instance_id": {
          "type": "string",
          "minLength": 1,
          "title": "Instance Id"
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$",
          "title": "Sha256"
        },
        "source_instance_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Instance Id"
        },
        "source_sha256": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Sha256"
        },
        "eval_task_version_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Eval Task Version Id"
        },
        "tool_policy_sha256": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tool Policy Sha256"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "schema",
        "instance_id",
        "sha256",
        "source_instance_id",
        "source_sha256",
        "eval_task_version_id",
        "tool_policy_sha256"
      ],
      "title": "RuntimeConfigReceipt"
    }
  }
}