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
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

Enterprise AI Trend Report: Gain insights on ethical AI, MLOps, generative AI, large language models, and much more.

2024 Cloud survey: Share your insights on microservices, containers, K8s, CI/CD, and DevOps (+ enter a $750 raffle!) for our Trend Reports.

PostgreSQL: Learn about the open-source RDBMS' advanced capabilities, core components, common commands and functions, and general DBA tasks.

AI Automation Essentials. Check out the latest Refcard on all things AI automation, including model training, data security, and more.

Related

  • MuleSoft Integration With RabbitMQ
  • How to Use Mulesoft VM Connector
  • Step-by-Step Guide to Use Anypoint MQ: Part 1
  • Deep Dive Into JMS Integration Patterns With MuleSoft and JMS Behavior With Anypoint Clustering and Server Groups

Trending

  • Behavior-Driven Development (BDD) Framework for Terraform
  • Advanced-Data Processing With AWS Glue
  • Navigating the Digital Frontier: A Journey Through Information Technology Progress
  • Minimum Viable Elevator [Comic]

Mule CloudHub Connector: Part 1

Need help connecting to CloudHub APIs? Use this tutorial to guide you through the steps of how to use CloudHub Connector in Mule Application.

By 
Karan Gupta user avatar
Karan Gupta
·
Jan. 10, 22 · Tutorial
Like (3)
Save
Tweet
Share
4.5K Views

Join the DZone community and get the full member experience.

Join For Free

What are CloudHub Connectors?

This helps you connect to CloudHub APIs through Mule applications. In total, there are 5 features provided by this connector as listed below:

  • Get Application
  • List Applications
  • Create Notification
  • List Notifications
  • Mark Notification

In this article, we are going to look at the first 2 features using a simple demo.

Get Application

Create a Mule Project. Once completed, add the CloudHub connector module from the exchange as shown below.Add CloudHub connector module

You can now see the list of features available for use.List of features available

Now create a simple Mule Flow by dragging an HTTP Listener and CloudHub Get Application Connector as shown.Create MuleFlow

Configure the HTTP Listener and CloudHub connection configuration as below.

HTTP Listener Connector Config:HTTP Listener configHTTP Listener 2

CloudHub Connector Config: 

Select the appropriate environment from which you want to get the application details. In the Domain section, select the Application Name.CloudHub Connector Config 1CloudHub Connector Config 2

Once the above configuration is completed, run the application, and you will get the app information as the Output.

  • Endpoint: http://localhost:8081/getApp
  • Output: 
 
{
    "versionId": "61d69713c792727d25726477",
    "domain": "helloappdemo",
    "fullDomain": "helloappdemo.us-e2.cloudhub.io",
    "properties": {},
    "propertiesOptions": {},
    "status": "STARTED",
    "workers": {
        "type": {
            "name": "Micro",
            "weight": 0.1,
            "cpu": "0.1 vCores",
            "memory": "500 MB memory"
        },
        "amount": 1,
        "remainingOrgWorkers": 1.0,
        "totalOrgWorkers": 1.0
    },
    "workerStatuses": [
        {
            "id": "i-05b4a69e302383205",
            "host": "18.118.132.173",
            "port": 0,
            "status": "STARTED",
            "deployedRegion": "us-east-2",
            "staticIPEnabled": false
        }
    ],
    "lastUpdateTime": 1641453436509,
    "fileName": "helloapp-1.0.0-SNAPSHOT-mule-application.jar",
    "muleVersion": {
        "version": "4.4.0",
        "updateId": "61d3db0536b6517e4ffcf614",
        "latestUpdateId": "61d3db0536b6517e4ffcf614",
        "endOfSupportDate": 1662595200000
    },
    "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": []
}

List Applications

We need to again follow the same steps as listed above to configure the Connector Configurations. Below are the snapshots for the same. This will list down all the applications in the given environment.Connector Configurations SnapshotDisplay Name: ListenerDisplay Name: List Applications

Once the above configuration is completed run the application. Below is the sample output you can see.

  • Endpoint: http://localhost:8081/listApp
  • Output:
 
[
    {
        "versionId": "61d69713c792727d25726477",
        "domain": "helloappdemo",
        "fullDomain": "helloappdemo.us-e2.cloudhub.io",
        "properties": {},
        "propertiesOptions": {},
        "status": "STARTED",
        "workers": {
            "type": {
                "name": "Micro",
                "weight": 0.1,
                "cpu": "0.1 vCores",
                "memory": "500 MB memory"
            },
            "amount": 1,
            "remainingOrgWorkers": 1.0,
            "totalOrgWorkers": 1.0
        },
        "lastUpdateTime": 1641453436509,
        "fileName": "helloapp-1.0.0-SNAPSHOT-mule-application.jar",
        "muleVersion": {
            "version": "4.4.0",
            "updateId": "61d3db0536b6517e4ffcf614",
            "latestUpdateId": "61d3db0536b6517e4ffcf614",
            "endOfSupportDate": 1662595200000
        },
        "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": []
    }
]


Connector (mathematics) application

Opinions expressed by DZone contributors are their own.

Related

  • MuleSoft Integration With RabbitMQ
  • How to Use Mulesoft VM Connector
  • Step-by-Step Guide to Use Anypoint MQ: Part 1
  • Deep Dive Into JMS Integration Patterns With MuleSoft and JMS Behavior With Anypoint Clustering and Server Groups

Partner Resources


Comments

ABOUT US

  • About DZone
  • Send 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: