{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Create a new K2 stream. HTTP is disabled when `http` is omitted. Enabled HTTP requires authentication and allows all origins unless `authentication` or `cors` say otherwise. At least one input must be enabled.","properties":{"path":{"type":"object","properties":{"account_id":{"$ref":"#/definitions/cloudflare-k2_workers-k2-account-id"}},"required":["account_id"],"additionalProperties":false},"body":{"$ref":"#/definitions/cloudflare-k2_CreateK2StreamRequest"}},"required":["path","body"],"additionalProperties":false,"definitions":{"cloudflare-k2_workers-k2-account-id":{"description":"Specifies the public ID of the account.","type":"string","maxLength":32,"minLength":32,"pattern":"^[a-f0-9]{32}$","examples":["0123105f4ecef8ad9ca31a8372d0c353"]},"cloudflare-k2_CreateK2StreamRequest":{"type":"object","properties":{"http":{"default":{"enabled":false},"allOf":[{"$ref":"#/definitions/cloudflare-k2_K2StreamHttpInput"}]},"name":{"description":"Specifies the name of the K2 stream.","type":"string","maxLength":128,"minLength":1,"pattern":"^[a-zA-Z0-9_]+$","examples":["my_k2_stream"]},"retention_seconds":{"description":"Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.","type":"integer","default":604800,"maximum":2592000,"minimum":3600},"worker_binding":{"default":{"enabled":true},"allOf":[{"$ref":"#/definitions/cloudflare-k2_K2StreamWorkerBindingInput"}]}},"additionalProperties":false,"not":{"properties":{"http":{"type":"object","properties":{"enabled":{"type":"boolean","enum":[false]}},"required":["enabled"]},"worker_binding":{"type":"object","properties":{"enabled":{"type":"boolean","enum":[false]}},"required":["enabled"]}},"required":["worker_binding"],"type":"object"},"required":["name"]},"cloudflare-k2_K2StreamHttpInput":{"description":"Configures the HTTP endpoint. Disabling HTTP keeps `authentication` and `cors`, so enabling it again restores them.","type":"object","properties":{"authentication":{"description":"Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.","type":"boolean"},"cors":{"$ref":"#/definitions/cloudflare-k2_K2StreamCorsOptions"},"enabled":{"description":"Indicates whether the HTTP endpoint accepts records.","type":"boolean"}},"additionalProperties":false,"required":["enabled"]},"cloudflare-k2_K2StreamWorkerBindingInput":{"oneOf":[{"additionalProperties":false,"properties":{"enabled":{"description":"Indicates whether Workers bindings can produce records to the stream.","type":"boolean","enum":[false]}},"required":["enabled"],"type":"object"},{"additionalProperties":false,"properties":{"enabled":{"description":"Indicates whether Workers bindings can produce records to the stream.","type":"boolean","enum":[true]}},"required":["enabled"],"type":"object"}]},"cloudflare-k2_K2StreamCorsOptions":{"type":"object","properties":{"origins":{"description":"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins.","type":"array","items":{"pattern":"^(\\*|https?://[^/?#@]+)$","type":"string"},"maxItems":5,"uniqueItems":true}},"additionalProperties":false}}},"name":"Create K2 stream","id":"cloudflare.postv4accountsbyaccount_idk2streams","example":{"path":{"account_id":"0123105f4ecef8ad9ca31a8372d0c353"},"body":{"name":"my_k2_stream"}},"maxRequests":1,"summary":false}}