Rest API - Restrict access via rest api to specific doctype

Since there is an open issue where if a field is hidden for a role, it only hides the field in UI and is accessible through Rest API.

Is there a way to block the doctype itself only for rest api? so that i can implement custom endpoint to access that doctype

AFAIK, there is not such setting for rhat.
But if you want, you can customize frappe api and disable default rest api to specific doctype

Any updates on the setting for disabling some doctypes access via REST API.

Recently, I also came across similar set of issues with rest api. Doesn’t it have to do anything with roles permissions manager?

Did you get any solution?

How can I customise REST API?