CLI for API Manager
Command | Description |
---|---|
Creates an API instance alert |
|
Lists alerts for an API instance |
|
Changes the asset version for an API instance by choosing a new version from Exchange |
|
Classifies an API instance in a given environment |
|
Deletes an API |
|
Deploys an API to CloudHub, hybrid server, or Runtime Fabric |
|
Deprecates an API instance |
|
Shows details of an API |
|
Downloads the API proxy ZIP file to a local directory |
|
Edits an API instance |
|
Lists all APIs in API Manager 2.x |
|
Manages a new API, API version, or new API instance with an asset from Exchange |
|
Promotes an API instance from source environment |
|
Redeploys an API to CloudHub, Hybrid server, or Runtime Fabric |
|
Undeprecates an API instance |
|
Deletes a given API contract |
|
Lists all contracts to a given API instance. |
|
Applies a policy to a given API instance |
|
Shows the description and available configuration properties of a given policy template |
|
Disables policy from a given API instance |
|
Edits the policy configuration of a given API instance |
|
Enables a policy on a given API instance |
|
Lists policies |
|
Removes a policy from a given API instance |
|
Creates an SLA tier |
|
Copies an SLA tier from source to a target API Instance |
|
Deletes an SLA tier from an API instance |
|
Lists the SLA tiers of an API instance |
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:
Option | Description |
---|---|
|
Sets whether the alert should be enabled or not. |
|
Alert severity. |
|
Alert type/condition. |
|
Condition operator explaining values relation to threshold. |
|
Condition occurrences threshold number. |
|
Number of consecutive periods condition should occur for. |
|
Condition occurrence period duration. |
|
Condition occurrence period duration unit. |
|
Username to send alert notification to. |
|
Email to send alert notification to. |
|
Response time to trigger |
|
Response codes to trigger |
|
ID of a policy applied to API instance to trigger |
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:
Option | Description | Example |
---|---|---|
|
Offsets the amount of APIs passed |
|
|
Sorts the results in the field name passed |
|
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.
This command is only supported for endpoints with proxy. |
Besides the default --help
, -f
/--fields
and -o
/--output
options, this command also takes:
Option | Description | Example |
---|---|---|
|
Hybrid or RTF deployment target ID. |
|
|
Application name |
|
|
Target environment name. Should only be used when deploying APIs from unclassified environments. |
|
|
The CloudHub Gateway version |
|
|
Update application if it exists. |
|
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:
Option | Description |
---|---|
|
Indicates whether the endpoint should use a proxy. |
|
Indicates whether a proxy should reference a user domain. |
|
Indicates whether you are managing this API in Mule 4 or above. |
|
Deployment type. |
|
Consumer endpoint URI. |
|
Implementation URI. |
|
Proxy scheme. |
|
Proxy port. |
|
Proxy path. |
|
Your maximum response timeout. |
|
(Optional) API instance label. |
|
WSDL service name. |
|
WSDL service namespace. |
|
WSDL service port. |
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:
Option | Description |
---|---|
|
Asset ID by which filter results. |
|
API version by which filter results. |
|
API instance label by which filter results. |
|
Number of results to retrieve. |
|
Offsets the amount of APIs passed |
|
Sorts the results in the field name passed |
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:
Option | Description |
---|---|
|
Endpoint type. |
|
Indicates whether the endpoint should use a proxy. |
|
Indicates whether a proxy should reference a user domain. |
|
Indicates whether you are managing this API in Mule 4 or above. |
|
Deployment type. |
|
Consumer endpoint URI. |
|
Implementation URI. |
|
Proxy scheme. |
|
Proxy port. |
|
Proxy path. |
|
Response timeout. |
|
(Optional) API instance label. |
|
WSDL service name. |
|
WSDL service namespace. |
|
WSDL service port. |
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:
Option | Description |
---|---|
|
Indicates whether to copy alerts. |
|
Indicates whether to copy policies. |
|
Indicates whether to copy tiers. |
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:
Option | Description |
---|---|
|
Hybrid or RTF deployment target ID. |
|
Application name. |
|
Target environment name. |
|
CloudHub Gateway version. |
|
Update application if exists. |
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>
.
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:
Option | Description | Example |
---|---|---|
|
Number of results to retrieve |
|
|
Offsets the amount of APIs passed |
|
|
Sorts the results in the field name passed |
|
api-mgr policy apply
> api-mgr policy apply [options] <apiInstanceId> <policyId>
Applies the policy passed in <policyId>
to the API instance passed in <apiInstanceId>
.
Option | Description |
---|---|
|
Mule 4 policy version. |
|
Mule 4 policy group ID. |
|
Pass the configuration data as a JSON string. |
|
Pass the configuration data as a file. |
|
Pass pointcut data as JSON strings. |
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:
Option | Description |
---|---|
|
Mule4 policy version. |
|
Mule4 policy group ID. |
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:
Option | Description |
---|---|
|
Pass the configuration data as a JSON string. |
|
Pass pointcut data as JSON strings. |
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:
Option | Description | ||
---|---|---|---|
|
Indicates whether the SAL tier should be auto-approved. |
||
|
Tier name |
||
|
Tier description |
||
|
Single instance of an SLA tier limit in the form
For example:
|
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:
Option | Description |
---|---|
Example |
|
Number of results to retrieve |
|
|
Offsets the amount of APIs passed |
|
|
Sorts the results in the field name passed |
|