-5

We trying to retrieve tasks under the Organization using this https://developers.podio.com/doc/tasks/get-tasks-77949 - Sandbox. We get 100 tasks only, but we need to bring the entire task. Is there any way we can get more than 100 tasks. Please Help.

Thanks.

user3378165
  • 6,546
  • 17
  • 62
  • 101

1 Answers1

5

There is another parameter called 'offset', that should work for getting another 100 tasks.

Here is working example for Ruby:

  all_tasks = []
  options = {'responsible' => <user id>, 'limit' => 100, 'sort_by' => 'created_on', 'sort_desc' => true}
  while true
    options['offset'] = all_tasks.length
    result = Podio::Task.find_all(options)
    all_tasks += result
    break if result.empty? || result.length < options['limit']
  end
  puts all_tasks.length

Output for my execution was 106 :)

Pavlo - Podio
  • 2,003
  • 2
  • 10
  • 19