{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/EndpointVersionResponse", "title": "EndpointVersionResponse", "type": "object", "description": "Extended endpoint representation when viewing a specific version.", "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique endpoint identifier (UUID)." }, "name": { "type": "string", "description": "URL-safe endpoint name, unique per team." }, "description": { "type": "string", "nullable": true, "description": "Human-readable description of the endpoint." }, "query": { "description": "The HogQL or insight query definition (JSON object with 'kind' key)." }, "is_active": { "type": "boolean", "description": "Whether the endpoint can be executed via the API." }, "data_freshness_seconds": { "type": "integer", "description": "How fresh the data is, in seconds. One of: 900, 1800, 3600, 21600, 43200, 86400, 604800." }, "endpoint_path": { "type": "string", "description": "Relative API path to execute this endpoint (e.g. /api/environments/{team_id}/endpoints/{name}/run)." }, "url": { "type": "string", "nullable": true, "description": "Absolute URL to execute this endpoint." }, "ui_url": { "type": "string", "nullable": true, "description": "Absolute URL to view this endpoint in the PostHog UI." }, "created_at": { "type": "string", "format": "date-time", "description": "When the endpoint was created (ISO 8601)." }, "updated_at": { "type": "string", "format": "date-time", "description": "When the endpoint was last updated (ISO 8601)." }, "created_by": { "allOf": [ { "$ref": "#/components/schemas/UserBasic" } ], "readOnly": true, "description": "User who created the endpoint." }, "is_materialized": { "type": "boolean", "description": "Whether the current version's results are pre-computed to S3." }, "current_version": { "type": "integer", "description": "Latest version number." }, "current_version_id": { "type": "string", "format": "uuid", "nullable": true, "description": "UUID of the current EndpointVersion row." }, "versions_count": { "type": "integer", "description": "Total number of versions for this endpoint." }, "derived_from_insight": { "type": "string", "nullable": true, "description": "Short ID of the source insight, if derived from one." }, "last_executed_at": { "type": "string", "format": "date-time", "nullable": true, "description": "When this endpoint was last executed via the API (ISO 8601), or null if never executed." }, "materialization": { "allOf": [ { "$ref": "#/components/schemas/EndpointMaterialization" } ], "description": "Materialization status and configuration for the current version." }, "bucket_overrides": { "type": "object", "additionalProperties": true, "nullable": true, "description": "Per-column bucket overrides for range variable materialization." }, "columns": { "type": "array", "items": { "$ref": "#/components/schemas/EndpointColumn" }, "description": "Column names and types from the query's SELECT clause." }, "version": { "type": "integer", "description": "Version number." }, "version_id": { "type": "string", "format": "uuid", "description": "Version unique identifier (UUID)." }, "endpoint_is_active": { "type": "boolean", "description": "Whether the parent endpoint is active (distinct from version.is_active)." }, "version_created_at": { "type": "string", "description": "ISO 8601 timestamp when this version was created." }, "version_updated_at": { "type": "string", "nullable": true, "description": "ISO 8601 timestamp when this version was last updated." }, "version_created_by": { "allOf": [ { "$ref": "#/components/schemas/UserBasic" } ], "readOnly": true, "nullable": true, "description": "User who created this version." } }, "required": [ "bucket_overrides", "columns", "created_at", "created_by", "current_version", "data_freshness_seconds", "derived_from_insight", "description", "endpoint_is_active", "endpoint_path", "id", "is_active", "is_materialized", "last_executed_at", "materialization", "name", "query", "ui_url", "updated_at", "url", "version", "version_created_at", "version_created_by", "version_id", "version_updated_at", "versions_count" ] }