Skip to content

Event types

Event types: 8 operations, tagged event-types in the OpenAPI document.

Method Path Summary
GET /api/event-types List event types
POST /api/event-types Create an event type
GET /api/event-types/by-code/{code} Get an event type by code
GET /api/event-types/{id} Get an event type by id
PUT /api/event-types/{id} Update an event type
DELETE /api/event-types/{id} Archive an event type
POST /api/event-types/{id}/schemas Add a schema version to an event type (Go-historical alias)
POST /api/event-types/{id}/versions Add a schema version to an event type

List event types

Operation ID: listEventTypes

Parameters

Name In Type Required Description
application query string no Filter by application code
clientId query string no Filter by client id
status query string no Filter by status (CURRENT, ARCHIVED)
subdomain query string no Filter by subdomain
aggregate query string no Filter by aggregate

Responses

Status Description Body
200 OK application/json EventTypeListResponse
default Error application/json ErrorModel

Create an event type

Operation ID: createEventType

Request body (required)

Content type Schema
application/json CreateEventTypeRequest

Responses

Status Description Body
201 Created application/json CreatedResponse
default Error application/json ErrorModel

Get an event type by code

Operation ID: getEventTypeByCode

Parameters

Name In Type Required Description
code path string yes Event type code (e.g. platform:iam:user:created)

Responses

Status Description Body
200 OK application/json EventTypeResponse
default Error application/json ErrorModel

Get an event type by id

Operation ID: getEventType

Parameters

Name In Type Required Description
id path string yes Event type id (TSID)

Responses

Status Description Body
200 OK application/json EventTypeResponse
default Error application/json ErrorModel

Update an event type

Operation ID: updateEventType

Parameters

Name In Type Required Description
id path string yes

Request body (required)

Content type Schema
application/json UpdateEventTypeRequest

Responses

Status Description Body
204 No Content none
default Error application/json ErrorModel

Archive an event type

Operation ID: deleteEventType

Parameters

Name In Type Required Description
id path string yes

Responses

Status Description Body
204 No Content none
default Error application/json ErrorModel

Add a schema version to an event type (Go-historical alias)

Operation ID: addEventTypeSchema

Parameters

Name In Type Required Description
id path string yes

Request body (required)

Content type Schema
application/json AddSchemaRequest

Responses

Status Description Body
200 OK application/json EventTypeResponse
default Error application/json ErrorModel

Add a schema version to an event type

Operation ID: addEventTypeVersion

Parameters

Name In Type Required Description
id path string yes

Request body (required)

Content type Schema
application/json AddSchemaRequest

Responses

Status Description Body
200 OK application/json EventTypeResponse
default Error application/json ErrorModel
Field Type Required Description
schema any yes JSON Schema document
version string yes Schema version (typically semver)
Field Type Required Description
id string yes
Field Type Required Description
clientId string no Ignored. Event types are platform-wide and have no client; a value is accepted for compatibility and not stored (creating an event type needs anchor scope). Use clientScoped to mark events of this type as carried per client.
clientScoped boolean no Events of this type are per-client
code string yes Event type code in application:subdomain:aggregate:event format
description string no
name string yes Human-readable event type name
schema any no Optional JSON Schema for the initial spec version
Field Type Required Description
items EventTypeResponse[] yes
Field Type Required Description
aggregate string yes
application string yes
clientId string no
code string yes
createdAt string (date-time) yes
createdBy string no
description string no
eventName string yes
id string yes
name string yes
source string yes
specVersions SpecVersionResponse[] yes
status string yes
subdomain string yes
updatedAt string (date-time) yes
Field Type Required Description
createdAt string (date-time) yes
schema any yes
status string yes
version string yes
Field Type Required Description
clientScoped boolean no Events of this type are per-client; absent leaves it unchanged
description string no
name string yes