{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cayra-io/json-schema/cayra-io-deployment-details-schema.json",
  "title": "DeploymentDetails",
  "description": "Full deployment details",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cayra-io-openapi.json#/components/schemas/DeploymentDetails",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "company_id": {
      "type": "string",
      "format": "uuid",
      "title": "Company Id"
    },
    "license_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "License Id"
    },
    "license_key": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "License Key",
      "description": "License key for accessing the deployment (e.g., CAYRA-INST-xxx)"
    },
    "provisioning_job_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Provisioning Job Id"
    },
    "subdomain": {
      "type": "string",
      "title": "Subdomain"
    },
    "status": {
      "$ref": "#/$defs/DeploymentStatusEnum"
    },
    "provider": {
      "$ref": "#/$defs/CloudProviderEnum"
    },
    "provider_resource_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Provider Resource Id"
    },
    "provider_metadata": {
      "type": "object",
      "title": "Provider Metadata"
    },
    "instance_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Instance Id"
    },
    "public_ip": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Public Ip"
    },
    "private_ip": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Private Ip"
    },
    "region": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Region"
    },
    "instance_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Instance Type"
    },
    "volume_size_gb": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Volume Size Gb"
    },
    "database_mode": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Database Mode"
    },
    "database_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Database Type"
    },
    "database_host": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Database Host"
    },
    "public_url": {
      "type": "string",
      "title": "Public Url"
    },
    "installer_version": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Installer Version"
    },
    "product_version": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Product Version"
    },
    "environment": {
      "anyOf": [
        {
          "$ref": "#/$defs/DeploymentEnvironmentEnum"
        },
        {
          "type": "null"
        }
      ]
    },
    "tags": {
      "type": "object",
      "title": "Tags"
    },
    "health_status": {
      "anyOf": [
        {
          "$ref": "#/$defs/DeploymentHealthStatusEnum"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_health_check": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Health Check"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "deployed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Deployed At"
    },
    "terminated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Terminated At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "company_id",
    "license_id",
    "provisioning_job_id",
    "subdomain",
    "status",
    "provider",
    "provider_resource_id",
    "instance_id",
    "public_ip",
    "private_ip",
    "region",
    "instance_type",
    "volume_size_gb",
    "database_mode",
    "database_type",
    "database_host",
    "public_url",
    "installer_version",
    "product_version",
    "environment",
    "health_status",
    "last_health_check",
    "created_at",
    "deployed_at",
    "terminated_at",
    "updated_at"
  ],
  "$defs": {
    "CloudProviderEnum": {
      "type": "string",
      "enum": [
        "aws",
        "azure"
      ],
      "title": "CloudProviderEnum"
    },
    "DeploymentEnvironmentEnum": {
      "type": "string",
      "enum": [
        "production",
        "staging",
        "development"
      ],
      "title": "DeploymentEnvironmentEnum",
      "description": "Deployment environment type"
    },
    "DeploymentHealthStatusEnum": {
      "type": "string",
      "enum": [
        "healthy",
        "unhealthy",
        "unknown"
      ],
      "title": "DeploymentHealthStatusEnum",
      "description": "Deployment health status enumeration"
    },
    "DeploymentStatusEnum": {
      "type": "string",
      "enum": [
        "active",
        "terminated",
        "failed"
      ],
      "title": "DeploymentStatusEnum",
      "description": "Deployment status enumeration"
    }
  }
}