Hi everyone, I wonder to fetch list of doctype including their childtable using REST API, is that possible ?
I found core frappe function to retrieves doctype list with childtable, but cors-origin occurs, the method is api/method/frappe.desk.reportview.get?doctype=...but working properly with postman.
Thanks in advance for each suggestions,
cc: @rmeyer
Child table rows are stored in a separate table. To fetch them, you need to know the name of the Database table. You can find the DocType name via customize form. Search for the Table field and check the “Options”.
For example, let’s get the UOMs and conversion details of an Item. The child table DocType is called UOM Conversion Detail. To get the database table name, just prepend “tab”: "tabUOM Conversion Detail". Now we can construct our query like this:
GET /api/resource/Item?fields=["name","`tabUOM Conversion Detail`.uom","`tabUOM Conversion Detail`.conversion_factor"]