Pushing an Updated App with the API
Using the API you can push updated apps to the cloud for TIBCO BusinessWorks, TIBCO Flogo®, and Node.js.
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 push an updated 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 name — Name of the new app or the app to be updated. Supports names that start with either a letter or underscore and can contain letters, numbers, periods, dashes and underscores.
- App archive — For TIBCO BusinessWorks apps, the app archive is an EAR archive. For Node.js apps, it is a ZIP archive. For TIBCO Flogo® apps, the app archive is a JSON file. For Node.js apps, see Deploying Node.js Apps for information on packaging your app.
manifest.json
file — For TIBCO BusinessWorks apps, themanifest.json
file is optional if it is included in the EAR archive. For Node.js and Flogo apps, themanifest.json
file is required. However, if the.flogo
file is provided, themanifest.json
file is not required.-
App ID — ID of the app to be accessed, which can be retrieved using the
GET /v1/subscriptions/{subscriptionLocator}/apps
method.
curl -X POST "https://api.cloud.tibco.com/tci/v1/subscriptions/0/apps?appName=ASBTestNewApp1&instanceCount=0&retainAppProps=true" -H "accept: application/json" -H "Authorization: Bearer <your-oauth-token>" -H "Content-Type: multipart/form-data" -F "artifact=@/Users/abahr/tci/flogo.json;type=application/json" -F "manifest.json=@/Users/abahr/tci/manifest.json;type=application/json"
- Use the
POST /v1/subscriptions/{subscriptionLocator}/apps
method to update an existing app and push it to the cloud. This is an asynchronous call. - Use the
forceOverwrite
parameter to overwrite the existing app. - Include the
instanceCount
parameter, which controls scaling by setting the number of app instances to run. Default value is the number of instances for the current running app. - Use the
retainAppProps
parameter to control overriding app variables from the original app. Default value is false. -
Include the
tunnelKey
parameter with ID of the Hybrid agent access key. Hybrid agent access keys are only required if you are using the Hybrid agent with apps that connect to on-premise systems.Generate a Hybrid agent access key under your TIBCO Cloud Integration user settings. Be sure to copy it immediately and store it in a safe location. The key is only displayed once when it is generated. See Generating or Revoking Access Keys.
Note: Access keys can also be modified or detached using thePUT /v1/subscriptions/{subscriptionLocator}/apps/{appId}/env/tunnelkey
orDELETE /v1/subscriptions/{subscriptionLocator}/apps/{appId}/env/tunnelkey
methods. - Include the
artifact
parameter with the name of the app archive to be pushed with the app. - If required, include the
manfest.json
parameter with the namemanfiest.json
to be pushed with the app. -
Include the
overrides
parameter with the name of the file containing the new variable values for the app. If theretainAppProps
parameter is set to true, the overrides file is not used. - Use the
GET /v1/subscriptions/{subscriptionLocator}/apps/{appId}/status
method to check whether or not the updated app has been successfully pushed to the cloud. - Use the
GET /v1/subscriptions/{subscriptionLocator}/apps/{appId}
method to view the app details.
When an existing app is updated, any existing app properties are updated, along with any existing property overrides. If no overrides are supplied, all properties assume their default value. Set the retainAppProps
parameter to false to keep the existing app properties.
If overrides are provided, only those included in the properties file are updated, all other properties remain at their default values.
TIBCO Cloud Integration - Connect has a separate API that allows you to manage objects for that capability. For information on updating TIBCO Cloud Integration - Connect apps see Create Or Modify A Solution Or Map, Solutions, Copy A Solution To Another Organization, and Preparing A Solution, in the TIBCO Cloud Integration - Connect Developer Portal.
Role Requirements
- Admins can update any app in their organization.
- Users can update any app they own.
- Read-only users cannot update any app.
Related Topics
Managing Apps with the TIBCO Cloud™ Integration API
Pushing a New App with the API
Checking the Status of an App with the API
Viewing App Details with the API