We have a public API. Users will call this API by passing in different Guids as the IDs for entities. In the API, the Guid will be translated to the internal ID (Int32) for that particular record in our DB.
The public API calls our internal API and the internal API receives this internal ID to fetch the record from the DB.
I understand why Guids are used, because malicious users can't guess a valid ID for some random record.
But why do we need to translate them to internal IDs? If our DB tables have ExternalId and InternalId, couldn't either one be used internally to fetch a record?