diff --git a/swagger.json b/swagger.json index 3e9540b..ea0f659 100644 --- a/swagger.json +++ b/swagger.json @@ -50,6 +50,12 @@ { "name": "Docs" }, + { + "name": "Eng Intel: Metrics" + }, + { + "name": "Eng Intel: Registry" + }, { "name": "Eng Intel: User Labels" }, @@ -2487,10 +2493,21 @@ "operationId": "deleteEntitiesByType", "parameters": [ { - "description": "A list of entity types to delete", + "description": "A list of entity types or IDs delete", "in": "query", "name": "types", - "required": true, + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "query", + "name": "ids", + "required": false, "schema": { "type": "array", "items": { @@ -2736,6 +2753,101 @@ "x-cortex-mcp-enabled": "true" } }, + "/api/v1/catalog/batch/{type}": { + "get": { + "description": "Gets a list of entities based on type and batch key plus identifier", + "operationId": "getEntitiesByBatchIdentifier", + "parameters": [ + { + "description": "The type name of the batches to retrieve. This corresponds to the `x-cortex-type` field in the entity descriptor.", + "in": "path", + "name": "type", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The batch key to filter entities by. This is a custom field set as entity metadata `__cortex_batch.key`", + "in": "query", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The batch version. This is a custom field set as entity metadata `__cortex_batch.identifier`, required if `compare` is specified", + "in": "query", + "name": "version", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The type over comparison to perform. Ignored unless `version` parameter must also be provided. Values can be `eq`, `ne`.", + "in": "query", + "name": "compare", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "includeArchived", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "description": "Number of results to return per page, between 1 and 1000. Default 250.", + "in": "query", + "name": "pageSize", + "required": true, + "schema": { + "type": "integer", + "format": "int32", + "default": 250 + } + }, + { + "description": "Page number to return, 0-indexed. Default 0.", + "in": "query", + "name": "page", + "required": true, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityCIDListResponse" + } + } + }, + "description": "List of entity identifiers matching the batch key and type, based on the specified compare parameter." + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "summary": "Get entities by batch identifier", + "tags": [ + "Catalog Entities" + ], + "x-cortex-mcp-enabled": "false" + } + }, "/api/v1/catalog/custom-data": { "delete": { "description": "Use this endpoint when attempting to delete custom data where the key contains non-alphanumeric characters. Otherwise, use the standard API under `Custom Data`.", @@ -9393,6 +9505,148 @@ "x-cortex-mcp-enabled": "false" } }, + "/api/v1/eng-intel/metrics/point-in-time": { + "post": { + "description": "Query current metric values with optional period comparisons and flexible grouping. Supports batch queries for multiple metrics efficiently.", + "operationId": "queryPointInTimeMetrics", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchPointInTimeRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInTimeResponse" + } + } + }, + "description": "Successfully executed metrics query" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInTimeResponse" + } + } + }, + "description": "Invalid metric names, date range exceeds 6 months, validation errors, or unsupported orderBy attributes" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PointInTimeResponse" + } + } + }, + "description": "Feature not enabled - contact help@cortex.io" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "summary": "Execute point-in-time engineering metrics queries", + "tags": [ + "Eng Intel: Metrics" + ], + "x-cortex-mcp-description": "Execute point-in-time queries for one or more engineering metrics in a single request.\n\n Returns current metric values for specified time periods, with support for batch queries\n and optional period-over-period comparisons.\n\n Request body supports:\n - Multiple metrics: Query several metrics efficiently in one call\n - Time range (startTime/endTime): Range cannot exceed 6 months (180 days)\n - Flexible filtering: Use filters available for each metric (varies by source)\n - Grouping options: Group results by available attributes or dimensions detailed from Registry API (author, repo, team, etc.)\n - Aggregation methods: COUNT, SUM, AVG, MIN, MAX per metric requirements - check individual metric definitions\n - Period comparisons: Optional comparison to previous time windows\n - Nested queries: Advanced nested metric calculations\n\n TIP: Always call Registry API first to discover available metrics and their supported operations.\n\n Response includes:\n - Lightweight metadata: Column definitions optimized for programmatic use\n - Row data: Actual metric values and dimensional data\n - No heavy schemas: Source definitions excluded (get from Registry API instead)\n\n Error responses:\n - 400: Invalid metric names, date range, validation errors, or unsupported metric combinations\n - 403: Feature not enabled (contact help@cortex.io)", + "x-cortex-mcp-enabled": "true", + "x-internal": true + } + }, + "/api/v1/eng-intel/registry/metrics/definitions": { + "get": { + "description": "Discover all available engineering metrics and their metadata. Use this before querying metrics to understand what data is available and how to query it effectively.", + "operationId": "listMetricDefinitions", + "parameters": [ + { + "in": "query", + "name": "view", + "required": false, + "schema": { + "type": "string", + "default": "basic" + } + }, + { + "in": "query", + "name": "key", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetricDefinitionsResponse" + } + } + }, + "description": "Successfully retrieved metric definitions" + }, + "400": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/BasicMetricDefinitionsResponse" + }, + { + "$ref": "#/components/schemas/FullMetricDefinitionsResponse" + } + ] + } + } + }, + "description": "Invalid query parameters or filters" + }, + "403": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/BasicMetricDefinitionsResponse" + }, + { + "$ref": "#/components/schemas/FullMetricDefinitionsResponse" + } + ] + } + } + }, + "description": "Feature not enabled - contact help@cortex.io" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + } + }, + "summary": "List available engineering metric definitions", + "tags": [ + "Eng Intel: Registry" + ], + "x-cortex-mcp-description": "List all available engineering metric definitions.\n\n Query parameters:\n - view: \u0027basic\u0027 (default) returns minimal info, \u0027full\u0027 includes sources and query metadata\n - key: Filter metrics by key (supports multiple values and comma-separated lists)\n\n Error responses:\n - 400: Invalid view parameter (must be \u0027basic\u0027 or \u0027full\u0027)\n - 403: Restricted Feature (contact help@cortex.io)\n\n Filter operators by type (for constructing queries):\n - STRING: EQUAL, NOT_EQUAL, IS_NULL, IS_NOT_NULL, LIKE, NOT_LIKE, IN, NOT_IN, ANY\n - INTEGER/DECIMAL/DOUBLE: EQUAL, NOT_EQUAL, IS_NULL, IS_NOT_NULL, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, IN, NOT_IN, BETWEEN, ANY\n - DATETIME/DATE: EQUAL, NOT_EQUAL, IS_NULL, IS_NOT_NULL, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, BETWEEN\n - BOOLEAN: EQUAL, NOT_EQUAL, IS_NULL, IS_NOT_NULL, IN, NOT_IN\n - ARRAY: EQUAL, CONTAINS, IN", + "x-cortex-mcp-enabled": "true", + "x-internal": true + } + }, "/api/v1/github/configurations": { "delete": { "operationId": "GitHubDeleteConfigurations", @@ -15406,6 +15660,59 @@ "x-cortex-mcp-enabled": "false" } }, + "/api/v1/scorecards/{tag}/entity/{entityTag}/scores": { + "post": { + "description": "Triggers score evaluation for entity scorecard", + "operationId": "refreshScorecardScoreForEntity", + "parameters": [ + { + "description": "Unique tag for the Scorecard", + "example": "my-production-readiness-checklist", + "in": "path", + "name": "tag", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The entity tag (`x-cortex-tag`) that identifies the entity.", + "in": "path", + "name": "entityTag", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Scorecard score evaluation triggered successfully" + }, + "403": { + "description": "Unauthorized" + }, + "404": { + "description": "Scorecard not found" + }, + "409": { + "description": "Already evaluating scorecard" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "description": "Scorecard evaluation failed" + } + }, + "summary": "Evaluate entity scorecard score", + "tags": [ + "Scorecards" + ], + "x-cortex-mcp-description": "Cortex Scorecards API - Measure and track service quality, compliance, and maturity levels across your organization with customizable scorecards and rules", + "x-cortex-mcp-enabled": "false" + } + }, "/api/v1/scorecards/{tag}/next-steps": { "get": { "operationId": "getScorecardNextStepsForEntity", @@ -18323,11 +18630,83 @@ } } }, - "AuditLogResponse": { + "Attribute": { "required": [ - "action", - "objectIdentifier", - "objectType", + "name", + "type" + ], + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Human-readable description of what this field contains" + }, + "name": { + "type": "string", + "description": "Field name for use in queries" + }, + "type": { + "type": "string", + "description": "Data type - determines which filter operators are supported (see endpoint description)", + "enum": [ + "STRING", + "BOOLEAN", + "INTEGER", + "DECIMAL", + "DOUBLE", + "DATE", + "TREE", + "DATETIME", + "JSON", + "ARRAY", + "UNSUPPORTED" + ] + } + }, + "description": "Queryable fields available on this dimension" + }, + "AttributeFilterObject": { + "required": [ + "attribute", + "operator", + "predicate" + ], + "type": "object", + "properties": { + "attribute": { + "type": "string" + }, + "operator": { + "type": "string", + "enum": [ + "ANY", + "BETWEEN", + "CONTAINS", + "EQUAL", + "GREATER_THAN", + "GREATER_THAN_OR_EQUAL", + "IN", + "IS_NOT_NULL", + "IS_NULL", + "LESS_THAN", + "LESS_THAN_OR_EQUAL", + "LIKE", + "NOT_EQUAL", + "NOT_IN", + "NOT_LIKE" + ] + }, + "predicate": { + "type": "object" + } + }, + "description": "Filters to apply to the data" + }, + "AuditLogResponse": { + "required": [ + "action", + "objectIdentifier", + "objectType", "timestamp" ], "type": "object", @@ -18757,6 +19136,148 @@ } ] }, + "BasicMetricDefinition": { + "required": [ + "displayName", + "key", + "readiness" + ], + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of what this metric measures" + }, + "displayName": { + "type": "string", + "description": "Human-readable name" + }, + "key": { + "type": "string", + "description": "Unique identifier for the metric (used in queries)" + }, + "readiness": { + "$ref": "#/components/schemas/Readiness" + } + }, + "description": "List of available metric definitions with basic metadata" + }, + "BasicMetricDefinitionsResponse": { + "required": [ + "metrics" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/MetricDefinitionsResponse" + }, + { + "type": "object", + "properties": { + "metrics": { + "type": "array", + "description": "List of available metric definitions with basic metadata", + "items": { + "$ref": "#/components/schemas/BasicMetricDefinition" + } + } + } + } + ] + }, + "BatchPointInTimeRequest": { + "required": [ + "endTime", + "filters", + "groupBy", + "limit", + "metrics", + "orderBy", + "startTime" + ], + "type": "object", + "properties": { + "comparison": { + "oneOf": [ + { + "$ref": "#/components/schemas/TimeWindow" + } + ] + }, + "endTime": { + "type": "string", + "description": "End time for the query period", + "format": "date-time" + }, + "filters": { + "type": "array", + "description": "Filters to apply to the data", + "items": { + "$ref": "#/components/schemas/AttributeFilterObject" + } + }, + "groupBy": { + "type": "array", + "description": "Fields to group results by", + "items": { + "type": "string", + "description": "Fields to group results by" + } + }, + "limit": { + "type": "integer", + "description": "Maximum number of results to return", + "format": "int32" + }, + "metrics": { + "type": "array", + "description": "List of metrics to query with their aggregation functions", + "items": { + "$ref": "#/components/schemas/MetricAggregation" + } + }, + "nestedGroupBy": { + "type": "array", + "description": "Fields to group nested results by", + "items": { + "type": "string", + "description": "Fields to group nested results by" + } + }, + "nestedMetrics": { + "type": "array", + "description": "Optional nested metrics for advanced queries", + "items": { + "$ref": "#/components/schemas/MetricAggregation" + } + }, + "nestedTimeAttribute": { + "type": "string", + "description": "Time attribute for nested queries" + }, + "nextPage": { + "type": "string", + "description": "Pagination token for next page of results" + }, + "orderBy": { + "type": "array", + "description": "Sort order for results", + "items": { + "$ref": "#/components/schemas/OrderBy" + } + }, + "startTime": { + "type": "string", + "description": "Start time for the query period", + "format": "date-time" + }, + "timeAttribute": { + "type": "string", + "description": "Time attribute to use for queries" + } + }, + "description": "Point-in-time metrics query request for batch processing" + }, "BulkAwsConfigurationsRequest": { "required": [ "configurations" @@ -19265,6 +19786,40 @@ } } }, + "Column": { + "required": [ + "alias", + "name", + "ordinal", + "type" + ], + "type": "object", + "properties": { + "alias": { + "type": "string" + }, + "category": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "ordinal": { + "type": "integer", + "format": "int32" + }, + "type": { + "type": "string" + } + }, + "description": "List of column definitions describing each field in the result rows", + "discriminator": { + "propertyName": "type" + } + }, "CompoundFilter": { "type": "object", "properties": { @@ -21279,6 +21834,32 @@ } } }, + "Dimension": { + "required": [ + "attributes", + "description", + "name" + ], + "type": "object", + "properties": { + "attributes": { + "type": "array", + "description": "Queryable fields available on this dimension", + "items": { + "$ref": "#/components/schemas/Attribute" + } + }, + "description": { + "type": "string", + "description": "Description of the relationship this dimension represents" + }, + "name": { + "type": "string", + "description": "Dimension identifier for use in queries" + } + }, + "description": "Related entities that can be joined for additional context" + }, "DiscoveryAuditEvent": { "required": [ "isIgnored", @@ -21527,6 +22108,39 @@ }, "description": "Emphasized rules for the Initiative. Either emphasized levels or rules must be provided" }, + "EntityCIDListResponse": { + "required": [ + "ids", + "page", + "total", + "totalPages" + ], + "type": "object", + "properties": { + "ids": { + "type": "array", + "description": "Unique, immutable, 18-character auto-generated identifier for the entity.", + "example": "en2da8159dbeefb974", + "items": { + "type": "string", + "description": "Unique, immutable, 18-character auto-generated identifier for the entity.", + "example": "en2da8159dbeefb974" + } + }, + "page": { + "type": "integer", + "format": "int32" + }, + "total": { + "type": "integer", + "format": "int32" + }, + "totalPages": { + "type": "integer", + "format": "int32" + } + } + }, "EntityDestinationsResponse": { "required": [ "destinations" @@ -22212,7 +22826,8 @@ "description": "The entity types to include. Can be found on https://app.getcortexapp.com/admin/entities" } } - } + }, + "description": "The type filter for the entity" }, "ErrorResponse": { "required": [ @@ -22317,7 +22932,6 @@ "type": "string" } }, - "description": "API key or person who requested, approved, or rejected the exemption", "discriminator": { "propertyName": "type", "mapping": { @@ -22412,6 +23026,115 @@ }, "description": "Filter applied to the Initiative" }, + "FilterOption": { + "required": [ + "displayName", + "filter", + "key" + ], + "type": "object", + "properties": { + "displayName": { + "type": "string", + "description": "Human-readable label for this filter" + }, + "filter": { + "type": "string", + "description": "Specific attribute to filter on" + }, + "key": { + "type": "string", + "description": "Field key to reference in queries" + } + }, + "description": "Available filtering options for querying metrics" + }, + "FullMetricDefinition": { + "required": [ + "displayName", + "key", + "readiness" + ], + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of what this metric measures" + }, + "displayName": { + "type": "string", + "description": "Human-readable name" + }, + "key": { + "type": "string", + "description": "Unique identifier for the metric (used in queries)" + }, + "readiness": { + "$ref": "#/components/schemas/Readiness" + }, + "sourceRef": { + "type": "string", + "description": "Reference to the data source in the sources map - indicates which integration provides this metric" + }, + "timeAttribute": { + "$ref": "#/components/schemas/Attribute" + }, + "type": { + "type": "string", + "description": "Type of metric: COUNT (discrete values), DURATION (time-based), RATIO/RATE (percentages), VALUE (continuous)", + "enum": [ + "DURATION", + "COUNT", + "VALUE", + "RATE" + ] + }, + "units": { + "type": "string", + "description": "Units of measurement (e.g., \u0027seconds\u0027, \u0027count\u0027, \u0027percentage\u0027)" + }, + "valence": { + "type": "string", + "description": "Whether higher values are better (POSITIVE) or worse (NEGATIVE) for this metric", + "enum": [ + "POSITIVE", + "NEGATIVE" + ] + } + }, + "description": "List of available metric definitions with full metadata" + }, + "FullMetricDefinitionsResponse": { + "required": [ + "metrics", + "sources" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/MetricDefinitionsResponse" + }, + { + "type": "object", + "properties": { + "metrics": { + "type": "array", + "description": "List of available metric definitions with full metadata", + "items": { + "$ref": "#/components/schemas/FullMetricDefinition" + } + }, + "sources": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Source" + }, + "description": "Map of source names to source metadata for query construction" + } + } + } + ] + }, "GCP": { "required": [ "projectId", @@ -22716,8 +23439,6 @@ "properties": { "provider": { "type": "string", - "description": "Name of the Git provider", - "example": "GITHUB", "enum": [ "AZURE_DEVOPS", "BITBUCKET", @@ -23059,6 +23780,24 @@ } } }, + "GroupByOption": { + "required": [ + "displayName", + "key" + ], + "type": "object", + "properties": { + "displayName": { + "type": "string", + "description": "Human-readable label for this grouping" + }, + "key": { + "type": "string", + "description": "Field key to use in GROUP BY clause" + } + }, + "description": "Available grouping options for aggregating metrics" + }, "GroupFilter": { "type": "object", "properties": { @@ -24110,6 +24849,76 @@ }, "description": "Custom data key/values associated with the entity." }, + "MetricAggregation": { + "required": [ + "aggregation", + "metric" + ], + "type": "object", + "properties": { + "aggregation": { + "type": "string", + "enum": [ + "SUM", + "AVG", + "COUNT", + "RATIO", + "MIN", + "MAX", + "P50", + "P95", + "RANKING" + ] + }, + "metric": { + "type": "string" + } + }, + "description": "Optional nested metrics for advanced queries" + }, + "MetricDefinition": { + "required": [ + "displayName", + "key", + "readiness" + ], + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "key": { + "type": "string" + }, + "readiness": { + "$ref": "#/components/schemas/Readiness" + } + } + }, + "MetricDefinitionsResponse": { + "required": [ + "metrics", + "view" + ], + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetricDefinition" + } + }, + "view": { + "type": "string" + } + }, + "discriminator": { + "propertyName": "view" + } + }, "ModifiedRuleExemptionsResponse": { "required": [ "exemptions" @@ -24532,7 +25341,6 @@ }, "failedReason": { "type": "string", - "description": "The reason why this notification failed.", "enum": [ "CHANNEL_NOT_FOUND", "MEMBER_EMAILS_NOT_FOUND", @@ -24550,7 +25358,6 @@ }, "ignoredReason": { "type": "string", - "description": "The reason why this notification was ignored.", "enum": [ "USER_UNSUBSCRIBED", "WORKSPACE_DISABLED", @@ -24565,7 +25372,6 @@ }, "medium": { "type": "string", - "description": "The medium used to send the notification.", "enum": [ "SLACK", "MICROSOFT_TEAMS", @@ -24589,7 +25395,6 @@ }, "recipientType": { "type": "string", - "description": "The type of the notification recipient.", "enum": [ "USER", "TEAM", @@ -24608,7 +25413,6 @@ }, "status": { "type": "string", - "description": "The status of the notification log.", "enum": [ "READY", "IGNORED", @@ -24618,7 +25422,6 @@ }, "type": { "type": "string", - "description": "The type of the notification.", "enum": [ "INITIATIVE_CREATION", "INITIATIVE_CUSTOM_SCHEDULE", @@ -24708,7 +25511,6 @@ }, "type": { "type": "string", - "description": "The type of the notification object.", "enum": [ "ENTITY", "SCORECARD", @@ -24755,7 +25557,6 @@ }, "failedReason": { "type": "string", - "description": "The reason why this notification run failed.", "enum": [ "PACKET_GENERATOR_ERROR", "CONTEXT_RESOLUTION_ERROR", @@ -24771,7 +25572,6 @@ }, "ignoredReason": { "type": "string", - "description": "The reason why this notification run was ignored.", "enum": [ "SCORECARD_DISABLED", "WORKSPACE_DISABLED", @@ -24780,7 +25580,6 @@ }, "medium": { "type": "string", - "description": "The medium used to send the notification.", "enum": [ "SLACK", "MICROSOFT_TEAMS", @@ -24797,7 +25596,6 @@ }, "notificationType": { "type": "string", - "description": "The type of the notification.", "enum": [ "INITIATIVE_CREATION", "INITIATIVE_CUSTOM_SCHEDULE", @@ -24836,7 +25634,6 @@ }, "status": { "type": "string", - "description": "The status of the notification run.", "enum": [ "CREATED", "FAILED", @@ -25060,6 +25857,26 @@ } } }, + "OrderBy": { + "required": [ + "attribute", + "direction" + ], + "type": "object", + "properties": { + "attribute": { + "type": "string" + }, + "direction": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + "description": "Sort order for results" + }, "OwnerGroup": { "required": [ "groupName" @@ -25392,8 +26209,7 @@ }, "lastUpdated": { "type": "string", - "description": "When the plugin was last updated", - "format": "date-time" + "description": "When the plugin was last updated" }, "minimumRoleRequired": { "type": "string", @@ -25456,8 +26272,7 @@ }, "lastUpdated": { "type": "string", - "description": "When the plugin was last updated", - "format": "date-time" + "description": "When the plugin was last updated" }, "minimumRoleRequired": { "type": "string", @@ -25513,6 +26328,26 @@ } } }, + "PointInTimeResponse": { + "required": [ + "metadata", + "rows" + ], + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/QueryMetadata" + }, + "rows": { + "type": "array", + "description": "Result rows containing metric values and dimensions - each row corresponds to the columns in metadata", + "items": { + "type": "object", + "description": "Result rows containing metric values and dimensions - each row corresponds to the columns in metadata" + } + } + } + }, "PrometheusConfiguration": { "required": [ "alias", @@ -25619,6 +26454,22 @@ } } }, + "QueryMetadata": { + "required": [ + "columns" + ], + "type": "object", + "properties": { + "columns": { + "type": "array", + "description": "List of column definitions describing each field in the result rows", + "items": { + "$ref": "#/components/schemas/Column" + } + } + }, + "description": "Query metadata describing the structure of returned columns" + }, "QueryRequest": { "required": [ "query" @@ -25698,6 +26549,21 @@ } } }, + "Readiness": { + "required": [ + "type" + ], + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "description": "Whether this metric is ready to use - includes hints if configuration is needed", + "discriminator": { + "propertyName": "type" + } + }, "RejectRuleExemptionRequest": { "required": [ "reason", @@ -26616,6 +27482,56 @@ } } }, + "Source": { + "required": [ + "attributes", + "description", + "dimensions", + "filterOptions", + "groupByOptions", + "name" + ], + "type": "object", + "properties": { + "attributes": { + "type": "array", + "description": "Queryable fields available directly on this source", + "items": { + "$ref": "#/components/schemas/Attribute" + } + }, + "description": { + "type": "string", + "description": "Human-readable description of what data this source provides" + }, + "dimensions": { + "type": "array", + "description": "Related entities that can be joined for additional context", + "items": { + "$ref": "#/components/schemas/Dimension" + } + }, + "filterOptions": { + "type": "array", + "description": "Available filtering options for querying metrics", + "items": { + "$ref": "#/components/schemas/FilterOption" + } + }, + "groupByOptions": { + "type": "array", + "description": "Available grouping options for aggregating metrics", + "items": { + "$ref": "#/components/schemas/GroupByOption" + } + }, + "name": { + "type": "string", + "description": "Unique identifier for the source" + } + }, + "description": "Map of source names to source metadata for query construction" + }, "TEAM_FILTER": { "required": [ "type" @@ -27028,6 +27944,86 @@ } } }, + "TimeWindow": { + "required": [ + "alias", + "name", + "ordinal", + "windowSize" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/Column" + }, + { + "type": "object", + "properties": { + "ordinal": { + "type": "integer", + "description": "Zero-based column position in the result data rows - use this to map column metadata to actual row data values", + "format": "int32" + }, + "windowSize": { + "type": "object", + "properties": { + "nano": { + "type": "integer", + "format": "int32" + }, + "negative": { + "type": "boolean" + }, + "seconds": { + "type": "integer", + "format": "int64" + }, + "units": { + "type": "array", + "items": { + "type": "object", + "properties": { + "dateBased": { + "type": "boolean" + }, + "duration": { + "type": "object", + "properties": { + "nano": { + "type": "integer", + "format": "int32" + }, + "negative": { + "type": "boolean" + }, + "seconds": { + "type": "integer", + "format": "int64" + }, + "zero": { + "type": "boolean" + } + } + }, + "durationEstimated": { + "type": "boolean" + }, + "timeBased": { + "type": "boolean" + } + } + } + }, + "zero": { + "type": "boolean" + } + }, + "description": "Duration of the time window represented by this column" + } + } + } + ] + }, "TooManyRequestsProblemDetail": { "required": [ "type", @@ -28256,6 +29252,10 @@ "$ref": "#/components/schemas/WorkflowInput" } }, + "jsValidatorScript": { + "type": "string", + "description": "Optional JavaScript validator script to validate the provided inputs" + }, "type": { "type": "string" }