{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-budget-schema.json", "title": "Budget", "description": "The Cloud Cost Budget definition", "x-generated": "2026-10-04", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/harness-budgets-api-openapi.yml#/components/schemas/Budget", "required": [ "accountId", "name" ], "type": "object", "properties": { "uuid": { "type": "string" }, "accountId": { "type": "string" }, "name": { "maxLength": 80, "minLength": 1, "type": "string" }, "scope": { "$ref": "#/$defs/BudgetScope" }, "type": { "type": "string", "description": "Whether the Budget is based on a specified amount or based on previous month's actual spend", "enum": [ "SPECIFIED_AMOUNT", "PREVIOUS_MONTH_SPEND", "PREVIOUS_PERIOD_SPEND" ] }, "budgetMonthlyBreakdown": { "$ref": "#/$defs/BudgetMonthlyBreakdown" }, "customAlertMessage": { "type": "string" }, "budgetAmount": { "type": "number", "format": "double" }, "period": { "type": "string", "enum": [ "DAILY", "WEEKLY", "MONTHLY", "QUARTERLY", "YEARLY" ] }, "growthRate": { "type": "number", "format": "double" }, "actualCost": { "type": "number", "format": "double" }, "forecastCost": { "type": "number", "format": "double" }, "lastMonthCost": { "type": "number", "format": "double" }, "alertThresholds": { "type": "array", "items": { "$ref": "#/$defs/AlertThreshold" } }, "emailAddresses": { "type": "array", "items": { "type": "string" } }, "userGroupIds": { "type": "array", "items": { "type": "string" } }, "parentBudgetGroupId": { "type": "string" }, "notifyOnSlack": { "type": "boolean" }, "isNgBudget": { "type": "boolean", "writeOnly": true }, "startTime": { "type": "integer", "format": "int64" }, "endTime": { "type": "integer", "format": "int64" }, "budgetHistory": { "type": "object", "additionalProperties": { "$ref": "#/$defs/BudgetCostData" } }, "disableCurrencyWarning": { "type": "boolean" }, "createdAt": { "type": "integer", "format": "int64" }, "lastUpdatedAt": { "type": "integer", "format": "int64" }, "createdBy": { "$ref": "#/$defs/EmbeddedUser" }, "lastUpdatedBy": { "$ref": "#/$defs/EmbeddedUser" }, "folderId": { "type": "string" }, "ngBudget": { "type": "boolean" } }, "$defs": { "AlertThreshold": { "type": "object", "properties": { "percentage": { "type": "number", "format": "double" }, "basedOn": { "type": "string", "description": "Whether the alert is based on Actual cost or next 30 days Forecasted Cost", "enum": [ "ACTUAL_COST", "FORECASTED_COST", "PARTIAL_COST", "YEARLY_ACTUAL_COST", "YEARLY_FORECASTED_COST" ] }, "emailAddresses": { "type": "array", "items": { "type": "string" } }, "userGroupIds": { "type": "array", "items": { "type": "string" } }, "slackWebhooks": { "type": "array", "items": { "type": "string" } }, "alertsSent": { "type": "integer", "format": "int32" }, "crossedAt": { "type": "integer", "format": "int64" } }, "description": "A description of a single Alert" }, "BudgetCostData": { "type": "object", "properties": { "time": { "type": "integer", "format": "int64" }, "endTime": { "type": "integer", "format": "int64" }, "actualCost": { "type": "number", "format": "double" }, "forecastCost": { "type": "number", "format": "double" }, "budgeted": { "type": "number", "format": "double" }, "budgetVariance": { "type": "number", "format": "double" }, "budgetVariancePercentage": { "type": "number", "format": "double" } } }, "BudgetMonthlyBreakdown": { "type": "object", "properties": { "budgetBreakdown": { "type": "string", "description": "Whether the Yearly budget breakdown is yearly or monthly", "enum": [ "YEARLY", "MONTHLY" ] }, "budgetMonthlyAmount": { "type": "array", "description": "Budgeted monthly amount for yearly budget", "items": { "$ref": "#/$defs/ValueDataPoint" } }, "actualMonthlyCost": { "type": "array", "description": "Actual monthly cost for yearly budget", "items": { "type": "number", "description": "Actual monthly cost for yearly budget", "format": "double" } }, "forecastMonthlyCost": { "type": "array", "description": "Forecasted monthly cost for yearly budget", "items": { "type": "number", "description": "Forecasted monthly cost for yearly budget", "format": "double" } }, "yearlyLastPeriodCost": { "type": "array", "description": "Yearly monthly cost for last year budget", "items": { "type": "number", "description": "Yearly monthly cost for last year budget", "format": "double" } }, "forecastCostConfigured": { "type": "boolean", "description": "Indicates whether forecast cost has been ingested by the user" } }, "description": "The budget monthly breakdown of a Yearly Budget" }, "BudgetScope": { "required": [ "type" ], "type": "object", "properties": { "entityIds": { "type": "array", "items": { "type": "string" } }, "entityNames": { "type": "array", "items": { "type": "string" } }, "budgetScopeType": { "type": "string" }, "type": { "type": "string" } }, "description": "The scope in which the Budget was created" }, "EmbeddedUser": { "type": "object", "properties": { "uuid": { "type": "string" }, "name": { "type": "string" }, "email": { "type": "string" }, "externalUserId": { "type": "string" } } }, "ValueDataPoint": { "type": "object", "properties": { "time": { "type": "integer", "format": "int64" }, "value": { "type": "number", "format": "double" } } } } }