---
schema_version: "1"
id: 05315f55d8315bf4c1878b37124d6598e4ea84583fc46ba13a1f6b049057fbeb
title: CloudHub API
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/cloudhub/cloudhub-api.md
canonical_url: https://docs.mulesoft.com/cloudhub/cloudhub-api
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 3940c0b11c983ca0e32f7ed9892474a6d03d15ac4f4afec46ff870b146ee3f58
description: MuleSoft Documentation Site
latest: true
---
---
product: CloudHub
---

# CloudHub API

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

The CloudHub management API (CloudHub API) enables you to programmatically access the functions of
Anypoint Runtime Manager, such as:

- Manage applications:

  - Create, deploy, start, stop, list, and delete an application on CloudHub.

  - Update application metadata, including the number of workers, Mule runtime engine version, and
    system properties.

  - Retrieve statistics for an application or worker.

  - Retrieve application transactions and events for a transaction.

  - Check for replay data, replay the flow for a transaction, and delete replay data for an
    application.

  - Manage static IP addresses and release unused IP addresses associated with an application.

  - Download the Mule package file for the application.

  - Update, enable, disable, or run all or some schedules.

- Manage logs, notifications, and alerts:

  - Add, update, or retrieve log levels for an application.

  - Download the log file for an application or instance.

  - Create, update, or retrieve a notification.

  - Mark a notification as read or unread.

  - Create, update, or delete an alert triggered by an application.

  - Retrieve an alert and alert history.

- Manage load balancers:

  - Create, update, or delete a load balancer.

  - List load balancers in an organization.

  - Test load balancer rules and return the number of the rule applied to the input.

- Manage VPCs, VPNs, and TGWs:

  - Create, update, list, and remove a VPC.

  - Create or delete a VPN connection.

  - Add, modify, and remove multiple AWS Transit Gateway attachments to your Anypoint Platform
    organization.

- Manage persistent queues:

  - Retrieve statistics for persistent queues.

  - Clear the entries from a persistent queue.

- Retrieve additional information about:

  - Supported Mule versions

  - The current organization, including usage statistics

  - Workers, including thread dumps and worker regions

  - Users, including permissions

  - Available domain names

For an interactive reference that includes supported resources, methods, required properties, and
expected responses, see the
[CloudHub API](https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/cloudhub-api/).

The CloudHub API manages only applications deployed to CloudHub, the cloud-based version of Runtime
Manager. To manage on-premises applications using the API, see
[Runtime Manager REST Services](https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/arm-rest-services).

## Use the CloudHub API

Before getting started, familiarize yourself with operations for applications.

You can use any HTTP client with the CloudHub API. With Java, use the
[Jersey client](https://jersey.github.io/) or
[HttpClient](https://hc.apache.org/httpclient-legacy/index.html) with
[Jackson](https://github.com/codehaus/jackson) for JSON support.

To access operations in the CloudHub API, you must:

1.  Generate an authorization bearer token (AUTH\_BEARER\_TOKEN) to authenticate with the API.

    To get the access token, you need the Anypoint Platform username and password of a user assigned
    the Organization Administrators role. See
    [Authentication](https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/access-management-api/minor/1.0/pages/Authentication/)
    in the
    [Access Management API](https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/access-management-api/minor/1.0/pages/home/).

    Your username specifies the environment to access. For example, if your username is `consuela`
    and the environment is `Development`, your username is `consuela@Development`. If you don’t
    specify an environment, the API defaults to `Production`.

2.  Get the organization ID (ORG\_ID).

    See the
    [`/api/me`](https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/access-management-api/minor/1.0/console/method/%234250/)
    endpoint in the
    [Access Management API](https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/access-management-api/minor/1.0/pages/home/).

3.  Get the environment ID (ENV\_ID).

    See the
    [`/api/organizations/_ORG_ID_/environments`](https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/access-management-api/minor/1.0/console/method/%234762/)
    endpoint in the
    [Access Management API](https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/access-management-api/minor/1.0/pages/home/).

### Get a List of Applications

To get a list of apps deployed to CloudHub, run the following `curl` command:

curl -X GET \\ --url https://anypoint.mulesoft.com/cloudhub/api/applications \\ -H 'authorization:
Bearer AUTH\_BEARER\_TOKEN' \\ -H 'X-ANYPNT-ENV-ID: ENV\_ID' \\ -H 'X-ANYPNT-ORG-ID: ORG\_ID'

## Data Format

Resources and methods that return or accept a type use the JSON data format. Here is an example of
data received in JSON format in response to a request to get an application:

```json
{
  "versionId": "xxxxxxxx",
  "domain": "hello",
  "fullDomain": "hello.us-e1.cloudhub.io",
  "properties": {
    "foo":"bar"
  },
  "propertiesOptions": {},
  "status": "STARTED",
  "workers": {
    "type": {
      "name": "Micro",
      "weight": 0.1,
      "cpu": "0.1 vCores",
      "memory": "500 MB memory"
    },
    "amount": 1,
    "remainingOrgWorkers": 223.7,
    "totalOrgWorkers": 1000.0
  },
  "workerStatuses": [
    {
      "id": "i-xxxxxxxx",
      "host": "xxx.xxx.xxx.xxx",
      "port": 0,
      "status": "STARTED",
      "deployedRegion": "us-east-1",
      "staticIPEnabled": false
    }
  ],
  "lastUpdateTime": 1589868960908,
  "fileName": "hello.zip",
  "muleVersion": {
    "version": "4.3.0",
    "updateId": "xxxxxxxx",
    "latestUpdateId": "xxxxxxxx",
    "endOfSupportDate": 1633737600000
  },
  ...
}
```

## JVM Tuning Fields

The Application API (v2) accepts two optional JVM tuning fields on `POST /applications` and
`PUT /applications/{domain}`, and returns them from `GET /applications/{domain}`:
`openJvmPackagesForArrow` and `gcMethod`. Both fields require a worker replacement to take effect,
so redeploy or restart the app after you change either value.

### openJvmPackagesForArrow

`openJvmPackagesForArrow` is a nullable Boolean that defaults to `false`. When you set it to `true`,
the CloudHub worker starts with these additional JVM flags:

\--add-opens=java.base/java.nio=ALL-UNNAMED -Dmule.module.tweaking.validation.skip=true

Set this field to `true` only for applications that require the Apache Arrow JDBC driver, such as
Snowflake Arrow, DuckDB, or any Arrow-backed connector, on Java 17. Without these flags, Java 17’s
stricter module system blocks Arrow’s use of `sun.misc.Unsafe` and off-heap NIO buffers, and the
application fails at runtime with an `InaccessibleObjectException`.

> [!NOTE] Enabling `openJvmPackagesForArrow` widens the JVM’s reflective access surface, because
> `java.base/java.nio` becomes open to the unnamed module. Enable it only for apps that need Apache
> Arrow, not as a general default.

> [!NOTE] `openJvmPackagesForArrow` is a transitional setting. It’s removed after Mule runtime
> engine delivers Module Layer Propagation, tracked in ADR-MULE-#072.

This table shows how each value behaves:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Value in request</th><th>Effect on POST (create)</th><th>Effect on PUT (update)</th></tr></thead><tbody><tr><td><p><code>true</code></p></td><td><p>Worker starts with both flags</p></td><td><p>Worker starts with both flags</p></td></tr><tr><td><p><code>false</code></p></td><td><p>Worker starts without the flags (default)</p></td><td><p>Worker starts without the flags</p></td></tr><tr><td><p><code>null</code> or omitted</p></td><td><p>Treated as <code>false</code></p></td><td><p>Leaves the stored value unchanged</p></td></tr></tbody></table>

Sample request (POST):

```json
{
  "domain": "my-arrow-app",
  "muleVersion": { "version": "4.7.0" },
  "openJvmPackagesForArrow": true
}
```

Sample response (GET):

```json
{
  "domain": "my-arrow-app",
  "openJvmPackagesForArrow": true
}
```

### gcMethod

`gcMethod` is a nullable String that selects which garbage collector the CloudHub worker’s JVM uses.
It defaults to `null`, which applies the boot-time default. Input is case-insensitive, and CloudHub
persists and returns the canonical form:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Input</th><th>Canonical form</th><th>JVM flag applied to the worker</th></tr></thead><tbody><tr><td><p><code>Serial</code>, <code>serial</code>, <code>SERIAL</code></p></td><td><p><code>Serial</code></p></td><td><p><code>-XX:+UseSerialGC</code></p></td></tr><tr><td><p><code>Parallel</code>, <code>parallel</code>, <code>PARALLEL</code></p></td><td><p><code>Parallel</code></p></td><td><p><code>-XX:+UseParallelGC</code></p></td></tr><tr><td><p><code>G1</code>, <code>g1</code></p></td><td><p><code>G1</code></p></td><td><p><code>-XX:+UseG1GC</code></p></td></tr><tr><td><p><code>null</code>, <code>""</code>, or omitted</p></td><td><p><code>null</code> (no override)</p></td><td><p>Boot-time default GC applies</p></td></tr><tr><td><p>Any other value</p></td><td><p>HTTP 400 with an allow-list error</p></td><td><p>—</p></td></tr></tbody></table>

Only these three canonical names match. CloudHub rejects aliases such as `G1GC` or `ParallelOld`, so
use only `Serial`, `Parallel`, or `G1`.

Choose a collector based on the workload:

- Serial GC minimizes the memory footprint on small workers (0.1 or 0.2 vCore).

- Parallel GC maximizes throughput for batch and ETL-heavy apps.

- G1 delivers lower, more predictable pause times for latency-sensitive request/response apps on 1
  vCore or larger.

> [!NOTE] When `gcMethod` is unset, the worker uses the baseline collector baked into its CloudHub
> AMI’s `wrapper.conf`. On current CloudHub 1.0 AMIs, that baseline is Parallel GC on all Java
> versions (8, 11, and 17) and all worker sizes. This baseline is a CloudHub deployment choice, not
> a JVM ergonomics outcome, so it applies even on Java 17, where the JVM’s own default would
> otherwise be G1. Leaving `gcMethod` unset is the recommended path unless you have a specific
> reason to override it.

This table shows how each value behaves:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Value in request</th><th>Effect on POST (create)</th><th>Effect on PUT (update)</th></tr></thead><tbody><tr><td><p><code>Serial</code>, <code>Parallel</code>, or <code>G1</code> (any case)</p></td><td><p>Stores the canonical form</p></td><td><p>Updates to the canonical form and audits the change</p></td></tr><tr><td><p><code>null</code> or omitted</p></td><td><p>Leaves the field <code>null</code> (boot default applies)</p></td><td><p>Leaves the stored value unchanged</p></td></tr><tr><td><p><code>""</code> or whitespace only</p></td><td><p>Stores <code>null</code> (boot default applies)</p></td><td><p>Clears any existing override and audits the change</p></td></tr><tr><td><p>Any other non-empty string</p></td><td><p>HTTP 400</p></td><td><p>HTTP 400</p></td></tr></tbody></table>

Changing `gcMethod` doesn’t hot-restart running workers. The new selector applies on the next worker
replacement: a redeploy, restart, or scaling event.

Sample request (POST):

```json
{
  "domain": "my-latency-app",
  "muleVersion": { "version": "4.7.0" },
  "gcMethod": "G1"
}
```

Sample request (PUT), which clears the override:

```json
{ "gcMethod": "" }
```

Sample response (GET):

```json
{
  "domain": "my-latency-app",
  "gcMethod": "G1"
}
```

## Rate Limits

The CloudHub management API enforces global usage limits, with some exceptions.

### Global Rate Limits for the CloudHub Management API

The following table lists the rate limits for the CloudHub management API endpoints except those
listed in [Exceptions to the Global Rate Limits](#exceptions-to-the-global-rate-limits).

When the app reaches the rate limit, CloudHub returns a 503 status code.

<table><colgroup><col> <col> <col> <col></colgroup><thead><tr><th>Endpoints</th><th>Control Plane</th><th>Rate Limit Per Client IP Address</th><th>Status Code</th></tr></thead><tbody><tr><td rowspan="3"><p>All except specified endpoints</p></td><td><p>U.S.</p></td><td><p>75 requests per second</p></td><td rowspan="3"><p><code>503</code></p></td></tr><tr><td><p>EU</p></td><td rowspan="2"><p>25 requests per second</p></td></tr><tr><td><p>Government Cloud</p></td></tr></tbody></table>

### Exceptions to the Global Rate Limits

The following table lists the exceptions to the
[Global Rate Limits for the CloudHub Management API](#global-rate-limits-for-the-cloudhub-management-api).

When the app reaches the rate limit, CloudHub returns the status codes shown here.

<table><colgroup><col> <col> <col> <col></colgroup><thead><tr><th>Endpoints</th><th>Control Plane</th><th>Rate Limit Per Client IP Address</th><th>Status Code</th></tr></thead><tbody><tr><td colspan="4"><p><strong>Endpoints under</strong> <code>/api</code></p></td></tr><tr><td rowspan="3"><p><code>/notifications</code></p></td><td><p>U.S.</p></td><td><p>75 requests per minute</p></td><td rowspan="3"><p><code>503</code></p></td></tr><tr><td><p>EU</p></td><td rowspan="2"><p>25 requests per minute</p></td></tr><tr><td><p>Government Cloud</p></td></tr><tr><td colspan="4"><p><strong>Endpoints under</strong> <code><strong>v2/applications/{domain}</strong></code></p></td></tr><tr><td><p><code>/logs</code></p></td><td rowspan="4"><p>All</p></td><td rowspan="3"><p>10 requests per second</p></td><td rowspan="3"><p><code>429</code></p></td></tr><tr><td><p><code>/deployments/{deploymentId}/logs</code></p></td></tr><tr><td><p><code>/instances/{instanceId}/logs</code></p></td></tr><tr><td><p><code>/instances/{instanceId}/log-file</code></p></td><td><p>1 request per minute</p></td><td><p><code>500</code></p></td></tr></tbody></table>

## Status Codes and Error Handling

When you call the CloudHub API, the following status codes are returned:

<table><colgroup><col> <col></colgroup><thead><tr><th>Status Code</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p>200</p></div></div></td><td><div><div><p>The operation was successful.</p></div></div></td></tr><tr><td><div><div><p>201</p></div></div></td><td><div><div><p>The resource (such as an application) was created.</p></div><div><p>The <code>Location</code> header contains the location of the resource.</p></div></div></td></tr><tr><td><div><div><p>404</p></div></div></td><td><div><div><p>The resource was not found.</p></div></div></td></tr><tr><td><div><div><p>409</p></div></div></td><td><div><div><p>When creating a resource (such as a server, server group, or deployment), a resource with that name already exists.</p></div></div></td></tr><tr><td><div><div><p>429</p></div></div></td><td><div><div><p>The operation was unsuccessful due to reaching the rate limit.</p></div></div></td></tr><tr><td><div><div><p>500</p></div></div></td><td><div><div><p>The operation was unsuccessful.</p></div><div><p>See the HTTP body for details.</p></div></div></td></tr><tr><td><div><div><p>503</p></div></div></td><td><div><div><p>The operation was unsuccessful due to a temporary condition, such as server overload or reaching a rate limit.</p></div><div><p>Retry the operation.</p></div></div></td></tr></tbody></table>

When errors occur, such as a 500 status code, the HTTP response contains a JSON response with an
error message:

```json
500
Content-Type: application/json
Server: Apache-Coyote/1.1
Date: Mon, 10 Aug 2015 00:12:55 GMT

{
  message : "Some error message."
}
```

## See Also

- [CloudHub API Reference](https://docs.mulesoft.com/cloudhub/cloudhub-api-reference)

- [CloudHub API](https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/cloudhub-api/)

- [Access Management API](https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/access-management-api/)

- [Deployment Options](https://docs.mulesoft.com/runtime-manager/deployment-strategies)

- [Deploy to CloudHub](https://docs.mulesoft.com/cloudhub/deploying-to-cloudhub)

- [Manage Applications on CloudHub](https://docs.mulesoft.com/cloudhub/managing-applications-on-cloudhub)

- [Develop Applications for CloudHub](https://docs.mulesoft.com/cloudhub/developing-applications-for-cloudhub)

- [Monitor Applications and Servers](https://docs.mulesoft.com/runtime-manager/monitoring)
