{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/red-hat-3scale/json-schema/red-hat-3scale-authorize-response-schema.json",
  "title": "AuthorizeResponse",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/red-hat-3scale-authorization-api-openapi.yml#/components/schemas/AuthorizeResponse",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "success",
        "failure"
      ]
    },
    "plan": {
      "type": "string",
      "description": "Name of the application plan"
    },
    "usage_reports": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/UsageReport"
      }
    }
  },
  "$defs": {
    "UsageReport": {
      "type": "object",
      "properties": {
        "metric": {
          "type": "string",
          "description": "The metric name (e.g. hits)"
        },
        "period": {
          "type": "string",
          "description": "The time period (minute, hour, day, month, year, eternity)"
        },
        "period_start": {
          "type": "string",
          "format": "date-time"
        },
        "period_end": {
          "type": "string",
          "format": "date-time"
        },
        "max_value": {
          "type": "integer",
          "description": "Maximum allowed value for this period"
        },
        "current_value": {
          "type": "integer",
          "description": "Current usage value for this period"
        }
      }
    }
  }
}