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:
TRI-1126
Currently, when you hit the
POST /api/v1/eventsendpoint, the JSON returned includes both theEventRecord.idand theEventRecord.eventId. Additionally, theGET /api/v1/events/$eventIdendpoint expects theEventRecord.idvalue, and not theEventRecord.eventIdvalue.EventRecord.idis meant to be a globally unique identifier for the EventRecord table, and theeventIdis meant to be the only identifier that is ever transmitted to and from the API.So we need to:
EventRecord.idfrom any event API endpoints and instead return just theEventRecord.eventIdas theidproperty (we probably need to also include theeventIdfor now for backwards compat reasonsGET /api/v1/events/$eventIdendpoint should take theEventRecord.eventIdvalue as the$eventIdparam and do afindUniqueagainst theeventId_environmentIdunique index.TRI-1126