{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$id" : "https://voltdb.com/voltsp/schemas/sink/http",
  "title" : "Http Sink Configuration",
  "description" : "The `http` sink connects and sends http(s) requests to configured downstream HTTP(s) server over single connection per worker thread.\nIf server doesn't close the connection, it will be reused for subsequent requests.\n\nIf server is not available, sink will keep on trying to re-connect each time new event arrives.\nIn other words, if there are not events in the pipeline, this sink will not try to connect.\n\nThis sink can execute only POST, PUT, PATCH or DELETE requests.\n",
  "type" : "object",
  "properties" : {
    "http" : {
      "type" : "object",
      "properties" : {
        "httpClient" : {
          "description" : "Http client reference",
          "anyOf" : [ {
            "type" : "string"
          }, {
            "$ref" : "resource-http-client.schema.json#/properties/http-client"
          } ]
        },
        "retryConfiguration" : {
          "type" : "object",
          "description" : "Retry configuration of failed request.",
          "properties" : {
            "retries" : {
              "type" : "integer",
              "description" : "Number of retry attempts after a request failure.",
              "default" : "3",
              "minimum" : -2147483648,
              "maximum" : 2147483647
            },
            "backoffDelay" : {
              "type" : "string",
              "pattern" : "^(\\d+[smhd]|P(T|\\d+[YMD]).*)",
              "description" : "Initial delay before the first retry attempt.",
              "default" : "PT0.2S"
            },
            "maxBackoffDelay" : {
              "type" : "string",
              "pattern" : "^(\\d+[smhd]|P(T|\\d+[YMD]).*)",
              "description" : "Maximum delay between consecutive retry attempts.",
              "default" : "PT3S"
            }
          },
          "additionalProperties" : false
        },
        "exceptionHandler" : {
          "type" : "string",
          "description" : "Custom exception handler enabling interception of all errors related to this sink.\n"
        }
      },
      "required" : [ "httpClient" ],
      "additionalProperties" : false
    }
  },
  "required" : [ "http" ],
  "additionalProperties" : false
}
