Loading

How to start stop or restart a CloudHub Application using CloudHub REST APIs

게시 일자: May 28, 2024
과업

Programmatically trigger a start, stop or restart of a CloudHub deployed Application.

단계


The Platform API used for this procedure is:

POST https://anypoint.mulesoft.com/cloudhub/api/applications/{application-name}/status


The following headers are required

  • Authorisation (this API will accept basic or bearer tokens)
  • Environment ID X-ANYPNT-ENV-ID


The following is required in the Body (json)

  • {"status": "stop" OR "start" OR "restart"}


Following is an example using the command line tool "Curl"
 

curl -X POST \
  https://anypoint.mulesoft.com/cloudhub/api/applications/{application-name}/status \
  -H 'authorization: Bearer <AUTH_TOKEN>' \
  -H 'content-type: application/json' \
  -H 'x-anypnt-env-id: <ENV_ID' \
  -d '{"status":"stop"}'

 

REFERENCES

https://help.mulesoft.com/s/article/How-to-generate-your-Authorization-Bearer-token-for-Anypoint-Platform
https://help.mulesoft.com/s/article/How-to-get-the-Environment-ID
https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/cloudhub-api/minor/1.0/console/method/%233316/

Knowledge 기사 번호

001116238

 
로드 중
Salesforce Help | Article