Loading

How to bulk start stop or restart CloudHub Applications

Data pubblicazione: Jul 25, 2025
Operazione

GOAL

You want to bulk start or stop or restart CloudHub applications with User/SAML credentials via mule application. 
Fasi
The Platform API used for this procedure is:
POST https://anypoint.mulesoft.com/cloudhub/api/applications/{domain}/status

1. Pre-requisites:

[x] For the Anypoint platform account with the user credentials:

  • User Name with Read/Write permission required to restart/stop/start a CloudHub application
  • User Password
  • Environment ID X-ANYPNT-ENV-ID (How to get the Environment ID)
  • Applications which you want to start/stop/restart. 
  • {"status": "stop" OR "start" OR "restart"}
[x] For the User authenticated by an External SAML IdP: Note:
  • The SAML Response grabbed from the browser session, is a URI encoded Base 64 string, please keep it as is, without doing URI decoding.
  • In order to retrieve org-domain, and providerId, Navigate to the Anypoint Platform -> Access Management -> Identity Providers -> Your IDP Name -> ACS URL (ACS URL is in the format of: https://anypoint.mulesoft.com/accounts/login/:org-domain/providers/:providerId/receive-id, and you can get the values from the same URL.)

2. Import the attached application project into Studio and edit the property file src/main/resources/configuration.yaml
env:
  id: "your_env_id"
user:
  name: "your_username"
  password: "your_password"
apps:
  ["app1", "app2"]
status
  "replace this with start or stop or restart"
org:
 domain: "your org-domain name"
providerId: "your provider Id"

Note: Replace apps1, apps2 with the application names which you want to start/stop/restart

3. Deploy the application and send a request: 

[x] Account with User Credentials:

curl http://localhost:8081/bulkapi
  [x] Account with External SAML IdP configured:
curl -X POST \
  http://localhost:8081/bulkapiSaml \
  -H 'Content-Type: application/json' \
  -d '{
    "SAMLResponse": "<SAML Response captured in Step 1>"
}'


Disclaimer: This solution provides a suggestion that should be considered in conjunction with your specific use case and requirements and does not represent a complete solution for all circumstances.

Numero articolo Knowledge

001116235

 
Caricamento
Salesforce Help | Article