Nav
You are viewing an older version of this topic. To go to a different version, use the version menu at the upper-right. +

To Run and Test the Project

  1. Right-click the project name in the Project Explorer, then select Run As > Mule Application. 

    The APIkit Console appears below the canvas, displaying the resource-action pairs exposed by the API. 

    APIkitconsole-tutorial

  2. Click Introduction under DOCUMENTATION to view the API description. 

    The main Introduction title and sentence map to the contents of documentation in the root section of the RAML file.

  3. Click /machines to expand the section. Expand GET: /machines, then click the tab labeled Try It.

    The baseURI is optional in a RAML-backed API, but required by the API Console Try It functionality; otherwise, Try-it is disabled.

    fv 601

    In the RAML, you can use an arbitrary value, for example http://www.example.com for the baseURI.

  4. Click the GET button to send a test call to GET a list of machines.

    apikitt-get

  5. The API returns a list of machines.

    The output is the payload set on the message by the get:/machines:apiConfig flow.

    
              
           
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    
    {
      "count": 3,
      "machines": [
        {
          "id": "ZX4102",
          "location": "Starbuck's, 442 Geary Street, San Francisco, CA 94102"
        },
        {
          "id": "ZX5322",
          "location": "Starbuck's, 462 Powell Street, San Francisco, CA 94102"
        },
        {
          "id": "ZX6792",
          "location": "Cafe La Taza, 470 Post Street, San Francisco, CA 94102"
        }
      ]
    }

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

+