Copying an App with the API
Using the API you can copy TIBCO BusinessWorks, TIBCO Flogo®, and Node.js apps to another new app in the same organization or another organization. The copied app is separate and independent from the original app with a different endpoint.
If the target organization has an existing connection that is similar, the app uses the connection ID of that connection. For example, if the app has a Salesforce connection and the target organization has an existing Salesforce connection, the app uses the ID of the existing Salesforce connection.
To copy an app you need the following:
- Subscription Locator — The Subscription Locator of the Organization you want to access. To find Subscription Locators for your organizations use the
GET /v1/userinfo
method to return a list of all of the organizations for your OAuth Token with their Subscription Locators. You can use 0 as the Subscription Locator for the organization that owns the OAuth token. - App ID — ID of the app to be accessed, which can be retrieved using the
GET /v1/subscriptions/{subscriptionLocator}/apps
method. - Target Subscription Locator— The Subscription Locator of the target Organization you want to access. To find Subscription Locators for your organizations use the
GET /v1/userinfo
method to return a list of all of the organizations for your OAuth Token with their Subscription Locators. You can use 0 as the Subscription Locator for the organization that owns the OAuth token. This is the organization where the app is copied.
- Use the
POST /v1/subscriptions/{subscriptionLocator}/apps/{appId}/copy
method to copy an existing app to a new app. - Include a unique name for the app.
- Provide the Subscription Locator of the target organization where you are copying the app. If no Subscription Locator is provided, the app is copied to the current organization.
After an app is copied, the app will be in the "Stopped" state, and you must scale up instances to make it run.
TIBCO Cloud Integration - Connect has a separate API that allows you to manage objects for that capability. For more information on copying TIBCO Cloud Integration - Connect apps, see the help for POST /v1/orgs/{orgId}/solutions/{solutionId}/clone
under Solutions and Copy A Solution To Another Organization in the TIBCO Cloud Integration - Connect Developer Portal.
Role Requirements
- Admins can copy an app owned by anyone to a new app.
- Users can copy an app owned by anyone to a new app.
- Read-only users cannot copy an app.