DZone
Integration Zone
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
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Integration Zone > Mule CloudHub Connector: Part 1

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.

Karan Gupta user avatar by
Karan Gupta
·
Jan. 10, 22 · Integration Zone · Tutorial
Like (3)
Save
Tweet
3.84K 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.

Popular on DZone

  • Modernize Legacy Code in Production: Rebuild Your Airplane Midflight Without Crashing
  • Choosing Between GraphQL Vs REST
  • Java: Why Core-to-Core Latency Matters
  • Open Source Security Risks

Comments

Integration Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

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

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo