Method Not Found

I’m trying to check if an Item exists via an HTTP GET to a frappe method. I am getting “Method Not Found”. I’m testing in Postman. /api/resource GETs are working fine.
I really need to use the frappe.db.exists() method to confirm if an Item Name (or Item Code) already exists.
I’ve tried a number of variations of the following:

GET ‘Item’, ‘AAAAA’) where ‘AAAAA’ is the item name to check
I appreciate any guidance


@Mike_Z ,
To be able to access a method via REST API, it must be whitelisted, but frappe.db.exists is not.
You can achieve this by creating whitelisted method and accessing it in REST API.

Similar to this.

def check_if_exists(doctype, docname):
   return frappe.db.exists(doctype, docname)

Reference :