Contact Us 1-800-596-4880

Develop the American Flights App

logo cloud IDE Cloud IDE

logo desktop IDE Desktop IDE

Use Anypoint Code Builder to create and implement an API specification that returns flight information from a MySQL database:

  1. Designing the American Flights API Spec:

    • Start the American Flights API specification.

    • Add a resource and methods.

    • Add query parameters and nested resources.

    • Add fragments and examples:

      • Add API fragments from Exchange for a data type and examples to the American Flights API specification.

      • Create your own examples for the specification.

      • Add a custom message for a response.

  2. Adding Examples to the API Spec

    Use the Mocking Service in the API Console to check the request and responses that you configured for American Flights API.

  3. Publishing the API Spec to Anypoint Exchange:

    Publish the American Flights API specification to Exchange so that other team members can find and implement it.

  4. Create an integration application for the American Flights example:

    1. Integrating American Flights Processes:

      Start by creating a basic integration for the American Flights example. This integration provides some of the logic for processing requests from the American Flights API.

    2. Connecting to a Database from the App:

      • Import the Anypoint Connector for Database (Database Connector) from Exchange.

      • Configure a database operation to connect to an external database from your Mule flow.

    3. Transforming Flight Data with DataWeave:

      Use DataWeave to transform and match flight data to your API specification.

  5. Implementing the American Flights API Spec:

    • Import your American Flights API specification from Anypoint Exchange.

    • Scaffold the specification into the American Flights project that you are developing.

    • Add logic to implement an endpoint in the API.

  6. Debugging the American Flights App:

    • Prepare to debug your Mule application by adding Logger and Set Variable components to better understand the behavior of your flows.

    • Set up breakpoints to stop your Mule application at specific points during a debug session.

    • Run a debug session, and inspect the message and variables at different points during your application’s execution.

  7. Deploying the American Flights App:

    • Deploy your American Flights application to CloudHub.

    • Enable your team to send requests to your API and return flight information from a database.