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.

Note: When pushing or copying an app, if the connections associated with that app do not exist in the target organization they are not automatically created and therefore do not display on the Connections page. The connections are contained in the app JSON and are used at runtime allowing the app to execute successfully.

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: 

Note: App updates fail if the artifacts use a name other than flogo.json and manifest.json. For example, if you downloaded multiple apps and the downloaded files have the same name, the download process renames them, such as flogo.json, flogo(1).json, and flogo(2).json. If you try to update using one of the renamed files, the redeployment of the app fails. After you download or export app files, rename them to flogo.json and manifest.json before attempting to redeploy them.
Note: Include a path to the directory containing the artifacts as shown in the following example.
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"
  1. Use the POST ​/v1​/subscriptions/{subscriptionLocator}/apps method to update an existing app and push it to the cloud. This is an asynchronous call.
  2. Use the forceOverwrite parameter to overwrite the existing app.
  3. 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.
  4. Use the retainAppProps parameter to control overriding app variables from the original app. Default value is false.
  5. 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 the PUT ​/v1​/subscriptions/{subscriptionLocator}/apps​/{appId}​/env​/tunnelkey or DELETE ​/v1​/subscriptions/{subscriptionLocator}/apps​/{appId}​/env​/tunnelkey methods.
  6. Include the artifact parameter with the name of the app archive to be pushed with the app.
  7. If required, include the manfest.json parameter with the name manfiest.json to be pushed with the app.
  8. Include the overrides parameter with the name of the file containing the new variable values for the app. If the retainAppProps parameter is set to true, the overrides file is not used.

  9. 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.
  10. 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.

Note: App tags are completely replaced each time an app is updated. Be sure to include any tags you want on the app when you update the app. Sending an empty array of App tags removes all of the tags on the app.

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

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

Attaching App Access Keys with the API

Detaching App Access Keys with the API