Hi everyone, im trying to get some data from a doctype using the api rest but i´m getting only ten items, tried to use the page_length and the limit_page_lenght modifiers but it didn´t work
Community members will help you if you explain in detail and share the code.
The thing is, i need to get some data from this endpoint:
/resource/BL%20Albaran%20ERP
But i receive only 10 items when theres 700 items, then i used this modifiers
?limit_start=0&limit_page_length=100, so the endpoint looks like this:
/resource/BL%20Albaran%20ERP?limit_start=0&limit_page_length=100
but keeps returning only ten items
The default is 20 items. And it can be changed using the limit_page_length parameters.
Request
Response
{
“data”: [
{
“name”: “Grant Plastics Ltd.”
},
{
“name”: “West View Software Ltd.”
},
{
“name”: “Palmer Productions Ltd.”
},
{
“name”: “Iskon Pvt Ltd”
},
{
“name”: “Lakme Sol”
},
{
“name”: “Disney”
},
{
“name”: “TATA Steel”
},
{
“name”: “TATA Motors Pvt. Ltd.”
},
{
“name”: “Glock Dame LSD”
},
{
“name”: “Tenvic LLD”
},
{
“name”: “Tanishq”
},
{
“name”: “Lagertha”
},
{
“name”: “Bjorn Ironbone”
},
{
“name”: “Jamalaka”
},
{
“name”: “Podolski”
},
{
“name”: “Jeremy Mathew”
},
{
“name”: “Morgan Schneiderlein”
},
{
“name”: “Puja Muhan”
},
{
“name”: “Sabeel”
},
{
“name”: “Rizwan Khan”
},
{
“name”: “Mehmet Fatehi”
},
{
“name”: “Indus Motors Ltd.”
}
]
}
I had only 22 items in my Customer DocType.
I tried that too, also tried /resource/BL%20Albaran%20ERP?limit=700&offset=0 but nothing changed
You will have to share more details or show your code/gif.
No worries, just figured out that there is an issue with the doctype controller
Hi @Grobix:
Right parameter is limit_page_length
. As offset you should use start
Note that if source data is a virtual doctype, params would vary since controller is manually managed.
Hope this helps.