{"openapi":"3.0.0","info":{"title":"Costory","version":"1.0","description":"API Documentation"},"servers":[{"url":"","description":"Production server"}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-token","description":"API token for authentication (or Admin API key). The token is scoped per organization and can be retrieved in the Organization Switcher."},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT or Clerk ak_* API key","description":"Send `Authorization: Bearer <credential>` using either a Clerk session JWT or a Clerk API key (`ak_*`). API keys may identify a user (`user_*`) or organization (`org_*`) principal and are generated in the Clerk Dashboard under API keys."}},"schemas":{"Unauthorized":{"type":"object","properties":{"error":{"type":"string","description":"Unauthorized error message"}},"required":["error"]},"NotFound":{"type":"object","properties":{"error":{"type":"string","description":"Resource not found error code"}},"required":["error"]},"BadRequest":{"type":"object","properties":{"error":{"type":"string","description":"Error code"},"reason":{"type":"string","description":"Human-readable reason"},"details":{"description":"Additional details"},"summary":{"type":"string","description":"Optional short summary"}},"required":["error"]},"ExternalEventRequest":{"type":"object","properties":{"name":{"type":"string","minLength":5,"description":"Name of the event (minimum 5 characters)"},"date":{"type":"string","nullable":true,"format":"date-time","description":"Date of the event (ISO 8601 format or parseable date string)"},"description":{"type":"string","description":"Detailed description of the event"},"tags":{"type":"array","items":{"type":"string"},"maxItems":5,"description":"Tags for the event (maximum 5)"},"labels":{"type":"array","items":{"type":"string"},"maxItems":5,"description":"Deprecated alias for tags. Ignored when tags is sent."},"category":{"type":"string","description":"Deprecated. If sent, merged into tags then discarded."},"metadata":{"type":"object","additionalProperties":{},"default":{"event":"Merged PR #123","owner":"John Doe","link":"https://gitlab.com/your_org/repo/merge_requests/123"},"description":"Additional metadata about the event (key-value pairs). Example: event, owner, link"}},"required":["name","date","description"]},"CreateEventSuccess":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the created event"}},"required":["id"]},"CreateEventBadRequest":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"reason":{"type":"string","description":"Reason for the error"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Field name that caused the error"},"message":{"type":"string","description":"Error message for the field"},"code":{"type":"string","description":"Error code"}},"required":["field","message","code"]},"description":"Detailed validation errors"},"summary":{"type":"string","description":"Summary of the error"}},"required":["error"]},"TeamNameExists":{"type":"object","properties":{"error":{"type":"string","enum":["TEAM_NAME_EXISTS"]},"existingTeamId":{"type":"string","description":"Id of the team that already uses this name in the organization"}},"required":["error","existingTeamId"]},"TerraformTeamInvalidScopeFilter":{"type":"object","properties":{"error":{"type":"string","enum":["INVALID_SCOPE_FILTER"]},"reason":{"type":"string"}},"required":["error"]},"TerraformTeamMultipleScopes":{"type":"object","properties":{"error":{"type":"string","enum":["TEAM_MULTIPLE_SCOPES"]},"reason":{"type":"string"}},"required":["error"]},"TerraformTeamOrgContextRequired":{"type":"object","properties":{"error":{"type":"string","enum":["ORG_CONTEXT_REQUIRED"]},"reason":{"type":"string"}},"required":["error"]},"TerraformTeamPatchBadRequest":{"anyOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/TeamNameExists"},{"$ref":"#/components/schemas/TerraformTeamInvalidScopeFilter"},{"$ref":"#/components/schemas/TerraformTeamMultipleScopes"},{"$ref":"#/components/schemas/TerraformTeamOrgContextRequired"}]},"CostAlert":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"},"createdById":{"type":"string"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"],"additionalProperties":false},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"teamId":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"scopeId":{"type":"string","nullable":true},"urlState":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"queryName":{"type":"string"},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"evaluationPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY"]},"thresholdType":{"type":"string","enum":["ABOVE","UNDER"]},"snoozedUntil":{"type":"string","nullable":true,"format":"date-time"},"condition":{"type":"string","nullable":true},"conditionAdvancedExplorerQuery":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"dedupKind":{"type":"string","nullable":true,"enum":["CALENDAR","ROLLING",null]},"dedupCalendarUnit":{"type":"string","nullable":true,"enum":["WEEK","MONTH",null]},"dedupWindowDays":{"type":"integer","nullable":true},"dedupResetAt":{"type":"string","nullable":true,"format":"date-time"},"notificationChannel":{"type":"string","enum":["EMAIL","SLACK","TEAMS"]},"emails":{"type":"array","items":{"type":"string","format":"email"}},"slackChannelId":{"type":"string","nullable":true},"teamsChannelId":{"type":"string","nullable":true},"description":{"type":"string"},"access":{"type":"object","properties":{"organizationRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"teamGrants":{"type":"array","items":{"type":"object","properties":{"teamId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]}},"required":["teamId","name","role"]}},"callerRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"capabilities":{"type":"object","properties":{"canView":{"type":"boolean"},"canEdit":{"type":"boolean"},"canManage":{"type":"boolean"}},"required":["canView","canEdit","canManage"]}},"required":["organizationRole","teamGrants","callerRole","capabilities"]}},"required":["id","organizationId","createdAt","updatedAt","createdById","createdBy","type","teamId","tags","archivedAt","scopeId","urlState","name","currency","queryName","queries","evaluationPeriod","thresholdType","snoozedUntil","condition","conditionAdvancedExplorerQuery","dedupKind","dedupCalendarUnit","dedupWindowDays","dedupResetAt","notificationChannel","emails","slackChannelId","teamsChannelId","description","access"]},"CostAlertsTableData":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"},"createdById":{"type":"string"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"],"additionalProperties":false},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"teamId":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"scopeId":{"type":"string","nullable":true},"urlState":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"queryName":{"type":"string"},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"evaluationPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY"]},"thresholdType":{"type":"string","enum":["ABOVE","UNDER"]},"snoozedUntil":{"type":"string","nullable":true,"format":"date-time"},"condition":{"type":"string","nullable":true},"conditionAdvancedExplorerQuery":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"dedupKind":{"type":"string","nullable":true,"enum":["CALENDAR","ROLLING",null]},"dedupCalendarUnit":{"type":"string","nullable":true,"enum":["WEEK","MONTH",null]},"dedupWindowDays":{"type":"integer","nullable":true},"dedupResetAt":{"type":"string","nullable":true,"format":"date-time"},"notificationChannel":{"type":"string","enum":["EMAIL","SLACK","TEAMS"]},"emails":{"type":"array","items":{"type":"string","format":"email"}},"slackChannelId":{"type":"string","nullable":true},"teamsChannelId":{"type":"string","nullable":true},"description":{"type":"string"},"access":{"type":"object","properties":{"organizationRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"teamGrants":{"type":"array","items":{"type":"object","properties":{"teamId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]}},"required":["teamId","name","role"]}},"callerRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"capabilities":{"type":"object","properties":{"canView":{"type":"boolean"},"canEdit":{"type":"boolean"},"canManage":{"type":"boolean"}},"required":["canView","canEdit","canManage"]}},"required":["organizationRole","teamGrants","callerRole","capabilities"]},"thresholds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costAlertId":{"type":"string","nullable":true},"budgetAlertId":{"type":"string","nullable":true},"value":{"type":"number"},"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"metricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"changeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]}},"required":["id","costAlertId","budgetAlertId","value","severityLevel","metricMode","changeBasis"]}},"computationResults":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costAlertId":{"type":"string"},"value":{"type":"number"},"reachedSeverityLevel":{"type":"string","nullable":true,"enum":["INFO","WARNING","RED",null]},"effectiveDate":{"type":"string","nullable":true,"format":"date-time"},"computedAt":{"type":"string","nullable":true,"format":"date-time"},"valueMetricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"valueChangeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]},"selectedPeriodValue":{"type":"number","nullable":true},"comparisonPeriodValue":{"type":"number","nullable":true},"groupByValue":{"type":"string","nullable":true},"notifiedAt":{"type":"string","nullable":true,"format":"date-time"},"notificationState":{"type":"string","nullable":true,"enum":["NOTIFIED","FIRED",null]}},"required":["id","costAlertId","value","reachedSeverityLevel","effectiveDate","computedAt","valueMetricMode","valueChangeBasis","selectedPeriodValue","comparisonPeriodValue","groupByValue","notifiedAt","notificationState"]}},"messageExecutions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costAlertId":{"type":"string"},"status":{"type":"string","enum":["PENDING","SUCCESS","FAILED"]},"scheduledFor":{"type":"string","nullable":true,"format":"date-time"},"sentAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","costAlertId","status","scheduledFor","sentAt"]}},"status":{"type":"string","enum":["ACTIVE","SNOOZED","ARCHIVED"]},"severityLevel":{"type":"string","nullable":true,"enum":["INFO","WARNING","RED",null]}},"required":["id","organizationId","createdAt","updatedAt","createdById","createdBy","type","teamId","tags","archivedAt","scopeId","urlState","name","currency","queryName","queries","evaluationPeriod","thresholdType","snoozedUntil","condition","conditionAdvancedExplorerQuery","dedupKind","dedupCalendarUnit","dedupWindowDays","dedupResetAt","notificationChannel","emails","slackChannelId","teamsChannelId","description","access","thresholds","computationResults","messageExecutions","status","severityLevel"]}},"CostAlertEditionPage":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"},"createdById":{"type":"string"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"],"additionalProperties":false},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"teamId":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"scopeId":{"type":"string","nullable":true},"urlState":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"queryName":{"type":"string"},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"evaluationPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY"]},"thresholdType":{"type":"string","enum":["ABOVE","UNDER"]},"snoozedUntil":{"type":"string","nullable":true,"format":"date-time"},"condition":{"type":"string","nullable":true},"conditionAdvancedExplorerQuery":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"dedupKind":{"type":"string","nullable":true,"enum":["CALENDAR","ROLLING",null]},"dedupCalendarUnit":{"type":"string","nullable":true,"enum":["WEEK","MONTH",null]},"dedupWindowDays":{"type":"integer","nullable":true},"dedupResetAt":{"type":"string","nullable":true,"format":"date-time"},"notificationChannel":{"type":"string","enum":["EMAIL","SLACK","TEAMS"]},"emails":{"type":"array","items":{"type":"string","format":"email"}},"slackChannelId":{"type":"string","nullable":true},"teamsChannelId":{"type":"string","nullable":true},"description":{"type":"string"},"access":{"type":"object","properties":{"organizationRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"teamGrants":{"type":"array","items":{"type":"object","properties":{"teamId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]}},"required":["teamId","name","role"]}},"callerRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"capabilities":{"type":"object","properties":{"canView":{"type":"boolean"},"canEdit":{"type":"boolean"},"canManage":{"type":"boolean"}},"required":["canView","canEdit","canManage"]}},"required":["organizationRole","teamGrants","callerRole","capabilities"]},"thresholds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costAlertId":{"type":"string","nullable":true},"budgetAlertId":{"type":"string","nullable":true},"value":{"type":"number"},"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"metricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"changeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]}},"required":["id","costAlertId","budgetAlertId","value","severityLevel","metricMode","changeBasis"]}}},"required":["id","organizationId","createdAt","updatedAt","createdById","createdBy","type","teamId","tags","archivedAt","scopeId","urlState","name","currency","queryName","queries","evaluationPeriod","thresholdType","snoozedUntil","condition","conditionAdvancedExplorerQuery","dedupKind","dedupCalendarUnit","dedupWindowDays","dedupResetAt","notificationChannel","emails","slackChannelId","teamsChannelId","description","access","thresholds"]},"CostAlertWidgetData":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"},"createdById":{"type":"string"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"],"additionalProperties":false},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"teamId":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"scopeId":{"type":"string","nullable":true},"urlState":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"queryName":{"type":"string"},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"evaluationPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY"]},"thresholdType":{"type":"string","enum":["ABOVE","UNDER"]},"snoozedUntil":{"type":"string","nullable":true,"format":"date-time"},"condition":{"type":"string","nullable":true},"conditionAdvancedExplorerQuery":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"dedupKind":{"type":"string","nullable":true,"enum":["CALENDAR","ROLLING",null]},"dedupCalendarUnit":{"type":"string","nullable":true,"enum":["WEEK","MONTH",null]},"dedupWindowDays":{"type":"integer","nullable":true},"dedupResetAt":{"type":"string","nullable":true,"format":"date-time"},"notificationChannel":{"type":"string","enum":["EMAIL","SLACK","TEAMS"]},"emails":{"type":"array","items":{"type":"string","format":"email"}},"slackChannelId":{"type":"string","nullable":true},"teamsChannelId":{"type":"string","nullable":true},"description":{"type":"string"},"access":{"type":"object","properties":{"organizationRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"teamGrants":{"type":"array","items":{"type":"object","properties":{"teamId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]}},"required":["teamId","name","role"]}},"callerRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"capabilities":{"type":"object","properties":{"canView":{"type":"boolean"},"canEdit":{"type":"boolean"},"canManage":{"type":"boolean"}},"required":["canView","canEdit","canManage"]}},"required":["organizationRole","teamGrants","callerRole","capabilities"]},"thresholds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costAlertId":{"type":"string","nullable":true},"budgetAlertId":{"type":"string","nullable":true},"value":{"type":"number"},"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"metricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"changeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]}},"required":["id","costAlertId","budgetAlertId","value","severityLevel","metricMode","changeBasis"]}}},"required":["id","organizationId","createdAt","updatedAt","createdById","createdBy","type","teamId","tags","archivedAt","scopeId","urlState","name","currency","queryName","queries","evaluationPeriod","thresholdType","snoozedUntil","condition","conditionAdvancedExplorerQuery","dedupKind","dedupCalendarUnit","dedupWindowDays","dedupResetAt","notificationChannel","emails","slackChannelId","teamsChannelId","description","access","thresholds"]},"CostAlertHistory":{"type":"array","items":{"type":"object","properties":{"effectiveDate":{"type":"string","nullable":true,"format":"date-time"},"computedAt":{"type":"string","nullable":true,"format":"date-time"},"notifiedAt":{"type":"string","nullable":true,"format":"date-time"},"state":{"type":"string","enum":["fired","notified"]},"valueTriggered":{"type":"number"},"configuration":{"type":"string","enum":["current","previous"]},"groups":{"type":"array","items":{"type":"object","properties":{"groupByValue":{"type":"string","nullable":true},"value":{"type":"number"},"explanation":{"type":"object","properties":{"combinator":{"type":"string","enum":["and","or","single"]},"terms":{"type":"array","items":{}}},"required":["combinator","terms"]},"queryName":{"type":"string"},"resolvedLabel":{"type":"string"},"state":{"type":"string","enum":["fired","notified"]}},"required":["groupByValue","value","state"]}}},"required":["effectiveDate","computedAt","notifiedAt","state","valueTriggered","configuration","groups"]}},"CostAlertConfigurationFormData":{"type":"object","properties":{"availableSlackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isDirectMessage":{"type":"boolean"}},"required":["id","name"]}},"availableTeamsChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isDirectMessage":{"type":"boolean"}},"required":["id","name"]}},"availableEmailRecipients":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"}},"required":["email","name"]}}},"required":["availableSlackChannels","availableTeamsChannels","availableEmailRecipients"]},"BudgetAlert":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"createdById":{"type":"string"},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"snoozedUntil":{"type":"string","nullable":true,"format":"date-time"},"name":{"type":"string"},"selectedVirtualDimensionValues":{"type":"array","items":{"type":"string"}},"notificationChannel":{"type":"string","enum":["EMAIL","SLACK","TEAMS"]},"emails":{"type":"array","items":{"type":"string","format":"email"}},"shouldNotifyLineOwners":{"type":"boolean"},"slackChannelId":{"type":"string","nullable":true},"teamsChannelId":{"type":"string","nullable":true},"conditionType":{"type":"string","enum":["ACTUAL_SPEND","FORECASTED_EOM"]},"parentBudgetId":{"type":"string"}},"required":["id","organizationId","createdAt","createdById","archivedAt","snoozedUntil","name","selectedVirtualDimensionValues","notificationChannel","emails","shouldNotifyLineOwners","slackChannelId","teamsChannelId","conditionType","parentBudgetId"]},"BudgetAlertsTableData":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"createdById":{"type":"string"},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"snoozedUntil":{"type":"string","nullable":true,"format":"date-time"},"name":{"type":"string"},"selectedVirtualDimensionValues":{"type":"array","items":{"type":"string"}},"notificationChannel":{"type":"string","enum":["EMAIL","SLACK","TEAMS"]},"emails":{"type":"array","items":{"type":"string","format":"email"}},"shouldNotifyLineOwners":{"type":"boolean"},"slackChannelId":{"type":"string","nullable":true},"teamsChannelId":{"type":"string","nullable":true},"conditionType":{"type":"string","enum":["ACTUAL_SPEND","FORECASTED_EOM"]},"parentBudgetId":{"type":"string"},"thresholds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costAlertId":{"type":"string","nullable":true},"budgetAlertId":{"type":"string","nullable":true},"value":{"type":"number"},"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"metricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"changeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]}},"required":["id","costAlertId","budgetAlertId","value","severityLevel","metricMode","changeBasis"]}},"computationResults":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"budgetAlertId":{"type":"string"},"value":{"type":"number"},"reachedSeverityLevel":{"type":"string","nullable":true,"enum":["INFO","WARNING","RED",null]},"virtualDimensionValue":{"type":"string"},"effectiveDate":{"type":"string","nullable":true,"format":"date-time"},"computedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","budgetAlertId","value","reachedSeverityLevel","virtualDimensionValue","effectiveDate","computedAt"]}},"status":{"type":"string","enum":["ACTIVE","SNOOZED","ARCHIVED"]},"severityLevel":{"type":"string","nullable":true,"enum":["INFO","WARNING","RED",null]}},"required":["id","organizationId","createdAt","createdById","archivedAt","snoozedUntil","name","selectedVirtualDimensionValues","notificationChannel","emails","shouldNotifyLineOwners","slackChannelId","teamsChannelId","conditionType","parentBudgetId","thresholds","computationResults","status","severityLevel"]}},"BudgetAlertConfigurationFormData":{"type":"object","properties":{"availableSlackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isDirectMessage":{"type":"boolean"}},"required":["id","name"]}},"availableTeamsChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isDirectMessage":{"type":"boolean"}},"required":["id","name"]}},"availableMailRecipients":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"}},"required":["email","name"]}}},"required":["availableSlackChannels","availableTeamsChannels","availableMailRecipients"]},"CostBudgetAlertsTableData":{"type":"object","properties":{"costAlerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"},"createdById":{"type":"string"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"],"additionalProperties":false},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"teamId":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"scopeId":{"type":"string","nullable":true},"urlState":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"queryName":{"type":"string"},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"evaluationPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY"]},"thresholdType":{"type":"string","enum":["ABOVE","UNDER"]},"snoozedUntil":{"type":"string","nullable":true,"format":"date-time"},"condition":{"type":"string","nullable":true},"conditionAdvancedExplorerQuery":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"dedupKind":{"type":"string","nullable":true,"enum":["CALENDAR","ROLLING",null]},"dedupCalendarUnit":{"type":"string","nullable":true,"enum":["WEEK","MONTH",null]},"dedupWindowDays":{"type":"integer","nullable":true},"dedupResetAt":{"type":"string","nullable":true,"format":"date-time"},"notificationChannel":{"type":"string","enum":["EMAIL","SLACK","TEAMS"]},"emails":{"type":"array","items":{"type":"string","format":"email"}},"slackChannelId":{"type":"string","nullable":true},"teamsChannelId":{"type":"string","nullable":true},"description":{"type":"string"},"access":{"type":"object","properties":{"organizationRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"teamGrants":{"type":"array","items":{"type":"object","properties":{"teamId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]}},"required":["teamId","name","role"]}},"callerRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"capabilities":{"type":"object","properties":{"canView":{"type":"boolean"},"canEdit":{"type":"boolean"},"canManage":{"type":"boolean"}},"required":["canView","canEdit","canManage"]}},"required":["organizationRole","teamGrants","callerRole","capabilities"]},"thresholds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costAlertId":{"type":"string","nullable":true},"budgetAlertId":{"type":"string","nullable":true},"value":{"type":"number"},"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"metricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"changeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]}},"required":["id","costAlertId","budgetAlertId","value","severityLevel","metricMode","changeBasis"]}},"computationResults":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costAlertId":{"type":"string"},"value":{"type":"number"},"reachedSeverityLevel":{"type":"string","nullable":true,"enum":["INFO","WARNING","RED",null]},"effectiveDate":{"type":"string","nullable":true,"format":"date-time"},"computedAt":{"type":"string","nullable":true,"format":"date-time"},"valueMetricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"valueChangeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]},"selectedPeriodValue":{"type":"number","nullable":true},"comparisonPeriodValue":{"type":"number","nullable":true},"groupByValue":{"type":"string","nullable":true},"notifiedAt":{"type":"string","nullable":true,"format":"date-time"},"notificationState":{"type":"string","nullable":true,"enum":["NOTIFIED","FIRED",null]}},"required":["id","costAlertId","value","reachedSeverityLevel","effectiveDate","computedAt","valueMetricMode","valueChangeBasis","selectedPeriodValue","comparisonPeriodValue","groupByValue","notifiedAt","notificationState"]}},"messageExecutions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costAlertId":{"type":"string"},"status":{"type":"string","enum":["PENDING","SUCCESS","FAILED"]},"scheduledFor":{"type":"string","nullable":true,"format":"date-time"},"sentAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","costAlertId","status","scheduledFor","sentAt"]}},"status":{"type":"string","enum":["ACTIVE","SNOOZED","ARCHIVED"]},"severityLevel":{"type":"string","nullable":true,"enum":["INFO","WARNING","RED",null]}},"required":["id","organizationId","createdAt","updatedAt","createdById","createdBy","type","teamId","tags","archivedAt","scopeId","urlState","name","currency","queryName","queries","evaluationPeriod","thresholdType","snoozedUntil","condition","conditionAdvancedExplorerQuery","dedupKind","dedupCalendarUnit","dedupWindowDays","dedupResetAt","notificationChannel","emails","slackChannelId","teamsChannelId","description","access","thresholds","computationResults","messageExecutions","status","severityLevel"]}},"budgetAlerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"createdById":{"type":"string"},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"snoozedUntil":{"type":"string","nullable":true,"format":"date-time"},"name":{"type":"string"},"selectedVirtualDimensionValues":{"type":"array","items":{"type":"string"}},"notificationChannel":{"type":"string","enum":["EMAIL","SLACK","TEAMS"]},"emails":{"type":"array","items":{"type":"string","format":"email"}},"shouldNotifyLineOwners":{"type":"boolean"},"slackChannelId":{"type":"string","nullable":true},"teamsChannelId":{"type":"string","nullable":true},"conditionType":{"type":"string","enum":["ACTUAL_SPEND","FORECASTED_EOM"]},"parentBudgetId":{"type":"string"},"thresholds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"costAlertId":{"type":"string","nullable":true},"budgetAlertId":{"type":"string","nullable":true},"value":{"type":"number"},"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"metricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"changeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]}},"required":["id","costAlertId","budgetAlertId","value","severityLevel","metricMode","changeBasis"]}},"computationResults":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"budgetAlertId":{"type":"string"},"value":{"type":"number"},"reachedSeverityLevel":{"type":"string","nullable":true,"enum":["INFO","WARNING","RED",null]},"virtualDimensionValue":{"type":"string"},"effectiveDate":{"type":"string","nullable":true,"format":"date-time"},"computedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","budgetAlertId","value","reachedSeverityLevel","virtualDimensionValue","effectiveDate","computedAt"]}},"status":{"type":"string","enum":["ACTIVE","SNOOZED","ARCHIVED"]},"severityLevel":{"type":"string","nullable":true,"enum":["INFO","WARNING","RED",null]}},"required":["id","organizationId","createdAt","createdById","archivedAt","snoozedUntil","name","selectedVirtualDimensionValues","notificationChannel","emails","shouldNotifyLineOwners","slackChannelId","teamsChannelId","conditionType","parentBudgetId","thresholds","computationResults","status","severityLevel"]}}},"required":["costAlerts","budgetAlerts"]},"AlertTemplatesResponse":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["weekly-costs-threshold","unused-reservation-cost","kubernetes-waste","aws-savings-plan-coverage","marginal-cost","rd-weekend-cost","egress-costs","untagged-resources","rolling-7d-relative-change","service-7d-cost-increase","never-seen-sku"]},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["COST","BUDGET"]},"icon":{"type":"string"},"available":{"type":"boolean"},"unavailableReason":{"type":"string","enum":["MISSING_DATASOURCE","MISSING_METRIC","FEATURE_NOT_AVAILABLE","MISSING_LABEL","MISSING_COLUMN"]},"unavailableTooltip":{"type":"string"},"config":{"type":"object","properties":{"alertForm":{"type":"object","properties":{"name":{"type":"string","minLength":1},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"thresholds":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"metricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"changeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]}},"required":["value","severityLevel"]},"default":[]},"queryName":{"type":"string","default":""},"evaluationPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY"],"default":"DAILY"},"thresholdType":{"type":"string","enum":["ABOVE","UNDER"],"default":"ABOVE"},"description":{"type":"string","default":""},"tagIds":{"type":"array","items":{"type":"string"},"default":[]},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"teamId":{"type":"string","nullable":true},"scout":{"type":"string","nullable":true,"minLength":1},"scopeId":{"type":"string","nullable":true},"condition":{"type":"string","nullable":true},"dedup":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["CALENDAR"]},"calendarUnit":{"type":"string","enum":["WEEK","MONTH"]}},"required":["kind","calendarUnit"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ROLLING"]},"windowDays":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["kind","windowDays"]},{"nullable":true,"type":"string","enum":[null]}]},"messageWidgets":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type","topN","flopN"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]}],"discriminator":{"propertyName":"type"}}]}}},"required":["name","currency"]},"explorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"]}},"required":["alertForm","explorerRequest"]}},"required":["id","name","description","type","icon","available"]}}},"required":["templates"]},"AlertTemplateResponse":{"type":"object","nullable":true,"properties":{"id":{"type":"string","enum":["weekly-costs-threshold","unused-reservation-cost","kubernetes-waste","aws-savings-plan-coverage","marginal-cost","rd-weekend-cost","egress-costs","untagged-resources","rolling-7d-relative-change","service-7d-cost-increase","never-seen-sku"]},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["COST","BUDGET"]},"icon":{"type":"string"},"available":{"type":"boolean"},"unavailableReason":{"type":"string","enum":["MISSING_DATASOURCE","MISSING_METRIC","FEATURE_NOT_AVAILABLE","MISSING_LABEL","MISSING_COLUMN"]},"unavailableTooltip":{"type":"string"},"config":{"type":"object","properties":{"alertForm":{"type":"object","properties":{"name":{"type":"string","minLength":1},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"thresholds":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"metricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"changeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]}},"required":["value","severityLevel"]},"default":[]},"queryName":{"type":"string","default":""},"evaluationPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY"],"default":"DAILY"},"thresholdType":{"type":"string","enum":["ABOVE","UNDER"],"default":"ABOVE"},"description":{"type":"string","default":""},"tagIds":{"type":"array","items":{"type":"string"},"default":[]},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"teamId":{"type":"string","nullable":true},"scout":{"type":"string","nullable":true,"minLength":1},"scopeId":{"type":"string","nullable":true},"condition":{"type":"string","nullable":true},"dedup":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["CALENDAR"]},"calendarUnit":{"type":"string","enum":["WEEK","MONTH"]}},"required":["kind","calendarUnit"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ROLLING"]},"windowDays":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["kind","windowDays"]},{"nullable":true,"type":"string","enum":[null]}]},"messageWidgets":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type","topN","flopN"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]}],"discriminator":{"propertyName":"type"}}]}}},"required":["name","currency"]},"explorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"]}},"required":["alertForm","explorerRequest"]}},"required":["id","name","description","type","icon","available"]},"BudgetsWithAlertStatus":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"virtualDimensionName":{"type":"string"},"hasAlert":{"type":"boolean"},"canEdit":{"type":"boolean"}},"required":["id","name","virtualDimensionName","hasAlert","canEdit"]}},"AlertTestSuccess":{"type":"object","properties":{"message":{"type":"string","enum":["Test notification sent successfully"]}},"required":["message"]},"AlertError":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"Dimension":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"valueEditorType":{"type":"string","enum":["multiselect"]},"values":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"proportionCostAllocated":{"type":"number"}},"required":["name","label","proportionCostAllocated"]}},"operators":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"label":{"type":"string"}},"required":["name","value","label"]}},"groupTitle":{"type":"string"}},"required":["name","label","valueEditorType","values","operators","groupTitle"]},"DimensionCandidate":{"type":"object","properties":{"usage_start_day":{"type":"string","nullable":true,"format":"date-time"},"key":{"type":"string"},"number_values":{"type":"number","nullable":true},"values":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"cost_allocated":{"type":"number"},"proportion_cost_allocated":{"type":"number"}},"required":["value","cost_allocated"]}},"total_cost_key_present":{"type":"number"},"proportion_key_present":{"type":"number"},"total_cost_key_absent":{"type":"number","nullable":true},"proportion_key_absent":{"type":"number"},"providers":{"type":"array","items":{"type":"string"}},"months":{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"number","nullable":true},{"type":"string","nullable":true,"format":"date-time"},{"nullable":true,"type":"string","enum":[null]}]}},"default":[]},"cost_percentage_change":{"type":"number","nullable":true},"ingested":{"type":"boolean"},"id":{"type":"string"}},"required":["usage_start_day","key","number_values","values","total_cost_key_present","total_cost_key_absent","id"]},"PublishedDimensionLabels":{"type":"object","properties":{"transformations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,299}$"},"columnsMerged":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["label","focus"]},"ingested":{"type":"boolean"}},"required":["name","type"]}},"maps":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"to":{"type":"string"}},"required":["value","to"]}},"category":{"type":"string","enum":["environment","boolean_flag","team","cost_significant"]}},"required":["name","columnsMerged","maps"]}},"computeByName":{"type":"object","additionalProperties":{"type":"object","properties":{"computeStatus":{"type":"string","enum":["LIVE","PARTIAL","DRAFT","TO_REFRESH","REFRESHING"]},"recomputedFromDate":{"type":"string","nullable":true}},"required":["computeStatus"]}}},"required":["transformations","computeByName"]},"PublishDimensionsSuccess":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"publishedLabels":{"type":"boolean"},"publishedVdimIds":{"type":"array","items":{"type":"string"}},"publishedEnrichments":{"type":"boolean"},"unpublished":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["label"]},"errors":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["label"]},"message":{"type":"string"}},"required":["kind","message"]},{"type":"object","properties":{"kind":{"type":"string","enum":["vdim"]},"vdimId":{"type":"string"},"vdimName":{"type":"string"},"message":{"type":"string"}},"required":["kind","vdimId","vdimName","message"]},{"type":"object","properties":{"kind":{"type":"string","enum":["cycle"]},"cycle":{"type":"array","items":{"type":"string"},"minItems":2},"message":{"type":"string"}},"required":["kind","cycle","message"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enrichment"]},"message":{"type":"string"}},"required":["kind","message"]}],"discriminator":{"propertyName":"kind"}}}},"required":["kind","errors"]},{"type":"object","properties":{"kind":{"type":"string","enum":["vdim"]},"vdimId":{"type":"string"},"vdimName":{"type":"string"},"errors":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["label"]},"message":{"type":"string"}},"required":["kind","message"]},{"type":"object","properties":{"kind":{"type":"string","enum":["vdim"]},"vdimId":{"type":"string"},"vdimName":{"type":"string"},"message":{"type":"string"}},"required":["kind","vdimId","vdimName","message"]},{"type":"object","properties":{"kind":{"type":"string","enum":["cycle"]},"cycle":{"type":"array","items":{"type":"string"},"minItems":2},"message":{"type":"string"}},"required":["kind","cycle","message"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enrichment"]},"message":{"type":"string"}},"required":["kind","message"]}],"discriminator":{"propertyName":"kind"}}}},"required":["kind","vdimId","vdimName","errors"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enrichment"]},"errors":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["label"]},"message":{"type":"string"}},"required":["kind","message"]},{"type":"object","properties":{"kind":{"type":"string","enum":["vdim"]},"vdimId":{"type":"string"},"vdimName":{"type":"string"},"message":{"type":"string"}},"required":["kind","vdimId","vdimName","message"]},{"type":"object","properties":{"kind":{"type":"string","enum":["cycle"]},"cycle":{"type":"array","items":{"type":"string"},"minItems":2},"message":{"type":"string"}},"required":["kind","cycle","message"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enrichment"]},"message":{"type":"string"}},"required":["kind","message"]}],"discriminator":{"propertyName":"kind"}}}},"required":["kind","errors"]}],"discriminator":{"propertyName":"kind"}}}},"required":["ok","publishedLabels","publishedVdimIds","publishedEnrichments","unpublished"]},"PublishDimensionsFailure":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"errors":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["label"]},"message":{"type":"string"}},"required":["kind","message"]},{"type":"object","properties":{"kind":{"type":"string","enum":["vdim"]},"vdimId":{"type":"string"},"vdimName":{"type":"string"},"message":{"type":"string"}},"required":["kind","vdimId","vdimName","message"]},{"type":"object","properties":{"kind":{"type":"string","enum":["cycle"]},"cycle":{"type":"array","items":{"type":"string"},"minItems":2},"message":{"type":"string"}},"required":["kind","cycle","message"]},{"type":"object","properties":{"kind":{"type":"string","enum":["enrichment"]},"message":{"type":"string"}},"required":["kind","message"]}],"discriminator":{"propertyName":"kind"}}}},"required":["ok","errors"]},"DimensionsAdminRequired":{"type":"object","properties":{"error":{"type":"string","enum":["ADMIN_REQUIRED"]}},"required":["error"]},"UsageMetric":{"type":"object","properties":{"consumed_unit":{"type":"string"},"service_names":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","enum":["unit","column"],"default":"unit"},"label":{"type":"string"},"unit":{"type":"string"}},"required":["consumed_unit"]},"EnrichmentMetricThen":{"type":"object","properties":{"integrationId":{"type":"string","description":"Active BigQuery integration of this organization."},"metric":{"type":"object","properties":{"table":{"type":"string","description":"BigQuery table as project.dataset.table."},"dateColumn":{"type":"string"},"metricColumn":{"type":"string"}},"required":["table","dateColumn","metricColumn"]},"propagates":{"type":"array","items":{"type":"string"},"description":"Target columns filled from the metric table."},"static":{"type":"object","additionalProperties":{"type":"string"},"description":"Constant target columns stamped on every share, including a null-hit day."}},"required":["integrationId","metric","propagates"],"description":"Split the billed row by a daily BigQuery measure instead of static weights."},"EnrichmentDocument":{"type":"object","properties":{"name":{"type":"string","description":"Must match the name in the URL."},"description":{"type":"string"},"keyField":{"type":"string","description":"Billing column whose value selects an entry."},"priority":{"type":"integer","minimum":0},"conditions":{"type":"string","description":"CEL expression. Every field is `input.` plus one SQL identifier. Omitted when unset."},"targetColumns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"mode":{"type":"string","enum":["replace","merge"]}},"required":["name","mode"]}},"entries":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Value of `keyField` this entry matches."},"when":{"type":"object","properties":{"start":{"type":"string","description":"Inclusive start, YYYY-MM-DD."},"end":{"type":"string","description":"Inclusive end, YYYY-MM-DD."}},"description":"Optional date window. Set start, end, or both."},"then":{"anyOf":[{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true,"type":"string","enum":[null]}]},"description":"Column values this entry writes. `weight` is the share of the billed row and defaults to 1."},{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"nullable":true,"type":"string","enum":[null]}]},"description":"Column values this entry writes. `weight` is the share of the billed row and defaults to 1."}},{"$ref":"#/components/schemas/EnrichmentMetricThen"}],"description":"One allocation, several when the entry splits the cost, or a metric then."}},"required":["key","then"]}}},"required":["name","keyField","priority","targetColumns","entries"]},"EnrichmentSummary":{"type":"object","properties":{"id":{"type":"string","description":"`draft:<name>` on a drafted document."},"name":{"type":"string"},"description":{"type":"string"},"ruleCount":{"type":"integer"},"keyField":{"type":"string"},"targetColumns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"computeStatus":{"type":"string","enum":["LIVE","PARTIAL","DRAFT","TO_REFRESH","REFRESHING"],"description":"Live mapping vs billing. Omitted on draft documents."},"recomputedFromDate":{"type":"string","nullable":true,"description":"Earliest month (YYYY-MM-DD) recomputed for the live version. When > 2021-01-01, the mapping is partial and will be fully refreshed on the next daily run."}},"required":["id","name","description","ruleCount","keyField","targetColumns"]},"EnrichmentChanges":{"type":"object","properties":{"added":{"type":"array","items":{"type":"string"}},"changed":{"type":"array","items":{"type":"string"}},"removed":{"type":"array","items":{"type":"string"}}},"required":["added","changed","removed"]},"EnrichmentDraftSummary":{"type":"object","properties":{"updatedAt":{"type":"string","description":"ISO-8601 time of the latest draft write."},"changes":{"$ref":"#/components/schemas/EnrichmentChanges"},"errors":{"type":"array","items":{"type":"string"},"description":"Why the pending set would not publish. Empty when it compiles."},"documents":{"type":"array","items":{"$ref":"#/components/schemas/EnrichmentSummary"},"description":"Added and changed documents as drafted."}},"required":["updatedAt","changes","errors","documents"]},"EnrichmentDraftWriteResponse":{"type":"object","properties":{"change":{"type":"string","enum":["added","changed","removed","unchanged"]}},"required":["change"]},"EnrichmentPublishResponse":{"type":"object","properties":{"changes":{"$ref":"#/components/schemas/EnrichmentChanges"},"workflowStarted":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["unknown"]}],"description":"`false`: the update did not start and a retry is safe. `true`: it started. `unknown`: the start call threw after the run may have been accepted."},"workflowError":{"type":"string"}},"required":["changes","workflowStarted"]},"EnrichmentTraceInputs":{"type":"object","properties":{"published":{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"keys":{"type":"array","items":{"type":"string"},"description":"Entry keys of the mappings keyed on this column. Empty for a condition column."}},"required":["column","keys"]}},"draft":{"type":"array","nullable":true,"items":{"type":"object","properties":{"column":{"type":"string"},"keys":{"type":"array","items":{"type":"string"},"description":"Entry keys of the mappings keyed on this column. Empty for a condition column."}},"required":["column","keys"]},"description":"Null when there are no drafts."}},"required":["published","draft"]},"EnrichmentExplainResponse":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"mapping":{"type":"string"},"keyField":{"type":"string"},"key":{"type":"string","nullable":true},"hit":{"type":"boolean"},"reason":{"type":"string","enum":["no key","no entry","condition false","unsupported condition"],"description":"Why a mapping did not hit."},"allocations":{"type":"array","items":{"type":"object","properties":{"weight":{"type":"number"},"values":{"type":"object","additionalProperties":{"type":"string","nullable":true}}},"required":["weight","values"]}},"metric":{"type":"object","properties":{"table":{"type":"string"},"dateColumn":{"type":"string"},"metricColumn":{"type":"string"},"propagates":{"type":"array","items":{"type":"string"}}},"required":["table","dateColumn","metricColumn","propagates"],"description":"Present on a metric hit. Allocations are empty."}},"required":["mapping","keyField","key","hit","allocations"]}},"rows":{"type":"array","items":{"type":"object","properties":{"weight":{"type":"number"},"values":{"type":"object","additionalProperties":{"type":"string","nullable":true}}},"required":["weight","values"]},"description":"The rows the billed row becomes. Weights sum to 1."},"warnings":{"type":"array","items":{"type":"string"}},"published":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"mapping":{"type":"string"},"keyField":{"type":"string"},"key":{"type":"string","nullable":true},"hit":{"type":"boolean"},"reason":{"type":"string","enum":["no key","no entry","condition false","unsupported condition"],"description":"Why a mapping did not hit."},"allocations":{"type":"array","items":{"type":"object","properties":{"weight":{"type":"number"},"values":{"type":"object","additionalProperties":{"type":"string","nullable":true}}},"required":["weight","values"]}},"metric":{"type":"object","properties":{"table":{"type":"string"},"dateColumn":{"type":"string"},"metricColumn":{"type":"string"},"propagates":{"type":"array","items":{"type":"string"}}},"required":["table","dateColumn","metricColumn","propagates"],"description":"Present on a metric hit. Allocations are empty."}},"required":["mapping","keyField","key","hit","allocations"]}},"rows":{"type":"array","items":{"type":"object","properties":{"weight":{"type":"number"},"values":{"type":"object","additionalProperties":{"type":"string","nullable":true}}},"required":["weight","values"]},"description":"The rows the billed row becomes. Weights sum to 1."},"warnings":{"type":"array","items":{"type":"string"}}},"required":["steps","rows","warnings"],"description":"Trace of the published set alone. Present when drafts exist."}},"required":["steps","rows","warnings"]},"EnrichmentErrors":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}},"required":["errors"]},"DashboardIdCreated":{"type":"object","properties":{"dashboardId":{"type":"string"}},"required":["dashboardId"]},"DashboardError":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"DigestCostTreeNode":{"type":"object","properties":{"childs":{"type":"array","items":{"$ref":"#/components/schemas/DigestCostTreeNode"}},"label":{"type":"string"},"previousCost":{"type":"number"},"cost":{"type":"number"},"key":{"type":"string"},"value":{"type":"string"},"childrenDimensionLabel":{"type":"string"},"nodeId":{"type":"string"}},"required":["childs","label","previousCost","cost"]},"ReportDetailResponse":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["PRIVATE","PUBLIC","TEMPLATE"]},"teamId":{"type":"string","nullable":true},"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]},"scopeId":{"type":"string","nullable":true},"scheduledPeriod":{"type":"string","nullable":true,"enum":["DAILY","WEEKDAYS","WEEKLY","MONTHLY",null]},"scheduledWeekday":{"type":"integer","nullable":true},"scheduledFirstRunAt":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string","enum":["ACTIVE","INACTIVE"]},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"lastRunAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdById":{"type":"string"},"updatedById":{"type":"string","nullable":true},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"],"additionalProperties":false},"updatedBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"],"additionalProperties":false},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"widgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"reportId":{"type":"string"},"type":{"type":"string","enum":["TOP_FLOP","GRAPH_SNAPSHOT","DASHBOARD_PDF","DIGEST","TEXT","ALERT","DIVIDER"]},"title":{"type":"string"},"description":{"type":"string"},"position":{"type":"integer"},"parameters":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","topN","flopN","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIGEST"],"description":"Cost-change breakdown as a tree, table, or LLM summary of the biggest movers."},"display":{"type":"string","enum":["tree","table","summary"],"default":"tree","description":"How the digest renders: 'tree' (default hierarchy), flat 'table', or an LLM-written 'summary'."},"showValue":{"type":"boolean","default":true,"description":"Show the absolute cost value on each row."},"showRelativeDelta":{"type":"boolean","default":true,"description":"Show the percentage change on each row."},"showDelta":{"type":"boolean","default":true,"description":"Show the absolute change on each row."},"topLargestAbsoluteChange":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many of the largest-absolute-change nodes to surface (integer 1–100). Applied at every tree level."},"minAbsoluteDiff":{"type":"number","minimum":0,"default":100,"description":"Hide nodes whose absolute change is below this threshold."},"minRelativeDiff":{"type":"number","minimum":0,"default":5,"description":"Hide nodes whose percentage change is below this threshold (percent)."},"additionalGroupBy":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Extra group-by dimensions applied after the report context `groupBy`, in order — each adds a deeper level to the tree."},"useDashboardGroupBy":{"type":"boolean","description":"Use the report (dashboard) context `groupBy` as this widget's root group-by (default true). Set false to override: the report context group-by is ignored for this widget and the first `additionalGroupBy` item (or the widget cost query `groupBy`) becomes the root. `false` requires at least one group-by dimension."},"enableAiInvestigation":{"type":"boolean","default":false,"description":"When true, the run's deepest-leaf nodes trigger an async AI investigation (`analysis_agent_run`) and the report waits for its callback before sending. Delivery is not immediate."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIVIDER"],"description":"Slack thread cut: widgets above post in the channel, widgets below post as replies. Ignored for email and Teams. At most one per report."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"],"additionalProperties":false}],"description":"One message widget. The `type` field selects the shape: ALERT | TOP_FLOP | GRAPH_SNAPSHOT | DASHBOARD_PDF | DIGEST | TEXT | DIVIDER. All fields other than `type` depend on the chosen type.","discriminator":{"propertyName":"type"}}},"required":["id","createdAt","updatedAt","reportId","type","title","description","position","parameters"],"additionalProperties":false}},"destinations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"reportId":{"type":"string"},"organizationId":{"type":"string"},"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]},"scopeId":{"type":"string","nullable":true},"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"]},"destinationValues":{"type":"array","items":{"type":"string"}}},"required":["id","createdAt","updatedAt","archivedAt","reportId","organizationId","metricId","groupBy","datePreset","startDate","endDate","conditions","currency","scopeId","destinationType","destinationValues"],"additionalProperties":false}},"access":{"type":"object","properties":{"organizationRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"teamGrants":{"type":"array","items":{"type":"object","properties":{"teamId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]}},"required":["teamId","name","role"]}},"callerRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"capabilities":{"type":"object","properties":{"canView":{"type":"boolean"},"canEdit":{"type":"boolean"},"canManage":{"type":"boolean"}},"required":["canView","canEdit","canManage"]}},"required":["organizationRole","teamGrants","callerRole","capabilities"]},"nextRunDate":{"type":"string","nullable":true,"format":"date-time"},"destinationCounts":{"type":"object","properties":{"SLACK":{"type":"integer","minimum":0},"EMAIL":{"type":"integer","minimum":0},"TEAMS":{"type":"integer","minimum":0}}},"lastRunHealth":{"type":"string","enum":["OK","FAILED","PARTIAL","IN_PROGRESS","NEVER_RUN"]},"recentRuns":{"type":"array","items":{"type":"object","properties":{"scheduledFor":{"type":"string","format":"date-time"},"outcome":{"type":"string","enum":["OK","FAILED","PARTIAL","IN_PROGRESS","NEVER_RUN"]},"destinations":{"type":"array","items":{"type":"object","properties":{"executionId":{"type":"string"},"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"]},"destinationValues":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["PENDING","SUCCESS","FAILED"]},"sentAt":{"type":"string","nullable":true,"format":"date-time"},"errorMessage":{"type":"string","nullable":true}},"required":["executionId","destinationType","destinationValues","status","sentAt","errorMessage"],"additionalProperties":false}}},"required":["scheduledFor","outcome","destinations"],"additionalProperties":false}},"executions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"reportId":{"type":"string"},"destinationId":{"type":"string"},"scheduledFor":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["PENDING","SUCCESS","FAILED"]},"startedAt":{"type":"string","nullable":true,"format":"date-time"},"finishedAt":{"type":"string","nullable":true,"format":"date-time"},"sentAt":{"type":"string","nullable":true,"format":"date-time"},"errorMessage":{"type":"string","nullable":true},"widgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"executionId":{"type":"string"},"reportWidgetId":{"type":"string","nullable":true},"type":{"type":"string","enum":["TOP_FLOP","GRAPH_SNAPSHOT","DASHBOARD_PDF","DIGEST","TEXT","ALERT","DIVIDER"]},"status":{"type":"string","enum":["PENDING","SUCCESS","FAILED"]},"resolvedParameters":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","topN","flopN","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIGEST"],"description":"Cost-change breakdown as a tree, table, or LLM summary of the biggest movers."},"display":{"type":"string","enum":["tree","table","summary"],"default":"tree","description":"How the digest renders: 'tree' (default hierarchy), flat 'table', or an LLM-written 'summary'."},"showValue":{"type":"boolean","default":true,"description":"Show the absolute cost value on each row."},"showRelativeDelta":{"type":"boolean","default":true,"description":"Show the percentage change on each row."},"showDelta":{"type":"boolean","default":true,"description":"Show the absolute change on each row."},"topLargestAbsoluteChange":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many of the largest-absolute-change nodes to surface (integer 1–100). Applied at every tree level."},"minAbsoluteDiff":{"type":"number","minimum":0,"default":100,"description":"Hide nodes whose absolute change is below this threshold."},"minRelativeDiff":{"type":"number","minimum":0,"default":5,"description":"Hide nodes whose percentage change is below this threshold (percent)."},"additionalGroupBy":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Extra group-by dimensions applied after the report context `groupBy`, in order — each adds a deeper level to the tree."},"useDashboardGroupBy":{"type":"boolean","description":"Use the report (dashboard) context `groupBy` as this widget's root group-by (default true). Set false to override: the report context group-by is ignored for this widget and the first `additionalGroupBy` item (or the widget cost query `groupBy`) becomes the root. `false` requires at least one group-by dimension."},"enableAiInvestigation":{"type":"boolean","default":false,"description":"When true, the run's deepest-leaf nodes trigger an async AI investigation (`analysis_agent_run`) and the report waits for its callback before sending. Delivery is not immediate."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIVIDER"],"description":"Slack thread cut: widgets above post in the channel, widgets below post as replies. Ignored for email and Teams. At most one per report."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"],"additionalProperties":false}],"description":"One message widget. The `type` field selects the shape: ALERT | TOP_FLOP | GRAPH_SNAPSHOT | DASHBOARD_PDF | DIGEST | TEXT | DIVIDER. All fields other than `type` depend on the chosen type.","discriminator":{"propertyName":"type"}},"result":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"]},"comparisonPeriodSummary":{"type":"string"},"top":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"number"},"variation":{"type":"number"},"difference":{"type":"number"}},"required":["name","value","variation"],"additionalProperties":false}},"flop":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"number"},"variation":{"type":"number"},"difference":{"type":"number"}},"required":["name","value","variation"],"additionalProperties":false}},"explorerUrl":{"type":"string"}},"required":["type","top","flop"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"]},"imageUrl":{"type":"string"},"data":{"type":"object","properties":{"outputData":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","nullable":true,"format":"date-time"},"values":{"type":"array","items":{"type":"object","properties":{"groupByValue":{"type":"string"},"queryName":{"type":"string"},"value":{"type":"number"},"yhatLower":{"type":"number"},"yhatUpper":{"type":"number"}},"required":["groupByValue","queryName","value"]}}},"required":["date","values"]}},"series":{"type":"array","items":{"type":"object","properties":{"queryName":{"type":"string"},"groupByValue":{"type":"string"},"totals":{"type":"number"},"unit":{"type":"string"}},"required":["queryName","groupByValue","totals","unit"]}},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"splitDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"forecastSkipReason":{"type":"string","enum":["not_enough_history"]}},"required":["outputData","series","aggBy"]},"explorerUrl":{"type":"string"}},"required":["type","imageUrl","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"]},"pdfUrl":{"type":"string","minLength":1}},"required":["type","pdfUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DIGEST"]},"comparisonPeriodSummary":{"type":"string"},"tree":{"type":"array","items":{"$ref":"#/components/schemas/DigestCostTreeNode"}},"summaryMarkdown":{"type":"string"},"explorerUrl":{"type":"string"},"investigations":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["PENDING"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["SUCCESS"]},"output":{"type":"object","properties":{"summary":{"type":"string"},"methodology":{"type":"string"}},"required":["summary"]}},"required":["status","output"]},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"error":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}}},"required":["status"]}]}}},"required":["type","tree"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"]},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000}},"required":["type","contentMarkdown"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"]},"dateText":{"type":"string"},"conditionText":{"type":"string"},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"valueUnit":{"type":"string"},"amountColumnHeader":{"type":"string"},"amountCaption":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"groupByValue":{"type":"string"},"triggeredValue":{"type":"number"},"costValue":{"type":"number","nullable":true},"explorerUrl":{"type":"string"}},"required":["groupByValue","triggeredValue","costValue"],"additionalProperties":false}},"truncatedCount":{"type":"integer","minimum":0},"exploreAllUrl":{"type":"string"}},"required":["type","dateText","conditionText","currency","valueUnit","amountColumnHeader","amountCaption","groups","truncatedCount","exploreAllUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DIVIDER"]}},"required":["type"],"additionalProperties":false},{"nullable":true,"type":"string","enum":[null]}]},"errorMessage":{"type":"string","nullable":true}},"required":["id","createdAt","updatedAt","executionId","reportWidgetId","type","status","resolvedParameters","result","errorMessage"],"additionalProperties":false}},"destination":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"reportId":{"type":"string"},"organizationId":{"type":"string"},"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]},"scopeId":{"type":"string","nullable":true},"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"]},"destinationValues":{"type":"array","items":{"type":"string"}}},"required":["id","createdAt","updatedAt","archivedAt","reportId","organizationId","metricId","groupBy","datePreset","startDate","endDate","conditions","currency","scopeId","destinationType","destinationValues"],"additionalProperties":false},"report":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","name","organizationId"],"additionalProperties":false}},"required":["id","createdAt","updatedAt","reportId","destinationId","scheduledFor","status","startedAt","finishedAt","sentAt","errorMessage","widgets","destination","report"],"additionalProperties":false}}},"required":["id","organizationId","name","description","type","teamId","metricId","groupBy","datePreset","startDate","endDate","conditions","currency","scopeId","scheduledPeriod","scheduledWeekday","scheduledFirstRunAt","status","archivedAt","lastRunAt","createdAt","updatedAt","createdById","updatedById","createdBy","updatedBy","tags","widgets","destinations","access","nextRunDate"],"additionalProperties":false},"ReportListItem":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["PRIVATE","PUBLIC","TEMPLATE"]},"teamId":{"type":"string","nullable":true},"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]},"scopeId":{"type":"string","nullable":true},"scheduledPeriod":{"type":"string","nullable":true,"enum":["DAILY","WEEKDAYS","WEEKLY","MONTHLY",null]},"scheduledWeekday":{"type":"integer","nullable":true},"scheduledFirstRunAt":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string","enum":["ACTIVE","INACTIVE"]},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"lastRunAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdById":{"type":"string"},"updatedById":{"type":"string","nullable":true},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"],"additionalProperties":false},"updatedBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"],"additionalProperties":false},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"widgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"reportId":{"type":"string"},"type":{"type":"string","enum":["TOP_FLOP","GRAPH_SNAPSHOT","DASHBOARD_PDF","DIGEST","TEXT","ALERT","DIVIDER"]},"title":{"type":"string"},"description":{"type":"string"},"position":{"type":"integer"},"parameters":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","topN","flopN","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIGEST"],"description":"Cost-change breakdown as a tree, table, or LLM summary of the biggest movers."},"display":{"type":"string","enum":["tree","table","summary"],"default":"tree","description":"How the digest renders: 'tree' (default hierarchy), flat 'table', or an LLM-written 'summary'."},"showValue":{"type":"boolean","default":true,"description":"Show the absolute cost value on each row."},"showRelativeDelta":{"type":"boolean","default":true,"description":"Show the percentage change on each row."},"showDelta":{"type":"boolean","default":true,"description":"Show the absolute change on each row."},"topLargestAbsoluteChange":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many of the largest-absolute-change nodes to surface (integer 1–100). Applied at every tree level."},"minAbsoluteDiff":{"type":"number","minimum":0,"default":100,"description":"Hide nodes whose absolute change is below this threshold."},"minRelativeDiff":{"type":"number","minimum":0,"default":5,"description":"Hide nodes whose percentage change is below this threshold (percent)."},"additionalGroupBy":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Extra group-by dimensions applied after the report context `groupBy`, in order — each adds a deeper level to the tree."},"useDashboardGroupBy":{"type":"boolean","description":"Use the report (dashboard) context `groupBy` as this widget's root group-by (default true). Set false to override: the report context group-by is ignored for this widget and the first `additionalGroupBy` item (or the widget cost query `groupBy`) becomes the root. `false` requires at least one group-by dimension."},"enableAiInvestigation":{"type":"boolean","default":false,"description":"When true, the run's deepest-leaf nodes trigger an async AI investigation (`analysis_agent_run`) and the report waits for its callback before sending. Delivery is not immediate."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIVIDER"],"description":"Slack thread cut: widgets above post in the channel, widgets below post as replies. Ignored for email and Teams. At most one per report."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"],"additionalProperties":false}],"description":"One message widget. The `type` field selects the shape: ALERT | TOP_FLOP | GRAPH_SNAPSHOT | DASHBOARD_PDF | DIGEST | TEXT | DIVIDER. All fields other than `type` depend on the chosen type.","discriminator":{"propertyName":"type"}}},"required":["id","createdAt","updatedAt","reportId","type","title","description","position","parameters"],"additionalProperties":false}},"destinations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"reportId":{"type":"string"},"organizationId":{"type":"string"},"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]},"scopeId":{"type":"string","nullable":true},"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"]},"destinationValues":{"type":"array","items":{"type":"string"}}},"required":["id","createdAt","updatedAt","archivedAt","reportId","organizationId","metricId","groupBy","datePreset","startDate","endDate","conditions","currency","scopeId","destinationType","destinationValues"],"additionalProperties":false}},"access":{"type":"object","properties":{"organizationRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"teamGrants":{"type":"array","items":{"type":"object","properties":{"teamId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]}},"required":["teamId","name","role"]}},"callerRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"capabilities":{"type":"object","properties":{"canView":{"type":"boolean"},"canEdit":{"type":"boolean"},"canManage":{"type":"boolean"}},"required":["canView","canEdit","canManage"]}},"required":["organizationRole","teamGrants","callerRole","capabilities"]},"nextRunDate":{"type":"string","nullable":true,"format":"date-time"},"destinationCounts":{"type":"object","properties":{"SLACK":{"type":"integer","minimum":0},"EMAIL":{"type":"integer","minimum":0},"TEAMS":{"type":"integer","minimum":0}}},"lastRunHealth":{"type":"string","enum":["OK","FAILED","PARTIAL","IN_PROGRESS","NEVER_RUN"]},"recentRuns":{"type":"array","items":{"type":"object","properties":{"scheduledFor":{"type":"string","format":"date-time"},"outcome":{"type":"string","enum":["OK","FAILED","PARTIAL","IN_PROGRESS","NEVER_RUN"]},"destinations":{"type":"array","items":{"type":"object","properties":{"executionId":{"type":"string"},"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"]},"destinationValues":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["PENDING","SUCCESS","FAILED"]},"sentAt":{"type":"string","nullable":true,"format":"date-time"},"errorMessage":{"type":"string","nullable":true}},"required":["executionId","destinationType","destinationValues","status","sentAt","errorMessage"],"additionalProperties":false}}},"required":["scheduledFor","outcome","destinations"],"additionalProperties":false}},"showTemplateRow":{"type":"boolean"},"executions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"reportId":{"type":"string"},"destinationId":{"type":"string"},"scheduledFor":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["PENDING","SUCCESS","FAILED"]},"startedAt":{"type":"string","nullable":true,"format":"date-time"},"finishedAt":{"type":"string","nullable":true,"format":"date-time"},"sentAt":{"type":"string","nullable":true,"format":"date-time"},"errorMessage":{"type":"string","nullable":true},"widgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"executionId":{"type":"string"},"reportWidgetId":{"type":"string","nullable":true},"type":{"type":"string","enum":["TOP_FLOP","GRAPH_SNAPSHOT","DASHBOARD_PDF","DIGEST","TEXT","ALERT","DIVIDER"]},"status":{"type":"string","enum":["PENDING","SUCCESS","FAILED"]},"resolvedParameters":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","topN","flopN","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIGEST"],"description":"Cost-change breakdown as a tree, table, or LLM summary of the biggest movers."},"display":{"type":"string","enum":["tree","table","summary"],"default":"tree","description":"How the digest renders: 'tree' (default hierarchy), flat 'table', or an LLM-written 'summary'."},"showValue":{"type":"boolean","default":true,"description":"Show the absolute cost value on each row."},"showRelativeDelta":{"type":"boolean","default":true,"description":"Show the percentage change on each row."},"showDelta":{"type":"boolean","default":true,"description":"Show the absolute change on each row."},"topLargestAbsoluteChange":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many of the largest-absolute-change nodes to surface (integer 1–100). Applied at every tree level."},"minAbsoluteDiff":{"type":"number","minimum":0,"default":100,"description":"Hide nodes whose absolute change is below this threshold."},"minRelativeDiff":{"type":"number","minimum":0,"default":5,"description":"Hide nodes whose percentage change is below this threshold (percent)."},"additionalGroupBy":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Extra group-by dimensions applied after the report context `groupBy`, in order — each adds a deeper level to the tree."},"useDashboardGroupBy":{"type":"boolean","description":"Use the report (dashboard) context `groupBy` as this widget's root group-by (default true). Set false to override: the report context group-by is ignored for this widget and the first `additionalGroupBy` item (or the widget cost query `groupBy`) becomes the root. `false` requires at least one group-by dimension."},"enableAiInvestigation":{"type":"boolean","default":false,"description":"When true, the run's deepest-leaf nodes trigger an async AI investigation (`analysis_agent_run`) and the report waits for its callback before sending. Delivery is not immediate."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIVIDER"],"description":"Slack thread cut: widgets above post in the channel, widgets below post as replies. Ignored for email and Teams. At most one per report."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"],"additionalProperties":false}],"description":"One message widget. The `type` field selects the shape: ALERT | TOP_FLOP | GRAPH_SNAPSHOT | DASHBOARD_PDF | DIGEST | TEXT | DIVIDER. All fields other than `type` depend on the chosen type.","discriminator":{"propertyName":"type"}},"result":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"]},"comparisonPeriodSummary":{"type":"string"},"top":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"number"},"variation":{"type":"number"},"difference":{"type":"number"}},"required":["name","value","variation"],"additionalProperties":false}},"flop":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"number"},"variation":{"type":"number"},"difference":{"type":"number"}},"required":["name","value","variation"],"additionalProperties":false}},"explorerUrl":{"type":"string"}},"required":["type","top","flop"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"]},"imageUrl":{"type":"string"},"data":{"type":"object","properties":{"outputData":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","nullable":true,"format":"date-time"},"values":{"type":"array","items":{"type":"object","properties":{"groupByValue":{"type":"string"},"queryName":{"type":"string"},"value":{"type":"number"},"yhatLower":{"type":"number"},"yhatUpper":{"type":"number"}},"required":["groupByValue","queryName","value"]}}},"required":["date","values"]}},"series":{"type":"array","items":{"type":"object","properties":{"queryName":{"type":"string"},"groupByValue":{"type":"string"},"totals":{"type":"number"},"unit":{"type":"string"}},"required":["queryName","groupByValue","totals","unit"]}},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"splitDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"forecastSkipReason":{"type":"string","enum":["not_enough_history"]}},"required":["outputData","series","aggBy"]},"explorerUrl":{"type":"string"}},"required":["type","imageUrl","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"]},"pdfUrl":{"type":"string","minLength":1}},"required":["type","pdfUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DIGEST"]},"comparisonPeriodSummary":{"type":"string"},"tree":{"type":"array","items":{"$ref":"#/components/schemas/DigestCostTreeNode"}},"summaryMarkdown":{"type":"string"},"explorerUrl":{"type":"string"},"investigations":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["PENDING"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["SUCCESS"]},"output":{"type":"object","properties":{"summary":{"type":"string"},"methodology":{"type":"string"}},"required":["summary"]}},"required":["status","output"]},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"error":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}}},"required":["status"]}]}}},"required":["type","tree"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"]},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000}},"required":["type","contentMarkdown"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"]},"dateText":{"type":"string"},"conditionText":{"type":"string"},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"valueUnit":{"type":"string"},"amountColumnHeader":{"type":"string"},"amountCaption":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"groupByValue":{"type":"string"},"triggeredValue":{"type":"number"},"costValue":{"type":"number","nullable":true},"explorerUrl":{"type":"string"}},"required":["groupByValue","triggeredValue","costValue"],"additionalProperties":false}},"truncatedCount":{"type":"integer","minimum":0},"exploreAllUrl":{"type":"string"}},"required":["type","dateText","conditionText","currency","valueUnit","amountColumnHeader","amountCaption","groups","truncatedCount","exploreAllUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DIVIDER"]}},"required":["type"],"additionalProperties":false},{"nullable":true,"type":"string","enum":[null]}]},"errorMessage":{"type":"string","nullable":true}},"required":["id","createdAt","updatedAt","executionId","reportWidgetId","type","status","resolvedParameters","result","errorMessage"],"additionalProperties":false}},"destination":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"reportId":{"type":"string"},"organizationId":{"type":"string"},"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]},"scopeId":{"type":"string","nullable":true},"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"]},"destinationValues":{"type":"array","items":{"type":"string"}}},"required":["id","createdAt","updatedAt","archivedAt","reportId","organizationId","metricId","groupBy","datePreset","startDate","endDate","conditions","currency","scopeId","destinationType","destinationValues"],"additionalProperties":false},"report":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","name","organizationId"],"additionalProperties":false}},"required":["id","createdAt","updatedAt","reportId","destinationId","scheduledFor","status","startedAt","finishedAt","sentAt","errorMessage","widgets","destination","report"],"additionalProperties":false}}},"required":["id","organizationId","name","description","type","teamId","metricId","groupBy","datePreset","startDate","endDate","conditions","currency","scopeId","scheduledPeriod","scheduledWeekday","scheduledFirstRunAt","status","archivedAt","lastRunAt","createdAt","updatedAt","createdById","updatedById","createdBy","updatedBy","tags","widgets","destinations","access","nextRunDate","showTemplateRow"],"additionalProperties":false},"ReportExecution":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"reportId":{"type":"string"},"destinationId":{"type":"string"},"scheduledFor":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["PENDING","SUCCESS","FAILED"]},"startedAt":{"type":"string","nullable":true,"format":"date-time"},"finishedAt":{"type":"string","nullable":true,"format":"date-time"},"sentAt":{"type":"string","nullable":true,"format":"date-time"},"errorMessage":{"type":"string","nullable":true},"widgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"executionId":{"type":"string"},"reportWidgetId":{"type":"string","nullable":true},"type":{"type":"string","enum":["TOP_FLOP","GRAPH_SNAPSHOT","DASHBOARD_PDF","DIGEST","TEXT","ALERT","DIVIDER"]},"status":{"type":"string","enum":["PENDING","SUCCESS","FAILED"]},"resolvedParameters":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","topN","flopN","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIGEST"],"description":"Cost-change breakdown as a tree, table, or LLM summary of the biggest movers."},"display":{"type":"string","enum":["tree","table","summary"],"default":"tree","description":"How the digest renders: 'tree' (default hierarchy), flat 'table', or an LLM-written 'summary'."},"showValue":{"type":"boolean","default":true,"description":"Show the absolute cost value on each row."},"showRelativeDelta":{"type":"boolean","default":true,"description":"Show the percentage change on each row."},"showDelta":{"type":"boolean","default":true,"description":"Show the absolute change on each row."},"topLargestAbsoluteChange":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many of the largest-absolute-change nodes to surface (integer 1–100). Applied at every tree level."},"minAbsoluteDiff":{"type":"number","minimum":0,"default":100,"description":"Hide nodes whose absolute change is below this threshold."},"minRelativeDiff":{"type":"number","minimum":0,"default":5,"description":"Hide nodes whose percentage change is below this threshold (percent)."},"additionalGroupBy":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Extra group-by dimensions applied after the report context `groupBy`, in order — each adds a deeper level to the tree."},"useDashboardGroupBy":{"type":"boolean","description":"Use the report (dashboard) context `groupBy` as this widget's root group-by (default true). Set false to override: the report context group-by is ignored for this widget and the first `additionalGroupBy` item (or the widget cost query `groupBy`) becomes the root. `false` requires at least one group-by dimension."},"enableAiInvestigation":{"type":"boolean","default":false,"description":"When true, the run's deepest-leaf nodes trigger an async AI investigation (`analysis_agent_run`) and the report waits for its callback before sending. Delivery is not immediate."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIVIDER"],"description":"Slack thread cut: widgets above post in the channel, widgets below post as replies. Ignored for email and Teams. At most one per report."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"],"additionalProperties":false}],"description":"One message widget. The `type` field selects the shape: ALERT | TOP_FLOP | GRAPH_SNAPSHOT | DASHBOARD_PDF | DIGEST | TEXT | DIVIDER. All fields other than `type` depend on the chosen type.","discriminator":{"propertyName":"type"}},"result":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"]},"comparisonPeriodSummary":{"type":"string"},"top":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"number"},"variation":{"type":"number"},"difference":{"type":"number"}},"required":["name","value","variation"],"additionalProperties":false}},"flop":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"number"},"variation":{"type":"number"},"difference":{"type":"number"}},"required":["name","value","variation"],"additionalProperties":false}},"explorerUrl":{"type":"string"}},"required":["type","top","flop"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"]},"imageUrl":{"type":"string"},"data":{"type":"object","properties":{"outputData":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","nullable":true,"format":"date-time"},"values":{"type":"array","items":{"type":"object","properties":{"groupByValue":{"type":"string"},"queryName":{"type":"string"},"value":{"type":"number"},"yhatLower":{"type":"number"},"yhatUpper":{"type":"number"}},"required":["groupByValue","queryName","value"]}}},"required":["date","values"]}},"series":{"type":"array","items":{"type":"object","properties":{"queryName":{"type":"string"},"groupByValue":{"type":"string"},"totals":{"type":"number"},"unit":{"type":"string"}},"required":["queryName","groupByValue","totals","unit"]}},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"splitDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"forecastSkipReason":{"type":"string","enum":["not_enough_history"]}},"required":["outputData","series","aggBy"]},"explorerUrl":{"type":"string"}},"required":["type","imageUrl","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"]},"pdfUrl":{"type":"string","minLength":1}},"required":["type","pdfUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DIGEST"]},"comparisonPeriodSummary":{"type":"string"},"tree":{"type":"array","items":{"$ref":"#/components/schemas/DigestCostTreeNode"}},"summaryMarkdown":{"type":"string"},"explorerUrl":{"type":"string"},"investigations":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["PENDING"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["SUCCESS"]},"output":{"type":"object","properties":{"summary":{"type":"string"},"methodology":{"type":"string"}},"required":["summary"]}},"required":["status","output"]},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"error":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}}},"required":["status"]}]}}},"required":["type","tree"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"]},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000}},"required":["type","contentMarkdown"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"]},"dateText":{"type":"string"},"conditionText":{"type":"string"},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"valueUnit":{"type":"string"},"amountColumnHeader":{"type":"string"},"amountCaption":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"groupByValue":{"type":"string"},"triggeredValue":{"type":"number"},"costValue":{"type":"number","nullable":true},"explorerUrl":{"type":"string"}},"required":["groupByValue","triggeredValue","costValue"],"additionalProperties":false}},"truncatedCount":{"type":"integer","minimum":0},"exploreAllUrl":{"type":"string"}},"required":["type","dateText","conditionText","currency","valueUnit","amountColumnHeader","amountCaption","groups","truncatedCount","exploreAllUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DIVIDER"]}},"required":["type"],"additionalProperties":false},{"nullable":true,"type":"string","enum":[null]}]},"errorMessage":{"type":"string","nullable":true}},"required":["id","createdAt","updatedAt","executionId","reportWidgetId","type","status","resolvedParameters","result","errorMessage"],"additionalProperties":false}},"destination":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"reportId":{"type":"string"},"organizationId":{"type":"string"},"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]},"scopeId":{"type":"string","nullable":true},"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"]},"destinationValues":{"type":"array","items":{"type":"string"}}},"required":["id","createdAt","updatedAt","archivedAt","reportId","organizationId","metricId","groupBy","datePreset","startDate","endDate","conditions","currency","scopeId","destinationType","destinationValues"],"additionalProperties":false},"report":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","name","organizationId"],"additionalProperties":false}},"required":["id","createdAt","updatedAt","reportId","destinationId","scheduledFor","status","startedAt","finishedAt","sentAt","errorMessage","widgets","destination","report"],"additionalProperties":false},"ReportCreated":{"type":"object","properties":{"reportId":{"type":"string"}},"required":["reportId"],"additionalProperties":false},"ReportRunNow":{"type":"object","properties":{"executionIds":{"type":"array","items":{"type":"string"}}},"required":["executionIds"],"additionalProperties":false},"ReportWidgetPreview":{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP","GRAPH_SNAPSHOT","DASHBOARD_PDF","DIGEST","TEXT","ALERT","DIVIDER"]},"status":{"type":"string","enum":["PENDING","SUCCESS","FAILED"]},"resolvedParameters":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","topN","flopN","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIGEST"],"description":"Cost-change breakdown as a tree, table, or LLM summary of the biggest movers."},"display":{"type":"string","enum":["tree","table","summary"],"default":"tree","description":"How the digest renders: 'tree' (default hierarchy), flat 'table', or an LLM-written 'summary'."},"showValue":{"type":"boolean","default":true,"description":"Show the absolute cost value on each row."},"showRelativeDelta":{"type":"boolean","default":true,"description":"Show the percentage change on each row."},"showDelta":{"type":"boolean","default":true,"description":"Show the absolute change on each row."},"topLargestAbsoluteChange":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many of the largest-absolute-change nodes to surface (integer 1–100). Applied at every tree level."},"minAbsoluteDiff":{"type":"number","minimum":0,"default":100,"description":"Hide nodes whose absolute change is below this threshold."},"minRelativeDiff":{"type":"number","minimum":0,"default":5,"description":"Hide nodes whose percentage change is below this threshold (percent)."},"additionalGroupBy":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Extra group-by dimensions applied after the report context `groupBy`, in order — each adds a deeper level to the tree."},"useDashboardGroupBy":{"type":"boolean","description":"Use the report (dashboard) context `groupBy` as this widget's root group-by (default true). Set false to override: the report context group-by is ignored for this widget and the first `additionalGroupBy` item (or the widget cost query `groupBy`) becomes the root. `false` requires at least one group-by dimension."},"enableAiInvestigation":{"type":"boolean","default":false,"description":"When true, the run's deepest-leaf nodes trigger an async AI investigation (`analysis_agent_run`) and the report waits for its callback before sending. Delivery is not immediate."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIVIDER"],"description":"Slack thread cut: widgets above post in the channel, widgets below post as replies. Ignored for email and Teams. At most one per report."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"],"additionalProperties":false}],"description":"One message widget. The `type` field selects the shape: ALERT | TOP_FLOP | GRAPH_SNAPSHOT | DASHBOARD_PDF | DIGEST | TEXT | DIVIDER. All fields other than `type` depend on the chosen type.","discriminator":{"propertyName":"type"}},"result":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"]},"comparisonPeriodSummary":{"type":"string"},"top":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"number"},"variation":{"type":"number"},"difference":{"type":"number"}},"required":["name","value","variation"],"additionalProperties":false}},"flop":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"number"},"variation":{"type":"number"},"difference":{"type":"number"}},"required":["name","value","variation"],"additionalProperties":false}},"explorerUrl":{"type":"string"}},"required":["type","top","flop"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"]},"imageUrl":{"type":"string"},"data":{"type":"object","properties":{"outputData":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","nullable":true,"format":"date-time"},"values":{"type":"array","items":{"type":"object","properties":{"groupByValue":{"type":"string"},"queryName":{"type":"string"},"value":{"type":"number"},"yhatLower":{"type":"number"},"yhatUpper":{"type":"number"}},"required":["groupByValue","queryName","value"]}}},"required":["date","values"]}},"series":{"type":"array","items":{"type":"object","properties":{"queryName":{"type":"string"},"groupByValue":{"type":"string"},"totals":{"type":"number"},"unit":{"type":"string"}},"required":["queryName","groupByValue","totals","unit"]}},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"splitDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"forecastSkipReason":{"type":"string","enum":["not_enough_history"]}},"required":["outputData","series","aggBy"]},"explorerUrl":{"type":"string"}},"required":["type","imageUrl","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"]},"pdfUrl":{"type":"string","minLength":1}},"required":["type","pdfUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DIGEST"]},"comparisonPeriodSummary":{"type":"string"},"tree":{"type":"array","items":{"$ref":"#/components/schemas/DigestCostTreeNode"}},"summaryMarkdown":{"type":"string"},"explorerUrl":{"type":"string"},"investigations":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["PENDING"]}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["SUCCESS"]},"output":{"type":"object","properties":{"summary":{"type":"string"},"methodology":{"type":"string"}},"required":["summary"]}},"required":["status","output"]},{"type":"object","properties":{"status":{"type":"string","enum":["FAILED"]},"error":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}}},"required":["status"]}]}}},"required":["type","tree"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"]},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000}},"required":["type","contentMarkdown"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"]},"dateText":{"type":"string"},"conditionText":{"type":"string"},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"valueUnit":{"type":"string"},"amountColumnHeader":{"type":"string"},"amountCaption":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"groupByValue":{"type":"string"},"triggeredValue":{"type":"number"},"costValue":{"type":"number","nullable":true},"explorerUrl":{"type":"string"}},"required":["groupByValue","triggeredValue","costValue"],"additionalProperties":false}},"truncatedCount":{"type":"integer","minimum":0},"exploreAllUrl":{"type":"string"}},"required":["type","dateText","conditionText","currency","valueUnit","amountColumnHeader","amountCaption","groups","truncatedCount","exploreAllUrl"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["DIVIDER"]}},"required":["type"],"additionalProperties":false},{"nullable":true,"type":"string","enum":[null]}]},"errorMessage":{"type":"string","nullable":true}},"required":["type","status","resolvedParameters"],"additionalProperties":false},"DigestSummaryPreview":{"type":"object","properties":{"markdown":{"type":"string"}},"required":["markdown"],"additionalProperties":false},"ReportsTestSendOutput":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"destinationIndex":{"type":"integer","minimum":0},"ok":{"type":"boolean"},"errorMessage":{"type":"string","nullable":true}},"required":["destinationIndex","ok"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false},"ReportsExecutionsTransferOutput":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"destinationIndex":{"type":"integer","minimum":0},"ok":{"type":"boolean"},"errorMessage":{"type":"string","nullable":true}},"required":["destinationIndex","ok"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false},"ReportsForbidden":{"type":"object","properties":{"error":{"type":"string","enum":["FORBIDDEN"]}},"required":["error"],"additionalProperties":false},"ReportsTeamMemberRequired":{"type":"object","properties":{"error":{"type":"string","enum":["TEAM_MEMBER_REQUIRED"]}},"required":["error"],"additionalProperties":false},"ReportsNotFound":{"type":"object","properties":{"error":{"type":"string","enum":["NOT_FOUND"]},"reason":{"type":"string"}},"required":["error"],"additionalProperties":false},"ReportsValidationError":{"type":"object","properties":{"error":{"type":"string","enum":["VALIDATION_ERROR"]},"reason":{"type":"string"},"details":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true,"type":"string","enum":[null]},{"type":"array","items":{}},{"type":"object","additionalProperties":{}}]}},"required":["error","details"],"additionalProperties":false},"ReportsRunOutcomeUnknown":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"string","enum":["OUTCOME_UNKNOWN"]},"reportId":{"type":"string"},"executionIds":{"type":"array","items":{"type":"string"}}},"required":["ok","error","reportId","executionIds"],"additionalProperties":false},"ReportsRetryOutcomeUnknown":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"string","enum":["OUTCOME_UNKNOWN"]},"reportId":{"type":"string"},"executionId":{"type":"string"}},"required":["ok","error","reportId","executionId"],"additionalProperties":false},"QueryRequest":{"type":"object","properties":{"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["cost"],"description":"Required series discriminator — always set explicitly, never omit. One of: \"cost\" | \"metric\" | \"usage\" | \"formula\" | \"budget\" | \"externalMetric\"."},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Required series identifier referenced by formulas (e.g. \"a\", \"b\", \"a__r6\"). Prefer short identifiers; put human labels in alias — never spaces or descriptive phrases in name."},"alias":{"type":"string","minLength":1,"maxLength":50,"description":"Optional human-readable label (e.g. \"Cost by environment\", \"AWS spend\"). Prefer short identifiers in name; put descriptive text here."},"filterCel":{"type":"string","nullable":true,"description":"Optional scope filter as CEL (Common Expression Language). Examples: cos_service_name in [\"AmazonEC2\"]; cos_provider in [\"AWS\"] && cos_environment in [\"prod\"]. Label dimensions use the cos_ prefix; native provider fields omit it. Unlabelled/untagged resources have null values; use == null to match them (e.g. cos_environment == null) and != null to exclude them. Omit or pass empty string for no filter."},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"],"default":"cost","description":"Cost column to query (e.g. \"cost\", \"effective_cost\", \"amortized_cost\"). Defaults to \"cost\"."},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"],"default":"USD","description":"Currency for cost values (USD, EUR, GBP). Defaults to \"USD\"."},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"description":"Explorer chart for this series: BAR, LINE, AREA, WATERFALL, or TABLE. Omit to use LINE."},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"description":"Aggregation over the bucket. Defaults to SUM."},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["metric"],"description":"Required series discriminator — always set explicitly, never omit. One of: \"cost\" | \"metric\" | \"usage\" | \"formula\" | \"budget\" | \"externalMetric\"."},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string","description":"Saved Costory metric id from list_metrics metrics[].id. This is the query identity — not list_metrics `datasourceId` (that filter only returns groupBy dimensions for telemetry)."},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Required series identifier referenced by formulas (e.g. \"a\", \"b\", \"a__r6\"). Prefer short identifiers; put human labels in alias — never spaces or descriptive phrases in name."},"alias":{"type":"string","minLength":1,"maxLength":50,"description":"Optional human-readable label (e.g. \"Cost by environment\", \"AWS spend\"). Prefer short identifiers in name; put descriptive text here."},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"description":"Explorer chart for this series: BAR, LINE, AREA, WATERFALL, or TABLE. Omit to use LINE."},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"description":"Aggregation over the bucket. Defaults to SUM."},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"rawMetric":{"type":"string"},"unitOverride":{"type":"string"}},"required":["type","metricId","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["usage"],"description":"Required series discriminator — always set explicitly, never omit. One of: \"cost\" | \"metric\" | \"usage\" | \"formula\" | \"budget\" | \"externalMetric\"."},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string","description":"Usage metric id (from suggest_usage_metrics). Either a billing consumed_unit (e.g. \"hours\") or an enrichment metric column published by an integration — those start with `query_` (e.g. query_compute_ms, query_bytes_billed) and are only available to orgs with that integration. Distinct from cost metricId and from list_metrics datasourceId."},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Required series identifier referenced by formulas (e.g. \"a\", \"b\", \"a__r6\"). Prefer short identifiers; put human labels in alias — never spaces or descriptive phrases in name."},"alias":{"type":"string","minLength":1,"maxLength":50,"description":"Optional human-readable label (e.g. \"Cost by environment\", \"AWS spend\"). Prefer short identifiers in name; put descriptive text here."},"filterCel":{"type":"string","nullable":true,"description":"Optional scope filter as CEL (Common Expression Language). Examples: cos_service_name in [\"AmazonEC2\"]; cos_provider in [\"AWS\"] && cos_environment in [\"prod\"]. Label dimensions use the cos_ prefix; native provider fields omit it. Unlabelled/untagged resources have null values; use == null to match them (e.g. cos_environment == null) and != null to exclude them. Omit or pass empty string for no filter."},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"description":"Explorer chart for this series: BAR, LINE, AREA, WATERFALL, or TABLE. Omit to use LINE."},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"description":"Aggregation over the bucket. Defaults to SUM."},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."}},"required":["type","metricId","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["formula"],"description":"Required series discriminator — always set explicitly, never omit. One of: \"cost\" | \"metric\" | \"usage\" | \"formula\" | \"budget\" | \"externalMetric\"."},"formula":{"type":"string"},"unitOverride":{"type":"string","description":"Optional unit override. Omit to infer from formula inputs. Currency codes (EUR, USD, GBP, CNY, KRW) format as money and follow the widget/dashboard currency; any other string (e.g. \"slot-h/TiB\", \"%\") is displayed as-is."},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Required series identifier referenced by formulas (e.g. \"a\", \"b\", \"a__r6\"). Prefer short identifiers; put human labels in alias — never spaces or descriptive phrases in name."},"alias":{"type":"string","minLength":1,"maxLength":50,"description":"Optional human-readable label (e.g. \"Cost by environment\", \"AWS spend\"). Prefer short identifiers in name; put descriptive text here."},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"description":"Explorer chart for this series: BAR, LINE, AREA, WATERFALL, or TABLE. Omit to use LINE."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]}},"required":["type","formula","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["budget"],"description":"Required series discriminator — always set explicitly, never omit. One of: \"cost\" | \"metric\" | \"usage\" | \"formula\" | \"budget\" | \"externalMetric\"."},"budgetId":{"type":"string"},"virtualDimensionValue":{"type":"string"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Required series identifier referenced by formulas (e.g. \"a\", \"b\", \"a__r6\"). Prefer short identifiers; put human labels in alias — never spaces or descriptive phrases in name."},"alias":{"type":"string","minLength":1,"maxLength":50,"description":"Optional human-readable label (e.g. \"Cost by environment\", \"AWS spend\"). Prefer short identifiers in name; put descriptive text here."},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"description":"Explorer chart for this series: BAR, LINE, AREA, WATERFALL, or TABLE. Omit to use LINE."},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}],"description":"Split by budget line. Must be this budget's virtual dimension bqName from get. Omit for the total. Sibling cost/usage/metric groupBy must be that same field so formulas match per line."}},"required":["type","budgetId","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"],"description":"Required series discriminator — always set explicitly, never omit. One of: \"cost\" | \"metric\" | \"usage\" | \"formula\" | \"budget\" | \"externalMetric\"."},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"query":{"type":"string","minLength":1},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"],"default":"tsuga","description":"External metric provider. Defaults to \"tsuga\" when omitted for backward compatibility with existing Tsuga MCP clients."},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Required series identifier referenced by formulas (e.g. \"a\", \"b\", \"a__r6\"). Prefer short identifiers; put human labels in alias — never spaces or descriptive phrases in name."},"alias":{"type":"string","minLength":1,"maxLength":50,"description":"Optional human-readable label (e.g. \"Cost by environment\", \"AWS spend\"). Prefer short identifiers in name; put descriptive text here."},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"description":"Explorer chart for this series: BAR, LINE, AREA, WATERFALL, or TABLE. Omit to use LINE."},"unitOverride":{"type":"string"}},"required":["type","integrationId","name"],"additionalProperties":false}],"discriminator":{"propertyName":"type"}},"minItems":1,"maxItems":26},"datePreset":{"type":"string","enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"],"default":"Month"},"forecastDays":{"type":"integer","minimum":0},"forecast":{"type":"boolean"},"compare":{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"],"default":"WATERFALL"}},"additionalProperties":false},"analyze":{"type":"object","properties":{"changePoint":{"anyOf":[{"type":"boolean"},{"type":"object","properties":{"ignoreWeekends":{"type":"boolean","description":"Drop Saturday/Sunday before detection. Maps to Billy `no_weekends`."}},"additionalProperties":false}]}},"additionalProperties":false},"limit":{"type":"integer","minimum":1,"maximum":1000},"scopeId":{"type":"string","nullable":true},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["queries"],"additionalProperties":false},"QueryDiffTreeRequest":{"type":"object","properties":{"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["cost"],"description":"Required series discriminator — always set explicitly, never omit. One of: \"cost\" | \"metric\" | \"usage\" | \"formula\" | \"budget\" | \"externalMetric\"."},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Required series identifier referenced by formulas (e.g. \"a\", \"b\", \"a__r6\"). Prefer short identifiers; put human labels in alias — never spaces or descriptive phrases in name."},"alias":{"type":"string","minLength":1,"maxLength":50,"description":"Optional human-readable label (e.g. \"Cost by environment\", \"AWS spend\"). Prefer short identifiers in name; put descriptive text here."},"filterCel":{"type":"string","nullable":true,"description":"Optional scope filter as CEL (Common Expression Language). Examples: cos_service_name in [\"AmazonEC2\"]; cos_provider in [\"AWS\"] && cos_environment in [\"prod\"]. Label dimensions use the cos_ prefix; native provider fields omit it. Unlabelled/untagged resources have null values; use == null to match them (e.g. cos_environment == null) and != null to exclude them. Omit or pass empty string for no filter."},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"],"default":"cost","description":"Cost column to query (e.g. \"cost\", \"effective_cost\", \"amortized_cost\"). Defaults to \"cost\"."},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"],"default":"USD","description":"Currency for cost values (USD, EUR, GBP). Defaults to \"USD\"."},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"description":"Explorer chart for this series: BAR, LINE, AREA, WATERFALL, or TABLE. Omit to use LINE."},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"description":"Aggregation over the bucket. Defaults to SUM."},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["metric"],"description":"Required series discriminator — always set explicitly, never omit. One of: \"cost\" | \"metric\" | \"usage\" | \"formula\" | \"budget\" | \"externalMetric\"."},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string","description":"Saved Costory metric id from list_metrics metrics[].id. This is the query identity — not list_metrics `datasourceId` (that filter only returns groupBy dimensions for telemetry)."},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Required series identifier referenced by formulas (e.g. \"a\", \"b\", \"a__r6\"). Prefer short identifiers; put human labels in alias — never spaces or descriptive phrases in name."},"alias":{"type":"string","minLength":1,"maxLength":50,"description":"Optional human-readable label (e.g. \"Cost by environment\", \"AWS spend\"). Prefer short identifiers in name; put descriptive text here."},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"description":"Explorer chart for this series: BAR, LINE, AREA, WATERFALL, or TABLE. Omit to use LINE."},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"description":"Aggregation over the bucket. Defaults to SUM."},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"rawMetric":{"type":"string"},"unitOverride":{"type":"string"}},"required":["type","metricId","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["usage"],"description":"Required series discriminator — always set explicitly, never omit. One of: \"cost\" | \"metric\" | \"usage\" | \"formula\" | \"budget\" | \"externalMetric\"."},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string","description":"Usage metric id (from suggest_usage_metrics). Either a billing consumed_unit (e.g. \"hours\") or an enrichment metric column published by an integration — those start with `query_` (e.g. query_compute_ms, query_bytes_billed) and are only available to orgs with that integration. Distinct from cost metricId and from list_metrics datasourceId."},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Required series identifier referenced by formulas (e.g. \"a\", \"b\", \"a__r6\"). Prefer short identifiers; put human labels in alias — never spaces or descriptive phrases in name."},"alias":{"type":"string","minLength":1,"maxLength":50,"description":"Optional human-readable label (e.g. \"Cost by environment\", \"AWS spend\"). Prefer short identifiers in name; put descriptive text here."},"filterCel":{"type":"string","nullable":true,"description":"Optional scope filter as CEL (Common Expression Language). Examples: cos_service_name in [\"AmazonEC2\"]; cos_provider in [\"AWS\"] && cos_environment in [\"prod\"]. Label dimensions use the cos_ prefix; native provider fields omit it. Unlabelled/untagged resources have null values; use == null to match them (e.g. cos_environment == null) and != null to exclude them. Omit or pass empty string for no filter."},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"description":"Explorer chart for this series: BAR, LINE, AREA, WATERFALL, or TABLE. Omit to use LINE."},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"description":"Aggregation over the bucket. Defaults to SUM."},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."}},"required":["type","metricId","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["formula"],"description":"Required series discriminator — always set explicitly, never omit. One of: \"cost\" | \"metric\" | \"usage\" | \"formula\" | \"budget\" | \"externalMetric\"."},"formula":{"type":"string"},"unitOverride":{"type":"string","description":"Optional unit override. Omit to infer from formula inputs. Currency codes (EUR, USD, GBP, CNY, KRW) format as money and follow the widget/dashboard currency; any other string (e.g. \"slot-h/TiB\", \"%\") is displayed as-is."},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Required series identifier referenced by formulas (e.g. \"a\", \"b\", \"a__r6\"). Prefer short identifiers; put human labels in alias — never spaces or descriptive phrases in name."},"alias":{"type":"string","minLength":1,"maxLength":50,"description":"Optional human-readable label (e.g. \"Cost by environment\", \"AWS spend\"). Prefer short identifiers in name; put descriptive text here."},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"description":"Explorer chart for this series: BAR, LINE, AREA, WATERFALL, or TABLE. Omit to use LINE."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]}},"required":["type","formula","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["budget"],"description":"Required series discriminator — always set explicitly, never omit. One of: \"cost\" | \"metric\" | \"usage\" | \"formula\" | \"budget\" | \"externalMetric\"."},"budgetId":{"type":"string"},"virtualDimensionValue":{"type":"string"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Required series identifier referenced by formulas (e.g. \"a\", \"b\", \"a__r6\"). Prefer short identifiers; put human labels in alias — never spaces or descriptive phrases in name."},"alias":{"type":"string","minLength":1,"maxLength":50,"description":"Optional human-readable label (e.g. \"Cost by environment\", \"AWS spend\"). Prefer short identifiers in name; put descriptive text here."},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"description":"Explorer chart for this series: BAR, LINE, AREA, WATERFALL, or TABLE. Omit to use LINE."},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}],"description":"Split by budget line. Must be this budget's virtual dimension bqName from get. Omit for the total. Sibling cost/usage/metric groupBy must be that same field so formulas match per line."}},"required":["type","budgetId","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"],"description":"Required series discriminator — always set explicitly, never omit. One of: \"cost\" | \"metric\" | \"usage\" | \"formula\" | \"budget\" | \"externalMetric\"."},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"query":{"type":"string","minLength":1},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"],"default":"tsuga","description":"External metric provider. Defaults to \"tsuga\" when omitted for backward compatibility with existing Tsuga MCP clients."},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Required series identifier referenced by formulas (e.g. \"a\", \"b\", \"a__r6\"). Prefer short identifiers; put human labels in alias — never spaces or descriptive phrases in name."},"alias":{"type":"string","minLength":1,"maxLength":50,"description":"Optional human-readable label (e.g. \"Cost by environment\", \"AWS spend\"). Prefer short identifiers in name; put descriptive text here."},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"description":"Explorer chart for this series: BAR, LINE, AREA, WATERFALL, or TABLE. Omit to use LINE."},"unitOverride":{"type":"string"}},"required":["type","integrationId","name"],"additionalProperties":false}],"discriminator":{"propertyName":"type"}},"minItems":1,"maxItems":26},"datePreset":{"type":"string","enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"],"default":"Month"},"forecastDays":{"type":"integer","minimum":0},"forecast":{"type":"boolean"},"compare":{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"],"default":"WATERFALL"}},"additionalProperties":false},"analyze":{"type":"object","properties":{"changePoint":{"anyOf":[{"type":"boolean"},{"type":"object","properties":{"ignoreWeekends":{"type":"boolean","description":"Drop Saturday/Sunday before detection. Maps to Billy `no_weekends`."}},"additionalProperties":false}]}},"additionalProperties":false},"limit":{"type":"integer","minimum":1,"maximum":1000},"scopeId":{"type":"string","nullable":true},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["queries"],"additionalProperties":false},"QueryResponse":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["series"]},"data":{"type":"object","properties":{"outputData":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","nullable":true,"format":"date-time"},"values":{"type":"array","items":{"type":"object","properties":{"groupByValue":{"type":"string"},"queryName":{"type":"string"},"value":{"type":"number"},"yhatLower":{"type":"number"},"yhatUpper":{"type":"number"}},"required":["groupByValue","queryName","value"]}}},"required":["date","values"]}},"series":{"type":"array","items":{"type":"object","properties":{"queryName":{"type":"string"},"groupByValue":{"type":"string"},"totals":{"type":"number"},"unit":{"type":"string"}},"required":["queryName","groupByValue","totals","unit"]}},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"splitDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"forecastSkipReason":{"type":"string","enum":["not_enough_history"]}},"required":["outputData","series","aggBy"]},"analyze":{"type":"object","properties":{"changePoint":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"queryName":{"type":"string"},"status":{"type":"string","enum":["completed"]},"error_message":{"type":"string","enum":[""]},"periods":{"type":"array","items":{"type":"object","properties":{"start":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"stop":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"type":{"type":"string","enum":["no trend","increasing","decreasing","peak","step up","step down"]},"stats":{"type":"object","properties":{"mean":{"type":"number"},"max":{"type":"number"},"head":{"type":"number"},"tail":{"type":"number"}},"required":["mean","max","head","tail"],"additionalProperties":false}},"required":["start","stop","type","stats"],"additionalProperties":false}}},"required":["queryName","status","error_message","periods"],"additionalProperties":false},{"type":"object","properties":{"queryName":{"type":"string"},"status":{"type":"string","enum":["failed"]},"error_message":{"type":"string"}},"required":["queryName","status","error_message"],"additionalProperties":false}]}}},"required":["changePoint"],"additionalProperties":false}},"required":["kind","data"]},{"type":"object","properties":{"kind":{"type":"string","enum":["comparison"]},"data":{"type":"object","properties":{"outputData":{"type":"array","items":{"type":"object","properties":{"comparisonPeriodValue":{"type":"number"},"selectedPeriodValue":{"type":"number"},"difference":{"type":"number"},"percentageChange":{"type":"number"},"queryName":{"type":"string"},"groupByValue":{"type":"string"}},"required":["comparisonPeriodValue","selectedPeriodValue","difference","percentageChange","queryName","groupByValue"]}},"series":{"type":"array","items":{"type":"object","properties":{"queryName":{"type":"string"},"groupByValue":{"type":"string"},"unit":{"type":"string"}},"required":["queryName","groupByValue","unit"]}},"totals":{"type":"array","items":{"type":"object","properties":{"totalPrevious":{"type":"number"},"totalCurrent":{"type":"number"},"queryName":{"type":"string"}},"required":["totalPrevious","totalCurrent","queryName"]}}},"required":["outputData","series","totals"]}},"required":["kind","data"]}],"discriminator":{"propertyName":"kind"}},"DiffTreeResponse":{"type":"array","items":{"type":"object","properties":{"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false}},"cost":{"type":"number"},"previous_cost":{"type":"number"},"diff":{"type":"number"}},"required":["dimensions","cost","previous_cost","diff"],"additionalProperties":false}},"QueryDimension":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"groupTitle":{"type":"string"},"values":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"proportionCostAllocated":{"type":"number"}},"required":["name","label","proportionCostAllocated"],"additionalProperties":false}}},"required":["name","label","groupTitle","values"],"additionalProperties":false},"QueryMetric":{"type":"object","properties":{"id":{"type":"string"},"datasourceId":{"type":"string"},"datasourceName":{"type":"string"},"metricName":{"type":"string"},"type":{"type":"string","enum":["CSV","GoogleSheet","Datadog","DatadogV2","DatadogCIVisibility","AWS","BigQuery","GCS","Amplitude","AwsS3V2","AwsCloudWatch","Cursor"]},"status":{"type":"string","nullable":true,"enum":["ACTIVE","DRAFT","ERROR","PENDING",null]},"dimensions":{"type":"array","items":{"type":"string"}},"unit":{"type":"string"}},"required":["id","datasourceId","datasourceName","metricName","type","status","dimensions"],"additionalProperties":false},"InvalidQueryError":{"type":"object","properties":{"error":{"type":"string","enum":["INVALID_QUERY"]},"reason":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"},"code":{"type":"string"}},"required":["path","message","code"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false},"HourlyGranularityForbiddenError":{"type":"object","properties":{"error":{"type":"string","enum":["HOURLY_GRANULARITY_FORBIDDEN"]}},"required":["error"],"additionalProperties":false},"QueryNotFoundError":{"type":"object","properties":{"error":{"type":"string","enum":["NOT_FOUND"]},"reason":{"type":"string"}},"required":["error"],"additionalProperties":false},"ExternalMetricIntegrationNotFoundError":{"type":"object","properties":{"error":{"type":"string","enum":["EXTERNAL_METRIC_INTEGRATION_NOT_FOUND"]}},"required":["error"],"additionalProperties":false},"ExternalMetricUnauthorizedError":{"type":"object","properties":{"error":{"type":"string","enum":["EXTERNAL_METRIC_UNAUTHORIZED"]},"reason":{"type":"string"}},"required":["error","reason"],"additionalProperties":false},"ExternalMetricNotFoundError":{"type":"object","properties":{"error":{"type":"string","enum":["EXTERNAL_METRIC_NOT_FOUND"]},"reason":{"type":"string"}},"required":["error","reason"],"additionalProperties":false},"InternalServerError":{"type":"object","properties":{"error":{"type":"string","enum":["INTERNAL_SERVER_ERROR"]}},"required":["error"],"additionalProperties":false},"AdminGetServiceAccount":{"type":"object","properties":{"serviceAccountEmail":{"type":"string"},"subIds":{"type":"array","items":{"type":"string"}}},"required":["serviceAccountEmail","subIds"]},"AdminTeam":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"name":{"type":"string"},"description":{"type":"string"},"visibility":{"type":"string","enum":["PUBLIC","PRIVATE"]},"defaultCostMetric":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"]},"destinationEnabled":{"type":"boolean"},"destination":{"type":"string","nullable":true},"organizationId":{"type":"string"},"scopes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Scope row id."},"name":{"type":"string","description":"Human-readable scope name."},"whereClause":{"type":"object","properties":{},"additionalProperties":{},"description":"Persisted react-querybuilder filter (RuleGroupType). Canonical filter string for API clients is filterCel."},"filterCel":{"type":"string","description":"Team cost filter as CEL (Common Expression Language), derived from whereClause."}},"required":["id","name","whereClause","filterCel"]}}},"required":["id","createdAt","updatedAt","name","description","visibility","defaultCostMetric","destinationType","destinationEnabled","destination","organizationId","scopes"]},"AdminTeamWithMembers":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"name":{"type":"string"},"description":{"type":"string"},"visibility":{"type":"string","enum":["PUBLIC","PRIVATE"]},"defaultCostMetric":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"]},"destinationEnabled":{"type":"boolean"},"destination":{"type":"string","nullable":true},"organizationId":{"type":"string"},"scopes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Scope row id."},"name":{"type":"string","description":"Human-readable scope name."},"whereClause":{"type":"object","properties":{},"additionalProperties":{},"description":"Persisted react-querybuilder filter (RuleGroupType). Canonical filter string for API clients is filterCel."},"filterCel":{"type":"string","description":"Team cost filter as CEL (Common Expression Language), derived from whereClause."}},"required":["id","name","whereClause","filterCel"]}},"_count":{"type":"object","properties":{"members":{"type":"number"}},"required":["members"]},"members":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["OWNER","MEMBER"]}},"required":["role"]}}},"required":["id","createdAt","updatedAt","name","description","visibility","defaultCostMetric","destinationType","destinationEnabled","destination","organizationId","scopes","_count","members"]},"AdminTeamDetail":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":"string","nullable":true,"format":"date-time"},"name":{"type":"string"},"description":{"type":"string"},"visibility":{"type":"string","enum":["PUBLIC","PRIVATE"]},"defaultCostMetric":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"]},"destinationEnabled":{"type":"boolean"},"destination":{"type":"string","nullable":true},"organizationId":{"type":"string"},"scopes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Scope row id."},"name":{"type":"string","description":"Human-readable scope name."},"whereClause":{"type":"object","properties":{},"additionalProperties":{},"description":"Persisted react-querybuilder filter (RuleGroupType). Canonical filter string for API clients is filterCel."},"filterCel":{"type":"string","description":"Team cost filter as CEL (Common Expression Language), derived from whereClause."}},"required":["id","name","whereClause","filterCel"]}},"_count":{"type":"object","properties":{"members":{"type":"number"}},"required":["members"]},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"teamId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string","enum":["OWNER","MEMBER"]},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"avatar":{"type":"string","nullable":true},"emailId":{"type":"string","nullable":true}},"required":["id","firstName","lastName","avatar","emailId"]}},"required":["id","createdAt","updatedAt","teamId","userId","role","user"]}},"invites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"teamId":{"type":"string"},"organizationId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["OWNER","MEMBER"]},"status":{"type":"string","enum":["PENDING","ACCEPTED"]}},"required":["id","createdAt","updatedAt","teamId","organizationId","email","role","status"]}}},"required":["id","createdAt","updatedAt","name","description","visibility","defaultCostMetric","destinationType","destinationEnabled","destination","organizationId","scopes","_count","members","invites"]},"AdminSuccessResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]},"AdminCreateBillingDatasourceResponse":{"allOf":[{"oneOf":[{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["GCP"]},"bqUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"isDetailedBilling":{"type":"boolean"},"status":{"type":"string"}},"required":["name","type","bqUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Azure"]},"storageAccountName":{"type":"string"},"containerName":{"type":"string"},"actualsPath":{"type":"string"},"amortizedPath":{"type":"string"},"status":{"type":"string"}},"required":["name","type","storageAccountName","containerName","actualsPath"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["AWS"]},"bucketName":{"type":"string"},"roleArn":{"type":"string"},"prefix":{"type":"string"},"eksSplitDataEnabled":{"type":"boolean","default":false},"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"eksSplit":{"type":"boolean"},"status":{"type":"string"}},"required":["name","type","bucketName","roleArn","prefix"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Cursor"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Anthropic"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["AnthropicClaudeAi"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["ElasticCloud"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["ClickHouseCloud"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Cloudflare"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Scaleway"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["OpenAI"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["OpenRouter"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["ElevenLabs"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["KlingAi"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["SeedanceAi"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["OCI"]},"tenancyOcid":{"type":"string"},"userOcid":{"type":"string"},"region":{"type":"string"},"prefix":{"type":"string"},"destination":{"type":"string"},"fingerprint":{"type":"string"},"status":{"type":"string"}},"required":["name","type","tenancyOcid","userOcid","region","prefix","destination"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["NEBIUS"]},"bucket":{"type":"string"},"region":{"type":"string"},"prefix":{"type":"string"},"destination":{"type":"string"},"status":{"type":"string"}},"required":["name","type","bucket","region","destination"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["CustomBigQuery"]},"mapping":{"type":"object","properties":{"billedCost":{"type":"string","minLength":1},"subAccountId":{"type":"string"},"serviceName":{"type":"string"},"billingPeriodStart":{"type":"string"},"billingPeriodEnd":{"type":"string"},"chargePeriodStart":{"type":"string"},"chargePeriodEnd":{"type":"string"},"chargeDescription":{"type":"string"},"billingCurrency":{"type":"string"},"contractedCost":{"type":"string"},"billingAccountId":{"type":"string"},"originalBillingCurrency":{"type":"string"},"chargeCategory":{"type":"string"},"chargeFrequency":{"type":"string"},"commitmentDiscountCategory":{"type":"string"},"commitmentDiscountId":{"type":"string"},"commitmentDiscountType":{"type":"string"},"consumedQuantity":{"type":"string"},"consumedUnit":{"type":"string"},"effectiveCost":{"type":"string"},"invoiceIssuer":{"type":"string"},"listCost":{"type":"string"},"listUnitPrice":{"type":"string"},"pricingCategory":{"type":"string"},"pricingQuantity":{"type":"string"},"pricingUnit":{"type":"string"},"provider":{"type":"string"},"publisher":{"type":"string"},"regionId":{"type":"string"},"resourceId":{"type":"string"},"resourceName":{"type":"string"},"resourceType":{"type":"string"},"categoryFocus":{"type":"string"},"skuId":{"type":"string"},"sku":{"type":"string"},"skuPriceId":{"type":"string"},"tags":{"type":"string"}},"required":["billedCost"]},"bqTablePath":{"type":"string"},"providerName":{"type":"string"},"billingAccountId":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","mapping","bqTablePath","providerName"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["CONFLUENT"]},"bqTableUri":{"type":"string"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Datadog"]},"integrationId":{"type":"string"},"bqTableUri":{"type":"string"},"status":{"type":"string"}},"required":["name","type","integrationId","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Aiven"]},"organizationId":{"type":"string"},"bqTableUri":{"type":"string"},"status":{"type":"string"}},"required":["name","type","organizationId","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["GCP_CUD_EXPORT"]},"bqTablePath":{"type":"string","minLength":1,"pattern":"^[a-zA-Z][a-zA-Z0-9_-]*\\.[a-zA-Z_][a-zA-Z0-9_]*\\.[a-zA-Z_][a-zA-Z0-9_]*$"},"status":{"type":"string"}},"required":["name","type","bqTablePath"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["SNOWFLAKE"]},"integrationId":{"type":"string"},"bqTableUris":{"type":"array","items":{"type":"string"}},"status":{"type":"string"}},"required":["name","type","integrationId","bqTableUris"]}],"discriminator":{"propertyName":"type"}},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},"AdminValidationResult":{"type":"object","properties":{"isSuccess":{"type":"boolean"}},"required":["isSuccess"],"additionalProperties":{}},"AdminBillingDatasourceCreate":{"oneOf":[{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["GCP"]},"bqTablePath":{"type":"string"},"isDetailedBilling":{"type":"boolean"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"}},"required":["name","type","bqTablePath"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Azure"]},"sasUrl":{"type":"string","format":"uri"},"containerName":{"type":"string","minLength":1},"storageAccountName":{"type":"string","minLength":1},"actualsPath":{"type":"string","minLength":1},"amortizedPath":{"type":"string","minLength":1}},"required":["name","type","sasUrl","containerName","storageAccountName","actualsPath","amortizedPath"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["AWS"]},"bucketName":{"type":"string"},"roleArn":{"type":"string","pattern":"^arn:aws:iam::\\d{12}:role\\/[\\w+=,.@-]+$"},"prefix":{"type":"string","default":""},"eksSplitDataEnabled":{"type":"boolean","default":false},"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"eksSplit":{"type":"boolean"}},"required":["name","type","bucketName","roleArn"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Cursor"]},"adminApiKey":{"type":"string","minLength":1},"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"}},"required":["name","type","adminApiKey"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Anthropic"]},"adminApiKey":{"type":"string","minLength":1},"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"}},"required":["name","type","adminApiKey"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["AnthropicClaudeAi"]},"analyticsApiKey":{"type":"string","minLength":1},"accountName":{"type":"string","minLength":1},"startDate":{"type":"string","nullable":true,"format":"date-time"}},"required":["name","type","analyticsApiKey","accountName"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["ElasticCloud"]},"apiKey":{"type":"string","minLength":1},"organizationId":{"type":"string","minLength":1},"startDate":{"type":"string","nullable":true,"format":"date-time"}},"required":["name","type","apiKey","organizationId"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["ClickHouseCloud"]},"keyId":{"type":"string","minLength":1},"keySecret":{"type":"string","minLength":1},"organizationId":{"type":"string","minLength":1},"startDate":{"type":"string","nullable":true,"format":"date-time"}},"required":["name","type","keyId","keySecret","organizationId"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["Cloudflare"]},"apiToken":{"type":"string","minLength":1},"accountId":{"type":"string","minLength":1},"startDate":{"type":"string","nullable":true,"format":"date-time"}},"required":["name","type","apiToken","accountId"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Scaleway"]},"secretKey":{"type":"string","minLength":1},"organizationId":{"type":"string","minLength":1},"accessKey":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"}},"required":["name","type","secretKey","organizationId"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["OpenAI"]},"adminApiKey":{"type":"string","minLength":1},"startDate":{"type":"string","nullable":true,"format":"date-time"}},"required":["name","type","adminApiKey"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["OpenRouter"]},"managementKey":{"type":"string","minLength":1},"organizationName":{"type":"string","nullable":true,"minLength":1},"startDate":{"type":"string","nullable":true,"format":"date-time"}},"required":["name","type","managementKey"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["ElevenLabs"]},"apiToken":{"type":"string","minLength":1},"region":{"type":"string","nullable":true,"enum":["us","eu","in","sg",null]},"startDate":{"type":"string","nullable":true,"format":"date-time"}},"required":["name","type","apiToken"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["KlingAi"]},"apiKey":{"type":"string","minLength":1},"region":{"type":"string","nullable":true,"enum":["singapore","beijing",null]},"startDate":{"type":"string","nullable":true,"format":"date-time"}},"required":["name","type","apiKey"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["SeedanceAi"]},"accessKeyId":{"type":"string","minLength":1},"secretAccessKey":{"type":"string","minLength":1},"region":{"type":"string","nullable":true,"minLength":1},"startDate":{"type":"string","nullable":true,"format":"date-time"}},"required":["name","type","accessKeyId","secretAccessKey"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["OCI"]},"userOcid":{"type":"string","minLength":1},"tenancyOcid":{"type":"string","minLength":1},"region":{"type":"string","minLength":1,"pattern":"^[a-zA-Z0-9-]+$"},"privateKeyPem":{"type":"string","minLength":1},"fingerprint":{"type":"string","minLength":1},"prefix":{"type":"string","nullable":true,"minLength":1}},"required":["name","type","userOcid","tenancyOcid","region","privateKeyPem"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["NEBIUS"]},"accessKeyId":{"type":"string","minLength":1},"secretAccessKey":{"type":"string","minLength":1},"bucket":{"type":"string","minLength":1},"region":{"type":"string","enum":["eu-north1","eu-west1"]},"prefix":{"type":"string","nullable":true,"minLength":1}},"required":["name","type","accessKeyId","secretAccessKey","bucket","region"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["CustomBigQuery"]},"mapping":{"type":"object","properties":{"billedCost":{"type":"string","minLength":1},"subAccountId":{"type":"string"},"serviceName":{"type":"string"},"billingPeriodStart":{"type":"string"},"billingPeriodEnd":{"type":"string"},"chargePeriodStart":{"type":"string"},"chargePeriodEnd":{"type":"string"},"chargeDescription":{"type":"string"},"billingCurrency":{"type":"string"},"contractedCost":{"type":"string"},"billingAccountId":{"type":"string"},"originalBillingCurrency":{"type":"string"},"chargeCategory":{"type":"string"},"chargeFrequency":{"type":"string"},"commitmentDiscountCategory":{"type":"string"},"commitmentDiscountId":{"type":"string"},"commitmentDiscountType":{"type":"string"},"consumedQuantity":{"type":"string"},"consumedUnit":{"type":"string"},"effectiveCost":{"type":"string"},"invoiceIssuer":{"type":"string"},"listCost":{"type":"string"},"listUnitPrice":{"type":"string"},"pricingCategory":{"type":"string"},"pricingQuantity":{"type":"string"},"pricingUnit":{"type":"string"},"provider":{"type":"string"},"publisher":{"type":"string"},"regionId":{"type":"string"},"resourceId":{"type":"string"},"resourceName":{"type":"string"},"resourceType":{"type":"string"},"categoryFocus":{"type":"string"},"skuId":{"type":"string"},"sku":{"type":"string"},"skuPriceId":{"type":"string"},"tags":{"type":"string"}},"required":["billedCost"]},"bqTablePath":{"type":"string"},"providerName":{"type":"string"},"billingAccountId":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"}},"required":["name","type","mapping","bqTablePath","providerName"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["CONFLUENT"]},"apiKey":{"type":"string"},"apiSecret":{"type":"string"}},"required":["name","type","apiKey","apiSecret"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["Datadog"]},"apiKey":{"type":"string","minLength":1},"applicationKey":{"type":"string","minLength":1},"region":{"type":"string","minLength":1}},"required":["name","type","apiKey","applicationKey","region"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["Aiven"]},"apiSecret":{"type":"string","minLength":1},"organizationId":{"type":"string","minLength":1}},"required":["name","type","apiSecret","organizationId"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["GCP_CUD_EXPORT"]},"bqTablePath":{"type":"string","minLength":1,"pattern":"^[a-zA-Z][a-zA-Z0-9_-]*\\.[a-zA-Z_][a-zA-Z0-9_]*\\.[a-zA-Z_][a-zA-Z0-9_]*$"}},"required":["name","type","bqTablePath"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["SNOWFLAKE"]},"integrationId":{"type":"string","minLength":1}},"required":["name","type","integrationId"]}],"discriminator":{"propertyName":"type"}},"AdminBillingDatasourceRead":{"oneOf":[{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["GCP"]},"bqUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"isDetailedBilling":{"type":"boolean"},"status":{"type":"string"}},"required":["name","type","bqUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Azure"]},"storageAccountName":{"type":"string"},"containerName":{"type":"string"},"actualsPath":{"type":"string"},"amortizedPath":{"type":"string"},"status":{"type":"string"}},"required":["name","type","storageAccountName","containerName","actualsPath"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["AWS"]},"bucketName":{"type":"string"},"roleArn":{"type":"string"},"prefix":{"type":"string"},"eksSplitDataEnabled":{"type":"boolean","default":false},"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"eksSplit":{"type":"boolean"},"status":{"type":"string"}},"required":["name","type","bucketName","roleArn","prefix"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Cursor"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Anthropic"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["AnthropicClaudeAi"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["ElasticCloud"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["ClickHouseCloud"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Cloudflare"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Scaleway"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["OpenAI"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["OpenRouter"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["ElevenLabs"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["KlingAi"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["SeedanceAi"]},"bqTableUri":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["OCI"]},"tenancyOcid":{"type":"string"},"userOcid":{"type":"string"},"region":{"type":"string"},"prefix":{"type":"string"},"destination":{"type":"string"},"fingerprint":{"type":"string"},"status":{"type":"string"}},"required":["name","type","tenancyOcid","userOcid","region","prefix","destination"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["NEBIUS"]},"bucket":{"type":"string"},"region":{"type":"string"},"prefix":{"type":"string"},"destination":{"type":"string"},"status":{"type":"string"}},"required":["name","type","bucket","region","destination"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["CustomBigQuery"]},"mapping":{"type":"object","properties":{"billedCost":{"type":"string","minLength":1},"subAccountId":{"type":"string"},"serviceName":{"type":"string"},"billingPeriodStart":{"type":"string"},"billingPeriodEnd":{"type":"string"},"chargePeriodStart":{"type":"string"},"chargePeriodEnd":{"type":"string"},"chargeDescription":{"type":"string"},"billingCurrency":{"type":"string"},"contractedCost":{"type":"string"},"billingAccountId":{"type":"string"},"originalBillingCurrency":{"type":"string"},"chargeCategory":{"type":"string"},"chargeFrequency":{"type":"string"},"commitmentDiscountCategory":{"type":"string"},"commitmentDiscountId":{"type":"string"},"commitmentDiscountType":{"type":"string"},"consumedQuantity":{"type":"string"},"consumedUnit":{"type":"string"},"effectiveCost":{"type":"string"},"invoiceIssuer":{"type":"string"},"listCost":{"type":"string"},"listUnitPrice":{"type":"string"},"pricingCategory":{"type":"string"},"pricingQuantity":{"type":"string"},"pricingUnit":{"type":"string"},"provider":{"type":"string"},"publisher":{"type":"string"},"regionId":{"type":"string"},"resourceId":{"type":"string"},"resourceName":{"type":"string"},"resourceType":{"type":"string"},"categoryFocus":{"type":"string"},"skuId":{"type":"string"},"sku":{"type":"string"},"skuPriceId":{"type":"string"},"tags":{"type":"string"}},"required":["billedCost"]},"bqTablePath":{"type":"string"},"providerName":{"type":"string"},"billingAccountId":{"type":"string"},"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string"}},"required":["name","type","mapping","bqTablePath","providerName"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["CONFLUENT"]},"bqTableUri":{"type":"string"},"status":{"type":"string"}},"required":["name","type","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Datadog"]},"integrationId":{"type":"string"},"bqTableUri":{"type":"string"},"status":{"type":"string"}},"required":["name","type","integrationId","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Aiven"]},"organizationId":{"type":"string"},"bqTableUri":{"type":"string"},"status":{"type":"string"}},"required":["name","type","organizationId","bqTableUri"]},{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["GCP_CUD_EXPORT"]},"bqTablePath":{"type":"string","minLength":1,"pattern":"^[a-zA-Z][a-zA-Z0-9_-]*\\.[a-zA-Z_][a-zA-Z0-9_]*\\.[a-zA-Z_][a-zA-Z0-9_]*$"},"status":{"type":"string"}},"required":["name","type","bqTablePath"]},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["SNOWFLAKE"]},"integrationId":{"type":"string"},"bqTableUris":{"type":"array","items":{"type":"string"}},"status":{"type":"string"}},"required":["name","type","integrationId","bqTableUris"]}],"discriminator":{"propertyName":"type"}},"EventTagsResponse":{"type":"object","properties":{"labels":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"source":{"type":"string","enum":["github","custom","provider"]},"count":{"type":"number"},"lastUsedDate":{"type":"string"}},"required":["value","source"]}}},"required":["labels"]},"GetEventResponse":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string","enum":["custom","provider","github","api","agent"]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","minLength":5},"date":{"type":"string","nullable":true,"format":"date-time"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"viewUsedForCreation":{"type":"object","nullable":true,"properties":{"metricId":{"type":"string"},"currency":{"type":"string","enum":["EUR","USD","GBP","CNY","KRW"],"default":"USD"},"limit":{"type":"number","nullable":true},"threshold":{"anyOf":[{"type":"number","nullable":true},{"nullable":true,"type":"string","enum":[null]}]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"groupBy":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_30_DAYS","TRAILING_90_DAYS","TRAILING_45_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_7_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_3_MONTHS","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_INVOICE_MONTH",null]},"previousFrom":{"type":"string"},"previousTo":{"type":"string"},"explorerChartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"default":"BAR"},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"scopeId":{"type":"string","nullable":true}},"required":["metricId","limit","aggBy","groupBy","from","to","datePreset","previousFrom","previousTo","whereClause"]},"metricId":{"type":"string"},"groupBy":{"type":"string"},"datePreset":{"type":"string","enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH"]},"startDate":{"type":"string"},"endDate":{"type":"string"},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","enum":["EUR","USD","GBP","CNY","KRW"],"default":"USD"},"scopeId":{"type":"string","nullable":true},"widgetEvents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"},"title":{"type":"string","default":""},"description":{"type":"string","default":""},"request":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"]}},"required":["x","y","w","h","request"]}},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"]},"isBookmarked":{"type":"boolean"},"dateFormatted":{"type":"string"}},"required":["source","metadata","name","date","description","tags","viewUsedForCreation","widgetEvents"]},"AggregatedEventsResponse":{"type":"object","properties":{"technicalEvents":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string","enum":["custom","provider","github","api","agent"]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","minLength":5},"date":{"type":"string","nullable":true,"format":"date-time"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"viewUsedForCreation":{"type":"object","nullable":true,"properties":{"metricId":{"type":"string"},"currency":{"type":"string","enum":["EUR","USD","GBP","CNY","KRW"],"default":"USD"},"limit":{"type":"number","nullable":true},"threshold":{"anyOf":[{"type":"number","nullable":true},{"nullable":true,"type":"string","enum":[null]}]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"groupBy":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_30_DAYS","TRAILING_90_DAYS","TRAILING_45_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_7_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_3_MONTHS","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_INVOICE_MONTH",null]},"previousFrom":{"type":"string"},"previousTo":{"type":"string"},"explorerChartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"default":"BAR"},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"scopeId":{"type":"string","nullable":true}},"required":["metricId","limit","aggBy","groupBy","from","to","datePreset","previousFrom","previousTo","whereClause"]},"scopeId":{"type":"string","nullable":true},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"]}},"required":["source","metadata","name","date","description","tags","viewUsedForCreation"]}}},"required":["date","events"]}},"businessEvents":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string","enum":["custom","provider","github","api","agent"]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","minLength":5},"date":{"type":"string","nullable":true,"format":"date-time"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"viewUsedForCreation":{"type":"object","nullable":true,"properties":{"metricId":{"type":"string"},"currency":{"type":"string","enum":["EUR","USD","GBP","CNY","KRW"],"default":"USD"},"limit":{"type":"number","nullable":true},"threshold":{"anyOf":[{"type":"number","nullable":true},{"nullable":true,"type":"string","enum":[null]}]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"groupBy":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_30_DAYS","TRAILING_90_DAYS","TRAILING_45_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_7_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_3_MONTHS","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_INVOICE_MONTH",null]},"previousFrom":{"type":"string"},"previousTo":{"type":"string"},"explorerChartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"default":"BAR"},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"scopeId":{"type":"string","nullable":true}},"required":["metricId","limit","aggBy","groupBy","from","to","datePreset","previousFrom","previousTo","whereClause"]},"scopeId":{"type":"string","nullable":true},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"]}},"required":["source","metadata","name","date","description","tags","viewUsedForCreation"]}}},"required":["date","events"]}},"providerEvents":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string","enum":["custom","provider","github","api","agent"]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","minLength":5},"date":{"type":"string","nullable":true,"format":"date-time"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"viewUsedForCreation":{"type":"object","nullable":true,"properties":{"metricId":{"type":"string"},"currency":{"type":"string","enum":["EUR","USD","GBP","CNY","KRW"],"default":"USD"},"limit":{"type":"number","nullable":true},"threshold":{"anyOf":[{"type":"number","nullable":true},{"nullable":true,"type":"string","enum":[null]}]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"groupBy":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_30_DAYS","TRAILING_90_DAYS","TRAILING_45_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_7_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_3_MONTHS","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_INVOICE_MONTH",null]},"previousFrom":{"type":"string"},"previousTo":{"type":"string"},"explorerChartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"default":"BAR"},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"scopeId":{"type":"string","nullable":true}},"required":["metricId","limit","aggBy","groupBy","from","to","datePreset","previousFrom","previousTo","whereClause"]},"scopeId":{"type":"string","nullable":true},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"]}},"required":["source","metadata","name","date","description","tags","viewUsedForCreation"]}}},"required":["date","events"]}},"bookmarkedSearchEvents":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}}},"required":["technicalEvents","businessEvents","providerEvents"]},"EventIdResponse":{"type":"string"}},"parameters":{}},"paths":{"/alerts-v2":{"get":{"operationId":"listAlertsV2","summary":"List cost and budget alerts","description":"Returns the current Alerts V2 table payload. This camelCase route is the supported application contract; canonical public resource naming is a separate follow-up.","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Cost and budget alerts in the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostBudgetAlertsTableData"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/alerts-v2/templates":{"get":{"operationId":"listAlertTemplatesV2","summary":"List alert templates","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Available and unavailable alert templates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertTemplatesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/alerts-v2/templates/{templateId}":{"get":{"operationId":"getAlertTemplateV2","summary":"Get an alert template","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["weekly-costs-threshold","unused-reservation-cost","kubernetes-waste","aws-savings-plan-coverage","marginal-cost","rd-weekend-cost","egress-costs","untagged-resources","rolling-7d-relative-change","service-7d-cost-increase","never-seen-sku"]},"required":true,"name":"templateId","in":"path"}],"responses":{"200":{"description":"Template configuration, or null when unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertTemplateResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/alerts-v2/budgets-with-alert-status":{"get":{"operationId":"listBudgetsWithAlertStatusV2","summary":"List budgets eligible for alerts","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Budgets visible to the caller with alert and edit status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetsWithAlertStatus"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/alerts-v2/{alertId}/snooze":{"post":{"operationId":"snoozeAlertV2","summary":"Snooze an alert","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"alertId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"alertType":{"type":"string","enum":["Cost","Budget"]},"snoozedUntil":{"type":"string","format":"date-time"}},"required":["alertType","snoozedUntil"]},"example":{"alertType":"Cost","snoozedUntil":"2027-01-05T09:00:00.000Z"}}}},"responses":{"200":{"description":"Alert snoozed","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"}}}},"404":{"description":"Alert not found in the authenticated organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"},"example":{"error":"NOT_FOUND","reason":"Alert not found"}}}}}}},"/alerts-v2/{alertId}/unsnooze":{"post":{"operationId":"unsnoozeAlertV2","summary":"Unsnooze an alert","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"alertId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"alertType":{"type":"string","enum":["Cost","Budget"]}},"required":["alertType"]},"example":{"alertType":"Cost"}}}},"responses":{"200":{"description":"Alert unsnoozed","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"}}}},"404":{"description":"Alert not found in the authenticated organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"},"example":{"error":"NOT_FOUND","reason":"Alert not found"}}}}}}},"/alerts-v2/{alertId}/archive":{"post":{"operationId":"archiveAlertV2","summary":"Archive an alert","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"alertId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"alertType":{"type":"string","enum":["Cost","Budget"]}},"required":["alertType"]},"example":{"alertType":"Cost"}}}},"responses":{"200":{"description":"Alert archived","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"}}}},"404":{"description":"Alert not found in the authenticated organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"},"example":{"error":"NOT_FOUND","reason":"Alert not found"}}}}}}},"/alerts-v2/{alertId}/restore":{"post":{"operationId":"restoreAlertV2","summary":"Restore an alert","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"alertId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"alertType":{"type":"string","enum":["Cost","Budget"]}},"required":["alertType"]},"example":{"alertType":"Cost"}}}},"responses":{"200":{"description":"Alert restored","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"}}}},"404":{"description":"Alert not found in the authenticated organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"},"example":{"error":"NOT_FOUND","reason":"Alert not found"}}}}}}},"/alerts-v2/{alertId}":{"delete":{"operationId":"deleteAlertV2","summary":"Delete an archived alert","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"alertId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"alertType":{"type":"string","enum":["Cost","Budget"]}},"required":["alertType"]},"example":{"alertType":"Cost"}}}},"responses":{"200":{"description":"Alert deleted","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"}}}},"404":{"description":"Alert not found in the authenticated organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"},"example":{"error":"NOT_FOUND","reason":"Alert not found"}}}}}}},"/alerts-v2/costAlerts":{"get":{"operationId":"listCostAlertsV2","summary":"List cost alerts","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Cost alerts with recent computation results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostAlertsTableData"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}},"post":{"operationId":"createCostAlertV2","summary":"Create a cost alert","description":"Creates either a condition-based alert (`condition` plus `dedup`) or a legacy threshold-based alert. The example monitors production AWS compute spend using Costory dimensions.","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"urlState":{"type":"string"},"name":{"type":"string","minLength":1},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"thresholds":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"metricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"changeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]}},"required":["value","severityLevel"]},"default":[]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"queryName":{"type":"string","default":""},"evaluationPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY"],"default":"DAILY"},"thresholdType":{"type":"string","enum":["ABOVE","UNDER"],"default":"ABOVE"},"description":{"type":"string","default":""},"tagIds":{"type":"array","items":{"type":"string"},"default":[]},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"teamId":{"type":"string","nullable":true},"scout":{"type":"string","nullable":true,"minLength":1},"scopeId":{"type":"string","nullable":true},"condition":{"type":"string","nullable":true},"dedup":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["CALENDAR"]},"calendarUnit":{"type":"string","enum":["WEEK","MONTH"]}},"required":["kind","calendarUnit"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ROLLING"]},"windowDays":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["kind","windowDays"]},{"nullable":true,"type":"string","enum":[null]}]},"messageWidgets":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type","topN","flopN"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]}],"discriminator":{"propertyName":"type"}}]}},"notificationChannel":{"type":"string","enum":["SLACK"]},"slackChannelId":{"type":"string","minLength":1}},"required":["urlState","name","currency","queries","notificationChannel","slackChannelId"]},{"type":"object","properties":{"urlState":{"type":"string"},"name":{"type":"string","minLength":1},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"thresholds":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"metricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"changeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]}},"required":["value","severityLevel"]},"default":[]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"queryName":{"type":"string","default":""},"evaluationPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY"],"default":"DAILY"},"thresholdType":{"type":"string","enum":["ABOVE","UNDER"],"default":"ABOVE"},"description":{"type":"string","default":""},"tagIds":{"type":"array","items":{"type":"string"},"default":[]},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"teamId":{"type":"string","nullable":true},"scout":{"type":"string","nullable":true,"minLength":1},"scopeId":{"type":"string","nullable":true},"condition":{"type":"string","nullable":true},"dedup":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["CALENDAR"]},"calendarUnit":{"type":"string","enum":["WEEK","MONTH"]}},"required":["kind","calendarUnit"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ROLLING"]},"windowDays":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["kind","windowDays"]},{"nullable":true,"type":"string","enum":[null]}]},"messageWidgets":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type","topN","flopN"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]}],"discriminator":{"propertyName":"type"}}]}},"notificationChannel":{"type":"string","enum":["TEAMS"]},"teamsChannelId":{"type":"string","minLength":1}},"required":["urlState","name","currency","queries","notificationChannel","teamsChannelId"]},{"type":"object","properties":{"urlState":{"type":"string"},"name":{"type":"string","minLength":1},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"thresholds":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"metricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"changeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]}},"required":["value","severityLevel"]},"default":[]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"queryName":{"type":"string","default":""},"evaluationPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY"],"default":"DAILY"},"thresholdType":{"type":"string","enum":["ABOVE","UNDER"],"default":"ABOVE"},"description":{"type":"string","default":""},"tagIds":{"type":"array","items":{"type":"string"},"default":[]},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"teamId":{"type":"string","nullable":true},"scout":{"type":"string","nullable":true,"minLength":1},"scopeId":{"type":"string","nullable":true},"condition":{"type":"string","nullable":true},"dedup":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["CALENDAR"]},"calendarUnit":{"type":"string","enum":["WEEK","MONTH"]}},"required":["kind","calendarUnit"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ROLLING"]},"windowDays":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["kind","windowDays"]},{"nullable":true,"type":"string","enum":[null]}]},"messageWidgets":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type","topN","flopN"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]}],"discriminator":{"propertyName":"type"}}]}},"notificationChannel":{"type":"string","enum":["EMAIL"]},"emails":{"type":"array","items":{"type":"string","format":"email"},"minItems":1}},"required":["urlState","name","currency","queries","notificationChannel","emails"]}]},"example":{"name":"Production compute spend increased 20% week over week","description":"Notify FinOps when the seven-day AWS compute run rate materially increases.","urlState":"metricId=cost&groupBy=cos_service_name&datePreset=TRAILING_30_DAYS","currency":"USD","queries":[{"type":"cost","name":"a","alias":"Production AWS compute","aggregator":"SUM","metricId":"cost","currency":"USD","groupBy":"cos_service_name","whereClause":{"combinator":"and","rules":[{"field":"cos_provider","operator":"in","value":["AWS"]},{"field":"cos_environment","operator":"in","value":["production"]},{"field":"cos_service_name","operator":"in","value":["AmazonEC2","AmazonRDS"]}]},"visible":true,"colorIndex":0,"chartType":"LINE"}],"condition":"rollingSum(a, 7, DAY) > timeShift(rollingSum(a, 7, DAY), 7, DAY) * 1.2 and rollingSum(a, 7, DAY) > 12000","dedup":{"kind":"CALENDAR","calendarUnit":"WEEK"},"thresholds":[],"notificationChannel":"EMAIL","emails":["finops@acme.com","cloud-platform@acme.com"],"tagIds":[]}}}},"responses":{"201":{"description":"Cost alert created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostAlert"}}}},"400":{"description":"Invalid alert, condition, query, or scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/alerts-v2/costAlerts/configurationFormData":{"get":{"operationId":"getCostAlertConfigurationV2","summary":"Get cost alert destination options","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Slack, Teams, and email destination options","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostAlertConfigurationFormData"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/alerts-v2/costAlerts/{id}/duplicate":{"post":{"operationId":"duplicateCostAlertV2","summary":"Duplicate a cost alert","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1}}}}}},"responses":{"201":{"description":"Cost alert duplicated","content":{"application/json":{"schema":{"type":"object","properties":{"alertId":{"type":"string"}},"required":["alertId"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Alert not found in the authenticated organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"},"example":{"error":"NOT_FOUND","reason":"Alert not found"}}}}}}},"/alerts-v2/costAlerts/{id}/edit":{"get":{"operationId":"getCostAlertForEditV2","summary":"Get cost alert editor data","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Cost alert with thresholds and tags","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostAlertEditionPage"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Alert not found in the authenticated organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"},"example":{"error":"NOT_FOUND","reason":"Alert not found"}}}}}}},"/alerts-v2/costAlerts/test":{"post":{"operationId":"sendCostAlertTestV2","summary":"Send a cost alert test notification","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"notificationChannel":{"type":"string","enum":["EMAIL"]},"emails":{"type":"array","items":{"type":"string","format":"email"},"minItems":1},"name":{"type":"string","minLength":1},"condition":{"type":"string","minLength":1},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"scopeId":{"type":"string","nullable":true},"previewRow":{"type":"object","properties":{"effectiveDate":{"type":"string","nullable":true,"format":"date-time"},"valueTriggered":{"type":"number"},"groups":{"type":"array","items":{"type":"object","properties":{"groupByValue":{"type":"string","nullable":true},"value":{"type":"number"}},"required":["groupByValue","value"]}}},"required":["effectiveDate","valueTriggered","groups"]},"messageWidgets":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type","topN","flopN"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]}],"discriminator":{"propertyName":"type"}}]}}},"required":["notificationChannel","emails"]},{"type":"object","properties":{"notificationChannel":{"type":"string","enum":["SLACK"]},"slackChannelId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"condition":{"type":"string","minLength":1},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"scopeId":{"type":"string","nullable":true},"previewRow":{"type":"object","properties":{"effectiveDate":{"type":"string","nullable":true,"format":"date-time"},"valueTriggered":{"type":"number"},"groups":{"type":"array","items":{"type":"object","properties":{"groupByValue":{"type":"string","nullable":true},"value":{"type":"number"}},"required":["groupByValue","value"]}}},"required":["effectiveDate","valueTriggered","groups"]},"messageWidgets":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type","topN","flopN"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]}],"discriminator":{"propertyName":"type"}}]}}},"required":["notificationChannel","slackChannelId"]},{"type":"object","properties":{"notificationChannel":{"type":"string","enum":["TEAMS"]},"teamsChannelId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"condition":{"type":"string","minLength":1},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"scopeId":{"type":"string","nullable":true},"previewRow":{"type":"object","properties":{"effectiveDate":{"type":"string","nullable":true,"format":"date-time"},"valueTriggered":{"type":"number"},"groups":{"type":"array","items":{"type":"object","properties":{"groupByValue":{"type":"string","nullable":true},"value":{"type":"number"}},"required":["groupByValue","value"]}}},"required":["effectiveDate","valueTriggered","groups"]},"messageWidgets":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type","topN","flopN"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]}],"discriminator":{"propertyName":"type"}}]}}},"required":["notificationChannel","teamsChannelId"]}]},"example":{"notificationChannel":"SLACK","slackChannelId":"C06FINOPS42","name":"Production compute spend increased 20% week over week","condition":"rollingSum(a, 7, DAY) > timeShift(rollingSum(a, 7, DAY), 7, DAY) * 1.2","currency":"USD","queries":[{"type":"cost","name":"a","alias":"Production AWS compute","aggregator":"SUM","metricId":"cost","currency":"USD","groupBy":"cos_service_name","whereClause":{"combinator":"and","rules":[{"field":"cos_provider","operator":"in","value":["AWS"]},{"field":"cos_environment","operator":"in","value":["production"]},{"field":"cos_service_name","operator":"in","value":["AmazonEC2","AmazonRDS"]}]},"visible":true,"colorIndex":0,"chartType":"LINE"}],"previewRow":{"effectiveDate":"2026-07-23T00:00:00.000Z","valueTriggered":14872.31,"groups":[{"groupByValue":"AmazonEC2","value":10241.82},{"groupByValue":"AmazonRDS","value":4630.49}]}}}}},"responses":{"200":{"description":"Test notification sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertTestSuccess"}}}},"400":{"description":"Destination is invalid or not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/alerts-v2/costAlerts/bulk/metadata":{"patch":{"operationId":"bulkUpdateCostAlertMetadataV2","summary":"Bulk update cost alert metadata","description":"Metadata-only patch of visibility, owner, team, and tags for cost alerts. Any id missing or not editable returns 403 for the whole batch.","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"updates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"metadata":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"createdById":{"type":"string"},"teamId":{"type":"string","nullable":true},"tagIds":{"type":"array","items":{"type":"string"}}}}},"required":["id","metadata"]},"minItems":1}},"required":["updates"]}}}},"responses":{"204":{"description":"Updated"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"}}}}}}},"/alerts-v2/costAlerts/bulk/archive":{"post":{"operationId":"bulkArchiveCostAlertsV2","summary":"Bulk archive cost alerts","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["ids"]}}}},"responses":{"204":{"description":"Archived"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"}}}}}}},"/alerts-v2/costAlerts/bulk/restore":{"post":{"operationId":"bulkRestoreCostAlertsV2","summary":"Bulk restore cost alerts","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["ids"]}}}},"responses":{"204":{"description":"Restored"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"}}}}}}},"/alerts-v2/costAlerts/{id}/metadata":{"patch":{"operationId":"updateCostAlertMetadataV2","summary":"Update cost alert metadata","description":"Metadata-only patch (visibility, owner, team, tags). Does not rewrite thresholds or condition.","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"createdById":{"type":"string"},"teamId":{"type":"string","nullable":true},"tagIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"204":{"description":"Updated"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"}}}}}}},"/alerts-v2/costAlerts/{id}":{"put":{"operationId":"updateCostAlertV2","summary":"Update a cost alert","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"urlState":{"type":"string"},"name":{"type":"string","minLength":1},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"thresholds":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"metricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"changeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]}},"required":["value","severityLevel"]},"default":[]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"queryName":{"type":"string","default":""},"evaluationPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY"],"default":"DAILY"},"thresholdType":{"type":"string","enum":["ABOVE","UNDER"],"default":"ABOVE"},"description":{"type":"string","default":""},"tagIds":{"type":"array","items":{"type":"string"},"default":[]},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"teamId":{"type":"string","nullable":true},"scout":{"type":"string","nullable":true,"minLength":1},"scopeId":{"type":"string","nullable":true},"condition":{"type":"string","nullable":true},"dedup":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["CALENDAR"]},"calendarUnit":{"type":"string","enum":["WEEK","MONTH"]}},"required":["kind","calendarUnit"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ROLLING"]},"windowDays":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["kind","windowDays"]},{"nullable":true,"type":"string","enum":[null]}]},"messageWidgets":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type","topN","flopN"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]}],"discriminator":{"propertyName":"type"}}]}},"notificationChannel":{"type":"string","enum":["SLACK"]},"slackChannelId":{"type":"string","minLength":1}},"required":["urlState","name","currency","queries","notificationChannel","slackChannelId"]},{"type":"object","properties":{"urlState":{"type":"string"},"name":{"type":"string","minLength":1},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"thresholds":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"metricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"changeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]}},"required":["value","severityLevel"]},"default":[]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"queryName":{"type":"string","default":""},"evaluationPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY"],"default":"DAILY"},"thresholdType":{"type":"string","enum":["ABOVE","UNDER"],"default":"ABOVE"},"description":{"type":"string","default":""},"tagIds":{"type":"array","items":{"type":"string"},"default":[]},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"teamId":{"type":"string","nullable":true},"scout":{"type":"string","nullable":true,"minLength":1},"scopeId":{"type":"string","nullable":true},"condition":{"type":"string","nullable":true},"dedup":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["CALENDAR"]},"calendarUnit":{"type":"string","enum":["WEEK","MONTH"]}},"required":["kind","calendarUnit"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ROLLING"]},"windowDays":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["kind","windowDays"]},{"nullable":true,"type":"string","enum":[null]}]},"messageWidgets":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type","topN","flopN"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]}],"discriminator":{"propertyName":"type"}}]}},"notificationChannel":{"type":"string","enum":["TEAMS"]},"teamsChannelId":{"type":"string","minLength":1}},"required":["urlState","name","currency","queries","notificationChannel","teamsChannelId"]},{"type":"object","properties":{"urlState":{"type":"string"},"name":{"type":"string","minLength":1},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"thresholds":{"type":"array","items":{"type":"object","properties":{"value":{"type":"number"},"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"metricMode":{"type":"string","nullable":true,"enum":["ABSOLUTE_SPEND","PERIOD_OVER_PERIOD_CHANGE",null]},"changeBasis":{"type":"string","nullable":true,"enum":["ABSOLUTE_DELTA","PERCENT_CHANGE",null]}},"required":["value","severityLevel"]},"default":[]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"queryName":{"type":"string","default":""},"evaluationPeriod":{"type":"string","enum":["DAILY","WEEKLY","MONTHLY"],"default":"DAILY"},"thresholdType":{"type":"string","enum":["ABOVE","UNDER"],"default":"ABOVE"},"description":{"type":"string","default":""},"tagIds":{"type":"array","items":{"type":"string"},"default":[]},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"teamId":{"type":"string","nullable":true},"scout":{"type":"string","nullable":true,"minLength":1},"scopeId":{"type":"string","nullable":true},"condition":{"type":"string","nullable":true},"dedup":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["CALENDAR"]},"calendarUnit":{"type":"string","enum":["WEEK","MONTH"]}},"required":["kind","calendarUnit"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ROLLING"]},"windowDays":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["kind","windowDays"]},{"nullable":true,"type":"string","enum":[null]}]},"messageWidgets":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ALERT"],"description":"Frozen body of a triggered cost alert notification."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Optional explicit query override. Omit to inherit the alert's first source cost query (resolved with the alert currency, scope, and effective-date period at send time)."}},"required":["type","topN","flopN"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]}],"discriminator":{"propertyName":"type"}}]}},"notificationChannel":{"type":"string","enum":["EMAIL"]},"emails":{"type":"array","items":{"type":"string","format":"email"},"minItems":1}},"required":["urlState","name","currency","queries","notificationChannel","emails"]}]},"example":{"name":"Production compute spend increased 20% week over week","description":"Notify FinOps when the seven-day AWS compute run rate materially increases.","urlState":"metricId=cost&groupBy=cos_service_name&datePreset=TRAILING_30_DAYS","currency":"USD","queries":[{"type":"cost","name":"a","alias":"Production AWS compute","aggregator":"SUM","metricId":"cost","currency":"USD","groupBy":"cos_service_name","whereClause":{"combinator":"and","rules":[{"field":"cos_provider","operator":"in","value":["AWS"]},{"field":"cos_environment","operator":"in","value":["production"]},{"field":"cos_service_name","operator":"in","value":["AmazonEC2","AmazonRDS"]}]},"visible":true,"colorIndex":0,"chartType":"LINE"}],"condition":"rollingSum(a, 7, DAY) > timeShift(rollingSum(a, 7, DAY), 7, DAY) * 1.2 and rollingSum(a, 7, DAY) > 12000","dedup":{"kind":"CALENDAR","calendarUnit":"WEEK"},"thresholds":[],"notificationChannel":"EMAIL","emails":["finops@acme.com","cloud-platform@acme.com"],"tagIds":[]}}}},"responses":{"200":{"description":"Cost alert updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostAlert"}}}},"400":{"description":"Invalid alert, condition, query, or scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Alert not found in the authenticated organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"},"example":{"error":"NOT_FOUND","reason":"Alert not found"}}}}}}},"/alerts-v2/costAlerts/{id}/widgetData":{"get":{"operationId":"getCostAlertWidgetDataV2","summary":"Get cost alert widget data","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Cost alert with thresholds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostAlertWidgetData"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Alert not found in the authenticated organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"},"example":{"error":"NOT_FOUND","reason":"Alert not found"}}}}}}},"/alerts-v2/costAlerts/{id}/history":{"get":{"operationId":"getCostAlertHistoryV2","summary":"Get cost alert firing history","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["all","fired","notified"]},"required":false,"name":"state","in":"query"}],"responses":{"200":{"description":"Consolidated firing and notification history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostAlertHistory"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Alert not found in the authenticated organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"},"example":{"error":"NOT_FOUND","reason":"Alert not found"}}}}}}},"/alerts-v2/budgetAlerts":{"post":{"operationId":"createBudgetAlertV2","summary":"Create a budget alert","description":"Creates an alert for budget lines visible to the caller. Threshold percentages are ordered from highest severity to lowest.","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"parentBudgetId":{"type":"string"},"conditionType":{"type":"string","enum":["ACTUAL_SPEND","FORECASTED_EOM"],"default":"ACTUAL_SPEND"},"selectedVirtualDimensionValues":{"type":"array","items":{"type":"string"},"minItems":1},"thresholds":{"type":"array","items":{"type":"object","properties":{"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"value":{"type":"number","minimum":0,"maximum":100}},"required":["severityLevel","value"]},"minItems":1,"maxItems":3},"notification":{"oneOf":[{"type":"object","properties":{"notificationChannel":{"type":"string","enum":["SLACK"]},"slackChannelId":{"type":"string","minLength":1}},"required":["notificationChannel","slackChannelId"]},{"type":"object","properties":{"notificationChannel":{"type":"string","enum":["TEAMS"]},"teamsChannelId":{"type":"string","minLength":1}},"required":["notificationChannel","teamsChannelId"]},{"type":"object","properties":{"notificationChannel":{"type":"string","enum":["EMAIL"]},"emails":{"type":"array","items":{"type":"string","format":"email"},"minItems":1},"shouldNotifyLineOwners":{"type":"boolean","default":false}},"required":["notificationChannel","emails"]}]}},"required":["name","parentBudgetId","selectedVirtualDimensionValues","thresholds","notification"]},"example":{"name":"Platform team monthly budget burn","parentBudgetId":"cm7q2g4w90001w3e8b9x4k2pn","conditionType":"FORECASTED_EOM","selectedVirtualDimensionValues":["Platform","Shared infrastructure"],"thresholds":[{"severityLevel":"RED","value":100},{"severityLevel":"WARNING","value":90},{"severityLevel":"INFO","value":75}],"notification":{"notificationChannel":"SLACK","slackChannelId":"C06FINOPS42"}}}}},"responses":{"200":{"description":"Budget alert created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetAlert"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Budget is not accessible to the caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"}}}}}}},"/alerts-v2/budgetAlerts/configurationFormData":{"get":{"operationId":"getBudgetAlertConfigurationV2","summary":"Get budget alert destination options","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Slack, Teams, and email destination options","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetAlertConfigurationFormData"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/alerts-v2/budgetAlerts/{budgetAlertId}":{"put":{"operationId":"updateBudgetAlertV2","summary":"Update a budget alert","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"budgetAlertId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"parentBudgetId":{"type":"string"},"conditionType":{"type":"string","enum":["ACTUAL_SPEND","FORECASTED_EOM"],"default":"ACTUAL_SPEND"},"selectedVirtualDimensionValues":{"type":"array","items":{"type":"string"},"minItems":1},"thresholds":{"type":"array","items":{"type":"object","properties":{"severityLevel":{"type":"string","enum":["INFO","WARNING","RED"]},"value":{"type":"number","minimum":0,"maximum":100}},"required":["severityLevel","value"]},"minItems":1,"maxItems":3},"notification":{"oneOf":[{"type":"object","properties":{"notificationChannel":{"type":"string","enum":["SLACK"]},"slackChannelId":{"type":"string","minLength":1}},"required":["notificationChannel","slackChannelId"]},{"type":"object","properties":{"notificationChannel":{"type":"string","enum":["TEAMS"]},"teamsChannelId":{"type":"string","minLength":1}},"required":["notificationChannel","teamsChannelId"]},{"type":"object","properties":{"notificationChannel":{"type":"string","enum":["EMAIL"]},"emails":{"type":"array","items":{"type":"string","format":"email"},"minItems":1},"shouldNotifyLineOwners":{"type":"boolean","default":false}},"required":["notificationChannel","emails"]}]}},"required":["name","parentBudgetId","selectedVirtualDimensionValues","thresholds","notification"]},"example":{"name":"Platform team monthly budget burn","parentBudgetId":"cm7q2g4w90001w3e8b9x4k2pn","conditionType":"FORECASTED_EOM","selectedVirtualDimensionValues":["Platform","Shared infrastructure"],"thresholds":[{"severityLevel":"RED","value":100},{"severityLevel":"WARNING","value":90},{"severityLevel":"INFO","value":75}],"notification":{"notificationChannel":"SLACK","slackChannelId":"C06FINOPS42"}}}}},"responses":{"200":{"description":"Budget alert updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetAlert"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Budget or alert is not accessible to the caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"}}}}}}},"/alerts-v2/budgetAlerts/sendTest":{"post":{"operationId":"sendBudgetAlertTestV2","summary":"Send a budget alert test notification","tags":["Alerts V2"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"notificationChannel":{"type":"string","enum":["EMAIL"]},"emails":{"type":"array","items":{"type":"string","format":"email"},"minItems":1}},"required":["notificationChannel","emails"]},{"type":"object","properties":{"notificationChannel":{"type":"string","enum":["SLACK"]},"slackChannelId":{"type":"string","minLength":1}},"required":["notificationChannel","slackChannelId"]},{"type":"object","properties":{"notificationChannel":{"type":"string","enum":["TEAMS"]},"teamsChannelId":{"type":"string","minLength":1}},"required":["notificationChannel","teamsChannelId"]}]},"example":{"notificationChannel":"EMAIL","emails":["finops@acme.com","platform-leads@acme.com"]}}}},"responses":{"200":{"description":"Test notification sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertTestSuccess"}}}},"400":{"description":"Destination is invalid or not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/dimensions":{"get":{"operationId":"listDimensions","summary":"List queryable dimensions","description":"Returns every dimension available to filter and group by today, with its values and supported operators. Served from the cached dimension list refreshed by the compute pipeline, so a dimension published moments ago may not appear yet.","tags":["Dimensions"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Dimensions available in the organization","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Dimension"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/dimensions/search":{"get":{"operationId":"searchDimensions","summary":"Search dimension values","description":"Full-text search across dimension names and their values. Unlike `GET /dimensions` this queries the billing warehouse live, so it is slower and costlier — use it for type-ahead, not to enumerate dimensions.","tags":["Dimensions"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"required":true,"name":"q","in":"query"}],"responses":{"200":{"description":"Dimensions whose name or values match the query","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Dimension"}}}}},"400":{"description":"Missing or too long query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/dimensions/candidates":{"get":{"operationId":"listDimensionCandidates","summary":"List label keys that could become dimensions","description":"Label keys found in the billing data with the cost-allocation stats used to judge whether promoting them is worthwhile: the share of cost carrying the key, its values, a per-month cost series, and the month-over-month change. Property names are snake_case because they come straight from the billing export. `ingested: true` means the key is already promoted.","tags":["Dimensions"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Candidate label keys with cost-allocation stats","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DimensionCandidate"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/dimensions/labels":{"get":{"operationId":"getPublishedDimensionLabels","summary":"Get published label transformations","description":"The currently published label configuration: which source columns are merged into each engineered dimension and how their values are mapped. This is the live configuration, not a draft — the client holds label edits until it calls `POST /dimensions/publish`. `computeByName` is the per-label billing watermark (spinner, clock, or in sync). It is not part of the publish body.","tags":["Dimensions"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Published label transformations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishedDimensionLabels"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/dimensions/publish":{"post":{"operationId":"publishDimensions","summary":"Publish pending dimension changes","description":"Promotes pending dimension changes: the label configuration supplied inline in `labels`, and every pending virtual-dimension draft in the organization. `scope` narrows the publish to labels or virtual dimensions only.\n\nEach draft is validated on its own and the valid set is promoted atomically. A `200` therefore does not mean everything was published: `unpublished[]` lists the drafts that failed validation, with per-draft error messages, while `publishedLabels` and `publishedVdimIds` report what did go live. A `400` means the request as a whole was rejected and nothing was promoted.\n\nA successful publish enqueues an asynchronous BigQuery refresh (a full feature-engineering refresh when labels changed, a lighter update otherwise), so newly published dimensions are not immediately queryable.","tags":["Dimensions"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["all","labels","vdims","enrichments"],"default":"all"},"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,299}$"},"columnsMerged":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["label","focus"]},"ingested":{"type":"boolean"}},"required":["name","type"]}},"maps":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"to":{"type":"string"}},"required":["value","to"]}},"category":{"type":"string","enum":["environment","boolean_flag","team","cost_significant"]}},"required":["name","columnsMerged","maps"]}},"vdimIds":{"type":"array","items":{"type":"string"}},"includeEnrichments":{"type":"boolean"}}},"example":{"scope":"all","labels":[{"name":"environment","columnsMerged":[{"name":"env","type":"label"},{"name":"Environment","type":"label"}],"maps":[{"value":"prd","to":"production"}]}]}}}},"responses":{"200":{"description":"Publish completed; `unpublished` may still list per-draft failures","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishDimensionsSuccess"}}}},"400":{"description":"Nothing was published","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishDimensionsFailure"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/dimensions/settings":{"patch":{"operationId":"updateDimensionsSettings","summary":"Restrict label dimensions to org admins","description":"Sets whether only org admins can add, edit, delete, and publish label dimensions. Virtual dimensions stay open to every member. Org admin only.","tags":["Dimensions"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"dimensionsAdminOnly":{"type":"boolean"}},"required":["dimensionsAdminOnly"]}}}},"responses":{"200":{"description":"Updated setting","content":{"application/json":{"schema":{"type":"object","properties":{"dimensionsAdminOnly":{"type":"boolean"}},"required":["dimensionsAdminOnly"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Org admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DimensionsAdminRequired"}}}}}}},"/usage-metrics":{"get":{"operationId":"listUsageMetrics","summary":"List usage metrics","description":"Consumed units available for usage-based queries, with the services that report each unit.","tags":["Metrics"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Consumed units available in the organization","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UsageMetric"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/enrichments":{"get":{"operationId":"listEnrichments","summary":"List live enrichments","description":"Live enrichment documents as summaries, sorted by priority then name. `entries` and `conditions` are omitted; read one document with `GET /enrichments/{name}`. Any member.","tags":["Enrichments"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Live enrichments","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnrichmentSummary"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/enrichments/draft":{"get":{"operationId":"getEnrichmentDraft","summary":"Get pending enrichment drafts","description":"The live set with every draft applied. The body is `null` when there is nothing to publish. `errors` is empty when the pending set compiles. Org admin only.","tags":["Enrichments"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Pending drafts, or null","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/EnrichmentDraftSummary"},{"nullable":true,"type":"string","enum":[null]}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Org admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DimensionsAdminRequired"}}}}}},"delete":{"operationId":"discardEnrichmentDrafts","summary":"Discard pending enrichment drafts","description":"Deletes every pending enrichment draft. Org admin only.","tags":["Enrichments"],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Drafts discarded"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Org admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DimensionsAdminRequired"}}}}}}},"/enrichments/draft/publish":{"post":{"operationId":"publishEnrichmentDrafts","summary":"Publish pending enrichment drafts","description":"Compiles the live set with every draft applied and, when it compiles, stores that set in one transaction and starts the update workflow.\n\nA `400` means the set does not compile and nothing was stored. A `404` means there is no draft. A `409` means the drafts changed since they were read.\n\nOrg admin only.","tags":["Enrichments"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Drafts published","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentPublishResponse"}}}},"400":{"description":"The pending set does not compile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentErrors"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Org admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DimensionsAdminRequired"}}}},"404":{"description":"No draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentErrors"}}}},"409":{"description":"Drafts changed since they were read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentErrors"}}}}}}},"/enrichments/trace-inputs":{"get":{"operationId":"getEnrichmentTraceInputs","summary":"List columns needed to trace a row","description":"Billing columns to fill in order to trace one row, with the entry keys the mappings list. `draft` is null when there are no drafts. Org admin only.","tags":["Enrichments"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Trace inputs for the published set and, when present, the draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentTraceInputs"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Org admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DimensionsAdminRequired"}}}}}}},"/enrichments/explain":{"post":{"operationId":"explainEnrichmentRow","summary":"Trace one row through the enrichments","description":"Runs one billed row through the live set with the drafts applied. `published` is the same trace on the live set alone and is present when drafts exist. Org admin only.","tags":["Enrichments"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"row":{"type":"object","additionalProperties":{"type":"string"},"description":"Column name to value for the billed row to trace."}},"required":["row"]},"example":{"row":{"cos_namespace":"team-a","cos_cluster_name":"d01"}}}}},"responses":{"200":{"description":"Row trace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentExplainResponse"}}}},"400":{"description":"The body is not a row, or the set cannot be traced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentErrors"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Org admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DimensionsAdminRequired"}}}}}}},"/enrichments/{name}":{"get":{"operationId":"getEnrichment","summary":"Get one live enrichment document","description":"One live document in the JSON form of the YAML file. A response saved unmodified is a valid `PUT` body. `conditions` is the stored CEL and is omitted when unset. Any member.","tags":["Enrichments"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Document name. Must match `name` in the body."},"required":true,"description":"Document name. Must match `name` in the body.","name":"name","in":"path"}],"responses":{"200":{"description":"Live document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentDocument"},"examples":{"merge":{"summary":"Merge columns from a key","description":"One key writes several columns. `merge` leaves a value the row already has.","value":{"name":"02_namespace_to_org","description":"EKS pods the pod label does not resolve -> namespace's responsible organization","keyField":"cos_namespace","priority":2,"conditions":"input.cos_cluster_name != null && input.cos_namespace != \"\"","targetColumns":[{"name":"owner_org","mode":"merge"},{"name":"owner_org_code","mode":"merge"}],"entries":[{"key":"team-a","then":{"owner_org":"Platform","owner_org_code":"PLAT"}}]}},"split":{"summary":"Split the cost","description":"One key splits the billed row. The weights of `then` sum to 1.","value":{"name":"03_account_split","description":"Split a shared account across the teams that use it","keyField":"cos_account_id","priority":3,"targetColumns":[{"name":"owner_org","mode":"merge"}],"entries":[{"key":"111122223333","then":[{"owner_org":"Platform","weight":0.6},{"owner_org":"Data","weight":0.4}]}]}},"datedReplace":{"summary":"Replace inside a date window","description":"The same key writes a different value in each window. Windows for one key must not overlap. `replace` overwrites a value the row already has.","value":{"name":"04_project_owner","description":"Project owner changed on 1 July 2024","keyField":"cos_project_id","priority":4,"targetColumns":[{"name":"owner_org","mode":"replace"}],"entries":[{"key":"billing-prod","when":{"start":"2024-01-01","end":"2024-06-30"},"then":{"owner_org":"Finance"}},{"key":"billing-prod","when":{"start":"2024-07-01"},"then":{"owner_org":"Platform"}}]}},"metric":{"summary":"Split from a metric table","description":"One key splits each day's cost from a BigQuery measure. `integrationId` is an active BigQuery integration. `propagates` names the target columns the metric table fills. `static` stamps constant target columns on every share.","value":{"name":"05_shared_ml_platform","description":"Split a shared platform by daily CPU hours","keyField":"cos_feature","priority":5,"targetColumns":[{"name":"app","mode":"replace"},{"name":"team","mode":"replace"},{"name":"cost_center","mode":"replace"},{"name":"component","mode":"replace"}],"entries":[{"key":"shared-ml-platform","then":{"integrationId":"clx8f2k9a0001qw3h7bn2m5vz","metric":{"table":"costory-prod.example_metrics.shared_ml_platform_usage","dateColumn":"date","metricColumn":"cpu_hours"},"propagates":["app","team","cost_center"],"static":{"component":"cloud-landing-zone"}}}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Unknown name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}},"put":{"operationId":"saveEnrichmentDraft","summary":"Store an enrichment document as a draft","description":"Stores the document as a draft. Publish makes it live. A body equal to the live document drops its draft and returns `unchanged`.\n\nThe document `name` must match the URL. A body larger than 10 MB is `413`. Org admin only.","tags":["Enrichments"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Document name. Must match `name` in the body."},"required":true,"description":"Document name. Must match `name` in the body.","name":"name","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentDocument"},"examples":{"merge":{"summary":"Merge columns from a key","description":"One key writes several columns. `merge` leaves a value the row already has.","value":{"name":"02_namespace_to_org","description":"EKS pods the pod label does not resolve -> namespace's responsible organization","keyField":"cos_namespace","priority":2,"conditions":"input.cos_cluster_name != null && input.cos_namespace != \"\"","targetColumns":[{"name":"owner_org","mode":"merge"},{"name":"owner_org_code","mode":"merge"}],"entries":[{"key":"team-a","then":{"owner_org":"Platform","owner_org_code":"PLAT"}}]}},"split":{"summary":"Split the cost","description":"One key splits the billed row. The weights of `then` sum to 1.","value":{"name":"03_account_split","description":"Split a shared account across the teams that use it","keyField":"cos_account_id","priority":3,"targetColumns":[{"name":"owner_org","mode":"merge"}],"entries":[{"key":"111122223333","then":[{"owner_org":"Platform","weight":0.6},{"owner_org":"Data","weight":0.4}]}]}},"datedReplace":{"summary":"Replace inside a date window","description":"The same key writes a different value in each window. Windows for one key must not overlap. `replace` overwrites a value the row already has.","value":{"name":"04_project_owner","description":"Project owner changed on 1 July 2024","keyField":"cos_project_id","priority":4,"targetColumns":[{"name":"owner_org","mode":"replace"}],"entries":[{"key":"billing-prod","when":{"start":"2024-01-01","end":"2024-06-30"},"then":{"owner_org":"Finance"}},{"key":"billing-prod","when":{"start":"2024-07-01"},"then":{"owner_org":"Platform"}}]}},"metric":{"summary":"Split from a metric table","description":"One key splits each day's cost from a BigQuery measure. `integrationId` is an active BigQuery integration. `propagates` names the target columns the metric table fills. `static` stamps constant target columns on every share.","value":{"name":"05_shared_ml_platform","description":"Split a shared platform by daily CPU hours","keyField":"cos_feature","priority":5,"targetColumns":[{"name":"app","mode":"replace"},{"name":"team","mode":"replace"},{"name":"cost_center","mode":"replace"},{"name":"component","mode":"replace"}],"entries":[{"key":"shared-ml-platform","then":{"integrationId":"clx8f2k9a0001qw3h7bn2m5vz","metric":{"table":"costory-prod.example_metrics.shared_ml_platform_usage","dateColumn":"date","metricColumn":"cpu_hours"},"propagates":["app","team","cost_center"],"static":{"component":"cloud-landing-zone"}}}]}}}}}},"responses":{"200":{"description":"Draft stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentDraftWriteResponse"}}}},"400":{"description":"The document is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentErrors"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Org admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DimensionsAdminRequired"}}}},"413":{"description":"Request body is larger than 10 MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentErrors"}}}}}},"delete":{"operationId":"removeEnrichmentDraft","summary":"Draft the removal of an enrichment","description":"Drafts the removal of a live document, or drops the draft of a document that is not live yet. `404` when there is neither. Org admin only.","tags":["Enrichments"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Document name. Must match `name` in the body."},"required":true,"description":"Document name. Must match `name` in the body.","name":"name","in":"path"}],"responses":{"200":{"description":"Removal drafted, or a pending document dropped","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichmentDraftWriteResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Org admin required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DimensionsAdminRequired"}}}},"404":{"description":"Unknown name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}},"/dashboard-v2/list":{"get":{"operationId":"listDashboards","summary":"List dashboards","description":"Returns dashboards visible to the caller, newest updated first. Optional `search` filters by name (case-insensitive contains).","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"Dashboards visible to the caller","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/dashboard-v2/recent":{"get":{"operationId":"listRecentDashboards","summary":"List recently updated dashboards","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Recently updated dashboards","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/dashboard-v2/popular":{"get":{"operationId":"listPopularDashboards","summary":"List popular dashboards by view count","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Popular dashboards","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/dashboard-v2/{id}/full":{"get":{"operationId":"getDashboard","summary":"Get a dashboard","description":"Returns the full dashboard including widgets. Increments the caller's view stats (except for templates) and emits opened analytics.","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Dashboard with widgets","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}}},"/dashboard-v2/{id}/versions":{"get":{"operationId":"listDashboardVersions","summary":"List saved dashboard versions","description":"Newest first. Requires the same read access as GET dashboard (Share Reader or Editor). Each row includes optional `name` (null when untitled). The first row is the current version.","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Saved versions, newest first","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string"},"name":{"type":"string","nullable":true},"savedBy":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"]}},"required":["id","createdAt","name","savedBy"]}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}}},"/dashboard-v2/{id}/versions/{versionId}":{"get":{"operationId":"getDashboardVersion","summary":"Get a dashboard version hydrate payload","description":"Version createdAt + context + widgets only (no shell identity). Requires the same read access as GET dashboard. Unknown or foreign version ids return 404.","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"versionId","in":"path"}],"responses":{"200":{"description":"Version context and widgets","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}},"patch":{"operationId":"renameDashboardVersion","summary":"Rename a saved dashboard version","description":"Updates only `name` on that version row (empty string becomes null). Max 80 characters. Does not insert a new version. The current version may be renamed. Unknown or foreign version ids return 404.","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"versionId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","nullable":true,"maxLength":80}},"required":["name"]}}}},"responses":{"204":{"description":"Renamed"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}}},"/dashboard-v2/{id}/versions/{versionId}/copy":{"post":{"operationId":"copyDashboardVersion","summary":"Copy an old dashboard version into a new dashboard","description":"Creates a private copy owned by the caller from that saved version. Requires the same read access as Duplicate.","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"versionId","in":"path"}],"responses":{"201":{"description":"Dashboard copied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardIdCreated"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}}},"/dashboard-v2":{"post":{"operationId":"createDashboard","summary":"Create a dashboard","description":"Creates a DashboardV2 from a bulk-save payload (metadata + widgets with explicit grid positions). Team/scope assignment is validated against membership.","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","default":""},"type":{"type":"string","enum":["PRIVATE","PUBLIC","TEMPLATE"]},"teamId":{"type":"string","nullable":true},"scopeId":{"type":"string","nullable":true},"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]},"widgets":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"title":{"type":"string"},"description":{"type":"string","default":""},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["advancedExplorer"]},"request":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"]}},"required":["type","request"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"textContent":{"type":"string","default":""}},"required":["type"]}],"discriminator":{"propertyName":"type"}}},"required":["key","x","y","w","h","title","source"]}}},"required":["name","type","conditions","widgets"]}}}},"responses":{"201":{"description":"Dashboard created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardIdCreated"}}}},"400":{"description":"Scope not found or invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Team membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}}},"/dashboard-v2/{id}":{"put":{"operationId":"updateDashboard","summary":"Publish a dashboard","description":"Inserts a new saved version (context + widgets) and updates shell metadata. Prefer metadata-only PATCH when widgets are unchanged.","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","default":""},"type":{"type":"string","enum":["PRIVATE","PUBLIC","TEMPLATE"]},"teamId":{"type":"string","nullable":true},"scopeId":{"type":"string","nullable":true},"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]},"widgets":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"title":{"type":"string"},"description":{"type":"string","default":""},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["advancedExplorer"]},"request":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"]}},"required":["type","request"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"textContent":{"type":"string","default":""}},"required":["type"]}],"discriminator":{"propertyName":"type"}}},"required":["key","x","y","w","h","title","source"]}}},"required":["name","type","conditions","widgets"]}}}},"responses":{"204":{"description":"Updated"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden or team membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}},"delete":{"operationId":"deleteDashboard","summary":"Delete a dashboard","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}}},"/dashboard-v2/{id}/metadata":{"patch":{"operationId":"updateDashboardMetadata","summary":"Update dashboard metadata","description":"Metadata-only patch (name, visibility, team, scope, tags, context). Does not rewrite widgets.","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["PRIVATE","PUBLIC","TEMPLATE"]},"createdById":{"type":"string"},"teamId":{"type":"string","nullable":true},"scopeId":{"type":"string","nullable":true},"tagIds":{"type":"array","items":{"type":"string"}},"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]}}}}}},"responses":{"204":{"description":"Updated"},"400":{"description":"Owner or scope validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}}},"/dashboard-v2/bulk/metadata":{"patch":{"operationId":"bulkUpdateDashboardMetadata","summary":"Bulk update dashboard metadata","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"updates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"metadata":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["PRIVATE","PUBLIC","TEMPLATE"]},"createdById":{"type":"string"},"teamId":{"type":"string","nullable":true},"scopeId":{"type":"string","nullable":true},"tagIds":{"type":"array","items":{"type":"string"}},"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]}}}},"required":["id","metadata"]},"minItems":1}},"required":["updates"]}}}},"responses":{"204":{"description":"Updated"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}}},"/dashboard-v2/bulk":{"delete":{"operationId":"bulkDeleteDashboards","summary":"Bulk delete dashboards","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["ids"]}}}},"responses":{"204":{"description":"Deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}}},"/dashboard-v2/templates":{"get":{"operationId":"listDashboardTemplates","summary":"List dashboard templates","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"Global dashboard templates","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":{}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/dashboard-v2/templates/{templateId}/clone":{"post":{"operationId":"cloneDashboardTemplate","summary":"Clone a dashboard template","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"templateId","in":"path"}],"responses":{"201":{"description":"Cloned dashboard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardIdCreated"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Template not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}}},"/dashboard-v2/{id}/duplicate":{"post":{"operationId":"duplicateDashboard","summary":"Duplicate a dashboard","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1}}}}}},"responses":{"201":{"description":"Dashboard duplicated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardIdCreated"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}}},"/dashboard-v2/{id}/create-template":{"post":{"operationId":"createDashboardTemplate","summary":"Publish a dashboard as a Costory template","description":"Costory-staff only. Creates a TEMPLATE row under COSTORY_ORG_ID.","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","default":""}},"required":["name"]}}}},"responses":{"201":{"description":"Template created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardIdCreated"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}}},"/dashboard-v2/create-from-intent":{"post":{"operationId":"createDashboardFromIntent","summary":"Create a dashboard with an AI-generated title","description":"SPA assist flow: generates a title from `intent` or `dashboardContext`, then creates the dashboard from the bulk-save payload.","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","default":""},"type":{"type":"string","enum":["PRIVATE","PUBLIC","TEMPLATE"]},"teamId":{"type":"string","nullable":true},"scopeId":{"type":"string","nullable":true},"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]},"widgets":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"title":{"type":"string"},"description":{"type":"string","default":""},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["advancedExplorer"]},"request":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"]}},"required":["type","request"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"textContent":{"type":"string","default":""}},"required":["type"]}],"discriminator":{"propertyName":"type"}}},"required":["key","x","y","w","h","title","source"]}},"intent":{"type":"string"},"dashboardContext":{"type":"object","additionalProperties":{}}},"required":["type","conditions","widgets"]}}}},"responses":{"201":{"description":"Dashboard created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardIdCreated"}}}},"400":{"description":"Invalid payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Team membership required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}}},"/dashboard-v2/legacy-redirect":{"get":{"operationId":"legacyDashboardRedirect","summary":"Resolve a legacy id to a DashboardV2 id","description":"Exactly one of `legacyDashboardId`, `savedViewId`, or `savedAdvancedExplorerId` must be provided.","tags":["Dashboards"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"legacyDashboardId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"savedViewId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"savedAdvancedExplorerId","in":"query"}],"responses":{"200":{"description":"Resolved dashboard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardIdCreated"}}}},"400":{"description":"Invalid legacy redirect query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardError"}}}}}}},"/reports":{"get":{"operationId":"listReports","summary":"List reports","description":"Returns reports visible to the authenticated user. Optional `recentExecutionsLimit` embeds recent execution rows per report.","tags":["Reports"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Filter by owning team id."},"required":false,"description":"Filter by owning team id.","name":"teamId","in":"query"},{"schema":{"type":"boolean","default":false,"description":"Include archived reports (default false)."},"required":false,"description":"Include archived reports (default false).","name":"includeArchived","in":"query"},{"schema":{"type":"string","enum":["SCHEDULED","ONE_TIME"],"description":"Filter by cadence: SCHEDULED or ONE_TIME."},"required":false,"description":"Filter by cadence: SCHEDULED or ONE_TIME.","name":"kind","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":200},"required":false,"name":"recentExecutionsLimit","in":"query"}],"responses":{"200":{"description":"Reports in the organization","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportListItem"}}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsValidationError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}},"post":{"operationId":"createReport","summary":"Create a report","description":"Creates a report. Rules not captured by the field types: at least one `destinations` entry is required; when `scheduledPeriod` is `WEEKLY`, `scheduledWeekday` (0=Sunday…6=Saturday) is required; EMAIL destinations must be a valid address (or `ALL_ACTIVE_USERS`); and a DIGEST widget rendered as a `table` supports at most two group-by dimensions (report `context.groupBy` plus `additionalGroupBy`).","tags":["Reports"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Report name. May be empty or whitespace — the server then generates one from the report's content."},"description":{"type":"string","default":"","description":"Optional longer description (default empty)."},"type":{"type":"string","enum":["PRIVATE","PUBLIC"],"default":"PRIVATE","description":"Deprecated. On create, PUBLIC still seeds an organization Editor grant (and PRIVATE does not). On update it is ignored — grant Reader or Editor via PUT /access/report/:id/grants instead. TEMPLATE is dashboard-only."},"tagIds":{"type":"array","items":{"type":"string"},"description":"Existing org tag ids to assign. Omit for untagged."},"teamId":{"type":"string","nullable":true,"description":"Deprecated. On create, a non-null teamId still seeds a team Editor grant. On update it is ignored — grant a team Reader or Editor via PUT /access/report/:id/grants instead."},"scout":{"type":"string","nullable":true,"minLength":1},"scopeId":{"type":"string","nullable":true},"context":{"type":"object","properties":{"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]}},"default":{},"description":"Report-wide defaults (metric, group-by, date range, filters, currency) that widgets and destinations inherit unless they override them."},"scheduledPeriod":{"type":"string","nullable":true,"enum":["DAILY","WEEKDAYS","WEEKLY","MONTHLY",null],"description":"Delivery cadence, or null for an on-demand (one-time) report that only runs when triggered."},"scheduledWeekday":{"type":"number","description":"Day of week for WEEKLY reports: 0 = Sunday … 6 = Saturday. Required when `scheduledPeriod` is WEEKLY; ignored for every other cadence."},"scheduledFirstRunAt":{"type":"string","nullable":true,"format":"date-time","description":"First send date (UTC). The time of day is ignored: the report is due for the whole UTC day, as soon as the org is ready. Ignored once the report has run at least once."},"status":{"type":"string","enum":["ACTIVE","INACTIVE"]},"widgets":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","topN","flopN","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIGEST"],"description":"Cost-change breakdown as a tree, table, or LLM summary of the biggest movers."},"display":{"type":"string","enum":["tree","table","summary"],"default":"tree","description":"How the digest renders: 'tree' (default hierarchy), flat 'table', or an LLM-written 'summary'."},"showValue":{"type":"boolean","default":true,"description":"Show the absolute cost value on each row."},"showRelativeDelta":{"type":"boolean","default":true,"description":"Show the percentage change on each row."},"showDelta":{"type":"boolean","default":true,"description":"Show the absolute change on each row."},"topLargestAbsoluteChange":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many of the largest-absolute-change nodes to surface (integer 1–100). Applied at every tree level."},"minAbsoluteDiff":{"type":"number","minimum":0,"default":100,"description":"Hide nodes whose absolute change is below this threshold."},"minRelativeDiff":{"type":"number","minimum":0,"default":5,"description":"Hide nodes whose percentage change is below this threshold (percent)."},"additionalGroupBy":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Extra group-by dimensions applied after the report context `groupBy`, in order — each adds a deeper level to the tree."},"useDashboardGroupBy":{"type":"boolean","description":"Use the report (dashboard) context `groupBy` as this widget's root group-by (default true). Set false to override: the report context group-by is ignored for this widget and the first `additionalGroupBy` item (or the widget cost query `groupBy`) becomes the root. `false` requires at least one group-by dimension."},"enableAiInvestigation":{"type":"boolean","default":false,"description":"When true, the run's deepest-leaf nodes trigger an async AI investigation (`analysis_agent_run`) and the report waits for its callback before sending. Delivery is not immediate."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIVIDER"],"description":"Slack thread cut: widgets above post in the channel, widgets below post as replies. Ignored for email and Teams. At most one per report."}},"required":["type"]}],"description":"One report widget. The `type` field selects the shape: TOP_FLOP | GRAPH_SNAPSHOT | DASHBOARD_PDF | DIGEST | TEXT | DIVIDER. All fields other than `type` depend on the chosen type.","discriminator":{"propertyName":"type"}}]},"default":[],"description":"Ordered widgets that make up the report body. Each widget's `type` selects its shape (see ReportWidgetParameters)."},"destinations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]},"scopeId":{"type":"string","nullable":true},"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"],"description":"Delivery channel: EMAIL, SLACK, or TEAMS."},"destinationValues":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":20,"description":"One or more delivery targets sharing this destination's filters/context. EMAIL: addresses or ALL_ACTIVE_USERS; SLACK: channel ids; TEAMS: channel ids."}},"required":["destinationType","destinationValues"]},"minItems":1,"description":"Delivery targets. At least one is required. Each report is fanned out to every destination on every run."}},"required":["name","scheduledPeriod","destinations"]},"example":{"name":"Weekly cloud cost digest","description":"Top movers across our AWS + GCP spend","type":"PRIVATE","context":{"metricId":"cost","groupBy":"provider","datePreset":"TRAILING_90_DAYS","currency":"USD"},"scheduledPeriod":"WEEKLY","scheduledWeekday":1,"status":"ACTIVE","widgets":[{"type":"TEXT","contentMarkdown":"## Weekly summary"}],"destinations":[{"destinationType":"SLACK","destinationValues":["C0123456789"]},{"destinationType":"EMAIL","destinationValues":["finance@acme.com"]}]}}}},"responses":{"201":{"description":"Report created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportCreated"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsValidationError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsTeamMemberRequired"}}}},"404":{"description":"Dashboard, team scope, or related resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsNotFound"}}}}}}},"/reports/{id}":{"get":{"operationId":"getReport","summary":"Get a report","tags":["Reports"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":200},"required":false,"name":"recentExecutionsLimit","in":"query"}],"responses":{"200":{"description":"Report detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportDetailResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsValidationError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsNotFound"}}}}}},"patch":{"operationId":"updateReport","summary":"Update a report","description":"Partially updates a report; omitted fields are left unchanged. `widgets` and `destinations`, when provided, replace the existing lists wholesale. Same conditional rules as create apply: a WEEKLY cadence needs a `scheduledWeekday` (from this body or already stored), EMAIL destinations must be valid addresses, and a `table` DIGEST widget allows at most two group-by dimensions. Archived reports cannot be updated (409).","tags":["Reports"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Optional name patch."},"description":{"type":"string","description":"Optional description patch."},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"teamId":{"type":"string","nullable":true},"scout":{"type":"string","nullable":true,"minLength":1},"createdById":{"type":"string","description":"Transfer document owner. Ignored when omitted or unchanged."},"tagIds":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"context":{"type":"object","properties":{"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]}}},"scheduledPeriod":{"type":"string","nullable":true,"enum":["DAILY","WEEKDAYS","WEEKLY","MONTHLY",null],"description":"Delivery cadence, or null for an on-demand report. Switching to WEEKLY requires a `scheduledWeekday` (in this body or already stored)."},"scheduledWeekday":{"type":"number","description":"Day of week for WEEKLY reports: 0 = Sunday … 6 = Saturday. Only validated when present in the body."},"scheduledFirstRunAt":{"type":"string","nullable":true,"format":"date-time"},"status":{"type":"string","enum":["ACTIVE","INACTIVE"]},"widgets":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","topN","flopN","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIGEST"],"description":"Cost-change breakdown as a tree, table, or LLM summary of the biggest movers."},"display":{"type":"string","enum":["tree","table","summary"],"default":"tree","description":"How the digest renders: 'tree' (default hierarchy), flat 'table', or an LLM-written 'summary'."},"showValue":{"type":"boolean","default":true,"description":"Show the absolute cost value on each row."},"showRelativeDelta":{"type":"boolean","default":true,"description":"Show the percentage change on each row."},"showDelta":{"type":"boolean","default":true,"description":"Show the absolute change on each row."},"topLargestAbsoluteChange":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many of the largest-absolute-change nodes to surface (integer 1–100). Applied at every tree level."},"minAbsoluteDiff":{"type":"number","minimum":0,"default":100,"description":"Hide nodes whose absolute change is below this threshold."},"minRelativeDiff":{"type":"number","minimum":0,"default":5,"description":"Hide nodes whose percentage change is below this threshold (percent)."},"additionalGroupBy":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Extra group-by dimensions applied after the report context `groupBy`, in order — each adds a deeper level to the tree."},"useDashboardGroupBy":{"type":"boolean","description":"Use the report (dashboard) context `groupBy` as this widget's root group-by (default true). Set false to override: the report context group-by is ignored for this widget and the first `additionalGroupBy` item (or the widget cost query `groupBy`) becomes the root. `false` requires at least one group-by dimension."},"enableAiInvestigation":{"type":"boolean","default":false,"description":"When true, the run's deepest-leaf nodes trigger an async AI investigation (`analysis_agent_run`) and the report waits for its callback before sending. Delivery is not immediate."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIVIDER"],"description":"Slack thread cut: widgets above post in the channel, widgets below post as replies. Ignored for email and Teams. At most one per report."}},"required":["type"]}],"description":"One report widget. The `type` field selects the shape: TOP_FLOP | GRAPH_SNAPSHOT | DASHBOARD_PDF | DIGEST | TEXT | DIVIDER. All fields other than `type` depend on the chosen type.","discriminator":{"propertyName":"type"}}]}},"destinations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]},"scopeId":{"type":"string","nullable":true},"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"],"description":"Delivery channel: EMAIL, SLACK, or TEAMS."},"destinationValues":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":20,"description":"One or more delivery targets sharing this destination's filters/context. EMAIL: addresses or ALL_ACTIVE_USERS; SLACK: channel ids; TEAMS: channel ids."}},"required":["destinationType","destinationValues"]}},"archivedAt":{"type":"string","nullable":true,"format":"date-time"}}},"example":{"name":"Weekly cloud cost digest","description":"Top movers across our AWS + GCP spend","type":"PRIVATE","context":{"metricId":"cost","groupBy":"provider","datePreset":"TRAILING_90_DAYS","currency":"USD"},"scheduledPeriod":"WEEKLY","scheduledWeekday":1,"status":"ACTIVE","widgets":[{"type":"TEXT","contentMarkdown":"## Weekly summary"}],"destinations":[{"destinationType":"SLACK","destinationValues":["C0123456789"]},{"destinationType":"EMAIL","destinationValues":["finance@acme.com"]}]}}}},"responses":{"204":{"description":"Report updated"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReportsValidationError"},{"type":"object","properties":{"error":{"type":"string","enum":["DESTINATIONS_REQUIRED"]}},"required":["error"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReportsForbidden"},{"$ref":"#/components/schemas/ReportsTeamMemberRequired"}]}}}},"404":{"description":"Report, dashboard, team scope, or related resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsNotFound"}}}},"409":{"description":"Archived report cannot be updated","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["REPORT_ARCHIVED"]}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"operationId":"archiveReport","summary":"Archive a report","description":"Soft-archives the report (sets `archivedAt`).","tags":["Reports"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Report archived"},"400":{"description":"Invalid report id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsValidationError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsForbidden"}}}}}}},"/reports/bulk/metadata":{"patch":{"operationId":"bulkUpdateReportMetadata","summary":"Bulk update report metadata","description":"Metadata-only patch of visibility, owner, team, and tags for reports. Any id missing or not editable returns 403 for the whole batch.","tags":["Reports"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"updates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"metadata":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"createdById":{"type":"string"},"teamId":{"type":"string","nullable":true},"tagIds":{"type":"array","items":{"type":"string"}}}}},"required":["id","metadata"]},"minItems":1}},"required":["updates"]}}}},"responses":{"204":{"description":"Updated"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReportsForbidden"},{"$ref":"#/components/schemas/ReportsTeamMemberRequired"}]}}}}}}},"/reports/bulk":{"delete":{"operationId":"bulkArchiveReports","summary":"Bulk archive reports","description":"Soft-archives reports (sets `archivedAt`).","tags":["Reports"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["ids"]}}}},"responses":{"204":{"description":"Reports archived"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsForbidden"}}}}}}},"/reports/{id}/metadata":{"patch":{"operationId":"updateReportMetadata","summary":"Update report metadata","description":"Metadata-only patch (visibility, owner, team, tags). Does not rewrite widgets or destinations.","tags":["Reports"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["PRIVATE","PUBLIC"]},"createdById":{"type":"string"},"teamId":{"type":"string","nullable":true},"tagIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"204":{"description":"Updated"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReportsForbidden"},{"$ref":"#/components/schemas/ReportsTeamMemberRequired"}]}}}}}}},"/reports/{id}/duplicate":{"post":{"operationId":"duplicateReport","summary":"Duplicate a report","tags":["Reports"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1}}}}}},"responses":{"201":{"description":"Report duplicated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportCreated"}}}},"400":{"description":"Validation or scope error","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReportsValidationError"},{"type":"object","properties":{"error":{"type":"string","enum":["DESTINATIONS_REQUIRED"]}},"required":["error"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsTeamMemberRequired"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsNotFound"}}}}}}},"/reports/{reportId}/executions":{"post":{"operationId":"runReportNow","summary":"Run a report now","description":"Enqueues and synchronously runs pending executions for every destination.","tags":["Reports"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"reportId","in":"path"}],"responses":{"200":{"description":"Run started and completed (or left pending for async widgets)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRunNow"}}}},"400":{"description":"Report cannot be run","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReportsValidationError"},{"type":"object","properties":{"error":{"type":"string","enum":["NO_DESTINATIONS","REPORT_NOT_ACTIVE","REPORT_ARCHIVED"]}},"required":["error"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsForbidden"}}}},"500":{"description":"Execution outcome could not be resolved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsRunOutcomeUnknown"}}}}}}},"/report-executions/{executionId}":{"get":{"operationId":"getReportExecution","summary":"Get a report execution","tags":["Reports"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"executionId","in":"path"}],"responses":{"200":{"description":"Execution detail with widgets and destination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportExecution"}}}},"400":{"description":"Invalid execution id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsValidationError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Execution not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsNotFound"}}}}}}},"/report-executions/{executionId}/retry":{"post":{"operationId":"retryReportExecution","summary":"Retry a failed report execution","tags":["Reports"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"executionId","in":"path"}],"responses":{"204":{"description":"Execution retried"},"400":{"description":"Execution cannot be retried","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReportsValidationError"},{"type":"object","properties":{"error":{"type":"string","enum":["EXECUTION_NOT_RETRYABLE"]}},"required":["error"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Execution not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsNotFound"}}}},"500":{"description":"Execution outcome could not be resolved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsRetryOutcomeUnknown"}}}}}}},"/report-executions/{executionId}/transfers":{"post":{"operationId":"transferReportExecution","summary":"Transfer a rendered execution to new destinations","tags":["Reports"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"executionId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"destinations":{"type":"array","items":{"type":"object","properties":{"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"]},"destinationValue":{"type":"string","minLength":1}},"required":["destinationType","destinationValue"]},"minItems":1,"maxItems":10}},"required":["destinations"]}}}},"responses":{"200":{"description":"Transfer results per destination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsExecutionsTransferOutput"}}}},"400":{"description":"Execution cannot be transferred","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReportsValidationError"},{"type":"object","properties":{"error":{"type":"string","enum":["EXECUTION_NOT_SENDABLE"]}},"required":["error"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Execution not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsNotFound"}}}}}}},"/report-previews/deliveries":{"post":{"operationId":"sendTestReport","summary":"Send a test report delivery","tags":["Reports"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Report name. May be empty or whitespace — the server then generates one from the report's content."},"description":{"type":"string","default":"","description":"Optional longer description (default empty)."},"type":{"type":"string","enum":["PRIVATE","PUBLIC"],"default":"PRIVATE","description":"Deprecated. On create, PUBLIC still seeds an organization Editor grant (and PRIVATE does not). On update it is ignored — grant Reader or Editor via PUT /access/report/:id/grants instead. TEMPLATE is dashboard-only."},"tagIds":{"type":"array","items":{"type":"string"},"description":"Existing org tag ids to assign. Omit for untagged."},"teamId":{"type":"string","nullable":true,"description":"Deprecated. On create, a non-null teamId still seeds a team Editor grant. On update it is ignored — grant a team Reader or Editor via PUT /access/report/:id/grants instead."},"scout":{"type":"string","nullable":true,"minLength":1},"scopeId":{"type":"string","nullable":true},"context":{"type":"object","properties":{"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]}},"default":{},"description":"Report-wide defaults (metric, group-by, date range, filters, currency) that widgets and destinations inherit unless they override them."},"scheduledPeriod":{"type":"string","nullable":true,"enum":["DAILY","WEEKDAYS","WEEKLY","MONTHLY",null],"description":"Delivery cadence, or null for an on-demand (one-time) report that only runs when triggered."},"scheduledWeekday":{"type":"number","description":"Day of week for WEEKLY reports: 0 = Sunday … 6 = Saturday. Required when `scheduledPeriod` is WEEKLY; ignored for every other cadence."},"scheduledFirstRunAt":{"type":"string","nullable":true,"format":"date-time","description":"First send date (UTC). The time of day is ignored: the report is due for the whole UTC day, as soon as the org is ready. Ignored once the report has run at least once."},"status":{"type":"string","enum":["ACTIVE","INACTIVE"]},"widgets":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","topN","flopN","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIGEST"],"description":"Cost-change breakdown as a tree, table, or LLM summary of the biggest movers."},"display":{"type":"string","enum":["tree","table","summary"],"default":"tree","description":"How the digest renders: 'tree' (default hierarchy), flat 'table', or an LLM-written 'summary'."},"showValue":{"type":"boolean","default":true,"description":"Show the absolute cost value on each row."},"showRelativeDelta":{"type":"boolean","default":true,"description":"Show the percentage change on each row."},"showDelta":{"type":"boolean","default":true,"description":"Show the absolute change on each row."},"topLargestAbsoluteChange":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many of the largest-absolute-change nodes to surface (integer 1–100). Applied at every tree level."},"minAbsoluteDiff":{"type":"number","minimum":0,"default":100,"description":"Hide nodes whose absolute change is below this threshold."},"minRelativeDiff":{"type":"number","minimum":0,"default":5,"description":"Hide nodes whose percentage change is below this threshold (percent)."},"additionalGroupBy":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Extra group-by dimensions applied after the report context `groupBy`, in order — each adds a deeper level to the tree."},"useDashboardGroupBy":{"type":"boolean","description":"Use the report (dashboard) context `groupBy` as this widget's root group-by (default true). Set false to override: the report context group-by is ignored for this widget and the first `additionalGroupBy` item (or the widget cost query `groupBy`) becomes the root. `false` requires at least one group-by dimension."},"enableAiInvestigation":{"type":"boolean","default":false,"description":"When true, the run's deepest-leaf nodes trigger an async AI investigation (`analysis_agent_run`) and the report waits for its callback before sending. Delivery is not immediate."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIVIDER"],"description":"Slack thread cut: widgets above post in the channel, widgets below post as replies. Ignored for email and Teams. At most one per report."}},"required":["type"]}],"description":"One report widget. The `type` field selects the shape: TOP_FLOP | GRAPH_SNAPSHOT | DASHBOARD_PDF | DIGEST | TEXT | DIVIDER. All fields other than `type` depend on the chosen type.","discriminator":{"propertyName":"type"}}]},"default":[],"description":"Ordered widgets that make up the report body. Each widget's `type` selects its shape (see ReportWidgetParameters)."},"destinations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]},"scopeId":{"type":"string","nullable":true},"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"],"description":"Delivery channel: EMAIL, SLACK, or TEAMS."},"destinationValues":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":20,"description":"One or more delivery targets sharing this destination's filters/context. EMAIL: addresses or ALL_ACTIVE_USERS; SLACK: channel ids; TEAMS: channel ids."}},"required":["destinationType","destinationValues"]},"minItems":1,"description":"Delivery targets. At least one is required. Each report is fanned out to every destination on every run."},"reportId":{"type":"string","format":"cuid"}},"required":["name","scheduledPeriod","destinations"]},"example":{"name":"Weekly cloud cost digest","description":"Top movers across our AWS + GCP spend","type":"PRIVATE","context":{"metricId":"cost","groupBy":"provider","datePreset":"TRAILING_90_DAYS","currency":"USD"},"scheduledPeriod":"WEEKLY","scheduledWeekday":1,"status":"ACTIVE","widgets":[{"type":"TEXT","contentMarkdown":"## Weekly summary"}],"destinations":[{"destinationType":"SLACK","destinationValues":["C0123456789"]},{"destinationType":"EMAIL","destinationValues":["finance@acme.com"]}]}}}},"responses":{"200":{"description":"Per-destination send results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsTestSendOutput"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsValidationError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReportsForbidden"},{"$ref":"#/components/schemas/ReportsTeamMemberRequired"}]}}}},"404":{"description":"Team scope or related resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsNotFound"}}}}}}},"/report-previews/widgets":{"post":{"operationId":"previewReportWidget","summary":"Preview a report widget","tags":["Reports"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"context":{"type":"object","properties":{"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]}},"default":{}},"scopeId":{"type":"string","nullable":true},"scoutId":{"type":"string","nullable":true},"previewOptions":{"type":"object","properties":{"preserveCurrentPeriodDates":{"type":"boolean"}}},"widget":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","topN","flopN","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIGEST"],"description":"Cost-change breakdown as a tree, table, or LLM summary of the biggest movers."},"display":{"type":"string","enum":["tree","table","summary"],"default":"tree","description":"How the digest renders: 'tree' (default hierarchy), flat 'table', or an LLM-written 'summary'."},"showValue":{"type":"boolean","default":true,"description":"Show the absolute cost value on each row."},"showRelativeDelta":{"type":"boolean","default":true,"description":"Show the percentage change on each row."},"showDelta":{"type":"boolean","default":true,"description":"Show the absolute change on each row."},"topLargestAbsoluteChange":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many of the largest-absolute-change nodes to surface (integer 1–100). Applied at every tree level."},"minAbsoluteDiff":{"type":"number","minimum":0,"default":100,"description":"Hide nodes whose absolute change is below this threshold."},"minRelativeDiff":{"type":"number","minimum":0,"default":5,"description":"Hide nodes whose percentage change is below this threshold (percent)."},"additionalGroupBy":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Extra group-by dimensions applied after the report context `groupBy`, in order — each adds a deeper level to the tree."},"useDashboardGroupBy":{"type":"boolean","description":"Use the report (dashboard) context `groupBy` as this widget's root group-by (default true). Set false to override: the report context group-by is ignored for this widget and the first `additionalGroupBy` item (or the widget cost query `groupBy`) becomes the root. `false` requires at least one group-by dimension."},"enableAiInvestigation":{"type":"boolean","default":false,"description":"When true, the run's deepest-leaf nodes trigger an async AI investigation (`analysis_agent_run`) and the report waits for its callback before sending. Delivery is not immediate."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIVIDER"],"description":"Slack thread cut: widgets above post in the channel, widgets below post as replies. Ignored for email and Teams. At most one per report."}},"required":["type"]}],"description":"One report widget. The `type` field selects the shape: TOP_FLOP | GRAPH_SNAPSHOT | DASHBOARD_PDF | DIGEST | TEXT | DIVIDER. All fields other than `type` depend on the chosen type.","discriminator":{"propertyName":"type"}}]}},"required":["widget"]}}}},"responses":{"200":{"description":"Widget preview result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportWidgetPreview"}}}},"400":{"description":"Invalid preview input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsValidationError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/report-previews/digest-summary":{"post":{"operationId":"previewDigestSummary","summary":"Preview digest summary markdown","tags":["Reports"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"context":{"type":"object","properties":{"metricId":{"type":"string","nullable":true},"groupBy":{"type":"string","nullable":true},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","nullable":true,"enum":["USD","EUR","GBP","CNY","KRW",null]}},"default":{}},"scopeId":{"type":"string","nullable":true},"scoutId":{"type":"string","nullable":true},"previewOptions":{"type":"object","properties":{"preserveCurrentPeriodDates":{"type":"boolean"}}},"widget":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid"},"title":{"type":"string","default":""},"description":{"type":"string","default":""}}},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOP_FLOP"],"description":"Ranked table of the biggest cost increases and decreases."},"topN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-increase rows to include."},"flopN":{"type":"integer","minimum":0,"maximum":100,"description":"Number of largest-decrease rows to include."},"cutOff":{"type":"number","minimum":0,"default":10,"description":"Minimum absolute cost change for a row to qualify. Rows below this are dropped."},"comparison":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PREVIOUS_PERIOD"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["CUSTOM"]},"from":{"type":"string","minLength":1},"to":{"type":"string","minLength":1}},"required":["kind","from","to"]}],"default":{"kind":"PREVIOUS_PERIOD"},"description":"Baseline the current period is compared against: PREVIOUS_PERIOD (default) or a CUSTOM { from, to } range.","discriminator":{"propertyName":"kind"}},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","topN","flopN","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRAPH_SNAPSHOT"],"description":"Rendered snapshot of an Advanced Explorer chart."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["DASHBOARD_PDF"],"description":"A dashboard rendered to PDF and attached to the report."},"dashboardV2Id":{"type":"string","minLength":1,"description":"Id of the dashboard to render as a PDF."},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null],"description":"Optional period override for every dashboard widget in the PDF. Omit to inherit the report (and destination) period. Mutually exclusive with startDate/endDate."},"startDate":{"type":"string","nullable":true,"description":"Optional custom range start (YYYY-MM-DD). Use with endDate instead of datePreset."},"endDate":{"type":"string","nullable":true,"description":"Optional custom range end (inclusive, YYYY-MM-DD). Use with startDate instead of datePreset."}},"required":["type","dashboardV2Id"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIGEST"],"description":"Cost-change breakdown as a tree, table, or LLM summary of the biggest movers."},"display":{"type":"string","enum":["tree","table","summary"],"default":"tree","description":"How the digest renders: 'tree' (default hierarchy), flat 'table', or an LLM-written 'summary'."},"showValue":{"type":"boolean","default":true,"description":"Show the absolute cost value on each row."},"showRelativeDelta":{"type":"boolean","default":true,"description":"Show the percentage change on each row."},"showDelta":{"type":"boolean","default":true,"description":"Show the absolute change on each row."},"topLargestAbsoluteChange":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"How many of the largest-absolute-change nodes to surface (integer 1–100). Applied at every tree level."},"minAbsoluteDiff":{"type":"number","minimum":0,"default":100,"description":"Hide nodes whose absolute change is below this threshold."},"minRelativeDiff":{"type":"number","minimum":0,"default":5,"description":"Hide nodes whose percentage change is below this threshold (percent)."},"additionalGroupBy":{"type":"array","items":{"type":"string","minLength":1},"default":[],"description":"Extra group-by dimensions applied after the report context `groupBy`, in order — each adds a deeper level to the tree."},"useDashboardGroupBy":{"type":"boolean","description":"Use the report (dashboard) context `groupBy` as this widget's root group-by (default true). Set false to override: the report context group-by is ignored for this widget and the first `additionalGroupBy` item (or the widget cost query `groupBy`) becomes the root. `false` requires at least one group-by dimension."},"enableAiInvestigation":{"type":"boolean","default":false,"description":"When true, the run's deepest-leaf nodes trigger an async AI investigation (`analysis_agent_run`) and the report waits for its callback before sending. Delivery is not immediate."},"advancedExplorerRequest":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"],"description":"Advanced Explorer query that defines this widget's data set: metric, group-by, period, filters and scope. Same shape as the Explorer API."}},"required":["type","advancedExplorerRequest"]},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"],"description":"Free-form Markdown block (headings, notes, context)."},"contentMarkdown":{"type":"string","minLength":1,"maxLength":10000,"description":"Markdown content, 1–10,000 characters."}},"required":["type","contentMarkdown"]},{"type":"object","properties":{"type":{"type":"string","enum":["DIVIDER"],"description":"Slack thread cut: widgets above post in the channel, widgets below post as replies. Ignored for email and Teams. At most one per report."}},"required":["type"]}],"description":"One report widget. The `type` field selects the shape: TOP_FLOP | GRAPH_SNAPSHOT | DASHBOARD_PDF | DIGEST | TEXT | DIVIDER. All fields other than `type` depend on the chosen type.","discriminator":{"propertyName":"type"}}]}},"required":["widget"]}}}},"responses":{"200":{"description":"Generated digest summary markdown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigestSummaryPreview"}}}},"400":{"description":"Invalid preview input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportsValidationError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/queries/run":{"post":{"operationId":"runQuery","summary":"Run a cost query","description":"Executes a CEL query and returns either a time series (`kind: series`) or a period-over-period comparison (`kind: comparison`) when `compare.enabled` is true. Organization comes from the authenticated principal (Clerk session JWT or `ak_*` API key). When `datePreset` is sent alongside `from`/`to`, the preset wins. An omitted `limit` is server-chosen (currently between 10 and 200 depending on the chart shape), not a flat default of 100. Optional `analyze.changePoint` (`true` or `{ ignoreWeekends }`) runs change-point detection once per query after a successful series result; Billy failures attach `analyze.changePoint[].status: failed` without failing the query. Incompatible with comparison. Optional `forecast: true` (Current Month / Current Quarter / Current Year, Day/Week/Month/Period) appends Billy forecast days onto the series: response `splitDate`, per-point `yhatLower`/`yhatUpper` on Day grain, or `forecastSkipReason: not_enough_history` when there are fewer than 21 training days. YTD/MTD + `forecast: true` is ignored. Billy failures degrade to observed-only without failing the query.","tags":["Query Costs"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"}}}},"responses":{"200":{"description":"Query result, discriminated by `kind`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"400":{"description":"Invalid query (strict CEL contract, formula refs, period, group-by, or other request rules)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidQueryError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Hourly granularity requires Costory Pro, or the external-metric provider denied access","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/HourlyGranularityForbiddenError"},{"$ref":"#/components/schemas/ExternalMetricUnauthorizedError"}]}}}},"404":{"description":"Scope, external-metric integration, or provider metric absent or not visible to this organization","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QueryNotFoundError"},{"$ref":"#/components/schemas/ExternalMetricIntegrationNotFoundError"},{"$ref":"#/components/schemas/ExternalMetricNotFoundError"}]}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/queries/diff-tree":{"post":{"operationId":"runQueryDiffTree","summary":"Run a cost-change diff tree","description":"Returns a `GROUP BY ROLLUP` tree of current vs previous cost per node for exactly one `cost` or `usage` series. Requires an enabled comparison period, a non-hourly `aggBy`, and at least one `groupBy` axis on that series. Pre-condition failures return `400 INVALID_QUERY` with today's message in `reason`. There is no Hour entitlement gate — hourly is rejected for every organization.","tags":["Query Costs"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryDiffTreeRequest"}}}},"responses":{"200":{"description":"Diff-tree rollup rows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiffTreeResponse"}}}},"400":{"description":"Invalid query (strict CEL contract, formula refs, period, group-by, or other request rules)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidQueryError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"The external-metric provider denied access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalMetricUnauthorizedError"}}}},"404":{"description":"Scope, external-metric integration, or provider metric absent or not visible to this organization","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QueryNotFoundError"},{"$ref":"#/components/schemas/ExternalMetricIntegrationNotFoundError"},{"$ref":"#/components/schemas/ExternalMetricNotFoundError"}]}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/queries/dimensions":{"get":{"operationId":"listQueryDimensions","summary":"List queryable dimensions","description":"Group-by axes and their values accepted by `groupBy` on cost/usage/metric series. Strict public shape — no react-querybuilder filter-widget fields.","tags":["Query Costs"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Dimensions available to the authenticated organization","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueryDimension"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/queries/usage-metrics":{"get":{"operationId":"listQueryUsageMetrics","summary":"List usage metrics","description":"Usage `metricId` values (and units) accepted by `usage` series.","tags":["Query Costs"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Usage metrics available to the authenticated organization","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UsageMetric"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/queries/metrics":{"get":{"operationId":"listQueryMetrics","summary":"List business metrics","description":"Business `metricId` values accepted by `metric` series, grouped by datasource. `status` is a stored value and is not refreshed on read for API-key callers.","tags":["Query Costs"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Queryable business metrics for the authenticated organization","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueryMetric"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerError"}}}}}}},"/public/events":{"post":{"summary":"Create a new event","description":"Endpoint to create a new event using public API.","tags":["Events"],"security":[{"apiKeyAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalEventRequest"}}}},"responses":{"201":{"description":"Event created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEventSuccess"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEventBadRequest"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/terraform":{"get":{"summary":"Get service account details","description":"Returns service account information for the Admin API.","tags":["Admin"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"responses":{"200":{"description":"Service account details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGetServiceAccount"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/terraform/billingDatasources":{"post":{"summary":"Create a billing datasource","tags":["Admin Billing Datasources"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBillingDatasourceCreate"}}}},"responses":{"201":{"description":"Billing datasource created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCreateBillingDatasourceResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}},"/terraform/billingDatasources/{id}":{"get":{"summary":"Get a billing datasource","tags":["Admin Billing Datasources"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Billing datasource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBillingDatasourceRead"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}},"delete":{"summary":"Archive a billing datasource","tags":["Admin Billing Datasources"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Billing datasource archived"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}},"/terraform/billingDatasources/validate":{"post":{"summary":"Validate billing datasource configuration","tags":["Admin Billing Datasources"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBillingDatasourceCreate"}}}},"responses":{"200":{"description":"Validation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminValidationResult"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}}}}},"/terraform/teams":{"get":{"summary":"List teams in the organization via Admin API","description":"Returns all non-archived teams for the authenticated organization (admin IAM — same list service as SPA `/teams`).","tags":["Admin Teams"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"responses":{"200":{"description":"Teams in the organization","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminTeamWithMembers"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}},"post":{"summary":"Create a team via Admin API","tags":["Admin Teams"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","default":""},"visibility":{"type":"string","enum":["PUBLIC","PRIVATE"]},"defaultCostMetric":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"scope":{"type":"string","description":"Optional team cost filter as CEL. When set, parses and validates against organization dimensions, then persists as whereClause. On create, writes the initial Default scope. On update, updates the single scope row; if the team has more than one named scope, use the /scopes API instead."},"destinationEnabled":{"type":"boolean"},"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"]},"destination":{"type":"string","nullable":true}},"required":["name"]}}}},"responses":{"201":{"description":"Created team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTeamWithMembers"}}}},"400":{"description":"Bad request (e.g. validation). When the team name is already taken, error is TEAM_NAME_EXISTS and existingTeamId is set. When `scope` CEL is invalid, error is INVALID_SCOPE_FILTER with a reason.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerraformTeamPatchBadRequest"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/terraform/teams/{id}":{"get":{"summary":"Get a team via Admin API","description":"The path parameter may be the team id or the team name (case-insensitive). Returns full team detail including members (with user) and pending invites.","tags":["Admin Teams"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Team id (cuid) or team name within the organization"},"required":true,"description":"Team id (cuid) or team name within the organization","name":"id","in":"path"}],"responses":{"200":{"description":"Team detail (members + pending invites)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTeamDetail"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}},"patch":{"summary":"Update a team via Admin API","description":"The path parameter may be the team id or the team name (case-insensitive).","tags":["Admin Teams"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Team id (cuid) or team name within the organization"},"required":true,"description":"Team id (cuid) or team name within the organization","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"visibility":{"type":"string","enum":["PUBLIC","PRIVATE"]},"defaultCostMetric":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"scope":{"type":"string","description":"Optional team cost filter as CEL. When set, parses and validates against organization dimensions, then persists as whereClause. On create, writes the initial Default scope. On update, updates the single scope row; if the team has more than one named scope, use the /scopes API instead."},"destinationEnabled":{"type":"boolean"},"destinationType":{"type":"string","enum":["SLACK","EMAIL","TEAMS"]},"destination":{"type":"string","nullable":true}}}}}},"responses":{"200":{"description":"Updated team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTeamWithMembers"}}}},"400":{"description":"Bad request (e.g. validation). When renaming to an existing name, error is TEAM_NAME_EXISTS and existingTeamId is set. When `scope` CEL is invalid, error is INVALID_SCOPE_FILTER with a reason. When the team has more than one named scope, error is TEAM_MULTIPLE_SCOPES.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerraformTeamPatchBadRequest"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}},"delete":{"summary":"Archive a team via Admin API","description":"The path parameter may be the team id or the team name (case-insensitive).","tags":["Admin Teams"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Team id (cuid) or team name within the organization"},"required":true,"description":"Team id (cuid) or team name within the organization","name":"id","in":"path"}],"responses":{"200":{"description":"Team archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSuccessResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}},"/terraform/teams/{id}/members":{"post":{"summary":"Add a member to a team via Admin API","description":"The path parameter may be the team id or the team name (case-insensitive).","tags":["Admin Teams"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Team id (cuid) or team name within the organization"},"required":true,"description":"Team id (cuid) or team name within the organization","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["OWNER","MEMBER"]}}}}}},"responses":{"200":{"description":"Member added or invited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSuccessResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}},"/terraform/teams/{id}/members/{userId}":{"delete":{"summary":"Remove a member from a team via Admin API","description":"The path parameter may be the team id or the team name (case-insensitive).","tags":["Admin Teams"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Team id (cuid) or team name within the organization"},"required":true,"description":"Team id (cuid) or team name within the organization","name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"Member removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSuccessResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}},"/terraform/teams/{id}/SYNC":{"post":{"summary":"Sync all members of a team via Admin API","description":"Replaces the full member list of a team. Existing members not in the payload are removed, new ones are added or invited. The path parameter may be the team id or the team name (case-insensitive).","tags":["Admin Teams"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Team id (cuid) or team name within the organization"},"required":true,"description":"Team id (cuid) or team name within the organization","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["OWNER","MEMBER"]}},"required":["role"]}}},"required":["members"]}}}},"responses":{"200":{"description":"Members synced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSuccessResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}},"/events/tags":{"get":{"summary":"Get event tags","tags":["Events"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Tags retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventTagsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/events/{id}":{"get":{"summary":"Get an event by ID","tags":["Events"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Event retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetEventResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Event not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}},"put":{"summary":"Update an event","tags":["Events"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","minLength":5},"date":{"type":"string","nullable":true,"format":"date-time"},"description":{"type":"string"},"viewUsedForCreation":{"type":"object","nullable":true,"properties":{"metricId":{"type":"string"},"currency":{"type":"string","enum":["EUR","USD","GBP","CNY","KRW"],"default":"USD"},"limit":{"type":"number","nullable":true},"threshold":{"anyOf":[{"type":"number","nullable":true},{"nullable":true,"type":"string","enum":[null]}]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"groupBy":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_30_DAYS","TRAILING_90_DAYS","TRAILING_45_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_7_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_3_MONTHS","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_INVOICE_MONTH",null]},"previousFrom":{"type":"string"},"previousTo":{"type":"string"},"explorerChartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"],"default":"BAR"},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"scopeId":{"type":"string","nullable":true}},"required":["metricId","limit","aggBy","groupBy","from","to","datePreset","previousFrom","previousTo","whereClause"]},"metricId":{"type":"string"},"groupBy":{"type":"string"},"datePreset":{"type":"string","enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH"]},"startDate":{"type":"string"},"endDate":{"type":"string"},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{}},"currency":{"type":"string","enum":["EUR","USD","GBP","CNY","KRW"],"default":"USD"},"scopeId":{"type":"string","nullable":true},"widgetEvents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"},"title":{"type":"string","default":""},"description":{"type":"string","default":""},"request":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"]}},"required":["x","y","w","h","request"]}},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"]},"source":{"type":"string","enum":["custom","provider","github","api","agent"]},"tags":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}]},"default":[]}},"required":["metadata","name","date","description","viewUsedForCreation","widgetEvents"]}}}},"responses":{"201":{"description":"Event updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventIdResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}},"delete":{"summary":"Delete an event","tags":["Events"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"201":{"description":"Event deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventIdResponse"}}}},"400":{"description":"Bad request (e.g. linked to saved view)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/events/aggregate":{"post":{"summary":"Aggregate events","tags":["Events"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"searchEvents":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"filters":{"type":"object","properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]}},"required":["from","to","aggBy"]},"bookmarkedEvents":{"type":"array","items":{"type":"string"},"default":[]}},"required":["filters"]}}}},"responses":{"200":{"description":"Events aggregated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedEventsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/events":{"post":{"summary":"Create a new event","description":"Endpoint to create a new event from the internal API.","tags":["Events"],"security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"name":{"type":"string","minLength":5},"date":{"type":"string","nullable":true,"format":"date-time"},"description":{"type":"string"},"tags":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}]},"default":[]},"metricId":{"type":"string","description":"Legacy event-level metric context. Usually omit it: when a chart is provided in widgetEvents, the backend derives this from its first cost query."},"groupBy":{"type":"string","description":"Legacy event-level group-by dimension. Usually omit it: when a chart is provided in widgetEvents, the backend derives this from its first cost query."},"datePreset":{"type":"string","enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH"],"description":"Legacy event-level chart period preset. Usually omit it: the backend derives the period from widgetEvents."},"startDate":{"type":"string","description":"Legacy event-level custom period start date. Usually omit it: the backend derives the period from widgetEvents."},"endDate":{"type":"string","description":"Legacy event-level custom period end date. Usually omit it: the backend derives the period from widgetEvents."},"conditions":{"type":"object","nullable":true,"properties":{},"additionalProperties":{},"description":"Legacy event-level query-builder filter. Usually omit it: the backend derives conditions from the first cost query's whereClause in widgetEvents."},"currency":{"type":"string","enum":["EUR","USD","GBP","CNY","KRW"],"default":"USD","description":"Legacy event-level chart currency. Usually omit it: the backend derives currency from widgetEvents."},"scopeId":{"type":"string","nullable":true},"widgetEvents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"createdAt":{"type":"string","nullable":true,"format":"date-time"},"updatedAt":{"type":"string","nullable":true,"format":"date-time"},"title":{"type":"string","default":""},"description":{"type":"string","default":""},"request":{"type":"object","properties":{"period":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"datePreset":{"type":"string","nullable":true,"enum":["TRAILING_90_DAYS","TRAILING_30_DAYS","TRAILING_45_DAYS","TRAILING_7_DAYS","TRAILING_3_DAYS","TRAILING_1_DAYS","TRAILING_14_WEEKS","MTD","QTD","YTD","CURRENT_MONTH","CURRENT_QUARTER","CURRENT_YEAR","LAST_WEEK","LAST_MONTH","LAST_6_MONTHS","LAST_12_MONTHS","LAST_4_YEARS","LAST_3_MONTHS","LAST_INVOICE_MONTH",null]},"aggBy":{"type":"string","enum":["Hour","Day","Week","Month","Period"]},"forecastDays":{"type":"integer","minimum":0},"comparisonPeriod":{"type":"object","properties":{"startDate":{"type":"string","nullable":true,"format":"date-time"},"endDate":{"type":"string","nullable":true,"format":"date-time"},"enabled":{"type":"boolean"},"chartType":{"type":"string","enum":["WATERFALL","TABLE","KPI_BREAKDOWN"]}},"required":["startDate","endDate","enabled","chartType"]}},"required":["aggBy"]},"queries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["condition"]},"expression":{"type":"string","minLength":1},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]}},"required":["type","expression","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["formula"]},"formula":{"type":"string"},"unitOverride":{"type":"string"},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","formula","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["metric"]},"metricId":{"type":"string"},"rawMetric":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"unitOverride":{"type":"string"},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","metricId","aggregator","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["cost"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"currency":{"type":"string","enum":["USD","EUR","GBP","CNY","KRW"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"metricId":{"type":"string","enum":["cost","effective_cost","list_cost","contracted_cost","unblended_cost","net_unblended_cost","amortized_cost","net_amortized_cost"]},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","aggregator","whereClause","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"whereClause":{"type":"object","properties":{},"additionalProperties":{}},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"metricId":{"type":"string"},"extendDashboardConditions":{"type":"boolean","default":true},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"reducer":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"excludeGroupByValue":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","enum":["indexation"]}},"required":["type"],"additionalProperties":false}},"required":["source"],"additionalProperties":false,"description":"Exclude group-by values already present in the billing-stats indexation catalog before the query window. HTTP API only; not available on MCP query."},"shiftAmount":{"type":"integer"},"shiftUnit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["type","whereClause","aggregator","metricId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["budget"]},"budgetId":{"type":"string"},"budgetLineId":{"type":"string"},"groupBy":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","minLength":1}},{"nullable":true,"type":"string","enum":[null]}]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"virtualDimensionValue":{"type":"string"},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"],"default":"SUM"}},"required":["type","budgetId","name","colorIndex","chartType"]},{"type":"object","properties":{"type":{"type":"string","enum":["externalMetric"]},"provider":{"type":"string","enum":["tsuga","bigquery","datadog","cloudwatch","s3","amplitude","snowflake","cloudmonitoring","push"]},"integrationId":{"type":"string","minLength":1,"description":"External metric integration ID from list_metrics(includeExternal: true)."},"query":{"type":"string","minLength":1},"metricName":{"type":"string","default":""},"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"groupByFields":{"type":"array","items":{"type":"string","minLength":1},"maxItems":7,"default":[]},"conditions":{"type":"string"},"dateColumn":{"type":"string","minLength":1},"metricColumn":{"type":"string","minLength":1},"gapFillingMethod":{"type":"string","enum":["ZERO","FORWARD_FILL","LINEAR_INTERPOLATION","SPREAD"]},"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"alias":{"type":"string","minLength":1,"maxLength":50},"visible":{"type":"boolean","default":true},"colorIndex":{"type":"number"},"chartType":{"type":"string","enum":["BAR","LINE","AREA","WATERFALL","TABLE"]},"colorPalette":{"type":"string","enum":["DEFAULT","PIYG","RDYLBU","CLASSIC"],"default":"DEFAULT"},"rollingAggregation":{"type":"object","properties":{"aggregator":{"type":"string","enum":["SUM","AVG","MAX","MIN"]},"window":{"type":"object","properties":{"preset":{"type":"string","enum":["MONTH","WEEK"]},"relativeDays":{"type":"integer","minimum":1}}}},"required":["aggregator","window"]},"unitOverride":{"type":"string"}},"required":["type","provider","integrationId","name","colorIndex","chartType"]}],"discriminator":{"propertyName":"type"}}},"eventsFilter":{"type":"object","nullable":true,"properties":{"sources":{"type":"array","items":{"type":"string","enum":["custom","provider","github","api","agent"]},"default":["custom","api"]},"githubSourceRepos":{"type":"array","items":{"type":"string"},"default":[]},"search":{"type":"string","default":""}}},"bookmarkedEvents":{"type":"array","items":{"type":"string"}},"scopeId":{"type":"string","nullable":true},"limitOverride":{"type":"integer","minimum":1,"maximum":1000},"displayOptions":{"type":"object","properties":{"sort":{"type":"object","properties":{"by":{"type":"string","minLength":1},"direction":{"type":"string","enum":["ASC","DESC"],"default":"DESC"}},"required":["by"]},"hideEmptyRows":{"type":"boolean"},"topN":{"type":"integer","minimum":1,"maximum":100},"showTotal":{"type":"boolean"},"precision":{"type":"integer","minimum":0,"maximum":6},"pivot":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1},"columns":{"type":"array","items":{"type":"string","enum":["groupBy","query","time"]},"minItems":1}},"required":["rows","columns"],"additionalProperties":false}},"additionalProperties":false}},"required":["period","queries","bookmarkedEvents"]}},"required":["x","y","w","h","request"]},"maxItems":1,"description":"Chart annotation associated with the event. Send an empty array for an event without a chart, or one item containing its grid layout, title, description, and Advanced Explorer request. POST /events accepts at most one item."},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}},"required":["id","firstName","lastName"]},"source":{"type":"string","enum":["custom","provider","github","api","agent"]}},"required":["name","date","description","widgetEvents"]},"example":{"name":"Migrated checkout service to Graviton","date":"2026-07-20","description":"Deployed ARM64 instances for the checkout service, reducing its EC2 compute cost by approximately 20%.","category":"TECHNICAL","metadata":{"source":"custom","link":"https://github.com/acme/checkout/pull/4821"},"tags":[{"key":"service","value":"checkout"},{"key":"change","value":"graviton-migration"}],"labels":["production","aws"],"currency":"USD","widgetEvents":[]}}}},"responses":{"201":{"description":"Event created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventIdResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}}}}},"/integrations/{id}/metrics/points":{"post":{"operationId":"pushCustomMetricPoints","summary":"Push custom metric points","description":"Stream hourly metric points into a Custom Metrics Push integration. Authenticate with a Clerk organization API key (`ak_*`, subject `org_*`). Session JWTs and user API keys are rejected. Timestamps are truncated to the hour in UTC; the last write for the same metric, hour, and tags wins.","tags":["Custom Metrics"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Custom Metrics Push integration id"},"required":true,"description":"Custom Metrics Push integration id","name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"points":{"type":"array","items":{"type":"object","properties":{"metric_name":{"type":"string","minLength":1,"maxLength":255},"ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"number"}]},"value":{"type":"number"},"tags":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"default":{}}},"required":["metric_name","ts","value"]},"minItems":1,"maxItems":10000}},"required":["points"]},"example":{"points":[{"metric_name":"orders","ts":"2026-09-02T15:37:00Z","value":42,"tags":{"env":"prod"}}]}}}},"responses":{"202":{"description":"Points accepted for streaming insert","content":{"application/json":{"schema":{"type":"object","properties":{"inserted":{"type":"integer","minimum":0},"truncatedHours":{"type":"integer","minimum":0}},"required":["inserted","truncatedHours"]}}}},"400":{"description":"Invalid points payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Missing or non-org Clerk API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"404":{"description":"Integration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}},"/access/{resourceKind}/{resourceId}":{"get":{"summary":"Get object access grants","tags":["Access"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["dashboard","report","budget","costAlert","scout"]},"required":true,"name":"resourceKind","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"resourceId","in":"path"}],"responses":{"200":{"description":"Direct grants and caller capabilities","content":{"application/json":{"schema":{"type":"object","properties":{"grants":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"principalType":{"type":"string","enum":["USER"]},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]},"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true}},"required":["id","principalType","role","userId","name","email","avatar"]},{"type":"object","properties":{"id":{"type":"string"},"principalType":{"type":"string","enum":["TEAM"]},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]},"teamId":{"type":"string"},"name":{"type":"string"}},"required":["id","principalType","role","teamId","name"]},{"type":"object","properties":{"id":{"type":"string"},"principalType":{"type":"string","enum":["ORGANIZATION"]},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]}},"required":["id","principalType","role"]},{"type":"object","properties":{"id":{"type":"string"},"principalType":{"type":"string","enum":["CLERK_ADMIN"]},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]}},"required":["id","principalType","role"]}]}},"callerRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"capabilities":{"type":"object","properties":{"canView":{"type":"boolean"},"canEdit":{"type":"boolean"},"canManage":{"type":"boolean"}},"required":["canView","canEdit","canManage"]},"availableRoles":{"type":"array","items":{"type":"string","enum":["READER","EDITOR","ADMIN"]}}},"required":["grants","callerRole","capabilities","availableRoles"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}},"/access/{resourceKind}/{resourceId}/grants":{"put":{"summary":"Replace object access grants","tags":["Access"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","enum":["dashboard","report","budget","costAlert","scout"]},"required":true,"name":"resourceKind","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"resourceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"grants":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"principalType":{"type":"string","enum":["USER"]},"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]}},"required":["principalType","userId","role"]},{"type":"object","properties":{"principalType":{"type":"string","enum":["TEAM"]},"teamId":{"type":"string","minLength":1},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]}},"required":["principalType","teamId","role"]},{"type":"object","properties":{"principalType":{"type":"string","enum":["ORGANIZATION"]},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]}},"required":["principalType","role"]},{"type":"object","properties":{"principalType":{"type":"string","enum":["CLERK_ADMIN"]},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]}},"required":["principalType","role"]}]},"description":"Full replacement of direct grants. Omitted principals lose access. Every object must retain a USER, TEAM, or CLERK_ADMIN Admin grant. Each principal may appear once."}},"required":["grants"]}}}},"responses":{"200":{"description":"Grants after the replacement","content":{"application/json":{"schema":{"type":"object","properties":{"grants":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"principalType":{"type":"string","enum":["USER"]},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]},"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true}},"required":["id","principalType","role","userId","name","email","avatar"]},{"type":"object","properties":{"id":{"type":"string"},"principalType":{"type":"string","enum":["TEAM"]},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]},"teamId":{"type":"string"},"name":{"type":"string"}},"required":["id","principalType","role","teamId","name"]},{"type":"object","properties":{"id":{"type":"string"},"principalType":{"type":"string","enum":["ORGANIZATION"]},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]}},"required":["id","principalType","role"]},{"type":"object","properties":{"id":{"type":"string"},"principalType":{"type":"string","enum":["CLERK_ADMIN"]},"role":{"type":"string","enum":["READER","EDITOR","ADMIN"]}},"required":["id","principalType","role"]}]}},"callerRole":{"type":"string","nullable":true,"enum":["READER","EDITOR","ADMIN",null]},"capabilities":{"type":"object","properties":{"canView":{"type":"boolean"},"canEdit":{"type":"boolean"},"canManage":{"type":"boolean"}},"required":["canView","canEdit","canManage"]},"availableRoles":{"type":"array","items":{"type":"string","enum":["READER","EDITOR","ADMIN"]}}},"required":["grants","callerRole","capabilities","availableRoles"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}