DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Automate and Persist MuleSoft CloudHub Application Logs
  • Revolutionize Your MuleSoft Deployments With GitOps
  • Terraform Best Practices: The 24 Practices You Should Adopt
  • Multimodal Design With Google Actions: Rich Responses Using Cards

Trending

  • Intro to RAG: Foundations of Retrieval Augmented Generation, Part 2
  • Implementing API Design First in .NET for Efficient Development, Testing, and CI/CD
  • Understanding the Shift: Why Companies Are Migrating From MongoDB to Aerospike Database?
  • Software Delivery at Scale: Centralized Jenkins Pipeline for Optimal Efficiency
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. Anypoint CLI Commands in MuleSoft

Anypoint CLI Commands in MuleSoft

Learn how to use Anypoint CLI commands for Anypoint Platform accounts, API Manager, CloudHub applications, design center projects, and exchange assets.

By 
Shyam Raj Prasad user avatar
Shyam Raj Prasad
·
Updated Jun. 18, 22 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
8.4K Views

Join the DZone community and get the full member experience.

Join For Free

Introduction

Anypoint CLI is a scripting and command-line tool for both Anypoint Platform and Anypoint Platform PCE. We will be using Anypoint CLI commands for Anypoint Platform accounts, API Manager, CloudHub applications, design center projects, and exchange assets.

Anypoint Platform logo

Prerequisites

  • NodeJS and npm
  • Git management system

Installation

  • Verify the npm version with the command npm -version
  • Anypoint CLI installation npm install -g anypoint-cli@latest

Authentication

You can configure Anypoint CLI authentication with username and password, client ID and client secret, or a bearer token. At least one method is required.

Credentials File

  • Create a directory called .anypoint in the ~/ directory for Linux and OSx, or C:\Users\USERNAME \ in Windows.
  • Navigate to your .anypoint directory and create a blank file named credentials with the following structure:
 
{
 "default": {
  "username": "yourAnypointUserName",
  "password": "yourAnypointPassword",
  "organization": "",
  "environment": "",
  "host": ""
 },
 "otherProfile": {
  "username": "",
  "password": "",
  "organization": "",
  "environment": "",
  "host": ""
 },
 "connAppProfile": {
  "client_id": "",
  "client_secret": "",
  "organization": "",
  "environment": "",
  "host": ""
 }
}


  • After providing credentials, run the command anypoint-cli:
 
shyamrajprasad@shyam test % anypoint-cli
    _                            _       _   ____  _       _    __                      
   / \   _ __  _   _ _ __   ___ (_)_ __ | |_|  _ \| | __ _| |_ / _| ___  _ __ _ __ ___  
  / _ \ | '_ \| | | | '_ \ / _ \| | '_ \| __| |_) | |/ _` | __| |_ / _ \| '__| '_ ` _ \ 
 / ___ \| | | | |_| | |_) | (_) | | | | | |_|  __/| | (_| | |_|  _| (_) | |  | | | | | |
/_/   \_\_| |_|\__, | .__/ \___/|_|_| |_|\__|_|   |_|\__,_|\__|_|  \___/|_|  |_| |_| |_|
               |___/|_|                                                                   CLI v3.11.0
                                              

Connecting to the Anypoint Platform...
Using supplied username and password
Connected to tricon - Design


Anypoint CLI Commands for Anypoint Platform Accounts

  • Show account details account user describe: 
 
> account user describe
┌───────────────┬─────────────────────────────────────────────────────────────────┐
│ Id            │ ac6935be-404f-4c7e-ae41-b92ccc4de926                            │
├───────────────┼─────────────────────────────────────────────────────────────────┤
│ User name     │ mulejun221231XXXX                                               │
├───────────────┼─────────────────────────────────────────────────────────────────┤
│ Full name     │ Shyam Raj Prasad                                                │
├───────────────┼─────────────────────────────────────────────────────────────────┤
│ Email         │ masteringmule@gmail.com                                         │
├───────────────┼─────────────────────────────────────────────────────────────────┤
│ Created       │ 8 days ago                                                      │
└───────────────┴─────────────────────────────────────────────────────────────────┘


  • Lists business groups account business-group list: 
 
> account business-group list
┌────────────────────────────────────────┬───────────────┬────────────────────────────────────────┐
│ Name                                   │ Type          │ Id                                     │
├────────────────────────────────────────┼───────────────┼────────────────────────────────────────┤
│ tricon                                 │ Master        │ 605578bb-09f3-4947-877a-60aac32601e2   │
└────────────────────────────────────────┴───────────────┴────────────────────────────────────────┘


  • Show details of a business group account business-group describe:  
 
> account business-group describe
┌────────────────────┬────────────────────────────────────────────────────────────┐
│ Name               │ tricon                                                     │
├────────────────────┼────────────────────────────────────────────────────────────┤
│ Owner              │ mulejun22                                                  │
├────────────────────┼────────────────────────────────────────────────────────────┤
│ Type               │ Master                                                     │
├────────────────────┼────────────────────────────────────────────────────────────┤
│ Subscription       │ Category: Developer                                        │
│                    │ Type: Trial                                                │
│                    │ Expires: 2022-07-01T14:26:05.843Z                          │
├────────────────────┼────────────────────────────────────────────────────────────┤
│ Entitlements       │ {                                                          │
│                    │   createEnvironments: true,                                │
│                    │   globalDeployment: false,                                 │
│                    │   createSubOrgs: true,                                     │
│                    │   hybrid: { enabled: true },                               │
│                    │   hybridInsight: true,                                     │
│                    │   hybridAutoDiscoverProperties: true,                      │
│                    │   vCoresProduction: { assigned: 0, reassigned: 0 },        │
│                    │   vCoresSandbox: { assigned: 1, reassigned: 0 },           │
│                    │   vCoresDesign: { assigned: 1, reassigned: 0 },            │
│                    │   staticIps: { assigned: 0, reassigned: 0 },               │
│                    │   vpcs: { assigned: 0, reassigned: 0 },                    │
│                    │   vpns: { assigned: 0, reassigned: 0 },                    │
│                    │   networkConnections: { assigned: 0, reassigned: 0 },      │
│                    │   workerLoggingOverride: { enabled: false },               │
│                    │   mqMessages: { base: 0, addOn: 0 },                       │
│                    │   mqRequests: { base: 0, addOn: 0 },                       │
│                    │   objectStoreRequestUnits: { base: 0, addOn: 0 },          │
│                    │   objectStoreKeys: { base: 0, addOn: 0 },                  │
│                    │   mqAdvancedFeatures: { enabled: false },                  │
│                    │   gateways: { assigned: 0 },                               │
│                    │   designCenter: { mozart: true, api: true, apiVisual: fal… │
│                    │   partnersProduction: { assigned: 0 },                     │
│                    │   partnersSandbox: { assigned: 0 },                        │
│                    │   tradingPartnersProduction: { assigned: 0 },              │
│                    │   tradingPartnersSandbox: { assigned: 0 },                 │
│                    │   loadBalancer: { assigned: 0, reassigned: 0 },            │
│                    │   externalIdentity: true,                                  │
│                    │   autoscaling: false,                                      │
│                    │   armAlerts: true,                                         │
│                    │   apis: { enabled: true },                                 │
│                    │   apiMonitoring: { schedules: 0 },                         │
│                    │   apiCommunityManager: { enabled: false },                 │
│                    │   apiExperienceHub: { enabled: false },                    │
│                    │   monitoringCenter: {                                      │
│                    │     productSKU: 0,                                         │
│                    │     rawStorageOverrideGB: 0,                               │
│                    │     dataRegion: 'us-east-1',                               │
│                    │     productionUnits: 0,                                    │
│                    │     preProductionUnits: 0,                                 │
│                    │     storageBase: 0,                                        │
│                    │     storageAddOn: 0                                        │
│                    │   },                                                       │
│                    │   apiQuery: { enabled: true, productSKU: 1, production: 0… │
│                    │   apiQueryC360: { enabled: false },                        │
│                    │   apiGovernance: { enabled: true, apisPerMonth: 5 },       │
│                    │   crowd: {                                                 │
│                    │     hideApiManagerDesigner: true,                          │
│                    │     hideFormerApiPlatform: true,                           │
│                    │     environments: true                                     │
│                    │   },                                                       │
│                    │   cam: { enabled: false },                                 │
│                    │   exchange2: { enabled: false },                           │
│                    │   crowdSelfServiceMigration: { enabled: false },           │
│                    │   kpiDashboard: { enabled: false },                        │
│                    │   pcf: false,                                              │
│                    │   appViz: false,                                           │
│                    │   runtimeFabric: false,                                    │
│                    │   anypointSecurityTokenization: { enabled: false },        │
│                    │   anypointSecurityEdgePolicies: { enabled: false },        │
│                    │   runtimeFabricCloud: { enabled: false },                  │
│                    │   serviceMesh: { enabled: true },                          │
│                    │   flexGateway: { enabled: true },                          │
│                    │   apiCatalog: { enabled: false },                          │
│                    │   composer: {                                              │
│                    │     enabled: false,                                        │
│                    │     tasksPerMonth: 0,                                      │
│                    │     maxConnectors: 0,                                      │
│                    │     unlimitedConnectors: false                             │
│                    │   },                                                       │
│                    │   muleDxWebIde: { enabled: false },                        │
│                    │   messaging: { assigned: 0 },                              │
│                    │   workerClouds: { assigned: 0, reassigned: 0 }             │
│                    │ }                                                          │
├────────────────────┼────────────────────────────────────────────────────────────┤
│ Environments       │ Design                                                     │
│                    │ dev                                                        │
│                    │ dzone                                                      │
└────────────────────┴────────────────────────────────────────────────────────────┘


  • Lists environments account environment list: 
 
> account environment list
┌────────────────────────────────────────┬────────────────────────────────────────┬──────────┐
│ Name                                   │ Id                                     │ Sandbox  │
├────────────────────────────────────────┼────────────────────────────────────────┼──────────┤
│ Design                                 │ 284d3b65-0ebf-49c1-a3cd-05890ec614c6   │ Y        │
├────────────────────────────────────────┼────────────────────────────────────────┼──────────┤
│ dev                                    │ ddb79dc5-c0a4-434a-9866-abef600d34d7   │ Y        │
├────────────────────────────────────────┼────────────────────────────────────────┼──────────┤
│ dzone                                  │ fb45b4b7-f4a3-4c63-9224-87c1ca61dcb8   │ N        │
└────────────────────────────────────────┴────────────────────────────────────────┴──────────┘


  • Create a new environment account environment create <name> --type <environmentType>:  
 
> account environment create dzone --type production
OK


  • Delete an environment account environment delete <name>:  
 
> account environment delete dzone
OK


  • Shows details of an environment account environment describe <name>:   
 
> account environment describe dev
┌────────────────────┬────────────────────────────────────────────────────────────┐
│ ID                 │ ddb79dc5-c0a4-434a-9866-abef600d34d7                       │
├────────────────────┼────────────────────────────────────────────────────────────┤
│ Name               │ dev                                                        │
├────────────────────┼────────────────────────────────────────────────────────────┤
│ Organization ID    │ 605578bb-09f3-4947-877a-60aac32601e2                       │
├────────────────────┼────────────────────────────────────────────────────────────┤
│ Production         │ N                                                          │
├────────────────────┼────────────────────────────────────────────────────────────┤
│ Type               │ sandbox                                                    │
├────────────────────┼────────────────────────────────────────────────────────────┤
│ Client ID          │ 85747746894144139b07f988011128c2                           │
└────────────────────┴────────────────────────────────────────────────────────────┘


Anypoint CLI Commands for Environments and Business Groups

  • Make specified environment active use environment <name>:  
 
> use environment dev
Switched to environment "dev"


  • Make specified business-group active use business-group <name>: 
 
> use business-group tricon
Switched to business group "tricon" (environment "Design")


Anypoint CLI Commands for API Manager

  • Create an API instance alert api-mgr alert add [options] <apiInstanceId> <name>:
 
> api-mgr alert add --severity Warning --type request-count --operator gt --threshold 250 --periods 1 --duration 15 --durationUnit minutes --email masteringmule@gmail.com  17866168 requst-count-warning
Created new alert with ID "67470491-XXXX-XXXX-XXXX-fd4c1d095c4d" in API ID "17866168"


  • List alerts for an API instance api-mgr alert list [options] <apiInstanceId>: 
 
> api-mgr alert list 17866168
┌──────────────────────────────────────┬──────────────────────┬───────────────────┬───────────────┬─────────┬──────────┬────────────┐
│ ID                                   │ Name                 │ Type              │ Updated       │ Enabled │ Severity │ Recipients │
├──────────────────────────────────────┼──────────────────────┼───────────────────┼───────────────┼─────────┼──────────┼────────────┤
│ 67470491-32fe-4397-abcb-fd4c1d095c4d │ requst-count-warning │ api-request-count │ 3 minutes ago │ No      │ Warning  │ 1          │
├──────────────────────────────────────┼──────────────────────┼───────────────────┼───────────────┼─────────┼──────────┼────────────┤
│ 57fb93c5-0059-4789-9c1a-9dccb366da2c │ test                 │ api-request-count │ 4 minutes ago │ No      │ Warning  │ 1          │


  • Change the asset version for an API instance by choosing a new version from Exchange api-mgr api change-specification [options] <apiInstanceId> <assetVersion>:
 
> api-mgr api change-specification 17866168 1.0.1
API instance "17866168" asset version changed to "1.0.1"


  • Classify an API instance in a given environment api-mgr api classify [options] <destEnvName> <apiInstanceId>:  
 
> api-mgr api classify dev 17866168
Error: The API with id 17866168 has already been classified


  • Delete an API api-mgr api delete [options] <apiInstanceId>: 
 
> api-mgr api delete 17809267
API deleted


  • Deploy an API to CloudHub, hybrid server, or Runtime Fabric. This command is only supported for endpoints with proxy api-mgr api deploy [options] <apiInstanceId>. 
  • Deprecate an API instance api-mgr api deprecate [options] <apiInstanceId>: 
 
> api-mgr api deprecate  17866312
API instance with ID "17866312" deprecated


  • Show details of an API api-mgr api describe [options] <apiInstanceId>: 
 
> api-mgr api describe 17866168
┌──────────────────────────────┬────────────────────────────────────────────────────────────┐
│ ID                           │ 17866168                                                   │
├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ Instance Label               │                                                            │
├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ Asset ID                     │ american-flights-api                                       │
├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ Asset Version                │ 1.0.1                                                      │
├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ Deprecated                   │ N                                                          │
├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ Tags                         │                                                            │
├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ Product Version              │ v2.0                                                       │
├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ Is Public                    │ N                                                          │
├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ Environment ID               │ 091f7c52-XXXX-XXXX-XXXX-c7b71f782a5c                       │
├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ Last Active                  │ a minute ago                                               │
├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ Endpoint URI                 │                                                            │
├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ Mule 4 or above              │ Y                                                          │
├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ Deployment Type              │ CH                                                         │
├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ Type                         │ RAML/OAS                                                   │
└──────────────────────────────┴────────────────────────────────────────────────────────────┘


  • Download the API proxy ZIP file to a local directory api-mgr api download-proxy [options] <apiInstanceId> <targetPath>: 
 
> api-mgr api download-proxy 17866316 /users/shyamrajprasad/mule
Downloading API Proxy to /users/shyamrajprasad/mule
API Proxy downloaded to /users/shyamrajprasad/mule/american_flights_api-v2_0-v2_0_17866316.jar


  • Edit an API instance api-mgr api edit [options] <apiInstanceId>: 
 
> api-mgr api edit 17866312 --scheme http
Edited API with ID: 17866312


  • List all APIs in API Manager 2.x api-mgr api list [options]: 
 
> api-mgr api list
┌──────────────────────┬─────────────┬───────────────┬──────────────────────┬─────────────────┬────────────────┬────────────┬────────┐
│ Asset ID             │ Instance ID │ Asset Version │ Exchange Asset Name  │ Product Version │ Instance Label │ Deprecated │ Public │
├──────────────────────┼─────────────┼───────────────┼──────────────────────┼─────────────────┼────────────────┼────────────┼────────┤
│ american-flights-api │ 17831973    │ 1.0.0         │ american-flights-api │ v2.0            │                │ N          │ N      │
├──────────────────────┼─────────────┼───────────────┼──────────────────────┼─────────────────┼────────────────┼────────────┼────────┤
│ check-in-papi        │ 17809267    │ 1.0.0         │ check-in-papi        │ v1              │                │ N          │ N      │
└──────────────────────┴─────────────┴───────────────┴──────────────────────┴─────────────────┴────────────────┴────────────┴────────┘


  • Manage a new API, API version, or new API instance with an asset from Exchange api-mgr api manage [options] <assetId> <assetVersion>: 
 
> api-mgr api manage --type raml  check-in-papi 1.0.0
Created new API with ID: 17866336


  • Promote an API instance from the source environment api-mgr api promote [options] <apiInstanceId> <sourceEnvId>: 
 
> api-mgr api promote  17866168 091f7c52-e27e-45e7-a920-c7b71f782a5c
API with ID "17866168" promoted from "091f7c52-e27e-45e7-a920-c7b71f782a5c" to "dev"


  • Redeploy an API to CloudHub, Hybrid server, or Runtime Fabric api-mgr api redeploy [options] <apiInstanceId>. 
  • Undeprecate an API instance api-mgr api undeprecate [options] <apiInstanceId>:
 
> api-mgr api undeprecate 17866312
API instance with ID "17866312" undeprecated


  • Delete a given API contract api-mgr contract delete [options] <apiInstanceId> <clientId>: 
 
> api-mgr contract delete 17866168 7d963ac9a8b24a65aedd75ff222d0af7
Error: Cannot delete active contract 3037778.


  • List all contracts to a given API instance api-mgr contract list [options] <apiInstanceId> [searchText]: 
 
> api-mgr contract list 17866168
┌──────────────────────────────┬──────────────────────────────────┬────────────────────┬────────────────────┬──────────┬────────────────────┐
│ Application                  │ Client ID                        │ Current SLA tier   │ Requested SLA tier │ Status   │ Updated            │
├──────────────────────────────┼──────────────────────────────────┼────────────────────┼────────────────────┼──────────┼────────────────────┤
│ american api                 │ 7d963ac9a8b24a65aedd75ff222d0af7 │ silver             │ N/A                │ APPROVED │ a few seconds ago  │
├──────────────────────────────┼──────────────────────────────────┼────────────────────┼────────────────────┼──────────┼────────────────────┤
│ test                         │ cc2dd7b0ec1248e38a9d9f19a596b115 │ silver             │ N/A                │ APPROVED │ a minute ago       │


  • Apply a policy to a given API instance api-mgr policy apply [options] <apiInstanceId> <policyId>.
  • Disable policy from a given API instance api-mgr policy disable [options] <apiInstanceId> <policyId>:  
 
> api-mgr policy disable 17866168  2862724
Policy with ID "2862724" disabled in API with ID "17866168".


  • Edit the policy configuration of a given API instance api-mgr policy edit [options] <apiInstanceId> <policyId>:  
 
> api-mgr policy edit  -c '{"loggingConfiguration": [{"itemName":"Default configuration","itemData":{"message":"#[attributes]","level":"INFO","firstSection":true,"secondSection":false}}]}'   17866168 2862725
Policy with ID "2862725" edited.


  • Enable a policy on a given API instance api-mgr policy enable [options] <apiInstanceId> <policyId>: 
 
> api-mgr policy enable 17866168  2862724
Policy with ID "2862724" enabled in API with ID "17866168".


  • List policies api-mgr policy list [options] [apiInstanceId]: 
 
 > api-mgr policy list 17866168
┌─────────┬─────────────┬─────────────────┬───────────────┬─────────┬──────────────────────────────────────────┬───────────────────┐
│ ID      │ Template ID │ Asset ID        │ Asset Version │ Status  │ Configuration                            │ Updated           │
├─────────┼─────────────┼─────────────────┼───────────────┼─────────┼──────────────────────────────────────────┼───────────────────┤
│ 2862724 │ 341467      │ spike-control   │ 1.2.1         │ Enabled │ maximumRequests: 1                       │ a minute ago      │
│         │             │                 │               │         │ timePeriodInMilliseconds: 1000           │                   │
│         │             │                 │               │         │ delayTimeInMillis: 1000                  │                   │
│         │             │                 │               │         │ delayAttempts: 1                         │                   │
│         │             │                 │               │         │ queuingLimit: 5                          │                   │
│         │             │                 │               │         │ exposeHeaders: false                     │                   │
├─────────┼─────────────┼─────────────────┼───────────────┼─────────┼──────────────────────────────────────────┼───────────────────┤
│ 2862725 │ 339001      │ message-logging │ 2.0.0         │ Enabled │ loggingConfiguration: [                  │ a few seconds ago │
│         │             │                 │               │         │   {                                      │                   │
│         │             │                 │               │         │     "itemName": "Default configuration", │                   │
│         │             │                 │               │         │     "itemData": {                        │                   │
│         │             │                 │               │         │       "message": "#[attributes]",        │                   │
│         │             │                 │               │         │       "level": "INFO",                   │                   │
│         │             │                 │               │         │       "firstSection": true,              │                   │
│         │             │                 │               │         │       "secondSection": true              │                   │
│         │             │                 │               │         │     }                                    │                   │
│         │             │                 │               │         │   }                                      │                   │
│         │             │                 │               │         │ ]                                        │                   │
└─────────┴─────────────┴─────────────────┴───────────────┴─────────┴──────────────────────────────────────────┴───────────────────┘


  • Remove a policy from a given API instance api-mgr policy remove [options] <apiInstanceId> <policyId>: 
 
> api-mgr policy remove  17866168 2862724
Policy with ID "2862724" removed from API with ID "17866168"


  • Create an SLA tier api-mgr tier add [options] <apiInstanceId>: 
 
> api-mgr tier add --autoApprove true --name silver --description silver --limit  true,100,min  17866168
Created SLA Tier with ID "1224161"


  • Copy an SLA tier from the source to a target API Instance api-mgr tier copy [options] <sourceAPIInstanceId> <targetAPIInstanceId>: 
 
> api-mgr tier copy  17866168 17866316
Copying tiers from API ID "17866168" to API ID "17866316"
- Copying source tier "Test"


  • Delete an SLA tier from an API instance api-mgr tier delete [options] <apiInstanceId> <tierId>:  
 
> api-mgr tier delete 17866168 1224136
Deleted SLA tier with ID "1224136" from API with ID "17866168"


  • List the SLA tiers of an API instance api-mgr tier list [options] <apiInstanceId> [searchText]:  
 
> api-mgr tier list 17866168
┌──────────────────────────────┬─────────┬────────┬──────────────┬────────┬──────────┬──────────────┐
│ Name                         │ ID      │ Limits │ Applications │ Status │ Approval │ Updated      │
├──────────────────────────────┼─────────┼────────┼──────────────┼────────┼──────────┼──────────────┤
│ Test                         │ 1224136 │ 1      │ 0            │ ACTIVE │ Auto     │ a minute ago │
└──────────────────────────────┴─────────┴────────┴──────────────┴────────┴──────────┴──────────────┘


Anypoint CLI Commands for CloudHub Applications

  • Lists all alerts in the environment runtime-mgr cloudhub-alert list [options]: 
 
> runtime-mgr cloudhub-alert list
┌───────────┬──────────────────────────────────────┬──────┬──────────┬───────────────────────────┬──────────────────────┬─────────┬───────────────────┐
│ Name      │ ID                                   │ Type │ Severity │ Source                    │ Source Type          │ Enabled │ Updated           │
├───────────┼──────────────────────────────────────┼──────┼──────────┼───────────────────────────┼──────────────────────┼─────────┼───────────────────┤
│ CPU usage │ b0ae4033-f843-4079-9215-6f9ff5e5616e │ cpu  │ INFO     │ american-flights-api-2905 │ cloudhub-application │ Yes     │ a few seconds ago │
└───────────┴──────────────────────────────────────┴──────┴──────────┴───────────────────────────┴──────────────────────┴─────────┴───────────────────┘


  • Describe the history of the alarm runtime-mgr cloudhub-alert-history describe [options] <name>: 
 
> runtime-mgr cloudhub-alert-history describe "CPU usage"
This alert has no history


  • List all applications in the environment runtime-mgr cloudhub-application list [options]: 
 
> runtime-mgr cloudhub-application list
┌────────────────────────────────────────┬──────────────────┬──────────────────┬──────────────────┐
│ Application                            │ Status           │ vCores           │ Updated          │
├────────────────────────────────────────┼──────────────────┼──────────────────┼──────────────────┤
│ hello-world-12-05                      │ STARTED          │ 0.1 vCores * 1   │ 18 days ago      │
│   Hello World.jar                      │                  │                  │                  │
├────────────────────────────────────────┼──────────────────┼──────────────────┼──────────────────┤
│ testing4321                            │ STARTED          │ 0.1 vCores * 1   │ 7 days ago       │
│   testing-1.0.0-SNAPSHOT-mule-applica… │                  │                  │                  │
├────────────────────────────────────────┼──────────────────┼──────────────────┼──────────────────┤
│ american-flights-api-2905              │ STARTED          │ 0.1 vCores * 1   │ 19 hours ago     │
│   american-flights-api-1.0.0-SNAPSHOT… │                  │                  │                  │
├────────────────────────────────────────┼──────────────────┼──────────────────┼──────────────────┤
│ american-flights-proxy-1234            │ STARTED          │ 0.1 vCores * 1   │ 11 hours ago     │
│   american-flights-proxy-1234-api-gat… │                  │                  │                  │


  • Show application details runtime-mgr cloudhub-application describe [options] <name>:
 
> runtime-mgr cloudhub-application describe hello-world-12-05
┌──────────────────────────────┬────────────────────────────────────────────────────────────────┐
│ Domain                       │ hello-world-12-05.us-e2.cloudhub.io                            │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Status                       │ STARTED                                                        │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Updated                      │ 18 days ago                                                    │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Runtime                      │ 4.4.0                                                          │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ File name                    │ Hello World.jar                                                │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Region                       │ us-east-2                                                      │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Persistent queues            │ false                                                          │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Persistent queues encrypted  │ false                                                          │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Static IPs enabled           │ false                                                          │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Monitoring                   │ Enabled. Will auto restart when not responding                 │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Workers                      │ 0.1 vCores * 1                                                 │
│                              │ IP: 18.189.182.154, STARTED                                    │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Properties                   │ anypoint.platform.config.analytics.agent.enabled = true        


  • Show raw application JSON response runtime-mgr cloudhub-application describe-json [options] <name>: 
 
> runtime-mgr cloudhub-application describe-json hello-world-12-05
{
  "versionId": "627d04678b6c0c3d086a9a3c",
  "domain": "hello-world-12-05",
  "fullDomain": "hello-world-12-05.us-e2.cloudhub.io",
  "properties": {
    "anypoint.platform.config.analytics.agent.enabled": "true"
  },
  "propertiesOptions": {},
  "status": "STARTED",
  "workers": {
    "type": {
      "name": "Micro",
      "weight": 0.1,
      "cpu": "0.1 vCores",
      "memory": "500 MB memory"
    },
    "amount": 1,
    "remainingOrgWorkers": 0.7,
    "totalOrgWorkers": 1
  },
  "workerStatuses": [
    {
      "id": "i-0a672e8af63166525",
      "host": "18.189.182.154",
      "port": 0,
      "status": "STARTED",
      "deployedRegion": "us-east-2",
      "staticIPEnabled": false
    }
  ],
  "lastUpdateTime": 1652360389858,
  "fileName": "Hello World.jar",
  "muleVersion": {
    "version": "4.4.0",
    "updateId": "6279a0a671ba5c3bd4878a8e",
    "latestUpdateId": "628d0a5d3678f51a9be882a8",
    "endOfSupportDate": 1709251200000
  },
  "region": "us-east-2",
  "persistentQueues": false,
  "persistentQueuesEncryptionEnabled": false,
  "persistentQueuesEncrypted": false,
  "monitoringEnabled": true,
  "monitoringAutoRestart": true,
  "staticIPsEnabled": false,
  "hasFile": true,
  "secureDataGatewayEnabled": false,
  "loggingNgEnabled": true,
  "loggingCustomLog4JEnabled": false,
  "cloudObjectStoreRegion": "us-east-2",
  "insightsReplayDataRegion": "us-east-2",
  "isDeploymentWaiting": false,
  "deploymentGroup": {
    "id": "5ac685b0de9e5022ac802745",
    "name": "US East (Ohio)"
  },
  "updateRuntimeConfig": false,
  "trackingSettings": {
    "trackingLevel": "DISABLED"
  },
  "logLevels": [],
  "ipAddresses": []
}

  • Stop a running application runtime-mgr cloudhub-application stop [options] <name>:
 
> runtime-mgr cloudhub-application stop  hello-world-12-05
OK


  • Start an application runtime-mgr cloudhub-application start [options] <name>:
 
> runtime-mgr cloudhub-application start  hello-world-12-05
OK


  • Restart a running application runtime-mgr cloudhub-application restart [options] <name>:  
 
> runtime-mgr cloudhub-application restart  hello-world-12-05
OK


  • Delete an application runtime-mgr cloudhub-application delete [options] <name>: 
 
> runtime-mgr cloudhub-application delete hello-world-12-05
hello-world-12-05 deleted


  • Deploy a new application runtime-mgr cloudhub-application deploy [options] <name> <zipfile>: 
 
> runtime-mgr cloudhub-application deploy --workerSize 0.1  hello-world-30-05-2022 /users/shyamrajprasad/downloads/HelloWorld.jar
Deploying hello-world-30-05-2022 ...
┌──────────────────────────────┬────────────────────────────────────────────────────────────────┐
│ Domain                       │ hello-world-30-05-2022.us-e2.cloudhub.io                       │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Status                       │ UNDEPLOYED                                                     │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Updated                      │ in a few seconds                                               │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Runtime                      │ 4.4.0                                                          │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ File name                    │ HelloWorld.jar                                                 │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Region                       │ us-east-2                                                      │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Persistent queues            │ false                                                          │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Persistent queues encrypted  │ false                                                          │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Static IPs enabled           │ false                                                          │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Monitoring                   │ Enabled. Will auto restart when not responding                 │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Workers                      │ 0.1 vCores * 1                                                 │
└──────────────────────────────┴────────────────────────────────────────────────────────────────┘


  • Modify an existing application, optionally updating the ZIP file runtime-mgr cloudhub-application modify [options] <name> [zipfile]:  
 
> runtime-mgr cloudhub-application modify  hello-world-30-05-2022 /users/shyamrajprasad/downloads/HelloWorld.jar
Updating hello-world-30-05-2022 ...
┌──────────────────────────────┬────────────────────────────────────────────────────────────────┐
│ Domain                       │ hello-world-30-05-2022.us-e2.cloudhub.io                       │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Status                       │ STARTED                                                        │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Updated                      │ a few seconds ago                                              │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Runtime                      │ 4.4.0                                                          │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ File name                    │ HelloWorld.jar                                                 │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Region                       │ us-east-2                                                      │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Persistent queues            │ false                                                          │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Persistent queues encrypted  │ false                                                          │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Static IPs enabled           │ false                                                          │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Monitoring                   │ Enabled. Will auto restart when not responding                 │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Workers                      │ 0.1 vCores * 1                                                 │
└──────────────────────────────┴────────────────────────────────────────────────────────────────┘


  • Download application logs to the specified directory runtime-mgr cloudhub-application download-logs [options] <name> <directory>:  
 
> runtime-mgr cloudhub-application download-logs hello-world-30-05-2022 /users/shyamrajprasad/mule
Downloading log for instance 6294463ecca8147235ed23bd-0
Saving to /users/shyamrajprasad/mule/hello-world-30-05-2022-2022_05_30.zip


  • Tail application logs runtime-mgr cloudhub-application tail-logs [options] <name>:
 
> runtime-mgr cloudhub-application tail-logs hello-world-30-05-2022 
Tailing log... hit ctrl-c to stop tailing
[09:51:18 30 May] Application queued to be deployed...
[09:51:20 30 May] Deploying application to 1 workers in us-east-2 region(s).
[09:51:21 30 May] Provisioning CloudHub worker in region=us-east-2...
[09:51:27 30 May] Starting CloudHub worker at 3.14.134.144 ...
[09:52:30 30 May] Worker(3.14.134.144): Starting your application on mule=4.4.0-20220321 Release date 05-24-2022 (MM-dd-yyyy) ...
[09:52:32 30 May] The PersistentQueueManager is NOT configured. The normal VM queue manager will be used.
[09:52:39 30 May] Loaded MuleMessageBuilderFactory implementation 'org.mule.runtime.core.internal.message.DefaultMessageBuilderFactory' from classloader 'org.mule.runtime.module.reboot.internal.MuleContainerSystemClassLoader@70fcb150'
[09:52:39 30 May] Loaded BindingContextBuilderFactory implementation 'org.mule.runtime.core.api.el.DefaultBindingContextBuilderFactory' from classloader 'org.mule.runtime.module.reboot.internal.MuleContainerSystemClassLoader@70fcb150'
[09:52:48 30 May] Using files for tx logs /opt/mule/mule-4.4.0/./.mule/hello-world-30-05-2022/queue-tx-log/tx1.log and /opt/mule/mule-4.4.0/./.mule/hello-world-30-05-2022/queue-tx-log/tx2.log
[09:52:48 30 May] Using files for tx logs /opt/mule/mule-4.4.0/./.mule/hello-world-30-05-2022/queue-xa-tx-log/tx1.log and /opt/mule/mule-4.4.0/./.mule/hello-world-30-05-2022/queue-xa-tx-log/tx2.log
[09:52:48 30 May] Initialising Bean: org.mule.runtime.module.extension.internal.runtime.config.ConfigurationProviderToolingAdapter-HTTP_Listener_config
[09:52:48 30 May] Initialising flow: hello-worldFlow
[09:52:49 30 May] Initialising Bean: listener
[09:52:49 30 May] Persistent queues is not enabled for batch module as it was not configured in Cloudhub console
[09:52:49 30 May] Starting ResourceManager
[09:52:49 30 May] Started ResourceManager
[09:52:49 30 May] Starting Bean: org.mule.runtime.module.extension.internal.runtime.config.ConfigurationProviderToolingAdapter-HTTP_Listener_config
[09:52:49 30 May] Listening for connections on 'http://0.0.0.0:8081'
[09:52:49 30 May] Starting flow: hello-worldFlow
[09:52:50 30 May] Starting Bean: listener
[09:52:50 30 May] Loading application configuration from fragment: mule.agent.application.properties.service
[09:52:50 30 May] Re-enabling component: mule.agent.application.properties.service
[09:52:50 30 May] 
**********************************************************************
* Application: hello-world-30-05-2022                                *
* OS encoding: UTF-8, Mule encoding: UTF-8                           *
*                                                                    *
**********************************************************************
[09:52:50 30 May] Worker(3.14.134.144): Your application has started successfully.
[09:52:50 30 May] Message source 'listener' on flow 'hello-worldFlow' successfully reconnected


  • Copy a CloudHub application runtime-mgr cloudhub-application copy [options] <source> <target>: 
  • List all supported regions cloudhub region list [options]:
 
> cloudhub region list
┌────────────────────┬────────────────────────────────────────┐
│ Region             │ Description                            │
├────────────────────┼────────────────────────────────────────┤
│ us-east-1          │ US East (N. Virginia)                  │
├────────────────────┼────────────────────────────────────────┤
│ us-east-2          │ US East (Ohio)                         │
├────────────────────┼────────────────────────────────────────┤
│ us-west-1          │ US West (N. California)                │
├────────────────────┼────────────────────────────────────────┤
│ us-west-2          │ US West (Oregon)                       │
├────────────────────┼────────────────────────────────────────┤
│ ca-central-1       │ Canada (Central)                       │
├────────────────────┼────────────────────────────────────────┤
│ eu-west-1          │ EU (Ireland)                           │
├────────────────────┼────────────────────────────────────────┤
│ eu-central-1       │ EU (Frankfurt)                         │
├────────────────────┼────────────────────────────────────────┤
│ eu-west-2          │ EU (London)                            │
├────────────────────┼────────────────────────────────────────┤
│ ap-northeast-1     │ Asia Pacific (Tokyo)                   │
├────────────────────┼────────────────────────────────────────┤
│ ap-southeast-1     │ Asia Pacific (Singapore)               │
├────────────────────┼────────────────────────────────────────┤
│ ap-southeast-2     │ Asia Pacific (Sydney)                  │
├────────────────────┼────────────────────────────────────────┤
│ sa-east-1          │ South America (São Paulo)              │
└────────────────────┴────────────────────────────────────────┘


  • List all available runtimes cloudhub runtime list [options]: 
 
> cloudhub runtime list
┌────────────────────────────────────────┐
│ Runtime                                │
├────────────────────────────────────────┤
│ 4.4.0                                  │
├────────────────────────────────────────┤
│ 4.3.0                                  │
├────────────────────────────────────────┤
│ 3.9.5-EXCEPTION                        │
└────────────────────────────────────────┘


Anypoint CLI Command for Design Center Projects

  • Create a new Design Center project designcenter project create [options] <name>:
 
> designcenter project create --type raml flights-api
Project created.


  • Delete a Design Center project designcenter project delete [options] <name>: 
 
> designcenter project delete flights-api
Project deleted.


  • Download the content of a Design Center project designcenter project download [options] <name> <targetDir>:  
 
> designcenter project download american-flights-api /users/shyamrajprasad/download
Getting files list
Downloading .gitignore
Downloading american-flights-api.raml
Downloading examples
Downloading examples/AmericanFlightExample.raml
Downloading examples/AmericanFlightNoIDExample.raml
Downloading exchange.json
Downloading exchange_modules
Downloading exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913
Downloading exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flight-data-type
Downloading exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flight-data-type/1.0.1
Downloading exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flight-data-type/1.0.1/AmericanFlightDataType.raml
Downloading exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flight-data-type/1.0.1/exchange.json
Downloading exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flights-example
Downloading exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flights-example/1.0.1
Downloading exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flights-example/1.0.1/AmericanFlightsExample.raml
Downloading exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flights-example/1.0.1/exchange.json


  • Publish a Design Center project to Exchange designcenter project publish [options] <projectName>:  
 
 > designcenter project publish --version 1.0.2 american-flights-api
Loading exchange.json
Acquiring lock
Publishing project to Exchange
Releasing lock
Project published to Exchange


  • Upload the content of a project to Design Center designcenter project upload [options] <name> <projDir>:
 
> designcenter project upload american-flights-api /users/shyamrajprasad/download
Preparing file: /american-flights-api.raml
Preparing file: /examples/AmericanFlightExample.raml
Preparing file: /examples/AmericanFlightNoIDExample.raml
Preparing file: /exchange.json
Preparing file: /exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flight-data-type/1.0.1/AmericanFlightDataType.raml
Preparing file: /exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flight-data-type/1.0.1/exchange.json
Preparing file: /exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flights-example/1.0.1/AmericanFlightsExample.raml
Preparing file: /exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flights-example/1.0.1/exchange.json
Acquiring lock
Uploading 8 files
Releasing lock


  • List all Design Center projects designcenter project list [options] [searchText]:
 
> designcenter project list
┌────────────────────────────────────────┬──────────┬──────────────────────┬──────────────────┬───────────────┐
│ ID                                     │ Version  │ Name                 │ Type             │ Created       │
├────────────────────────────────────────┼──────────┼──────────────────────┼──────────────────┼───────────────┤
│ 5e4103d7-76c2-41f0-8a67-a059f65c9632   │ 1.0      │ american-flights-api │ raml             │ 15 days ago   │
├────────────────────────────────────────┼──────────┼──────────────────────┼──────────────────┼───────────────┤
│ 621c8888-bb8e-4ced-bdf6-d63bf5e3fa67   │ 1.0      │ test                 │ Mule Application │ 24 days ago   │
├────────────────────────────────────────┼──────────┼──────────────────────┼──────────────────┼───────────────┤
│ 938ff273-9606-4185-ae92-7abeffc6a7af   │ 1.0      │ check-in-papi        │ raml             │ 25 days ago   │
└────────────────────────────────────────┴──────────┴──────────────────────┴──────────────────┴───────────────┘


Anypoint CLI Commands for Exchange Assets

  • Upload an Exchange asset exchange asset upload [options] <assetIdentifier> [filePath]:   
 
> exchange asset upload --classifier raml --apiVersion v1 --mainFile covid-data-tracking-api.raml --name covid-data-tracking-api  covid-data-tracking-api/1.0.5 /users/shyamrajprasad/downloads/covid19-data-tracking-api-3.0.0-raml.zip
-Uploading assetzip
Asset uploaded


  • Upload an Exchange asset using Exchange Experience API v2 exchange asset uploadv2 [properties] <assetIdentifier>:
 
 
> exchange asset uploadv2 --name "Covid data tracking api" --description "RAML" --properties.apiVersion v1 --properties.mainFile covid-data-tracking-api.raml --files.raml.zip /users/shyamrajprasad/downloads/covid19Uploading assetapi-3.0.0-raml.zip covid-data-tracking-api/1.0.4
- organizationId: 139e1148-d888-487c-b041-6b6d9f38625fapi/1.0.4
- groupId: 139e1148-d888-487c-b041-6b6d9f38625f
- assetId: covid-data-tracking-api
- version: 1.0.4
Asset metadata
- name: Covid data tracking api
- description: RAML
Asset properties
- apiVersion: v1
- mainFile: covid-data-tracking-api.raml
Asset files
- classifier: raml, packaging: zip, path: /users/shyamrajprasad/downloads/covid19-data-tracking-api-3.0.0-raml.zip
............ Publishing completed


  • Modify mutable data of an existing Exchange asset exchange asset mutableDataUpload [properties] <assetIdentifier>: 
 
> exchange asset mutableDataUpload --tags api covid-data-tracking-api/3.0.0 
Asset
- organizationId: 605578bb-09f3-4947-877a-60aac32601e2
- groupId: 605578bb-09f3-4947-877a-60aac32601e2
- assetId: covid-data-tracking-api
- version: 3.0.0
Asset tags
- tags: api
.. Publishing completed


  • Modify the status of an existent Exchange asset exchange asset updateStatus [properties] <assetIdentifier>:    
 
> exchange asset updateStatus --status deprecated american-flights-api/1.0.2
Modifying asset status
Asset status modified


  • Modify an Exchange asset exchange asset modify [options] <assetIdentifier>:
 
> exchange asset modify --tags covid covid-data-tracking-api/1.0.0
Modifying asset tags
Asset tags modified


  • Download an Exchange asset exchange asset download [options] <assetIdentifier> <directory>:  
 
> exchange asset download  covid-data-tracking-api/1.0.0 /users/shyamrajprasad/download/covid
Downloading asset to /users/shyamrajprasad/download/covid/727af8e4f7e63b8e12b7ae84941d11deb5ed52e129309b2126df40021ab2ab2b.zip
Asset downloaded


  • List all assets exchange asset list [options] [searchText]:   
 
exchange asset list --organizationId  139e1148-d888-487c-b041-6b6d9f38625f
┌──────────────────────────────────────┬─────────────────────────────────────┬─────────┬──────────────────────────────────────┬───────────┬────────────────
│ GroupID                              │ AssetID                             │ Version │ Name                                 │ Type      │ Changed        
├──────────────────────────────────────┼─────────────────────────────────────┼─────────┼──────────────────────────────────────┼───────────┼────────────────
│ 139e1148-d888-487c-b041-6b6d9f38625f │ mule-module-covid-data-tracking-api │ 1.0.0   │ COVID-19 Data Tracking API Connector │ connector │ a minute ago   
├──────────────────────────────────────┼─────────────────────────────────────┼─────────┼──────────────────────────────────────┼───────────┼────────────────
│ 139e1148-d888-487c-b041-6b6d9f38625f │ mule-plugin-covid-data-tracking-api │ 1.0.0   │ covid-data-tracking-api              │ extension │ a minute ago   
├──────────────────────────────────────┼─────────────────────────────────────┼─────────┼──────────────────────────────────────┼───────────┼────────────────
│ 139e1148-d888-487c-b041-6b6d9f38625f │ covid-data-tracking-api             │ 1.0.0   │ covid-data-tracking-api              │ rest-api  │ a minute ago   
├──────────────────────────────────────┼─────────────────────────────────────┼─────────┼──────────────────────────────────────┼───────────┼────────────────
│ 139e1148-d888-487c-b041-6b6d9f38625f │ mule-module-american-flights-api    │ 1.0.2   │ American Flights API Connector       │ connector │ 14 minutes ago 
├──────────────────────────────────────┼─────────────────────────────────────┼─────────┼──────────────────────────────────────┼───────────┼────────────────
│ 139e1148-d888-487c-b041-6b6d9f38625f │ mule-plugin-american-flights-api    │ 1.0.2   │ american-flights-api                 │ extension │ 14 minutes ago 
├──────────────────────────────────────┼─────────────────────────────────────┼─────────┼──────────────────────────────────────┼───────────┼────────────────
│ 139e1148-d888-487c-b041-6b6d9f38625f │ american-flights-api                │ 1.0.2   │ american-flights-api                 │ rest-api  │ 14 minutes ago 
├──────────────────────────────────────┼─────────────────────────────────────┼─────────┼──────────────────────────────────────┼───────────┼────────────────
│ 139e1148-d888-487c-b041-6b6d9f38625f │ mule-module-american-flights-api    │ 1.0.1   │ American Flights API Connector       │ connector │ 14 minutes ago 
├──────────────────────────────────────┼─────────────────────────────────────┼─────────┼──────────────────────────────────────┼───────────┼────────────────
│ 139e1148-d888-487c-b041-6b6d9f38625f │ mule-plugin-american-flights-api    │ 1.0.1   │ american-flights-api                 │ extension │ 14 minutes ago 
├──────────────────────────────────────┼─────────────────────────────────────┼─────────┼──────────────────────────────────────┼───────────┼────────────────
│ 139e1148-d888-487c-b041-6b6d9f38625f │ american-flights-api                │ 1.0.1   │ american-flights-api                 │ rest-api  │ 14 minutes ago 
├──────────────────────────────────────┼─────────────────────────────────────┼─────────┼──────────────────────────────────────┼───────────┼────────────────
│ 139e1148-d888-487c-b041-6b6d9f38625f │ mule-module-american-flights-api    │ 1.0.0   │ American Flights API Connector       │ connector │ 14 minutes ago 
├──────────────────────────────────────┼─────────────────────────────────────┼─────────┼──────────────────────────────────────┼───────────┼────────────────
│ 139e1148-d888-487c-b041-6b6d9f38625f │ mule-plugin-american-flights-api    │ 1.0.0   │ american-flights-api                 │ extension │ 14 minutes ago 
├──────────────────────────────────────┼─────────────────────────────────────┼─────────┼──────────────────────────────────────┼───────────┼────────────────
│ 139e1148-d888-487c-b041-6b6d9f38625f │ american-flights-api                │ 1.0.0   │ american-flights-api                 │ rest-api  │ 14 minutes ago 
├──────────────────────────────────────┼─────────────────────────────────────┼─────────┼──────────────────────────────────────┼───────────┼────────────────
│ 139e1148-d888-487c-b041-6b6d9f38625f │ mule-module-check-in-papi           │ 1.0.0   │ Simplified Check-In PAPI Connector   │ connector │ 25 days ago    
├──────────────────────────────────────┼─────────────────────────────────────┼─────────┼──────────────────────────────────────┼───────────┼────────────────
│ 139e1148-d888-487c-b041-6b6d9f38625f │ mule-plugin-check-in-papi           │ 1.0.0   │ check-in-papi                        │ extension │ 25 days ago    
├──────────────────────────────────────┼─────────────────────────────────────┼─────────┼──────────────────────────────────────┼───────────┼────────────────
│ 139e1148-d888-487c-b041-6b6d9f38625f │ check-in-papi                       │ 1.0.0   │ check-in-papi                        │ rest-api  │ 25 days ago    


  • Download an asset’s description page from Exchange exchange asset page download [options] <assetIdentifier> <directory> [pageName]:
 
> exchange asset page download  covid-data-tracking-api/1.0.0  /users/shyamrajprasad/download home
Downloading asset page "home"


  • Change an asset’s description page from Exchange exchange asset page modify [options] <assetIdentifier> <pageName>:   
 
 > exchange asset page modify --name covid covid-data-tracking-api/1.0.0 home
Enabling asset draft mode
Renaming asset page "home" to "covid"
Trying to create new asset page "covid"
Asset page "covid" created
Publishing asset draft
Asset page modified


  • Upload an asset’s description page from Exchange exchange asset page upload [options] <assetIdentifier> <pageName> <mdPath>: 
 
 > exchange asset page upload  covid-data-tracking-api/1.0.0 home /users/shyamrajprasad/download/home.md
Enabling asset draft mode
Trying to create new asset page "home"
Asset page "home" created
Uploading asset page
Publishing asset draft
Asset page uploaded and published


  • Update an asset’s description page from Exchange exchange asset page update [options] <assetIdentifier> <pageName> <mdPath>: 
 
> exchange asset page update  covid-data-tracking-api/1.0.0 home /users/shyamrajprasad/download/home.md
Enabling asset draft mode
Uploading asset page
Publishing asset draft
Asset page updated and published


  • Delete an asset’s description page from Exchange exchange asset page delete [options] <assetIdentifier> <pageName>:
 
> exchange asset page delete  covid-data-tracking-api/1.0.0 covid
Enabling asset draft mode
Deleting asset page "covid"
Publishing asset draft
Asset page deleted


  • List all pages for a given asset exchange asset page list <assetIdentifier>:  
 
> exchange asset page list  covid-data-tracking-api/1.0.0 covid
Getting asset pages list
┌──────┬──────┐
│ Name │ Path │
├──────┼──────┤
│ home │ home │
├──────┼──────┤
│ Test │ Test │
└──────┴──────┘


  • Copy Exchange asset exchange asset copy [options] <source> <target>: 
 
> exchange asset copy --targetOrganizationId f16989ac-84c0-4868-90a6-45a5ee100d04 covid-data-tracking-api/1.0.0 covid-data-tracking-api/1.0.6
Copying asset from "covid-data-tracking-api/1.0.0" to "covid-data-tracking-api/1.0.6"
Downloading source asset data
Copying source asset data to target


  • Delete an asset from Exchange exchange asset delete [options] <assetIdentifier>:
 
> exchange asset delete covid-data-tracking-api/1.0.5
Asset deleted


  • Deprecate an asset exchange asset deprecate <assetIdentifier>:
 
> exchange asset deprecate  covid-data-tracking-api/1.0.5
Asset covid-data-tracking-api Deprecated


  • Undeprecate an asset exchange asset undeprecate <assetIdentifier>:
 
 > exchange asset undeprecate  covid-data-tracking-api/1.0.5
Asset covid-data-tracking-api Undeprecated


  • Show a given asset’s information exchange asset describe <assetIdentifier>: 
 
> exchange asset describe covid-data-tracking-api/1.0.0
┌──────────────────────────────┬────────────────────────────────────────────────────────────────┐
│ Name                         │ covid-data-tracking-api                                        │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Changed                      │ a minute ago                                                   │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Status                       │ published                                                      │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Type                         │ rest-api                                                       │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ API Version                  │ v1                                                             │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ Asset Versions               │ 1.0.4, 1.0.2, 1.0.1, 1.0.0                                     │
├──────────────────────────────┼────────────────────────────────────────────────────────────────┤
│ API Versions                 │ v1                                                             │
└──────────────────────────────┴────────────────────────────────────────────────────────────────┘


  • Upload a resource to an asset portal exchange asset resource upload [options] <assetIdentifier> <filepath>: 
 
> exchange asset resource upload  covid-data-tracking-api/1.0.0 /users/shyamrajprasad/download/mulesoft.jpeg
Uploading resource...
Resource uploaded. To use, add the following markdown code in the desired page:

![mulesoft](resources/mulesoft-034db6b3-c44b-421a-86a5-fdc60b3d0170.jpeg)


  • List published resources in the asset portal exchange asset resource list [options] <assetIdentifier>:  
 
> exchange asset resource list covid-data-tracking-api/1.0.0
Getting asset resource list
The asset: "covid-data-tracking-api/1.0.0" does not have any published resource


  • Download resource from the asset portal exchange asset resource download [options] <assetIdentifier> <resourcePath> <filePath>:
APL
 
 > exchange asset resource download  covid-data-tracking-api/1.0.0 mulesoft.jpeg /users/shyamrajprasad/download/
Downloading resource...
Error: Resource not found: mulesoft.jpeg


  • Delete resources from the asset portal exchange asset resource delete [options] <assetIdentifier> <resourcePath>:  
 
> exchange asset resource delete  covid-data-tracking-api/1.0.0 mulesoft.jpeg
Deleting resource...
Error: DELETE /assets/139e1148-d888-487c-b041-6b6d9f38625f/covid-data-tracking-api/1.0.0/portal/draft/mulesoft.jpeg does not exist in the RAML for this application
Command-line interface Design MuleSoft Command (computing)

Opinions expressed by DZone contributors are their own.

Related

  • Automate and Persist MuleSoft CloudHub Application Logs
  • Revolutionize Your MuleSoft Deployments With GitOps
  • Terraform Best Practices: The 24 Practices You Should Adopt
  • Multimodal Design With Google Actions: Rich Responses Using Cards

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!