×

Please give details of the problem

Skip to content

How to list more than 1000 objects from a collection

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
<#function list_all_objects pattern collection_name index>
 <#assign list = list_objects(pattern,collection_name,index*1000,1000)>
 <#if (list?size = 1000)>
  <#assign list = list?eval+ list_all_objects(pattern,collection_name,index+1)>
  <#return list>
 <#else>
  <#return list?eval>
 <!--#if-->
<!--#function-->

<#assign my_pattern = {}>
<#assign my_collection_name = "clients">
${list_all_objects(my_pattern,my_collection_name,0)}