Custom apps: Dotted path to method?

I’m trying to build a custom app to work with ERPNext that has a custom method that can be called via REST.

I don’t understand what Frappe means when they say the “dotted path” to the function.

For example, suppose I have my custom app set up as: frappe-bench/apps/my_app/custom_api.py and the python function is: def my_api(): inside custom_api.py

What’s the proper URL to call the function?

Dotted path to your function is my_app.custom_api.my_api

When I try to call that via Client Script, I get Failed to get method for command my_app.custom_api.my_api with No module named 'my_app.custom_api'

frappe-bench/apps/my_app is reserved for configuration files. The actual source code must reside in frappe-bench/apps/my_app/my_app. Just move your file to this location, it should work.