Loading

How to fetch logs for CloudHub 2.0 application using Platform API

Date de publication: Nov 17, 2025
Tâche

GOAL

How to fetch the logs of CloudHub 2.0 applications  using Anypoint Platform APIs
Étapes

Please find below step by step procedure to fetch the application logs for CloudHub 2.0 applications

1. Generate a bearer token as mentioned here.

2. Find Organization/Business group ID as mentioned here.

3. Find the respective environment ID as per this article.

4. Retrieve the complete list of CloudHub 2.0 applications using below platform API.

GET https://anypoint.mulesoft.com/amc/application-manager/api/v2/organizations/{organizationId}/environments/{environmentId}/deployments

curl --location 'https://anypoint.mulesoft.com/amc/application-manager/api/v2/organizations/{ORG_ID}/environments/{ENV_ID}/deployments' \
--header 'Authorization: Bearer xx-d507-xxxx'

 

   5. To further find individual application details you can use the below platform API where the deploymentId can be referred from step #4
 

GET https://anypoint.mulesoft.com/amc/application-manager/api/v2/organizations/{organizationId}/environments/{environmentId}/deployments/{deploymentId}

curl --location 'https://anypoint.mulesoft.com/amc/application-manager/api/v2/organizations/{ORG_ID}/environments/{ENV_ID}/deployments/exx40007-97c5-45d1-xxxx' \
--header 'Authorization: Bearer xxxxx-d507-4ca7-bff4-xxx'

 

   6. To fetch the logs for respective application you can use below platform API where specificationId will be desiredVersion from step#5

 

GET https://anypoint.mulesoft.com/amc/application-manager/api/v2/organizations/{organizationId}/environments/{environmentId}/deployments/{deploymentId}/specs/{specificationId}/logs/file

curl --location 'https://anypoint.mulesoft.com/amc/application-manager/api/v2/organizations/{ORG_ID}/environments/{ENV_ID}/deployments/xxxxx-97c5-xxxxxx/specs/b6d0ecxxxxxx-45c5xxxx/logs/file' \
--header 'Authorization: Bearer xx-d507-xxxx'

OR
GET https://anypoint.mulesoft.com/amc/application-manager/api/v2/organizations/{organizationId}/environments/{environmentId}/deployments/{deploymentId}/specs/{specificationId}/logs

curl --location 'https://anypoint.mulesoft.com/amc/application-manager/api/v2/organizations/{ORG_ID}/environments/{ENV_ID}/deployments/xxxxx-97c5-xxxxxx/specs/b6d0ecxxxxxx-45c5xxxx/logs' \ --header 'Authorization: Bearer xx-d507-xxxx'

 


Additional Details:

Connected App Scope : Read Applications

Query parameter "search" mentioned on the exchange documentation is not mandatory.

To fetch logs for CH1.0 application refer How to fetch the logs of the CloudHub application using the platform APIs article.

Numéro d’article de la base de connaissances

001115346

 
Chargement
Salesforce Help | Article