Loading

CloudHub 2.0 - Add or Update Application Properties using REST API

Publiseringsdato: Mar 4, 2026
Forkunnskaper
Ensure that a Connected App has been setup with Client Credentials Grant type and the necessary access to perform these operations.
Oppgave

To add or update the properties on CloudHub 2.0 application using the AMC Application Manager REST API.

Trinn
  1. Obtain Authorization Bearer token using the REST API by following the documentaiton for Getting the Bearer Token for a Connected App Example.
  2. Fetch the existing properties using the AMC Application Manager API as documented here. Refer to the curl command and output section.
  • Curl command to get the deployment details that contains application properties:
curl --location '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>'
 
  • Below is a sample section from the response that contains the existing application properties.
"configuration": {
	            "mule.agent.application.properties.service": {
	                "applicationName": "ch2-test",
	                "properties": {
	                    "host.name": "value"
	                },
	                "secureProperties": {
	                    "db.password": "******"
	                }
	            },
  1. Add or update properties to the above and use this in the below curl command to apply the properties. 
  • Curl command to execute "PATCH" endpoint.
  • IMPORTANT: Ensure the "secureProperties" section is copied as-is from above without any changes, otherwise, all the secure properties will be erased.
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 '{
  "application": {
    "configuration": {
      "mule.agent.application.properties.service": {
        "applicationName": "ch2-test",
        "properties": {
          "host.name": "newvalue"
        },
        "secureProperties": {
          "db.password": "******"
        }
      }
    }
  }
}'
  • The response will contain the new properties that have been applied to the CloudHub 2.0 application.
	"configuration": {
	            "mule.agent.application.properties.service": {
	                "applicationName": "ch2-test",
	                "properties": {
	                    "host.name": "newvalue"
	                },
	                "secureProperties": {
	                    "db.password": "******"
	                }
	            },
Knowledge-artikkelnummer

005316378

 
Laster
Salesforce Help | Article