Skip to content

[TRI-1126] We need to keep the EventRecord.id internal, and only ever communicate using the EventRecord.eventId through the API #377

Description

@ericallam

Currently, when you hit the POST /api/v1/events endpoint, the JSON returned includes both the EventRecord.id and the EventRecord.eventId. Additionally, the GET /api/v1/events/$eventId endpoint expects the EventRecord.id value, and not the EventRecord.eventId value.

EventRecord.id is meant to be a globally unique identifier for the EventRecord table, and the eventId is meant to be the only identifier that is ever transmitted to and from the API.

So we need to:

  • Stop returning EventRecord.id from any event API endpoints and instead return just the EventRecord.eventId as the id property (we probably need to also include the eventId for now for backwards compat reasons
  • The GET /api/v1/events/$eventId endpoint should take the EventRecord.eventId value as the $eventId param and do a findUnique against the eventId_environmentId unique index.
  • Update any docs related to any changes here.

TRI-1126

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions