SlideShare a Scribd company logo
Delight Driven Development of
REST APIs with RAML
By Vijay Dhanakodi
REST is also called as representational state transfer.
The REST API lets us to interact with anything that can send an
HTTP request.
REST APIs are very easy to create and design and it supports
various methods like GET, POST, PUT, DELETE etc to perform
various types of operations.
In Mule, we can create and design a REST service various ways.
But, with the new specification of RAML, it became quite a easy
task to create, design and test our APIs as per our requirement.
Before we start, we will actually look into what RAML really is.
RAML which is also called as RESTful API Modeling Language,
helps us to manage the whole api lifecycle starting from it’s design,
develop to sharing.
It is basically build on top of YAML for describing RESTful APIs and
provides all the information to describe an API.
Reference :- http://raml.org/
Advantage of RAML:-
RAML can be designed in API designer.
API Designer is a standalone/embeddable editor for RAML
(RESTful API Modeling Language) written in JavaScript using
Angular.JS. By default, the editor uses an in-browser filesystem
stored in HTML5 Local storage.
API designer :- https://www.mulesoft.com/platform/api/api-
designer
With this tool/editor, we can design our APIs and test it there itself
using a mock service with the tool.
So, we need to log in into our account to start designing our APIs.
https://anypoint.mulesoft.com/#/signin
If we don’t have an account we can sign up and create one.
Once we sign in, we need to click APIs menu in the top right as follows:-
If we don’t have any API present there in our account, we can create a
new API by clicking the button as below :-
Now, a dialog box will arrive and we will be filling it by giving our API
name, Version name and a end point as follows :-
So, we will be creating our first RAML in the API designer as follows.:-
Now, we will add some more tags in the file like Protocols and Media Type
Resource :- Resources are identified by their relative URI, which MUST begin
with a slash (/).
Now we can add methods for our resources.
methods :- methods are operations that are performed on a resource.
There can be several methods applied on a resources such as :-
* GET
* POST
* PUT
* DELETE
and many more.
We will be seeing GET performed on our resource.
Methods also contains the properties like displayName and description
As you can see here, we applied GET method on our resource /product
We can add our custom headers in our API

More Related Content

What's hot

Apimanagement
ApimanagementApimanagement
Apimanagement
chandu1443
 
LINE developers site the tech behind the docs
LINE developers site the tech behind the docsLINE developers site the tech behind the docs
LINE developers site the tech behind the docs
LINE Corporation
 
Schema-First API Design
Schema-First API DesignSchema-First API Design
Schema-First API Design
Yos Riady
 
API Façade Pattern
API Façade PatternAPI Façade Pattern
API Façade Pattern
Nabeel Yoosuf
 
Quality sdk for your apis in minutes!
Quality sdk for your apis in minutes!Quality sdk for your apis in minutes!
Quality sdk for your apis in minutes!
Son Nguyen
 
Creating a custom connector in mule
Creating a custom connector in muleCreating a custom connector in mule
Creating a custom connector in mule
Achyuta Lakshmi
 
Mule Integration with Dropbox
Mule Integration with DropboxMule Integration with Dropbox
Mule Integration with Dropbox
Ramakrishna Narkedamilli
 
Manage and consume the api
Manage and consume the apiManage and consume the api
Manage and consume the api
Achyuta Lakshmi Puvvala
 
Mule ESB integration with Stripe
Mule ESB integration with StripeMule ESB integration with Stripe
Mule ESB integration with Stripe
Ramakrishna Narkedamilli
 
Salesforce Integration using Mule ESB
Salesforce Integration using Mule ESBSalesforce Integration using Mule ESB
Salesforce Integration using Mule ESB
Sreekanth Kondapalli
 
Integration with Microsoft SharePoint using Mule ESB
Integration with Microsoft SharePoint using Mule ESBIntegration with Microsoft SharePoint using Mule ESB
Integration with Microsoft SharePoint using Mule ESB
Sanjeet Pandey
 
App Manifest
App ManifestApp Manifest
App Manifest
S M Mohi Us Sunnat
 
Software components design for poc and mvp, keep it simple but be ready to sc...
Software components design for poc and mvp, keep it simple but be ready to sc...Software components design for poc and mvp, keep it simple but be ready to sc...
Software components design for poc and mvp, keep it simple but be ready to sc...
Roman Taluyev
 
Creating a mule project with raml and api
Creating a mule project with raml and apiCreating a mule project with raml and api
Creating a mule project with raml and api
Bhargav Ranjit
 
Mule with facebook
Mule with facebookMule with facebook
Mule with facebook
D.Rajesh Kumar
 
ActionBarCompat Tutorial-Part 1(Prepare and Setup)
ActionBarCompat Tutorial-Part 1(Prepare and Setup)ActionBarCompat Tutorial-Part 1(Prepare and Setup)
ActionBarCompat Tutorial-Part 1(Prepare and Setup)
Haining Lee
 
The API Facade Pattern: Common Patterns - Episode 2
The API Facade Pattern: Common Patterns - Episode 2The API Facade Pattern: Common Patterns - Episode 2
The API Facade Pattern: Common Patterns - Episode 2
Apigee | Google Cloud
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripe
D.Rajesh Kumar
 
Varaprasad-Go
Varaprasad-GoVaraprasad-Go
Varaprasad-Go
Varaprasad Pemmasani
 
Rails engine
Rails engineRails engine
Rails engine
Jyaasa Technologies
 

What's hot (20)

Apimanagement
ApimanagementApimanagement
Apimanagement
 
LINE developers site the tech behind the docs
LINE developers site the tech behind the docsLINE developers site the tech behind the docs
LINE developers site the tech behind the docs
 
Schema-First API Design
Schema-First API DesignSchema-First API Design
Schema-First API Design
 
API Façade Pattern
API Façade PatternAPI Façade Pattern
API Façade Pattern
 
Quality sdk for your apis in minutes!
Quality sdk for your apis in minutes!Quality sdk for your apis in minutes!
Quality sdk for your apis in minutes!
 
Creating a custom connector in mule
Creating a custom connector in muleCreating a custom connector in mule
Creating a custom connector in mule
 
Mule Integration with Dropbox
Mule Integration with DropboxMule Integration with Dropbox
Mule Integration with Dropbox
 
Manage and consume the api
Manage and consume the apiManage and consume the api
Manage and consume the api
 
Mule ESB integration with Stripe
Mule ESB integration with StripeMule ESB integration with Stripe
Mule ESB integration with Stripe
 
Salesforce Integration using Mule ESB
Salesforce Integration using Mule ESBSalesforce Integration using Mule ESB
Salesforce Integration using Mule ESB
 
Integration with Microsoft SharePoint using Mule ESB
Integration with Microsoft SharePoint using Mule ESBIntegration with Microsoft SharePoint using Mule ESB
Integration with Microsoft SharePoint using Mule ESB
 
App Manifest
App ManifestApp Manifest
App Manifest
 
Software components design for poc and mvp, keep it simple but be ready to sc...
Software components design for poc and mvp, keep it simple but be ready to sc...Software components design for poc and mvp, keep it simple but be ready to sc...
Software components design for poc and mvp, keep it simple but be ready to sc...
 
Creating a mule project with raml and api
Creating a mule project with raml and apiCreating a mule project with raml and api
Creating a mule project with raml and api
 
Mule with facebook
Mule with facebookMule with facebook
Mule with facebook
 
ActionBarCompat Tutorial-Part 1(Prepare and Setup)
ActionBarCompat Tutorial-Part 1(Prepare and Setup)ActionBarCompat Tutorial-Part 1(Prepare and Setup)
ActionBarCompat Tutorial-Part 1(Prepare and Setup)
 
The API Facade Pattern: Common Patterns - Episode 2
The API Facade Pattern: Common Patterns - Episode 2The API Facade Pattern: Common Patterns - Episode 2
The API Facade Pattern: Common Patterns - Episode 2
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripe
 
Varaprasad-Go
Varaprasad-GoVaraprasad-Go
Varaprasad-Go
 
Rails engine
Rails engineRails engine
Rails engine
 

Similar to Rest With Raml

Raml part 1
Raml part 1Raml part 1
Raml part 1
venkata20k
 
Web API Design: Crafting Interfaces that Developers Love
Web API Design:  Crafting Interfaces that Developers LoveWeb API Design:  Crafting Interfaces that Developers Love
Web API Design: Crafting Interfaces that Developers Love
Jamison K. Bell | OvenPOP 360
 
What is Design Center | API Designer | API Specification
What is Design Center | API Designer | API SpecificationWhat is Design Center | API Designer | API Specification
What is Design Center | API Designer | API Specification
Rahul Vijayanagaram
 
Building restful apis with laravel
Building restful apis with laravelBuilding restful apis with laravel
Building restful apis with laravel
Mindfire LLC
 
Practical guide to building public APIs
Practical guide to building public APIsPractical guide to building public APIs
Practical guide to building public APIs
Reda Hmeid MBCS
 
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay NagchowdhuryIBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
Karen Broughton-Mabbitt
 
RAML - The architecture
RAML  - The architectureRAML  - The architecture
RAML - The architecture
Ankush Sharma
 
Building APIs with Node.js and MonogDB
Building APIs with Node.js and MonogDBBuilding APIs with Node.js and MonogDB
Building APIs with Node.js and MonogDB
Charlie Key
 
A Practical Guide to Automating End-to-End API Testing
A Practical Guide to Automating End-to-End API TestingA Practical Guide to Automating End-to-End API Testing
A Practical Guide to Automating End-to-End API Testing
pCloudy
 
Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...
Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...
Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...
Polyxer Systems
 
Api design part 1
Api design part 1Api design part 1
Api design part 1
Ibrahim Elsawaf
 
How to Develop APIs - Importance, Types, Tools, Terminology, and Best Practic...
How to Develop APIs - Importance, Types, Tools, Terminology, and Best Practic...How to Develop APIs - Importance, Types, Tools, Terminology, and Best Practic...
How to Develop APIs - Importance, Types, Tools, Terminology, and Best Practic...
Techugo Inc
 
Guide To API Development – Cost, Importance, Types, Tools, Terminology, and B...
Guide To API Development – Cost, Importance, Types, Tools, Terminology, and B...Guide To API Development – Cost, Importance, Types, Tools, Terminology, and B...
Guide To API Development – Cost, Importance, Types, Tools, Terminology, and B...
Techugo
 
Mule api gateway overview
Mule api gateway overviewMule api gateway overview
Mule api gateway overview
Sanjeet Pandey
 
REST full API Design
REST full API DesignREST full API Design
REST full API Design
Christian Guenther
 
Rest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookRest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbook
Katy Slemon
 
Play Your API with MuleSoft API Notebook
Play Your API with MuleSoft API NotebookPlay Your API with MuleSoft API Notebook
Play Your API with MuleSoft API Notebook
Rakesh Kumar Jha
 

Similar to Rest With Raml (20)

Raml part 1
Raml part 1Raml part 1
Raml part 1
 
Web API Design: Crafting Interfaces that Developers Love
Web API Design:  Crafting Interfaces that Developers LoveWeb API Design:  Crafting Interfaces that Developers Love
Web API Design: Crafting Interfaces that Developers Love
 
Web API Design
Web API DesignWeb API Design
Web API Design
 
What is Design Center | API Designer | API Specification
What is Design Center | API Designer | API SpecificationWhat is Design Center | API Designer | API Specification
What is Design Center | API Designer | API Specification
 
Building restful apis with laravel
Building restful apis with laravelBuilding restful apis with laravel
Building restful apis with laravel
 
Practical guide to building public APIs
Practical guide to building public APIsPractical guide to building public APIs
Practical guide to building public APIs
 
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay NagchowdhuryIBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
 
Api Testing.pdf
Api Testing.pdfApi Testing.pdf
Api Testing.pdf
 
RAML - The architecture
RAML  - The architectureRAML  - The architecture
RAML - The architecture
 
Building APIs with Node.js and MonogDB
Building APIs with Node.js and MonogDBBuilding APIs with Node.js and MonogDB
Building APIs with Node.js and MonogDB
 
API.docx
API.docxAPI.docx
API.docx
 
A Practical Guide to Automating End-to-End API Testing
A Practical Guide to Automating End-to-End API TestingA Practical Guide to Automating End-to-End API Testing
A Practical Guide to Automating End-to-End API Testing
 
Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...
Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...
Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...
 
Api design part 1
Api design part 1Api design part 1
Api design part 1
 
How to Develop APIs - Importance, Types, Tools, Terminology, and Best Practic...
How to Develop APIs - Importance, Types, Tools, Terminology, and Best Practic...How to Develop APIs - Importance, Types, Tools, Terminology, and Best Practic...
How to Develop APIs - Importance, Types, Tools, Terminology, and Best Practic...
 
Guide To API Development – Cost, Importance, Types, Tools, Terminology, and B...
Guide To API Development – Cost, Importance, Types, Tools, Terminology, and B...Guide To API Development – Cost, Importance, Types, Tools, Terminology, and B...
Guide To API Development – Cost, Importance, Types, Tools, Terminology, and B...
 
Mule api gateway overview
Mule api gateway overviewMule api gateway overview
Mule api gateway overview
 
REST full API Design
REST full API DesignREST full API Design
REST full API Design
 
Rest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookRest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbook
 
Play Your API with MuleSoft API Notebook
Play Your API with MuleSoft API NotebookPlay Your API with MuleSoft API Notebook
Play Your API with MuleSoft API Notebook
 

Recently uploaded

Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
Kamal Acharya
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 

Recently uploaded (20)

Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 

Rest With Raml

  • 1. Delight Driven Development of REST APIs with RAML By Vijay Dhanakodi
  • 2. REST is also called as representational state transfer. The REST API lets us to interact with anything that can send an HTTP request. REST APIs are very easy to create and design and it supports various methods like GET, POST, PUT, DELETE etc to perform various types of operations. In Mule, we can create and design a REST service various ways. But, with the new specification of RAML, it became quite a easy task to create, design and test our APIs as per our requirement.
  • 3. Before we start, we will actually look into what RAML really is. RAML which is also called as RESTful API Modeling Language, helps us to manage the whole api lifecycle starting from it’s design, develop to sharing. It is basically build on top of YAML for describing RESTful APIs and provides all the information to describe an API. Reference :- http://raml.org/
  • 5. RAML can be designed in API designer. API Designer is a standalone/embeddable editor for RAML (RESTful API Modeling Language) written in JavaScript using Angular.JS. By default, the editor uses an in-browser filesystem stored in HTML5 Local storage. API designer :- https://www.mulesoft.com/platform/api/api- designer With this tool/editor, we can design our APIs and test it there itself using a mock service with the tool.
  • 6. So, we need to log in into our account to start designing our APIs. https://anypoint.mulesoft.com/#/signin If we don’t have an account we can sign up and create one.
  • 7. Once we sign in, we need to click APIs menu in the top right as follows:-
  • 8. If we don’t have any API present there in our account, we can create a new API by clicking the button as below :-
  • 9. Now, a dialog box will arrive and we will be filling it by giving our API name, Version name and a end point as follows :-
  • 10. So, we will be creating our first RAML in the API designer as follows.:-
  • 11. Now, we will add some more tags in the file like Protocols and Media Type
  • 12. Resource :- Resources are identified by their relative URI, which MUST begin with a slash (/).
  • 13. Now we can add methods for our resources. methods :- methods are operations that are performed on a resource. There can be several methods applied on a resources such as :- * GET * POST * PUT * DELETE and many more. We will be seeing GET performed on our resource. Methods also contains the properties like displayName and description
  • 14. As you can see here, we applied GET method on our resource /product
  • 15. We can add our custom headers in our API