REST API: retrieve id only ids of relations

you can add "autoPopulate": false, to categories attribute in the

model.settings.json

file and it will give you just ids of categories. I use two way relationship for this and strapi version is 3.6.0