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'
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.
001115346

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.