-3

We have an app called "Deliverables" in each of the workspaces (there are about 20+ workspaces). Each of these Deliverables have a number of Items under them. What is the best API to use to retrieve,

  1. All the deliverables from all the workspaces
  2. All the items under all deliverables, from all the workspaces

Thanks

Hema
  • 3
  • 2
  • Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it. – techydesigner Sep 14 '16 at 01:44

3 Answers3

3

Alternative way with example
- Get all apps user has access to
- Loop over apps and get items (also don't forget to handle offset and limits)

Docs used:
https://developers.podio.com/doc/applications/get-all-apps-5902728 https://developers.podio.com/doc/items/filter-items-4496747

Sorry, but example is in Ruby and not C#. Main idea will remain same and won't depend on programming language used :)

begin
  Podio.client.authenticate_with_credentials(login, password)
  apps = Podio::Application.find_all_for_current_user({'text' => 'Deliverables'})
  apps.select! {|app| app.name == 'Deliverables'}                 # select only full name match
  apps.select! {|app| app.status == 'active'}                     # filter out inactive (archived) apps
  options = {'limit' => 30, 'offset' => 0}
  filter = {:last_edit_on => {:from => '-7d', :to => '+0d'}}      # as example, work with most recent items only
  apps.each do |app|
    puts "Working with app: '#{app.config['name']}' from workspace_id #{app.space_id}"
    all_found_items = []
    result = Podio::Item.find_by_filter_values(app.app_id, filter, options)
    puts "Found #{result.count} items matching filter #{filter}"
    all_found_items += result.all

    while all_found_items.length < result.count
      options['offset'] = all_found_items.length
      result = Podio::Item.find_by_filter_values(app.app_id, filter, options)
      all_found_items += result.all
    end

    all_found_items.each_with_index do |item, i|
      puts "\t#{i+1}: #{item.title}"
    end

  end

rescue Podio::PodioError => ex
  puts ex
end
Pavlo - Podio
  • 2,003
  • 2
  • 10
  • 19
1
  1. Get all organisations
    https://developers.podio.com/doc/organizations/get-organizations-22344 This will give you all ORG_IDs, associated to the user. Select the ORG_IDs for which ORGs you want to deal with, or use all of them in loop.

  2. Get all workspaces
    https://developers.podio.com/doc/spaces/get-list-of-organization-workspaces-238875316 will return the list of workspaces for particular ORG_ID

  3. Loop through workspaces to get apps
    https://developers.podio.com/doc/applications/get-app-by-org-label-space-label-and-app-label-91708386

  4. Get items from apps
    https://developers.podio.com/doc/items/filter-items-4496747 will finally give you items in apps (again needs to be in the loop)

There is also alternative way you may try:
* Get all apps user has access to
https://developers.podio.com/doc/applications/get-all-apps-5902728
* Loop over apps and get items
https://developers.podio.com/doc/items/filter-items-4496747

Pavlo - Podio
  • 2,003
  • 2
  • 10
  • 19
priya lingam
  • 164
  • 4
-1

First fetch all the work-spaces, and get all the apps for each work-space. Then you can use `ItemService.FilterItems' method in Podio C# client library to fetch all the items in an App.

Ajmal VH
  • 1,691
  • 1
  • 13
  • 27