Loading
Salesforce から送信されるメールは、承認済ドメインからのみとなります続きを読む

How to get a Thread dump from a CloudHub application via the CloudHub API

公開日: Aug 6, 2025
タスク

GOAL

The aim of this article is to help guide you through the process of creating a curl or postman call to get a single thread dump from a running application that has been deployed on CloudHub. This would then make it easy for you to create a script that runs several thread dumps at regular intervals. If you need a single thread dump, following How to take a thread dump from CloudHub deployed applications may be easier.
ステップ
  •  You will need to get your bearer token. The process to do this is given here: 
  • Obtain the environment id:
curl --header "Authorization: Bearer {$BEARER_TOKEN}" https://anypoint.mulesoft.com/accounts/api/organizations/{$ORGANIZATION_ID}/environments
Search in the output for the id of the environment.
  • After that you need to retrieve the instance id for the application: 
curl --location --request GET /
 --header 'authorization: Bearer {$BEARER_TOKEN}' /
 --header 'content-type: application/json' /
 --header 'X-ANYPNT-ENV-ID: {$ENVIRONMENT_ID}' /
 'https://anypoint.mulesoft.com/cloudhub/api/v2/applications/{$APPLICATION_NAME}/deployments'
looking for instance with status of STARTED
{
    "instanceId": "5ee0550d9aa4b335dd1c2ee5-0",   <--- This is the ID we require
    "publicIPAddress": "34.202.161.46",
    "status": "STARTED",
    "region": "us-east-1"
}
  • Based upon this, we should then be able to retrieve a thread dump for that instance.
curl --location --request GET 'https://anypoint.mulesoft.com/cloudhub/api/v2/applications/{$APPLICATION_NAME}/instances/{$INSTANCE_ID}/diagnostics' \
--header 'authorization: Bearer {$BEARER_TOKEN}' \
--header 'content-type: application/json'

For further detail, please see the CloudHub API Documentation

https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/cloudhub-api/minor/1.0/console/method/%232471/
ナレッジ記事番号

001116634

 
読み込み中
Salesforce Help | Article