SlideShare a Scribd company logo
Designing ReST APIs with RAML (Part 2)
Venkatanarayana
k
POST - Create a new entry in the collection.
In the below example, we are adding a new peripheral to the collection(List of peripheral
devices)
body – body key indicates the content, that would POST.
application/json – Content Type
example – example data that would POST.
URI Parameters: Resources often taken dynamic data, such as id or even search filter, RAML supports
URI parameters/placeholders. to indicate dynamic data, just use the braces either side of the URI
parameter(open and closed braces).
Ex: {URI_Param}
Below itemId as a URI Parameter
Include:
Keyword include helps us to replace
in-Line declaration with reference
declaration.
Before we refer any example, we
need to create/place the example in
API directory.
Create a folder name as POST
Project  New Folder
To create an example
Project  New File  Raml 1.0 
Example
Rename default with the
below
Paste example data, which
was shown in previous slide
and save it.
Replace Inline example with reference.
!include filename with path
securedBy: Keyword is used to provide authentication for API. Before using the
authentication need to define the authentication. To define the security schema’s,
changed the RAML version 0.8 to 1.0.
In the above example, we used Basic Authentication. Basic
authentication validates Username and password. Mulesoft also
supports below authentications.
• OAuth 1.0
• OAuth 2.0
• Digest Authentication
• Pass Through
• x-{other}
Please refer undistributed ReST by Michael Stowe for more on
authentications.
Mocking and Sharing the RAML :
To Mock the Service, toggle Mocking Service as shown below.
Sharing an RAML : To share RAML to users, follow the below steps
Click on API Administrator (Top Left corner).
Select the RAML API, which you want to share.
Under API Portal section, select Create New Portal Option, It will redirect to the
below screen.
Select the resources and click on visible
Toggle private to public
Click on live portal, it will redirect to the below screen.
This will provide users to test the RAML. Need to copy the URL and
share it for testers to testing the RAML.
It can also provide to download RAML from the link Download API
definition as a .zip file.
RAML is not small, recommend you to go
through Mulesoft documentations.

More Related Content

PPTX
Raml part 1
PPTX
Consuming raml
PPTX
Basic auth implementation using raml in mule
PPTX
Day02 a pi.
PPTX
Api Testing
PDF
Lunacloud's Compute RESTful API - Programmer's Guide
PDF
PPTX
Quantum API 1.1 proposal
Raml part 1
Consuming raml
Basic auth implementation using raml in mule
Day02 a pi.
Api Testing
Lunacloud's Compute RESTful API - Programmer's Guide
Quantum API 1.1 proposal

What's hot (20)

PDF
Apikit in studio
PPTX
LAJUG Napster REST API
PPT
A RESTful Interface for Erlang Code using Webmachine
KEY
CakePHP REST Plugin
PPTX
PPTX
Selenium-4
PDF
REST API Basics
PPTX
Force.com Migration Tool
PPT
New features incorporated in laravel 5.6 version
PPTX
Amazon API Gateway
PPT
API Façade Pattern
PDF
Web services with laravel
PDF
Top laravel packages to install handpicked list from expert
PDF
WordPress REST API
PPTX
Designing CakePHP plugins for consuming APIs
PPTX
Icter cloud appfog_keynotes
PPTX
Intro to Functions
PDF
Task scheduling in laravel 8 tutorial
Apikit in studio
LAJUG Napster REST API
A RESTful Interface for Erlang Code using Webmachine
CakePHP REST Plugin
Selenium-4
REST API Basics
Force.com Migration Tool
New features incorporated in laravel 5.6 version
Amazon API Gateway
API Façade Pattern
Web services with laravel
Top laravel packages to install handpicked list from expert
WordPress REST API
Designing CakePHP plugins for consuming APIs
Icter cloud appfog_keynotes
Intro to Functions
Task scheduling in laravel 8 tutorial
Ad

Similar to Raml part 2 (20)

PPTX
Faridabad Mulesoft Meetup Oct 10
PPTX
mulesoft birmingham meetup_api_designing_with_raml
PPTX
MuleSoft Surat Virtual Meetup#9 - RAML Reusability and Simplified
PPTX
The ins and outs of RAML
PDF
ApiAddicts Meetup Sept 2016, Madrid
PDF
Engineering Student MuleSoft Meetup#2 - API Design Using Restful API Modelin...
PDF
RAML BASED REST API with Mulesoft anypoint
PPTX
Mule soft RAML API Designing
PPTX
Design API using RAML - basics
PPTX
Rest With Raml
PPTX
RAML - APIs By Design
PPTX
Creating a mule project with raml and api
PPTX
#7 Deep Dive into RAML 1.0 .pptx
PPTX
MuleSoft London Community - May 2017 RAML
PPTX
Mule raml
PPTX
API Specifications and Best Practices | MuleSoft Mysore Meetup #4
PPTX
Mule soft meetup_4_mty_online_oct_2020
PPT
PDF
Faridabad MuleSoft Meetup Group (1).pdf
PPTX
API Athens Meetup - API standards 25-6-2014
Faridabad Mulesoft Meetup Oct 10
mulesoft birmingham meetup_api_designing_with_raml
MuleSoft Surat Virtual Meetup#9 - RAML Reusability and Simplified
The ins and outs of RAML
ApiAddicts Meetup Sept 2016, Madrid
Engineering Student MuleSoft Meetup#2 - API Design Using Restful API Modelin...
RAML BASED REST API with Mulesoft anypoint
Mule soft RAML API Designing
Design API using RAML - basics
Rest With Raml
RAML - APIs By Design
Creating a mule project with raml and api
#7 Deep Dive into RAML 1.0 .pptx
MuleSoft London Community - May 2017 RAML
Mule raml
API Specifications and Best Practices | MuleSoft Mysore Meetup #4
Mule soft meetup_4_mty_online_oct_2020
Faridabad MuleSoft Meetup Group (1).pdf
API Athens Meetup - API standards 25-6-2014
Ad

Recently uploaded (20)

PPTX
OMC Textile Division Presentation 2021.pptx
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
August Patch Tuesday
PDF
Hybrid model detection and classification of lung cancer
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Mushroom cultivation and it's methods.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Approach and Philosophy of On baking technology
PDF
Getting Started with Data Integration: FME Form 101
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
OMC Textile Division Presentation 2021.pptx
Chapter 5: Probability Theory and Statistics
Digital-Transformation-Roadmap-for-Companies.pptx
August Patch Tuesday
Hybrid model detection and classification of lung cancer
MIND Revenue Release Quarter 2 2025 Press Release
Univ-Connecticut-ChatGPT-Presentaion.pdf
DP Operators-handbook-extract for the Mautical Institute
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Mushroom cultivation and it's methods.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Approach and Philosophy of On baking technology
Getting Started with Data Integration: FME Form 101
TLE Review Electricity (Electricity).pptx
Assigned Numbers - 2025 - Bluetooth® Document
Heart disease approach using modified random forest and particle swarm optimi...
cloud_computing_Infrastucture_as_cloud_p
Web App vs Mobile App What Should You Build First.pdf
Enhancing emotion recognition model for a student engagement use case through...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

Raml part 2

  • 1. Designing ReST APIs with RAML (Part 2) Venkatanarayana k
  • 2. POST - Create a new entry in the collection. In the below example, we are adding a new peripheral to the collection(List of peripheral devices) body – body key indicates the content, that would POST. application/json – Content Type example – example data that would POST.
  • 3. URI Parameters: Resources often taken dynamic data, such as id or even search filter, RAML supports URI parameters/placeholders. to indicate dynamic data, just use the braces either side of the URI parameter(open and closed braces). Ex: {URI_Param} Below itemId as a URI Parameter
  • 4. Include: Keyword include helps us to replace in-Line declaration with reference declaration. Before we refer any example, we need to create/place the example in API directory. Create a folder name as POST Project  New Folder To create an example Project  New File  Raml 1.0  Example
  • 5. Rename default with the below Paste example data, which was shown in previous slide and save it.
  • 6. Replace Inline example with reference. !include filename with path
  • 7. securedBy: Keyword is used to provide authentication for API. Before using the authentication need to define the authentication. To define the security schema’s, changed the RAML version 0.8 to 1.0.
  • 8. In the above example, we used Basic Authentication. Basic authentication validates Username and password. Mulesoft also supports below authentications. • OAuth 1.0 • OAuth 2.0 • Digest Authentication • Pass Through • x-{other} Please refer undistributed ReST by Michael Stowe for more on authentications.
  • 9. Mocking and Sharing the RAML : To Mock the Service, toggle Mocking Service as shown below.
  • 10. Sharing an RAML : To share RAML to users, follow the below steps Click on API Administrator (Top Left corner). Select the RAML API, which you want to share. Under API Portal section, select Create New Portal Option, It will redirect to the below screen.
  • 11. Select the resources and click on visible Toggle private to public
  • 12. Click on live portal, it will redirect to the below screen. This will provide users to test the RAML. Need to copy the URL and share it for testers to testing the RAML. It can also provide to download RAML from the link Download API definition as a .zip file.
  • 13. RAML is not small, recommend you to go through Mulesoft documentations.