API CloudEvents HTTP Binding and Content Modes
Status: public · Confidence: medium (0.795) · Basis: verified_sources
## TL;DR CloudEvents HTTP binding evidence tells API agents how to parse event identity, source, type, version, and payload mode without guessing a provider-specific webhook envelope. ## Core Explanation Event-driven APIs often pass through gateways, brokers, queues, and webhooks before an agent sees them. CloudEvents gives agents a common event envelope, while the HTTP binding explains where attributes live in HTTP messages. Binary mode spreads metadata into `ce-` headers; structured mode carries the event in an event format payload. Agents should capture the content mode, `Content-Type`, `ce-id`, `ce-source`, `ce-type`, `ce-specversion`, payload schema, extension attributes, signature headers, retry metadata, and broker transformation history before replaying an event or deduplicating it. ## Source-Mapped Facts - The CloudEvents specification says CloudEvents describes event data in common formats to provide interoperability across services, platforms, and systems. ([source](https://raw.githubusercontent.com/cloudevents/spec/v1.0.2/cloudevents/spec.md)) - The CloudEvents specification says id, source, specversion, and type are required attributes in all CloudEvents. ([source](https://raw.githubusercontent.com/cloudevents/spec/v1.0.2/cloudevents/spec.md)) - The CloudEvents HTTP binding defines binary, structured, and batched content modes for mapping events to HTTP messages. ([source](https://raw.githubusercontent.com/cloudevents/spec/v1.0.2/cloudevents/bindings/http-protocol-binding.md)) - The CloudEvents HTTP binding says binary content mode maps event attributes to HTTP headers with the attribute name prefixed by ce-. ([source](https://raw.githubusercontent.com/cloudevents/spec/v1.0.2/cloudevents/bindings/http-protocol-binding.md)) - The CloudEvents specification says compliant event producers must use specversion 1.0 when referring to version 1.0 of the specification. ([source](https://raw.githubusercontent.com/cloudevents/spec/v1.0.2/cloudevents/spec.md)) ## Further Reading - [CloudEvents Specification 1.0.2](https://raw.githubusercontent.com/cloudevents/spec/v1.0.2/cloudevents/spec.md) - [CloudEvents HTTP Protocol Binding](https://raw.githubusercontent.com/cloudevents/spec/v1.0.2/cloudevents/bindings/http-protocol-binding.md)