{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-ccmbudget-filter-properties-schema.json",
  "title": "CCMBudgetFilterProperties",
  "description": "Properties of the Budget Filter defined in Harness",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/harness-budgets-api-openapi.yml#/components/schemas/CCMBudgetFilterProperties",
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Filter by budget period",
      "enum": [
        "DAILY",
        "WEEKLY",
        "MONTHLY",
        "QUARTERLY",
        "YEARLY"
      ]
    },
    "createdBy": {
      "type": "array",
      "description": "Filter by creator user ID",
      "items": {
        "type": "string",
        "description": "Filter by creator user ID"
      }
    },
    "perspectiveNames": {
      "type": "array",
      "description": "Filter by perspective ID",
      "items": {
        "type": "string",
        "description": "Filter by perspective ID"
      }
    },
    "minBudgetAmount": {
      "type": "number",
      "description": "Minimum budget amount",
      "format": "double"
    },
    "maxBudgetAmount": {
      "type": "number",
      "description": "Maximum budget amount",
      "format": "double"
    },
    "lastModifiedStartTime": {
      "type": "integer",
      "description": "Start time for last modified filter (timestamp in milliseconds)",
      "format": "int64"
    },
    "lastModifiedEndTime": {
      "type": "integer",
      "description": "End time for last modified filter (timestamp in milliseconds)",
      "format": "int64"
    },
    "offset": {
      "type": "integer",
      "description": "Number of results to skip",
      "format": "int32"
    },
    "limit": {
      "type": "integer",
      "description": "Maximum number of results to return",
      "format": "int32"
    },
    "folderIds": {
      "type": "array",
      "description": "Filter by multiple folder IDs",
      "items": {
        "type": "string",
        "description": "Filter by multiple folder IDs"
      }
    },
    "searchKey": {
      "type": "string",
      "description": "Search text to filter budgets by name (case-insensitive)"
    },
    "budgetStatus": {
      "type": "array",
      "description": "Filter by budget status (ON_TRACK, AT_RISK, OVER_BUDGET)",
      "items": {
        "type": "string",
        "description": "Filter by budget status (ON_TRACK, AT_RISK, OVER_BUDGET)",
        "enum": [
          "ON_TRACK",
          "AT_RISK",
          "OVER_BUDGET"
        ]
      }
    },
    "scopeType": {
      "type": "string",
      "description": "Filter by budget scope type (PERSPECTIVE, COST_BUCKET)"
    },
    "costCategoryNames": {
      "type": "array",
      "description": "Filter by cost category names",
      "items": {
        "type": "string",
        "description": "Filter by cost category names"
      }
    },
    "costBucketNames": {
      "type": "array",
      "description": "Filter by cost bucket names",
      "items": {
        "type": "string",
        "description": "Filter by cost bucket names"
      }
    },
    "costCategoryDTOs": {
      "type": "array",
      "description": "Filter by nested cost category and cost bucket pairs. Each entry matches budgets scoped to the given cost category and cost bucket; entries are OR-ed together. Takes precedence over costCategoryNames/costBucketNames when provided.",
      "items": {
        "$ref": "#/$defs/CCMCostCategoryDTO"
      }
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "description": "Filter tags as a key-value pair."
      },
      "description": "Filter tags as a key-value pair."
    },
    "filterType": {
      "type": "string",
      "enum": [
        "CCMBudget"
      ]
    }
  },
  "$defs": {
    "CCMCostCategoryDTO": {
      "type": "object",
      "properties": {
        "costCategory": {
          "type": "string"
        },
        "costBucket": {
          "type": "string"
        }
      },
      "description": "This object will contain cost category and it's bucket value"
    }
  }
}