Cloudhub API

(16 reviews)

home

Short description

The CloudHub Public API enables you to access application management services for applications deployed to CloudHub.

Detailed description

The Cloudhub Public API allows you to deploy and manage applications in CloudHub. You can deploy your application, manage schedules and queues within an application, and view logs pertaining to an application. You can also view memory and cpu usage and get statistics about the Mule messages sent using the application.

Overview

You can access the API through an interface provided by the Runtime Manager. The Runtime Manager UI enables access to all of the API endpoints.

The Cloudhub Public API provides a one month retention policy for statistics data.

To access this API you must send a request with a valid token. See the Getting Started section to understand how to obtain a token and use it in this API.

To access the API you can use the curl command to make calls to the endpoint directly while supplying the access token and authorization header.

Getting Started

To start using the API, the you need to authenticate using Anypoint Access Management and select Runtime Manager after logging in. You can also access the API by including the access token obtained by authenticating via Anypoint Access Management in every request.

Example API Calls

The following example shows how to retrieve schedules for an application.

Request:

curl -X GET \
-H 'Authorization:bearer ea27ee48-43d3-4d63-a71c-e7cf3c9ff167' \
-H 'X-ANYPNT-ENV-ID:3a654a5a-dc7f-4b39-997e-55dbd9675bb7' \
-H 'X-ANYPNT-ORG-ID:f1f2a7eb-995f-456f-a295-62a9ec9285da' \
'https://anypoint.mulesoft.com/cloudhub/api/applications/stats-gath/schedules?_=1517351860955'

Response:
[
 {
  "id":"5a0f6f0696c73657e379c99b_vmpersistentqueue_pocFlow1_polling_vmpersistentqueue_pocFlow1_1",
  "flow":"vmpersistentqueue_pocFlow1","name":"vmpersistentqueue_pocFlow1 Poll",
  "href":"wss://anypoint.mulesoft.com/api/applications/stats-gath/schedules/5a0f6f0696c73657e379c99b_vmpersistentqueue_pocFlow1_polling_vmpersistentqueue_pocFlow1_1",
  "lastRun":"2018-01-27T06:28:02.483Z",
  "enabled":true,
  "status":"IDLE",
  "schedule":{"timeUnit":"seconds","period":1},
  "run-href":"wss://anypoint.mulesoft.com/api/applications/stats-gath/schedules/5a0f6f0696c73657e379c99b_vmpersistentqueue_pocFlow1_polling_vmpersistentqueue_pocFlow1_1/run"
 }
]

Support

Support for this API is provided through the [Anypoint Platform support portal](https://support.mulesoft.com/s/.


Reviews

DU
Deleted UserApr 16, 2025, 11:37 AM
Poorly Documented
The API is essential to understand if you are serious about managing and running your CloudHub applications. It offers a complex set of endpoints and operations, the resources are (mostly) consistently designed and intuitive to understand. But more or less all operations have one thing in common: they are poorly and insufficiently documented. Operations such as updating an existing application (PUT /v2/applications/{domain}) require a complex data model for the request body. As a user, you have to go through endless trial-and-error sessions to figure out how to use the API appropriately. It's embarrassing for a company that puts so much emphasis on APIs to provide such poor examples.
DU
Deleted UserJun 9, 2021, 2:25 AM
Please add Enum ap-northeast-1
Please add "ap-northeast-1" as Enum value for: - POST to https://anypoint.mulesoft.com/cloudhub/api/v2/applications/{domain}/staticips - Parameter "region" - URL) https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/cloudhub-api/minor/1.0/console/method/%232166/ We can see that in the URL below but the "ap-northeast-1" is not included while others are there(ex: us-east-1, ap-southeast-1, etc)
DU
Deleted UserSep 13, 2020, 3:22 PM
Missing parameter
It would be great to filter the logs by Priority. Can we add a priority query parameter ?
DU
Deleted UserMay 9, 2020, 2:49 AM
Bulk Update of Application
Bulk update of Application metadata like muleVersion doesn't work. I have multiple applications and mixture of runtime versions ( 4.1.6,4.2.1,etc) . I wanted to update all the applications to 4.2.2 . I get a 200 response upon doing a HTTP PUT but i dont see the application runtime updated It does work with the v1 API but it does not have a bulk option
DU
Deleted UserApr 16, 2020, 6:53 PM
Deploying to CloudHub
After multiple tries, I am able to deploy application to CloudHub by following below steps: Step-1: get the bearer token HTTP Method: GET Endpoint: https://anypoint.mulesoft.com/accounts/login Headers: Content-Type: application/json Body: { "username": "anypointusername", "password": "******" } Response: Get the <<access_token>> from response json Step-2: get the get the org id HTTP Method: GET Endpoint: https://anypoint.mulesoft.com/accounts/api/me Headers: Content-Type: application/json, Authorization: Bearer <<access_token>> Body: Response: Get the org id from <<user.organization.id>> from response json Step-3: get the get the env id HTTP Method: GET Endpoint: Https://anypoint.mulesoft.com/accounts/api/organizations/<<org_id>>/environments Headers: Content-Type: application/json, Authorization: Bearer <<access_token>> Body: Response: Get the enviorment id from <<data.id>> from response json Step-4: deploy the application HTTP Method: POST Endpoint: https://anypoint.mulesoft.com/cloudhub/api/v2/applications Headers: Content-Type: multipart/form-data, Authorization: Bearer <<access_token>>, X-ANYPNT-ENV-ID : <<env_id>> Body: file: <<path to jar file>>, autoStart:true appInfoJson:{ "domain": "<<applicationName>>", "muleVersion" : {"version":"4.2.2"}, "region" : "us-east-1", "monitoringEnabled":true, "monitoringAutoRestart" : true, "workers": {"amount":1, "type": {"name":"Micro","weight":"0.1","cpu":"0.1 vCores", "memory":"500 MB memory"}}, "loggingNgEnabled":true, "persistentQueues":false
DU
Deleted UserJan 13, 2020, 9:34 PM
Get Logs
you can use the offset queryParam in https://anypoint.mulesoft.com/cloudhub/api/v2/applications/{domain}/instances/{instanceId}/logs
DU
Deleted UserNov 30, 2019, 2:21 PM
Need detail specification
Though able to upload the application could not enable the gatekeeper which blocks the API and throws 503 service unavailable. If we directly upload the artifact on anypoint platform it works. The API specification does not really help to understand the expected request and response in both success and failure scenarios.
MB
Matias BruchiAug 7, 2019, 2:51 PM
Great API!
<3
DU
Deleted UserApr 24, 2019, 3:24 PM
What is the timeframe limit?
If I call the API for a day it works. If I call it for a month it does not. Since it doesn't return anything I'm assuming there is some sort of restriction. Is it number of days? Or is there a max size limit? Also, Statistics and Interval queryParams are NOT required. Doc should be updated.
DU
Deleted UserDec 6, 2018, 10:42 AM
Poor documentation !!
Guys this API should be better documented as it could be very useful for CD/CI process. - Is it not clear how the body of the request should be formatted in order to deploy a new application. - Is it not clear how the request should be formatted in order to update an existing application. Please to update the documentation accordingly. Best Regards
DU
Deleted UserSep 12, 2018, 3:38 PM
Documentation needs fixing
It mentions, Create Notification API body accepts an array of custom properties, but instead it accepts a map with key values. As per documentation: { "domain": "jeff-1amstudios-test", "message": "hello world", "transactionId": "id", "customProperties": [ { "prop": "value" } ] } Actual Working: { "domain": "jeff-1amstudios-test", "message": "hello world", "transactionId": "id", "customProperties": { "key1": "value1", "key2": "value2" } }
DU
Deleted UserAug 26, 2018, 10:51 AM
I like it
Best API ever
DU
Deleted UserAug 24, 2018, 4:40 AM
Best API ever!
I like it
PK
Purvesh KarkamkarFeb 28, 2018, 3:08 PM
I agree! best api ever
:-D
PK
Purvesh KarkamkarFeb 28, 2018, 3:08 PM
I agree! best api ever
Very useful addition
FB
Federico BongiovanniFeb 28, 2018, 3:08 PM
best api ever
best api ever