---
schema_version: "1"
id: 8777dbcd98a06cf83b7a9a83a2deed77e5ba8e8f99e2345c469bc47501415349
title: CLI for API Manager
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/anypoint-cli/3.x/api-mgr.md
canonical_url: https://docs.mulesoft.com/anypoint-cli/3.x/api-mgr
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 3d303add88f650789eb892b6bdc90e4d8a3d724aa344219012b750f8c58a4c96
description: MuleSoft Documentation Site
release: 3.x
latest: false
---
---
product: Anypoint CLI
version: 3.x
---

# CLI for API Manager

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

<table><colgroup><col> <col></colgroup><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><a href="#api-mgr-alert-add">api-mgr alert add</a></p></div></div></td><td><div><div><p>Creates an API instance alert</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-alert-list">api-mgr alert list</a></p></div></div></td><td><div><div><p>Lists alerts for an API instance</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-api-change-specification">api-mgr api change-specification</a></p></div></div></td><td><div><div><p>Changes the asset version for an API instance by choosing a new version from Exchange</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-api-classify">api-mgr api classify</a></p></div></div></td><td><div><div><p>Classifies an API instance in a given environment</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-api-delete">api-mgr api delete</a></p></div></div></td><td><div><div><p>Deletes an API</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-api-deploy">api-mgr api deploy</a></p></div></div></td><td><div><div><p>Deploys an API to CloudHub, hybrid server, or Runtime Fabric</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-api-deprecate">api-mgr api deprecate</a></p></div></div></td><td><div><div><p>Deprecates an API instance</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-api-describe">api-mgr api describe</a></p></div></div></td><td><div><div><p>Shows details of an API</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-api-download-proxy">api-mgr api download-proxy</a></p></div></div></td><td><div><div><p>Downloads the API proxy ZIP file to a local directory</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-api-edit">api-mgr api edit</a></p></div></div></td><td><div><div><p>Edits an API instance</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-api-list">api-mgr api list</a></p></div></div></td><td><div><div><p>Lists all APIs in API Manager 2.x</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-api-manage">api-mgr api manage</a></p></div></div></td><td><div><div><p>Manages a new API, API version, or new API instance with an asset from Exchange</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-api-promote">api-mgr api promote</a></p></div></div></td><td><div><div><p>Promotes an API instance from source environment</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-api-redeploy">api-mgr api redeploy</a></p></div></div></td><td><div><div><p>Redeploys an API to CloudHub, Hybrid server, or Runtime Fabric</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-api-undeprecate">api-mgr api undeprecate</a></p></div></div></td><td><div><div><p>Undeprecates an API instance</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-contract-delete">api-mgr contract delete</a></p></div></div></td><td><div><div><p>Deletes a given API contract</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-contract-list">api-mgr contract list</a></p></div></div></td><td><div><div><p>Lists all contracts to a given API instance.</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-policy-apply">api-mgr policy apply</a></p></div></div></td><td><div><div><p>Applies a policy to a given API instance</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-policy-describe">api-mgr policy describe</a></p></div></div></td><td><div><div><p>Shows the description and available configuration properties of a given policy template</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-policy-disable">api-mgr policy disable</a></p></div></div></td><td><div><div><p>Disables policy from a given API instance</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-policy-edit">api-mgr policy edit</a></p></div></div></td><td><div><div><p>Edits the policy configuration of a given API instance</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-policy-enable">api-mgr policy enable</a></p></div></div></td><td><div><div><p>Enables a policy on a given API instance</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-policy-list">api-mgr policy list</a></p></div></div></td><td><div><div><p>Lists policies</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-policy-remove">api-mgr policy remove</a></p></div></div></td><td><div><div><p>Removes a policy from a given API instance</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-tier-add">api-mgr tier add</a></p></div></div></td><td><div><div><p>Creates an SLA tier</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-tier-copy">api-mgr tier copy</a></p></div></div></td><td><div><div><p>Copies an SLA tier from source to a target API Instance</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-tier-delete">api-mgr tier delete</a></p></div></div></td><td><div><div><p>Deletes an SLA tier from an API instance</p></div></div></td></tr><tr><td><div><div><p><a href="#api-mgr-tier-list">api-mgr tier list</a></p></div></div></td><td><div><div><p>Lists the SLA tiers of an API instance</p></div></div></td></tr></tbody></table>

## api-mgr alert add

\> api-mgr alert add \[options\] <apiInstanceId> <name>

This command creates an API instance alert with the name passed in `name` for the API Instance Id
passed in `<apiInstanceId>`.

Besides the default `--help`, `-f`/`--fields` and `-o`/`--output` options, this command also takes:

<table><colgroup><col> <col></colgroup><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><code>enabled</code></p></div></div></td><td><div><div><p>Sets whether the alert should be enabled or not.<br>Possible values are <code>true</code> or <code>false</code>.</p></div></div></td></tr><tr><td><div><div><p><code>severity &lt;val&gt;</code></p></div></div></td><td><div><div><p>Alert severity.<br>Supported values: <code>Info</code>, <code>Warning</code>, <code>Critical</code>.</p></div></div></td></tr><tr><td><div><div><p><code>type &lt;val&gt;</code></p></div></div></td><td><div><div><p>Alert type/condition.<br>Supported values: <code>request-count</code>, <code>response-code</code>, <code>policy-violation</code>, <code>response-time</code></p></div></div></td></tr><tr><td><div><div><p><code>operator &lt;val&gt;</code></p></div></div></td><td><div><div><p>Condition operator explaining values relation to threshold.<br>Supported values: gt, lt, eq</p></div></div></td></tr><tr><td><div><div><p><code>threshold &lt;num&gt;</code></p></div></div></td><td><div><div><p>Condition occurrences threshold number.</p></div></div></td></tr><tr><td><div><div><p><code>periods &lt;num&gt;</code></p></div></div></td><td><div><div><p>Number of consecutive periods condition should occur for.</p></div></div></td></tr><tr><td><div><div><p><code>duration &lt;num&gt;</code></p></div></div></td><td><div><div><p>Condition occurrence period duration.</p></div></div></td></tr><tr><td><div><div><p><code>durationUnit &lt;val&gt;</code></p></div></div></td><td><div><div><p>Condition occurrence period duration unit.<br>Supported values: days, hours, minutes.</p></div></div></td></tr><tr><td><div><div><p><code>recipient [username]</code></p></div></div></td><td><div><div><p>Username to send alert notification to.<br>You can pass this option multiple times to specify multiple usernames.</p></div></div></td></tr><tr><td><div><div><p><code>email [emailAddress]</code></p></div></div></td><td><div><div><p>Email to send alert notification to.<br>You can pass this option multiple times to specify multiple emails.</p></div></div></td></tr><tr><td><div><div><p><code>responseTime [num]</code></p></div></div></td><td><div><div><p>Response time to trigger <code>response-time</code> alert type.</p></div></div></td></tr><tr><td><div><div><p><code>responseCode [code]</code></p></div></div></td><td><div><div><p>Response codes to trigger <code>response-code</code> alert type.<br>You can pass this option multiple times to specify multiple codes.</p></div></div></td></tr><tr><td><div><div><p><code>policyId [num]</code></p></div></div></td><td><div><div><p>ID of a policy applied to API instance to trigger <code>response-code</code> alert type.</p></div></div></td></tr></tbody></table>

## api-mgr alert list

\> api-mgr alert list \[options\] <apiInstanceId>

Lists alerts for the API instance passed in `<apiInstanceId>`.

Besides the default `--help`, `-f`/`--fields` and `-o`/`--output` options, this command also takes:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Option</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><div><div><p><code>--offset</code></p></div></div></td><td><div><div><p>Offsets the amount of APIs passed</p></div></div></td><td><div><div><p><code>api-mgr alert list --offset 3</code></p></div></div></td></tr><tr><td><div><div><p><code>--sort</code></p></div></div></td><td><div><div><p>Sorts the results in the field name passed<br>Supported values are: <code>id</code>, <code>name</code>, <code>createdDate</code>, and <code>updatedDate</code></p></div></div></td><td><div><div><p><code>api-mgr alert list --sort updatedDate</code></p></div></div></td></tr></tbody></table>

## api-mgr api change-specification

\> api-mgr api change-specification \[options\] <apiInstanceId> <assetVersion>

Changes the asset version for the API instance passed in `<apiInstanceId`, by choosing a new version
from Exchange passed in `<assetVersion>`.

This command accepts only the default options: `--help`, `-f`/`--fields` and `-o`/`--output`.

## api-mgr api classify

\> api-mgr api classify \[options\] <destEnvName> <apiInstanceId>

Classifies the API instance passed in `<apiInstanceId>` in the environment passed in
`<destEnvName>`.

This command accepts only the default options: `--help`, `-f`/`--fields` and `-o`/`--output`.

## api-mgr api delete

\> api-mgr api delete \[options\] <apiInstanceId>

This command deletes the API instance passed in `<apiInstanceId>`.

This command accepts only the default options: `--help`, `-f`/`--fields` and `-o`/`--output`.

## api-mgr api deploy

\> api-mgr api deploy \[options\] <apiInstanceId>

This command deploys the API instance passed in <apiInstanceId> to the deployment target specified
using the options described below.

> [!NOTE] This command is only supported for endpoints with proxy.

Besides the default `--help`, `-f`/`--fields` and `-o`/`--output` options, this command also takes:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Option</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><div><div><p><code>target &lt;id&gt;</code></p></div></div></td><td><div><div><p>Hybrid or RTF deployment target ID.<br></p></div></div></td><td><div><div><p><code>api-mgr api deploy --target 1598794 643404</code></p></div></div></td></tr><tr><td><div><div><p><code>applicationName &lt;name&gt;</code></p></div></div></td><td><div><div><p>Application name</p></div></div></td><td><div><div><p><code>api-mgr api deploy --applicationName myMuleApp 643404</code></p></div></div></td></tr><tr><td><div><div><p><code>environmentName &lt;name&gt;</code></p></div></div></td><td><div><div><p>Target environment name. Should only be used when deploying APIs from unclassified environments.</p></div></div></td><td><div><div><p><code>api-mgr api deploy --environmentName TestEnv 643404</code></p></div></div></td></tr><tr><td><div><div><p><code>gatewayVersion &lt;version&gt;</code></p></div></div></td><td><div><div><p>The CloudHub Gateway version</p></div></div></td><td><div><div><p><code>api-mgr api deploy --gatewayVersion: 9.9.9.9 643404</code></p></div></div></td></tr><tr><td><div><div><p><code>overwrite</code></p></div></div></td><td><div><div><p>Update application if it exists.<br>It takes <code>true</code> or <code>false</code> values.</p></div></div></td><td><div><div><p><code>api-mgr api deploy --overwrite: true 643404</code></p></div></div></td></tr></tbody></table>

## api-mgr api deprecate

\> api-mgr api deprecate \[options\] <apiInstanceId>

Deprecates the API instance passed in `<apiInstanceId>`.

This command accepts only the default options: `--help`, `-f`/`--fields` and `-o`/`--output`.

## api-mgr api describe

\> api-mgr api describe \[options\] <apiInstanceId>

Shows details of the API Instance passed in `<apiInstanceId>`.

This command accepts only the default options: `--help`, `-f`/`--fields` and `-o`/`--output`.

## api-mgr api download-proxy

\> api-mgr api download-proxy \[options\] <apiInstanceId> <targetPath>

This command downloads the API proxy ZIP file of the API Instance passed in `<apiInstanceId>` to a
local directory specified in `<targetPath>`.

Besides the default `--help`, `-f`/`--fields` and `-o`/`--output` options, this command also takes a
`gatewayVersion` option to specify the gateway version you want to download. For example:
`api-mgr api download-proxy --gatewayVersion: 4.0.1 643404 /tmp/`

## api-mgr api edit

\> api-mgr api edit \[options\] <apiInstanceId>

Edits the API instance passed in `<apiInstanceId>`.  
Besides the default `--help`, `-f`/`--fields` and `-o`/`--output` options, this command also takes:

<table><colgroup><col> <col></colgroup><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><code>-p, --withProxy</code></p></div></div></td><td><div><div><p>Indicates whether the endpoint should use a proxy.<br>This option takes <code>true</code> or <code>false</code> values.</p></div></div></td></tr><tr><td><div><div><p><code>-r, --referencesUserDomain</code></p></div></div></td><td><div><div><p>Indicates whether a proxy should reference a user domain.<br>This option takes <code>true</code> or <code>false</code> values.</p></div></div></td></tr><tr><td><div><div><p><code>-m, --muleVersion4OrAbove</code></p></div></div></td><td><div><div><p>Indicates whether you are managing this API in Mule 4 or above.<br>This option takes <code>true</code> or <code>false</code> values.</p></div></div></td></tr><tr><td><div><div><p><code>--deploymentType &lt;value&gt;</code></p></div></div></td><td><div><div><p>Deployment type.<br>Supported values are <code>cloudhub</code>, <code>hybrid</code>, or <code>rtf</code>.</p></div></div></td></tr><tr><td><div><div><p><code>--endpointUri &lt;value&gt;</code></p></div></div></td><td><div><div><p>Consumer endpoint URI.</p></div></div></td></tr><tr><td><div><div><p><code>--uri &lt;value&gt;</code></p></div></div></td><td><div><div><p>Implementation URI.</p></div></div></td></tr><tr><td><div><div><p><code>--scheme &lt;value&gt;</code></p></div></div></td><td><div><div><p>Proxy scheme.<br>Supported values are <code>http</code>, or <code>https</code>.</p></div></div></td></tr><tr><td><div><div><p><code>--port &lt;value&gt;</code></p></div></div></td><td><div><div><p>Proxy port.</p></div></div></td></tr><tr><td><div><div><p><code>--path &lt;value&gt;</code></p></div></div></td><td><div><div><p>Proxy path.</p></div></div></td></tr><tr><td><div><div><p><code>--responseTimeout &lt;value&gt;</code></p></div></div></td><td><div><div><p>Your maximum response timeout.</p></div></div></td></tr><tr><td><div><div><p><code>--apiInstanceLabel &lt;value&gt;</code></p></div></div></td><td><div><div><p>(Optional) API instance label.</p></div></div></td></tr><tr><td><div><div><p><code>--serviceName &lt;value&gt;</code></p></div></div></td><td><div><div><p>WSDL service name.</p></div></div></td></tr><tr><td><div><div><p><code>--serviceNamespace &lt;value&gt;</code></p></div></div></td><td><div><div><p>WSDL service namespace.</p></div></div></td></tr><tr><td><div><div><p><code>--servicePort &lt;value&gt;</code></p></div></div></td><td><div><div><p>WSDL service port.</p></div></div></td></tr></tbody></table>

## api-mgr api list

\> api-mgr api list \[options\]

Lists all APIs in API Manager 2.x.

Besides the default `--help`, `-f`/`--fields` and `-o`/`--output` options, this command also takes:

<table><colgroup><col> <col></colgroup><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><code>--assetId &lt;value&gt;</code></p></div></div></td><td><div><div><p>Asset ID by which filter results.</p></div></div></td></tr><tr><td><div><div><p><code>--apiVersion &lt;value&gt;</code></p></div></div></td><td><div><div><p>API version by which filter results.</p></div></div></td></tr><tr><td><div><div><p><code>--instanceLabel &lt;value&gt;</code></p></div></div></td><td><div><div><p>API instance label by which filter results.</p></div></div></td></tr><tr><td><div><div><p><code>--limit &lt;num&gt;</code></p></div></div></td><td><div><div><p>Number of results to retrieve.</p></div></div></td></tr><tr><td><div><div><p><code>--offset</code></p></div></div></td><td><div><div><p>Offsets the amount of APIs passed</p></div></div></td></tr><tr><td><div><div><p><code>--sort</code><br>Supported values are: <code>id</code>, <code>name</code>, <code>createdDate</code>, and <code>updatedDate</code></p></div></div></td><td><div><div><p>Sorts the results in the field name passed</p></div></div></td></tr></tbody></table>

## api-mgr api manage

\> api-mgr api manage \[options\] <assetId> <assetVersion>

Manages a new API, API version, or new API instance with the Exchange asset passed in `<assetId>`,
and the version passed in `<assetVersion>`.

Besides the default `--help`, `-f`/`--fields` and `-o`/`--output` options, this command also takes:

<table><colgroup><col> <col></colgroup><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><code>--type &lt;value&gt;</code></p></div></div></td><td><div><div><p>Endpoint type.<br>Accepted values are <code>http</code>, <code>raml</code>, or <code>wsdl</code>.</p></div></div></td></tr><tr><td><div><div><p><code>-p, --withProxy</code></p></div></div></td><td><div><div><p>Indicates whether the endpoint should use a proxy.<br>This option takes <code>true</code> or <code>false</code> values.</p></div></div></td></tr><tr><td><div><div><p><code>-r, --referencesUserDomain</code></p></div></div></td><td><div><div><p>Indicates whether a proxy should reference a user domain.<br>This option takes <code>true</code> or <code>false</code> values.</p></div></div></td></tr><tr><td><div><div><p><code>-m, --muleVersion4OrAbove</code></p></div></div></td><td><div><div><p>Indicates whether you are managing this API in Mule 4 or above.<br>This option takes <code>true</code> or <code>false</code> values.</p></div></div></td></tr><tr><td><div><div><p><code>--deploymentType &lt;value&gt;</code></p></div></div></td><td><div><div><p>Deployment type.<br>Supported values are <code>cloudhub</code>, <code>hybrid</code>, or <code>rtf</code>.</p></div></div></td></tr><tr><td><div><div><p><code>--endpointUri &lt;value&gt;</code></p></div></div></td><td><div><div><p>Consumer endpoint URI.</p></div></div></td></tr><tr><td><div><div><p><code>--uri &lt;value&gt;</code></p></div></div></td><td><div><div><p>Implementation URI.</p></div></div></td></tr><tr><td><div><div><p><code>--scheme &lt;value&gt;</code></p></div></div></td><td><div><div><p>Proxy scheme.<br>Supported values are <code>http</code>, or <code>https</code>.</p></div></div></td></tr><tr><td><div><div><p><code>--port &lt;value&gt;</code></p></div></div></td><td><div><div><p>Proxy port.</p></div></div></td></tr><tr><td><div><div><p><code>--path &lt;value&gt;</code></p></div></div></td><td><div><div><p>Proxy path.</p></div></div></td></tr><tr><td><div><div><p><code>--responseTimeout &lt;value&gt;</code></p></div></div></td><td><div><div><p>Response timeout.</p></div></div></td></tr><tr><td><div><div><p><code>--apiInstanceLabel &lt;value&gt;</code></p></div></div></td><td><div><div><p>(Optional) API instance label.</p></div></div></td></tr><tr><td><div><div><p><code>--serviceName &lt;value&gt;</code></p></div></div></td><td><div><div><p>WSDL service name.</p></div></div></td></tr><tr><td><div><div><p><code>--serviceNamespace &lt;value&gt;</code></p></div></div></td><td><div><div><p>WSDL service namespace.</p></div></div></td></tr><tr><td><div><div><p><code>--servicePort &lt;value&gt;</code></p></div></div></td><td><div><div><p>WSDL service port.</p></div></div></td></tr></tbody></table>

## api-mgr api promote

\> api-mgr api promote \[options\] <apiInstanceId> <sourceEnvId>

Promotes the API instance passed in `<apiInstanceId>` from the source environment in
`<sourceEnvId>`.

Besides the default `--help`, `-f`/`--fields` and `-o`/`--output` options, this command also takes:

<table><colgroup><col> <col></colgroup><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><code>-a, --copyAlerts</code></p></div></div></td><td><div><div><p>Indicates whether to copy alerts.<br>This option takes <code>true</code> or <code>false</code> values. Default Value is <code>true</code></p></div></div></td></tr><tr><td><div><div><p><code>-p, --copyPolicies</code></p></div></div></td><td><div><div><p>Indicates whether to copy policies.<br>This option takes <code>true</code> or <code>false</code> values. Default Value is <code>true</code></p></div></div></td></tr><tr><td><div><div><p><code>-t, --copyTiers</code></p></div></div></td><td><div><div><p>Indicates whether to copy tiers.<br>This option takes <code>true</code> or <code>false</code> values. Default Value is <code>true</code></p></div></div></td></tr></tbody></table>

## api-mgr api redeploy

\> api-mgr api redeploy \[options\] <apiInstanceId>

Redeploys the API Instance passed in `<apiInstanceId>` to the deployment target set up in the
options described below.

Besides the default `--help`, `-f`/`--fields` and `-o`/`--output` options, this command also takes:

<table><colgroup><col> <col></colgroup><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><code>--target &lt;id&gt;</code></p></div></div></td><td><div><div><p>Hybrid or RTF deployment target ID.</p></div></div></td></tr><tr><td><div><div><p><code>--applicationName &lt;name&gt;</code></p></div></div></td><td><div><div><p>Application name.</p></div></div></td></tr><tr><td><div><div><p><code>--environmentName &lt;name&gt;</code></p></div></div></td><td><div><div><p>Target environment name.<br>Must be provided to redeploy APIs from unclassified environments.</p></div></div></td></tr><tr><td><div><div><p><code>--gatewayVersion &lt;version&gt;</code></p></div></div></td><td><div><div><p>CloudHub Gateway version.</p></div></div></td></tr><tr><td><div><div><p><code>--overwrite</code></p></div></div></td><td><div><div><p>Update application if exists.<br>This option takes <code>true</code> or <code>false</code> values. Default Value is <code>true</code></p></div></div></td></tr></tbody></table>

## api-mgr api undeprecate

\> api-mgr api undeprecate \[options\] <apiInstanceId>

Undeprecates the API instance passed in `<apiInstanceId>`.

This command accepts only the default options: `--help`, `-f`/`--fields` and `-o`/`--output`.

## api-mgr contract delete

\> api-mgr contract delete \[options\] <apiInstanceId> <clientId>

This command deletes the contract between the API Instance passed in `<apiInstanceId>`, and the
client passed in `<clientId>`.

This command accepts only the default options: `--help`, `-f`/`--fields` and `-o`/`--output`.

## api-mgr contract list

\> api-mgr contract list \[options\] <apiInstanceId> \[searchText\]

Lists all contracts of the API passed in `<apiInstanceId>`.

> [!TIP] You can specify keywords in searchText to limit results to APIs containing those specific
> keywords.

Besides the default `--help`, `-f`/`--fields` and `-o`/`--output` options, this command also takes:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Option</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><div><div><p><code>--limit</code></p></div></div></td><td><div><div><p>Number of results to retrieve</p></div></div></td><td><div><div><p><code>exchange asset list --limit 2</code></p></div></div></td></tr><tr><td><div><div><p><code>--offset</code></p></div></div></td><td><div><div><p>Offsets the amount of APIs passed</p></div></div></td><td><div><div><p><code>api-mgr contract list --offset 3 643404</code></p></div></div></td></tr><tr><td><div><div><p><code>--sort</code></p></div></div></td><td><div><div><p>Sorts the results in the field name passed<br>Supported values are: <code>id</code>, <code>name</code>, <code>createdDate</code>, and <code>updatedDate</code></p></div></div></td><td><div><div><p><code>api-mgr contract list --sort createdDate</code></p></div></div></td></tr></tbody></table>

## api-mgr policy apply

\> api-mgr policy apply \[options\] <apiInstanceId> <policyId>

Applies the policy passed in `<policyId>` to the API instance passed in `<apiInstanceId>`.

<table><colgroup><col> <col></colgroup><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><code>--policyVersion &lt;value&gt;</code></p></div></div></td><td><div><div><p>Mule 4 policy version.</p></div></div></td></tr><tr><td><div><div><p><code>--groupId &lt;value&gt;</code></p></div></div></td><td><div><div><p>Mule 4 policy group ID.<br>If no value is provided, this value defaults to MuleSoft group ID.</p></div></div></td></tr><tr><td><div><div><p><code>-c, --config [configJSON]</code></p></div></div></td><td><div><div><p>Pass the configuration data as a JSON string.<br>For example, <code>api-mgr policy apply -c '{"property": "value"}'</code></p></div></div></td></tr><tr><td><div><div><p><code>--configFile [file]</code></p></div></div></td><td><div><div><p>Pass the configuration data as a file.<br>For example, <code>api-mgr policy apply --configFile ./config.json</code></p></div></div></td></tr><tr><td><div><div><p><code>-p, --pointcut [dataJSON]</code></p></div></div></td><td><div><div><p>Pass pointcut data as JSON strings.<br>For example <code>api-mgr policy apply (…​) -p '[{"methodRegex":"GET\|PUT","uriTemplateRegex":"/users*"}]'</code></p></div></div></td></tr></tbody></table>

The following example defines a rate limit of one request every ten seconds:

{ "rateLimits": \[{ "maximumRequests": 1, "timePeriodInMilliseconds": 10000 }\], "clusterizable":
true, "exposeHeaders": false }

## api-mgr policy describe

\> api-mgr policy describe \[options\] <policyId>

This command shows the description and available configuration properties of the policy passed in
`<policyId>`.

Besides the default `--help`, `-f`/`--fields` and `-o`/`--output` options, this command also takes:

<table><colgroup><col> <col></colgroup><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><code>--policyVersion &lt;value&gt;</code></p></div></div></td><td><div><div><p>Mule4 policy version.</p></div></div></td></tr><tr><td><div><div><p><code>--groupId &lt;value&gt;</code></p></div></div></td><td><div><div><p>Mule4 policy group ID.<br>Defaults to MuleSoft group ID when not provided.</p></div></div></td></tr></tbody></table>

## api-mgr policy disable

\> api-mgr policy disable \[options\] <apiInstanceId> <policyId>

This command disables the policy passed in `<policyId>` from the API instance passed in
`<apiInstanceId>`.

This command accepts only the default options: `--help`, `-f`/`--fields` and `-o`/`--output`.

## api-mgr policy edit

\> api-mgr policy edit \[options\] <apiInstanceId> <policyId>

This command edits the policy configuration passed in `<policyId>` of the API Instance passed in
`<apiInstanceId>`.

Besides the default `--help`, `-f`/`--fields` and `-o`/`--output` options, this command also takes:

<table><colgroup><col> <col></colgroup><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><code>-c, --config [configJSON</code>]</p></div></div></td><td><div><div><p>Pass the configuration data as a JSON string.<br>For example, <code>api-mgr policy apply -c '{"property": "value"}'</code></p></div></div></td></tr><tr><td><div><div><p><code>-p, --pointcut [dataJSON]</code></p></div></div></td><td><div><div><p>Pass pointcut data as JSON strings.<br>For example <code>api-mgr policy apply (…​) -p '[{"methodRegex":"GET\|PUT","uriTemplateRegex":"/users*"}]'</code></p></div></div></td></tr></tbody></table>

## api-mgr policy enable

\> api-mgr policy enable \[options\] <apiInstanceId> <policyId>

This command enables the policy passed in `<policyId>` for the API Instance passed in
`<apiInstanceId>`.

This command accepts only the default options: `--help`, `-f`/`--fields` and `-o`/`--output`.

## api-mgr policy list

\> api-mgr policy list \[options\] \[apiInstanceId\]

This command lists all policies for all APIs in API Manager 2.x.  
When the `[apiInstanceId]` parameter is specified, this command lists the policies applied to that
API instance.

Besides the default `--help`, `-f`/`--fields` and `-o`/`--output` options, this command also takes
the `-m, --muleVersion4OrAbove` option which takes `true` or `false` values.

## api-mgr policy remove

\> api-mgr policy remove \[options\] <apiInstanceId> <policyId>

This command removes the policy specified in `<policyId>` from the API instance passed in
`<apiInstanceId>`.

This command accepts only the default options: `--help`, `-f`/`--fields` and `-o`/`--output`.

## api-mgr tier add

\> api-mgr tier add \[options\] <apiInstanceId>

This command creates an SLA tier for the API instance passed in `<apiInstanceId>`.

Besides the default `--help`, `-f`/`--fields` and `-o`/`--output` options, this command also takes:

<table><colgroup><col> <col></colgroup><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><code>-a, --autoApprove</code></p></div></div></td><td><div><div><p>Indicates whether the SAL tier should be auto-approved.<br>This command only takes <code>true</code> or <code>false</code> values.</p></div></div></td></tr><tr><td><div><div><p><code>--name &lt;value&gt;</code></p></div></div></td><td><div><div><p>Tier name</p></div></div></td></tr><tr><td><div><div><p><code>--description &lt;value&gt;</code></p></div></div></td><td><div><div><p>Tier description</p></div></div></td></tr><tr><td><div><div><p><code>-l, --limit &lt;value&gt;</code></p></div></div></td><td><div><div><p>Single instance of an SLA tier limit in the form <code>--limit A,B,C</code> where:</p></div><div><ul><li><p><code>A</code> is a boolean indicating whether or not this limit should be visible.</p></li><li><p><code>B</code> is a number of requests per "C" time period.</p></li><li><p><code>C</code> is the time period unit. Time period options are:</p><div><ul><li><p><code>ms</code>(millisecond)</p></li><li><p><code>sec</code>(second)</p></li><li><p><code>min</code>(minute)</p></li><li><p><code>hr</code>(hour)</p></li><li><p><code>d</code>(day)</p></li><li><p><code>wk</code>(week)</p></li><li><p><code>mo</code>(month)</p></li><li><p><code>yr</code>(year)</p></li></ul></div></li></ul></div><div><p>For example: <code>--limit true,100,min</code> is a visible limit of 100 requests per minute.<br></p></div><div><div data-type="TIP">To create multiple limits, you can provide multiple <code>--limit</code> options.<br>For example: <code>-l true,100,sec -l false,20,min</code></div></div></div></td></tr></tbody></table>

## api-mgr tier copy

\> api-mgr tier copy \[options\] <sourceAPIInstanceId> <targetAPIInstanceId>

This command copies the SLA tier from the API instance passed in `<sourceAPIInstanceId>` to the API
instance Id passed in `<targetAPIInstanceId>`.

This command accepts only the default options: `--help`, `-f`/`--fields` and `-o`/`--output`.

## api-mgr tier delete

\> api-mgr tier delete \[options\] <apiInstanceId> <tierId>

This command deletes the SLA tier passed in `<tierId>` from API instance passed in
`<apiInstanceId>`.

This command accepts only the default options: `--help`, `-f`/`--fields` and `-o`/`--output`.

## api-mgr tier list

\> api-mgr tier list \[options\] <apiInstanceId> \[searchText\]

This command lists the SLA tiers of the API instance passed in `<apiInstanceId>`.

Besides the default `--help`, `-f`/`--fields` and `-o`/`--output` options, this command also takes:

<table><colgroup><col> <col></colgroup><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p>Example</p></div></div></td><td><div><div><p><code>--limit</code></p></div></div></td></tr><tr><td><div><div><p>Number of results to retrieve</p></div></div></td><td><div><div><p><code>api-mgr tier list --limit 2</code></p></div></div></td></tr><tr><td><div><div><p><code>--offset</code></p></div></div></td><td><div><div><p>Offsets the amount of APIs passed</p></div></div></td></tr><tr><td><div><div><p><code>api-mgr tier list --offset 3</code></p></div></div></td><td><div><div><p><code>--sort</code></p></div></div></td></tr><tr><td><div><div><p>Sorts the results in the field name passed<br>Supported values are: <code>id</code>, <code>name</code>, <code>createdDate</code>, and <code>updatedDate</code></p></div></div></td><td><div><div><p><code>api-mgr tier list --sort id</code></p></div></div></td></tr></tbody></table>
