I faced the problem bellow when I designed our new app. We are thinking to have one extra column for some tables which is a UUID for security purposes. So, there are two different solutions. First is to have an extra column (UUID) on top of primary key which is a serial. In that case you need some more calls just to get the primary key from UUID. Second is to have a UUID as a primary key and expose this ID to the REST level. I am not sure that is a good practice to do that.
What do you think? What is the preferred solution for you?