Helm Chart APIs for Application Management

You can find the following APIs in the 'Apps - Managed by Helm Chart' section of the TIBCO Flogo® Capability APIs page. For instructions on how to access the APIs, see Accessing the API Documentation with Swagger UI.

Note:
  • Apps deployed using a Helm chart are identified with the " Managed" in the App Details page. This label indicates that the app deployment is managed through Helm, providing clear identification of Helm-managed applications.

  • Apps deployed using the Helm chart APIs cannot be managed using the FLOGO provisioner APIs. You can manage these apps using the APIs under the 'Apps - Managed by Helm Chart' and 'Apps and Builds' sections.

  • To use a namespace other than the default data plane namespace for APIs using the Namespace parameter, see Deploying App Outside Data Plane Namespace.

API for Generating the YAML File from an App Build

Use the GET /v2/dp/builds/{buildId}/values API to generate the values.yaml file from an app build for the provided build Id.

To generate the YAML file, you need the build Id parameter. To get the build Id, see API for Building an Application Executable Using app.json or app.flogo File.

Required API Parameter:

Parameter Name Type Required Description
buildId Path Yes The application build ID.

API for Deploying an Application Helm Chart Using YAML File

Use the POST /v2/dp/deploy/release API to deploy or upgrade a TIBCO Flogo application Helm chart using the values.yaml file.

Important: An App Id in the values.yaml file is mandatory for upgrading an existing application. If you are deploying the application for the first time, the App Id remains blank.

Required and Optional API Parameters:

Parameter Name Type Required Description
namespace Query No The namespace where the application is deployed. This parameter is not mandatory and is only required if the application is running outside of the default data plane namespace.
chartName Query No

The TIBCO Flogo application Helm chart name.

chartVersion Query No The TIBCO Flogo application Helm Chart version.
retainFailedApp Query No This parameter controls whether failed app deployments are retained. The app is always retained for the app upgrade flow. The default value is false. Set to true to retain failed app deployments.
eula Query Yes The End-User License Agreement for the TIBCO Flogo application.

In the Request body section, click Choose File, browse to the values.yaml file, and click Open.

Note: If an app fails to deploy, it appears in the Applications section with the Status "App not present in dp". In this case, you can delete the app and redeploy it using the relevant APIs to resolve the issue.

API for Viewing Helm Chart Values

Use the GET /v2/dp/apps/{appId}/release/values API to return a list of helm chart values from the TIBCO Flogo app deployment.

Required and Optional API Parameters:

Parameter Name Type Required Description
appId Path Yes The application ID of the app to view the helm chart values.
namespace Query No The namespace where the application is deployed. This parameter is required only if the application is running outside of the default data plane namespace.
allValues Query No All the required computed values. The default value is false.

API for Updating Helm Chart values

Use the PUT /v2/dp/apps/{appId}/release/values API to update the Helm chart values for the TIBCO Flogo application chart. The values can be provided in the values.yaml payload.

Note: If you update the Helm chart values, a new revision of the application is created.

Required and Optional API Parameters:

Parameter Name Type Required Description
appId Path Yes The application ID of the app to update the helm chart values.
namespace Query No The namespace where the application is deployed. This parameter is required only if the application is running outside of the default data plane namespace.

In the Request body section, click Choose File, browse to the values.yaml file, and click Open.

API for Viewing Status of an Application Chart Deployment Chart Values

Use the GET /v2/dp/apps/{appId}/release/status API to return a list of the status of an application deployed for an app Id.

Required and Optional API Parameters:

Parameter Name Type Required Description
appId Path Yes The application ID of the app to view the status of an application chart.
namespace Query No The namespace where the application is deployed. This parameter is required only if the application is running outside of the default data plane namespace.

API for Viewing Release History of an Application Chart Deployment Chart Values

Use the GET /v2/dp/apps/{appId}/release/history API to return a list of the release history of an application deployed for an app Id.

Required and Optional API Parameters:

Parameter Name Type Required Description
appId Path Yes The application ID of the app to view the release history of an application chart.
namespace Query No The namespace where the application is deployed. This parameter is required only if the application is running outside of the default data plane namespace.

API to Roll back an Application Helm Chart Release

Use the PUT /v2/dp/apps/{appId}/release/rollback API to roll back an application's Helm chart release to a specific version. With this API, you can revert your application to a previous deployment state.

Required and Optional API Parameters:

Parameter Name Type Required Description
appId Path Yes The application ID of the app to roll back the application's Helm chart release.
namespace Query No The namespace where the application is deployed. This parameter is required only if the application is running outside of the default data plane namespace.
revision Query No The revision number to roll back to. Default value: 0 (previous revision).
force Query No A boolean flag indicating whether to force the rollback. The default value is false.

API for Renaming an Application Chart Deployment

Use the PUT /v2/dp/apps/{appId}/rename API to rename an application deployment.

Warning: This uninstalls the existing release and reinstalls it with a new name. This may cause a service outage for clients.
Note: Renaming an application resets the revision number to 1. The new revision will not be added to the previous app name's revision number.

Required and Optional API Parameters:

Parameter Name Type Required Description
appId Path Yes The application ID of the app to rename an application deployment.
appName Query Yes The new application name
namespace Query No The namespace where the application is deployed. This parameter is required only if the application is running outside of the default data plane namespace.

API for Enabling or Disabling Service Mesh for an Application

Use the PUT /v2/dp/apps/{appId}/servicemesh API to enable or disable service mesh sidecar of an application.

Required and Optional API Parameters:

Parameter Name Type Required Description
appId Path Yes The application ID of the app to enable or disable service mesh.
namespace Query No The namespace where the application is deployed. This parameter is required only if the application is running outside of the default data plane namespace.
enable Query Yes A boolean flag to enable or disable the service mesh. Set to true to enable, false to disable.

API for Modifying or Creating Auto Scaling Configuration for an Application

Use the PUT /v2/dp/apps/{appId}/autoscaling API to modify or create the auto scaling configuration instance for a deployed application. You can define the minimum and maximum number of replicas and set CPU and memory thresholds for scaling in the Request body section.

Required and Optional API Parameters:

Parameter Name Type Required Description
appId Path Yes The application ID of the app to modify or create the auto scaling configuration.
namespace Query No The namespace where the application is deployed. This parameter is required only if the application is running outside of the default data plane namespace.

Request Body Field Descriptions:

  • hpaMetrics: Defines the metrics used for Horizontal Pod Autoscaler (HPA).

  • cpuUtilization: Configures CPU-based scaling.

  • averageCpuUtilization: The desired average CPU utilization (as a percentage) before scaling occurs.

  • enabled: Set to true to enable CPU-based scaling.

  • memoryUtilization: Configures memory-based scaling.

  • averageMemoryUtilization: The desired average memory utilization (as a percentage) before scaling occurs.

  • enabled: Set to true to enable memory-based scaling.

  • maxReplicas: The maximum number of replicas that the application can scale up to.

  • minReplicas: The minimum number of replicas that the application should always have running.

API for Removing Auto Scaling for an Application

Use the DELETE /v2/dp/apps/{appId}/autoscaling API to delete auto scaling configuration for an application.

Required and Optional API Parameters:

Parameter Name Type Required Description
appId Path Yes The application ID of the app to remove the auto scaling configuration.
namespace Query No The namespace where the application is deployed. This parameter is required only if the application is running outside of the default data plane namespace.

API for Changing an Application Endpoint to Private

Use the DELETE /v2/dp/apps/{appId}/endpoints/public API to change an applications endpoint to private. This API removes the Ingress resource from the application to make the endpoint private.

Required and Optional API Parameters:

Parameter Name Type Required Description
appId Path Yes The application ID of the app to change the app endpoint to private.
namespace Query No The namespace where the application is deployed. This parameter is required only if the application is running outside of the default data plane namespace.

API for Changing an Application Endpoint to Public

Use the POST /v2/dp/apps/{appId}/endpoints/public API to change an application endpoint to public. This API allows you to configure ingress settings to expose your application to external access.

Required and Optional API Parameters:

Parameter Name Type Required Description
appId Path Yes The application ID of the app to change the app endpoint to public.
namespace Query No The namespace where the application is deployed. This parameter is required only if the application is running outside of the default data plane namespace.

Request Body Field Descriptions:

  • IngressClassName: The name of the Ingress class to use for this application.

  • IngressControllerName: The name of the ingress controller to use.

  • IngressHostName: The hostname to use for the Ingress rule. This is the public address used to access the application.

  • IngressTLSConfigs: (Optional) An array of TLS configurations for HTTPS access.

    • hosts: A list of hostnames that the TLS certificate should be valid for.

    • secretName: The name of the Kubernetes secret containing the TLS certificate and key.

  • portServicePathMappings: An array defining how application ports are mapped to services and paths.

    • port: The application port number.

    • servicePath: The path that is appended to the Ingress hostname to access this port.

    • isPublic: Set to true to make this port public.

    • isServicediscoveryEnabled: Set to true to enable service discovery for this port.

  • customAnnotations: (Optional) An array of custom annotations to add to the Ingress rule.