REST API: retrieve id only ids of relations

Would you recommend writing a custom Query (Backend customization - Strapi Developer Documentation) with Bookshelf and stuff?