New API for new db schema.