Pushing a New App with the API

Using the API you can push 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.

Considerations for apps pushed using the API:

To push an app you need the following: 

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 create a new app and push it to the cloud. This is an asynchronous call.
  2. Include the instanceCount parameter, which controls scaling by setting the number of app instances to run. Default value is 0.
  3. 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.
  4. Include the artifact parameter with the name of the app archive to be pushed with the app.
  5. If required, include the manfest.json parameter with the name manfiest.json to be pushed with the app.
  6. 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.

  7. Use the GET ​/v1​/subscriptions/{subscriptionLocator}/apps​/{appId}​/status method to check whether or not the app has been successfully pushed to the cloud.
  8. Use the GET /v1/subscriptions/{subscriptionLocator}/apps/{appId} method to view the app details.
Note: App names must be unique within an organization. If you attempt to push an app to the cloud using an app name that already exists, the app push fails with an error indicating that there is an existing app with the same name. If you set the forceOverwrite parameter to true, the new app overwrites the existing app with the same name.

TIBCO Cloud Integration - Connect has a separate API that allows you to manage objects for that capability. For information on creating 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 an Updated 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