Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Design a RAML-Based REST API With Mulesoft Anyp...

Design a RAML-Based REST API With Mulesoft Anypoint API Manager

Design a RAML-Based REST API With Mulesoft Anypoint API Manager

Jitendra Bafna

May 24, 2017
Tweet

More Decks by Jitendra Bafna

Other Decks in Technology

Transcript

  1. Raml (Rest API Modeling Language) RAML (Rest API Modeling Language)

    is based on YAML format, which is used to design REST APIs. RAML provides various features, including standardization, reusability, easy readability, and much more. RESTful API Modeling Language (RAML) makes it easy to manage the whole API lifecycle from design to sharing. It's concise - you only write what you need to define - and reusable. It is machine readable API design that is actually human friendly.
  2. Steps to create API using Anypoint API manager • Create

    an Anypoint MuleSoft Account Create an Anypoint MuleSoft accountand sign into the Anypoint MuleSoft platform. • Add a New API First, go to API Manager as shown below:
  3. Steps to create API using Anypoint API manager Click API

    Manager to reach the API Manager Screen. Then, click Add New API. Fill in the details like API name and Version name. Description and API endpoint are optional. After filling in these details, click Add.
  4. Steps to create API using Anypoint API manager Define the

    API Next, click Define API in the API Designer.We will be navigated to API Manager Designer, where we can start writing the RAML. We can see the documentation on the left side, depending on the RAML we are writing. On the right side, we can see the RAML file name. By default, the file name will be api.raml. We can rename the RAML filename by right clicking on api.raml. The extension of a RAML file is always .raml.
  5. Steps to create API using Anypoint API manager We can

    see title and version have already been defined by default at the root level. Title and Version will be the same, as we mentioned in previous steps. Now, we can start defining the RAML.
  6. Steps to create API using Anypoint API manager We can

    see title and version have already been defined by default at the root level. Title and Version will be the same, as we mentioned in Step 2. Now, we can start defining the RAML.
  7. Steps to create API using Anypoint API manager As we

    are writing the RAML, we can see the documentation being generated on the left side of the screen.
  8. Test the API from API Manager We need to enable

    Mocking Service for testing the API. Once we will enable the mocking service, then baseURI will be added to the RAML.
  9. Test the API from API Manager After enabling the mocking

    service, we can test the REST API by clicking on any of the HTTP methods on the left side of the screen. Then, click Try it!.