{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "type" : "object",
  "properties" : {
    "timestamp" : {
      "type" : "string",
      "format" : "date-time",
      "x-isAttributed" : false,
      "description" : "The timestamp when the event originally occurred"
    },
    "observation_count" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Number of times the event was observed",
      "pattern" : "\\d+"
    },
    "asset" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "Name of the asset used"
    },
    "user" : {
      "type" : "string",
      "x-isAttributed" : true,
      "description" : "The username of the person who initiated the request"
    },
    "user_domain" : {
      "type" : "string",
      "x-isAttributed" : false,
      "format" : "hostname",
      "description" : "Domain of the user"
    },
    "source_ip" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Source IP address of the traffic",
      "oneOf" : [ {
        "format" : "ipv4"
      }, {
        "format" : "ipv6"
      } ]
    },
    "scheme" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The request scheme (for example, HTTP or HTTPS)"
    },
    "http_method" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "HTTP method used in the request (for example, GET or POST)"
    },
    "incoming_bytes" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Number of bytes received from the client",
      "pattern" : "\\d+"
    },
    "outgoing_bytes" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Number of bytes sent to the client",
      "pattern" : "\\d+"
    },
    "user_agent" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "User-Agent string from the request header"
    },
    "url" : {
      "type" : "string",
      "x-isAttributed" : false,
      "format" : "hostname",
      "description" : "Full URL of the request"
    },
    "is_blocked" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Indicates whether the request was blocked",
      "pattern" : "true|false"
    },
    "url_host" : {
      "type" : "string",
      "x-isAttributed" : false,
      "format" : "hostname",
      "description" : "Host portion of the URL"
    },
    "url_path" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Path portion of the URL"
    },
    "url_query" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Query string parameters of the URL"
    },
    "public_suffix" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Public suffix of the domain"
    },
    "top_private_domain" : {
      "type" : "string",
      "x-isAttributed" : false,
      "format" : "hostname",
      "description" : "Top private domain (for example, google.com)"
    },
    "destination_ip" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Destination IP address of the request",
      "oneOf" : [ {
        "format" : "ipv4"
      }, {
        "format" : "ipv6"
      } ]
    },
    "geoip_city" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The city name of the source IP address"
    },
    "geoip_country_code" : {
      "type" : "string",
      "x-isAttributed" : false,
      "pattern" : "[A-Z]{2}",
      "description" : "Two-character ISO 3166-1 country code for the source IP address"
    },
    "geoip_country_name" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The country name of the source IP address"
    },
    "geoip_organization" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The organization name attributed from source IP address"
    },
    "geoip_region" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The region name of the source IP address"
    },
    "first_observed_time" : {
      "type" : "string",
      "format" : "date-time",
      "x-isAttributed" : false,
      "description" : "Timestamp when the event was first observed"
    },
    "last_observed_time" : {
      "type" : "string",
      "format" : "date-time",
      "x-isAttributed" : false,
      "description" : "Timestamp when the event was last observed"
    },
    "source_json" : {
      "type" : "object",
      "x-isAttributed" : false,
      "description" : "The data that was received or collected by our collector or endpoint agent, formatted as JSON"
    },
    "r7_context" : {
      "type" : "object",
      "properties" : {
        "user" : {
          "type" : "object",
          "properties" : {
            "domain" : {
              "type" : "string",
              "x-isAttributed" : false,
              "format" : "hostname",
              "description" : "The domain of the user"
            },
            "name" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The name of the r7context resource"
            },
            "rrn" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The RRN (Rapid7 Resource Name) of the r7context resource",
              "pattern" : "rrn(_[^\\s:]+)?:[^\\s:]+:[^\\s:]*:[^\\s:]*(:[^\\s:]+)+"
            },
            "type" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The type of r7context field",
              "const" : "user"
            }
          },
          "required" : [ "name", "rrn", "type" ],
          "x-isAttributed" : true
        },
        "account" : {
          "type" : "object",
          "properties" : {
            "name" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The name of the r7context resource"
            },
            "rrn" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The RRN (Rapid7 Resource Name) of the r7context resource",
              "pattern" : "rrn(_[^\\s:]+)?:[^\\s:]+:[^\\s:]*:[^\\s:]*(:[^\\s:]+)+"
            },
            "type" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The type of r7context field",
              "enum" : [ "account", "asset:account" ]
            }
          },
          "required" : [ "name", "rrn", "type" ],
          "x-isAttributed" : true
        },
        "asset" : {
          "type" : "object",
          "properties" : {
            "name" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The name of the r7context resource"
            },
            "rrn" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The RRN (Rapid7 Resource Name) of the r7context resource",
              "pattern" : "rrn(_[^\\s:]+)?:[^\\s:]+:[^\\s:]*:[^\\s:]*(:[^\\s:]+)+"
            },
            "type" : {
              "type" : "string",
              "x-isAttributed" : false,
              "description" : "The type of r7context field",
              "const" : "asset"
            }
          },
          "required" : [ "name", "rrn", "type" ],
          "x-isAttributed" : true
        }
      },
      "x-isAttributed" : true,
      "description" : "R7_context includes attributed information related to the entry, with references to Rapid7-specific RRNs"
    },
    "entry_id" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "Unique Entry ID assigned to each document or log entry"
    },
    "custom_data" : {
      "type" : "object",
      "x-isAttributed" : false,
      "description" : "JSON string produced by applying one or more user-defined custom parsers to the original data"
    },
    "source_data" : {
      "type" : "string",
      "x-isAttributed" : false,
      "description" : "The unparsed, original log line as received from the collector"
    }
  },
  "required" : [ "timestamp", "source_ip", "scheme", "url" ],
  "description" : "Web proxy"
}