Nav

To Simulate Calling a RAML API

This procedure builds on the Placeholder API example to test the API. You see the response example from the JSON example when you preview the /users resource.

  1. After entering RAML code in the editor, click the hamburger menu to display resources.

    Files

  2. Turn on Mocking Service on the top, right to simulate calls to the API.

    Files

    In your RAML definition, the baseUri changes to a mocking service URI.

  3. Expand resources to see methods. Click GET. Try It appears.

    Try It control
  4. Click Try It. Click Send to return the example data.

    The user information in the /users resource appears.

  5. Click the GET tab for the /userbyid resource. Click Try it.

  6. Check Show Optional Parameters, and accept the default query parameter ID = 3. Click Send.

    The user information appears for the user having an ID 3.

In this topic: