Loading

Perform a Mule Runtime version update on CloudHub 2.0 using REST APIs

Julkaisupäivä: Dec 3, 2025
Edellytykset
CloudHub 2.0, Mule Runtime, AMC Mpplication Manager REST API
Tehtävä

How to perform a Mule Runtime version update on CloudHub 2.0 using REST APIs?

Vaiheet

This will be achieved using the AMC Application Manager REST API.

  1. Firstly, retrieve the Organization ID: How to know my Organization ID (Org ID) on the Anypoint Platform
  2. Also the Environment ID: How to get the Environment ID
  3. Refer to following articles to get a bearer token: Creating connected app and getting the bearer token example or How to generate your Authorization Bearer token for Anypoint Platform

Example:

curl --location --request POST https://anypoint.mulesoft.com/accounts/api/v2/oauth2/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=<connected_app_clientID>' \
--data-urlencode 'client_secret=<connected_app_secret>' \
--data-urlencode 'grant_type=client_credentials'
  1. Fetch the Deployment ID using the GET deployment ID endpoint in the AMC Application Manager API.

Sample curl request:

curl --location 'https://anypoint.mulesoft.com/amc/application-manager/api/v2/organizations/<ORG-ID>/environments/<ENV-ID>/deployments' \
--header 'X-ANYPNT-ENV-ID: <ENV-ID>' \
--header 'X-ANYPNT-ORG-ID: <ORG-ID>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'Authorization: Bearer <token>' 

 

  1. Pass the "id" in the below PATCH request endpoint to apply the Runtime version update and restart the API.

Sample curl command looks as below:

curl --location --request PATCH 'https://anypoint.mulesoft.com/amc/application-manager/api/v2/organizations/<ORG-ID>/environments/<ENV-ID>/deployments/<deployment-ID>' \
--header 'X-ANYPNT-ENV-ID: <ENV-ID>' \
--header 'X-ANYPNT-ORG-ID: <ORG-ID>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'Authorization: Bearer <token>' \
--data '{
  "target": {
    "deploymentSettings": {
      "runtimeVersion": "4.9.11:6-java17"
    }
  }
}'

Knowledge-artikkelin numero

005232699

 
Ladataan
Salesforce Help | Article