{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/HttpLogPluginConfig", "title": "HttpLogPluginConfig", "x-speakeasy-entity": "PluginHttpLog", "properties": { "config": { "type": "object", "properties": { "content_type": { "description": "Indicates the type of data sent. The only available option is `application/json`.", "type": "string", "default": "application/json", "enum": [ "application/json", "application/json; charset=utf-8" ] }, "custom_fields_by_lua": { "description": "Lua code as a key-value map", "type": "object", "additionalProperties": { "type": "string" } }, "flush_timeout": { "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", "type": "number" }, "headers": { "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", "type": "object", "additionalProperties": { "type": "string" } }, "http_endpoint": { "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", "type": "string", "x-encrypted": true, "x-referenceable": true }, "keepalive": { "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", "type": "number", "default": 60000 }, "method": { "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", "type": "string", "default": "POST", "enum": [ "PATCH", "POST", "PUT" ] }, "queue": { "type": "object", "properties": { "concurrency_limit": { "description": "The number of of queue delivery timers. -1 indicates unlimited.", "type": "integer", "default": 1, "enum": [ -1, 1 ] }, "initial_retry_delay": { "description": "Time in seconds before the initial retry is made for a failing batch.", "type": "number", "default": 0.01, "maximum": 1000000, "minimum": 0.001 }, "max_batch_size": { "description": "Maximum number of entries that can be processed at a time.", "type": "integer", "default": 1, "maximum": 1000000, "minimum": 1 }, "max_bytes": { "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", "type": "integer" }, "max_coalescing_delay": { "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", "type": "number", "default": 1, "maximum": 3600, "minimum": 0 }, "max_entries": { "description": "Maximum number of entries that can be waiting on the queue.", "type": "integer", "default": 10000, "maximum": 1000000, "minimum": 1 }, "max_retry_delay": { "description": "Maximum time in seconds between retries, caps exponential backoff.", "type": "number", "default": 60, "maximum": 1000000, "minimum": 0.001 }, "max_retry_time": { "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", "type": "number", "default": 60 } } }, "queue_size": { "description": "Maximum number of log entries to be sent on each message to the upstream server.", "type": "integer" }, "retry_count": { "description": "Number of times to retry when sending data to the upstream server.", "type": "integer" }, "ssl_verify": { "description": "When using TLS, this option enables verification of the certificate presented by the server.", "type": "boolean", "default": true }, "timeout": { "description": "An optional timeout in milliseconds when sending data to the upstream server.", "type": "number", "default": 10000 } }, "required": [ "http_endpoint" ] }, "consumer": { "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" } } }, "name": { "const": "http-log" }, "protocols": { "description": "A set of strings representing protocols.", "type": "array", "items": { "description": "A string representing a protocol, such as HTTP or HTTPS.", "enum": [ "grpc", "grpcs", "http", "https", "tcp", "tls", "tls_passthrough", "udp", "ws", "wss" ], "type": "string" }, "format": "set", "default": [ "grpc", "grpcs", "http", "https" ] }, "route": { "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" } } }, "service": { "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" } } } }, "required": [ "config" ] }