Free MuleSoft CONNECT Keynote & Expo Pass Available!

Register now+
Nav

About Starting an APIkit Project

In Studio, you can start a REST APIkit project in several ways:

  • Select File > New > Mule Project. Check Add APIkit Components (do not enter an API definition file location or URL).

  • Select File > New > Mule Project. Check Add APIkit Components. Enter an API definition file location or URL.

  • Create the RAML file within an existing Studio project (called a backend-first APIkit design). In package explorer, right-click the project name. Select Mule > Generate Flows From Rest API.

The API definition file is a RAML or WSDL. When you check Add APIkit Components but don’t import or reference an API definition file, scaffolding generates a skeletal RAML file and XML configuration that includes the following things:

  • A main flow

    
              
           
    1
    2
    3
    
    <flow name="api-main">
    
    </flow>
  • HTTP Listener configuration in the main flow

  • APIkit Router component

  • Error handlers

In the project files, in src/main/resources/api, the api.raml is virtually empty in this case.

When you check Add APIkit Components and do import or reference an API definition file, scaffolding creates an archetype depending on the type of API definition file. In the case of a RAML definition file, the api.raml contains the RAML you imported. The following things are generated:

  • RAML

    • A main flow

    • HTTP Listener configuration

    • APIkit Router component

    • Error handlers

    • RAML dependencies

      Push or pull changes from one location, such as Studio, to the other, such as Design Center.

  • Backend flows containing REST resource-action mappings

  • WSDL

    • Everything listed above

    • A main flow with an HTTP Listener

    • A SOAP Router

    • A SOAP fault response template

    • Backend flows containing SOAP message templates.

Use a SOAP testing tool, such as SoapUI, to simulate calls to the API. If you change the WSDL, regenerate backend flows using Mule > Generate SOAP Flows.