{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-approvals-list-response-v2-schema.json",
  "title": "ApprovalsListResponseV2",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/harness-commitment-orchestrator-user-approval-apis-api-openapi.yml#/components/schemas/ApprovalsListResponseV2",
  "type": "object",
  "properties": {
    "ts": {
      "type": "integer",
      "description": "Response timestamp"
    },
    "success": {
      "type": "boolean",
      "description": "Indicates if the request was successful"
    },
    "errors": {
      "type": [
        "array",
        "null"
      ],
      "description": "List of errors if any",
      "items": {
        "type": "object"
      }
    },
    "response": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "description": "Total number of events matching the criteria"
        },
        "pages": {
          "type": "integer",
          "description": "Total number of pages"
        },
        "events": {
          "type": "array",
          "description": "List of approval events",
          "items": {
            "$ref": "#/$defs/ApprovalEventV2"
          }
        }
      }
    }
  },
  "$defs": {
    "ApprovalEventV2": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Unique identifier for the event"
        },
        "category": {
          "type": "string",
          "description": "Category of the event"
        },
        "cloud_account_id": {
          "type": "string",
          "description": "Cloud account identifier"
        },
        "cloud_account_name": {
          "type": "string",
          "description": "Cloud account name"
        },
        "account_id": {
          "type": "string",
          "description": "Harness account identifier"
        },
        "evaluated_at": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when the event was evaluated"
        },
        "status": {
          "type": "string",
          "description": "Status of the event",
          "enum": [
            "PENDING",
            "COMPLETED",
            "EXPIRED",
            "REJECTED"
          ]
        },
        "potential_savings": {
          "type": "number",
          "format": "float",
          "description": "Potential savings from the event"
        },
        "potential_spend": {
          "type": "number",
          "format": "float",
          "description": "Potential spend from the event"
        },
        "name": {
          "type": "string",
          "description": "Name of the event"
        },
        "metadata": {
          "type": "object",
          "description": "Additional metadata for the event",
          "additionalProperties": true
        }
      }
    }
  }
}