Platform Event Fields
Migrate Platform Event Definitions with Metadata API
Get the Event Schema with REST API
Get the Event Schema with Pub/Sub API
Encrypting Platform Event Messages at Rest in the Event Bus
Previous Versions
Use REST API eventschema resource to retrieve the event schema by using the event name or the schema ID.
To retrieve the event schema by schema ID, perform a GET request to this REST API resource and supply the schema ID: /services/data/vXX.X/event/eventSchema/schemaId. For more information, see Platform Event Schema by Schema ID in the REST API Developer Guide.
To retrieve the event schema by event name, perform a GET request to this REST API resource and supply the event name: /services/data/vXX.X/sobjects/eventName/eventSchema. For more information, see Platform Event Schema by Event Name in the REST API Developer Guide.
When the schema changes, for example, after an administrator adds a field to the platform event definition, the schema ID changes. You can determine if the schema changed by comparing the schema ID with the previous schema ID value.