Copying an Extension with the API
Using the API you can copy TIBCO Flogo® extensions in the same organization or another organization.
To copy an extension 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/userinfomethod 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 Type — Type of app to be included in the API method. App types include flogo, bw, or node. For this API, only the
flogoapp type is supported. - Name — Name of the extension you want to copy. To find extension names use the
GET /v1/subscriptions/{subscriptionLocator/extensionsmethod to return all extensions in the selected organization. - Source Scope — Filters by the owner type of the source extension. Options include user or org (organization).
- 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/userinfomethod 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 new extension is copied.
- Use the
POST /v1/subscriptions/{subscriptionLocator}/extensions/copymethod to copy an existing extension into a different organization or the same organization. - Provide the Subscription Locator of the target organization where you are copying the extension. If no Subscription Locator is provided, the request fails.
- Set the
overrideparameter to determine whether or not to overwrite an extension with the same name and app type. If set to false, the existing extension is not overwritten. If set to true, the existing extension is deleted and then the new extension is copied to the selected organization. Default is true.
When an extension is copied:
- Only one extension can be copied at a time.
- Copying a user level extension disables that extension for the user in the target organization because user level extensions are already present in all organizations for the requesting user.
- Copying a user level extension promotes it from user level to organization level in the target organization.
- Admins can promote extensions they own from user to org level by setting
sourceScopetouserand copying the extension back into the source organization . - If the
sourceScopeparameter is set to org, the source and target organization of the extension cannot be the same.
Role Requirements
Only Admins can copy extensions.