REST API: retrieve id only ids of relations

Also maybe you guys already have some viable solution? Other than mapping for each required operation