Try ERPNext Buy Support Partners Foundation Foundation Members

Rest Api for single type doctype document

Hi friends,

  1. How to retrieve a single type doctype document using rest API?
  2. In which table Frappe store data of single type doctypes?

api/resource/Doctype/Doctype
for example:

 api/resource/Dropbox Settings/Dropbox Settings 

It is called Singles,

You can retrieve data from it as following:
Using Query:

Select * from `tabSingles` where doctype = 'Dropbox Settings'

Using frappe ORM:
Either

frappe.get_single(doctype)
frappe.get_single('Dropbox Settings')

OR

frappe.get_doc(doctype,doctype)
frappe.get_doc('Dropbox Settings','Dropbox Settings')
3 Likes