How can we use the API to clone a Workspace
AnsweredWe would like to be able to clone a Workspace, along with its Apps and App items, with the click of a button - instead of having to create a new Workspace, install our App Pack and then duplicate each App Item individually.
Any help would be much appreciated - and apologies for my lack of API knowledge!
Jamie
-
Hi Jamie,
Your best bet is to have a master workspace that you use the clone app feature to clone each app individually to your target workspaces. Use https://developers.podio.com/doc/applications/install-app-22506 to clone apps programmatically.
All the best,
Andreas -
Hi Andreas,
Thank you for your reply. I'm not technically knowledgable on anything 'API' related, so please excuse my basic understanding - are you saying that something could be developed to make the process achievable from the click of a button (or entering a name for a wordspace outside of Podio which then creates a new clone of the master workspace, its Apps and App items and adds that name to it?
Thanks,
Jamie
-
Some shameless self promotion here Jamie. I work for Elvenite in Sweden. We are one of a few Podio Preferred Partners. If you feel the need to build this Elvenite, or pretty much any other preferred partner are more than happy to help you.
// Carl-Fredrik
Ps. All the partners can be found here: https://company.podio.com/partners (I'm the blurred guy on the left behind the text on the top image)
-
As a proof of concept, I created a powershell script that uses the .NET client library that creates a workspace, changes the URL, adds members to the space based on email addresses and installs all the applications from a specific template workspace. Looks like install-app API installs the application, but does not bring the data over.
So I'm guessing you'd have to install all the applications, loop through the items in each application in the template workspace grab the items from there and add them to the apps in the new workspace.
-
Please don't loop over all the items in the app. It'll take forever and you'll hit the rate limit. The Install App operation takes a list of features as the arguments. One of these is "items" and it'll clone the app to the new location and copy over all the app items as well. See https://developers.podio.com/doc/applications/install-app-22506
-
If you don't mind, (I'm sure I could figure this out on my own but it would help me and others to have a head start...)
What value should be provided in the 'items' field in order that the "Install app" command will "clone the app to the new location and copy over all the app items as well."
Oh. I get it. Never mind. 'items' isn't a parameter, but rather a value for the 'features' parameter array! So all I'll have to do is add the string 'items' into my array of 'features', and all the items will be cloned from whatever existing app I've provided the ID for.
Thanks!
-
Podio::Application.install(app.app_id,{"space_id" => newSpace['space_id'],"features" => ['filters', 'tasks', 'widgets', 'integration', 'forms', 'items']})
Looks like 'tasks' isn't valid anymore. Had to remove it:
"Invalid value \"tasks\" (string): must be one of {'votings', 'items', 'integration', 'flows', 'forms', 'filters', 'widgets'}", "error"=>"invalid_value"}
Please sign in to leave a comment.
Comments
14 comments