{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-list-costs-response-schema.json",
  "title": "ListCostsResponse",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/harness-costs-api-openapi.yml#/components/schemas/ListCostsResponse",
  "type": "object",
  "properties": {
    "pageSize": {
      "type": "integer",
      "description": "Current page size",
      "format": "int64"
    },
    "totalItems": {
      "type": "integer",
      "description": "Total items available",
      "format": "int64"
    },
    "totalPages": {
      "type": "integer",
      "description": "Total pages available",
      "format": "int64"
    },
    "workspaces": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/HarnessIacmMonthlycost"
      },
      "description": "Representation of all the workspaces, and cost information"
    }
  },
  "required": [
    "totalItems",
    "totalPages",
    "pageSize"
  ],
  "$defs": {
    "HarnessIacmMonthlycost": {
      "type": "object",
      "properties": {
        "cost": {
          "type": "string",
          "description": "The cost associated to the execution metadata"
        },
        "created": {
          "type": "integer",
          "description": "The epoch time for the cost",
          "format": "int64"
        },
        "currency": {
          "type": "string",
          "description": "The currency for the cost"
        },
        "workspace_id": {
          "type": "string"
        },
        "workspace_name": {
          "type": "string"
        }
      },
      "description": "MonthlyCost is the cost of a workspace per month",
      "required": [
        "workspace_id",
        "workspace_name",
        "currency",
        "cost",
        "created"
      ]
    }
  }
}