API get_doc limiting number of returned documents?

Hi all,

I’m starting to play with the Frappe REST API and have noticed that with the get_doc method, I’m only receiving a maximum of 20 entries. Is there a way to override this and get all the entries for a given query?

Thanks.

@alec_ruizramon1, yes, pass limit_page_length=n where n is a valid positive integer! eg: 500

1 Like

Thanks @max_morais_dmm! That works for the get_api rather than get_doc, but I guess I should be using that anyways. Much appreciated.

On another note, can someone help me with the error I get with this request?

I’m getting a ValueError - “No JSON object could be decoded”, from postprocess in frappeclient. The request works with every key except filters.

params = {“doctype”: “Sales Order”,
“fields”: “name, customer, po_no, po_date”,
“filters”: [[“Sales Order”, “customer”, “=”, “XYZ Customer”]],
“limit_page_length”:“None”}

documents = client.get_api(‘frappe.client.get_list’, params)

@alec_ruizramon1 None is not a valid integer value, use 0

1 Like

Same issue regardless of ‘None’ or ‘0’ - I can leave out that entire key and run into the same issue because of the filters I’m trying to use.

@alec_ruizramon1 it’s None or 0 not "None" or "0"