SlideShare a Scribd company logo
1 of 13
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

What's hot (20)

Apikit in studio
Apikit in studioApikit in studio
Apikit in studio
 
LAJUG Napster REST API
LAJUG Napster REST APILAJUG Napster REST API
LAJUG Napster REST API
 
A RESTful Interface for Erlang Code using Webmachine
A RESTful Interface for Erlang Code using WebmachineA RESTful Interface for Erlang Code using Webmachine
A RESTful Interface for Erlang Code using Webmachine
 
CakePHP REST Plugin
CakePHP REST PluginCakePHP REST Plugin
CakePHP REST Plugin
 
REST API V2
REST API V2REST API V2
REST API V2
 
Rest API
Rest APIRest API
Rest API
 
Selenium-4
Selenium-4Selenium-4
Selenium-4
 
Rack
RackRack
Rack
 
REST API Basics
REST API BasicsREST API Basics
REST API Basics
 
Force.com Migration Tool
Force.com Migration ToolForce.com Migration Tool
Force.com Migration Tool
 
New features incorporated in laravel 5.6 version
New features incorporated in laravel 5.6 versionNew features incorporated in laravel 5.6 version
New features incorporated in laravel 5.6 version
 
Amazon API Gateway
Amazon API GatewayAmazon API Gateway
Amazon API Gateway
 
API Façade Pattern
API Façade PatternAPI Façade Pattern
API Façade Pattern
 
Web services with laravel
Web services with laravelWeb services with laravel
Web services with laravel
 
Top laravel packages to install handpicked list from expert
Top laravel packages to install handpicked list from expertTop laravel packages to install handpicked list from expert
Top laravel packages to install handpicked list from expert
 
WordPress REST API
WordPress REST APIWordPress REST API
WordPress REST API
 
Designing CakePHP plugins for consuming APIs
Designing CakePHP plugins for consuming APIsDesigning CakePHP plugins for consuming APIs
Designing CakePHP plugins for consuming APIs
 
Icter cloud appfog_keynotes
Icter cloud appfog_keynotesIcter cloud appfog_keynotes
Icter cloud appfog_keynotes
 
Intro to Functions
Intro to FunctionsIntro to Functions
Intro to Functions
 
Task scheduling in laravel 8 tutorial
Task scheduling in laravel 8 tutorialTask scheduling in laravel 8 tutorial
Task scheduling in laravel 8 tutorial
 

Similar to Raml part 2

RAML - The architecture
RAML  - The architectureRAML  - The architecture
RAML - The architectureAnkush Sharma
 
Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1SmartBear
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Mindfire Solutions
 
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 TestingpCloudy
 
File Upload with RESP API
File Upload with RESP APIFile Upload with RESP API
File Upload with RESP APIThiago Santana
 
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 apiBhargav Ranjit
 
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptxTransform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptxkmani5
 
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).ppt
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).pptTransform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).ppt
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).pptHusseinWassof
 
Mule soft meetup_4_mty_online_oct_2020
Mule soft meetup_4_mty_online_oct_2020Mule soft meetup_4_mty_online_oct_2020
Mule soft meetup_4_mty_online_oct_2020Veyra Celina
 
#ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman
#ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman #ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman
#ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman Agile Testing Alliance
 
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!Evan Mullins
 
Api design and development
Api design and developmentApi design and development
Api design and developmentoquidave
 
Web Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIWeb Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIDinesh Kaushik
 
The ultimate api checklist by Blendr.io
The ultimate api checklist by Blendr.ioThe ultimate api checklist by Blendr.io
The ultimate api checklist by Blendr.ioBlendr.io
 

Similar to Raml part 2 (20)

Siebel Web Service
Siebel Web ServiceSiebel Web Service
Siebel Web Service
 
RAML - The architecture
RAML  - The architectureRAML  - The architecture
RAML - The architecture
 
Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
 
Play with force.com metadata
Play with force.com metadataPlay with force.com metadata
Play with force.com metadata
 
Introduction To REST
Introduction To RESTIntroduction To REST
Introduction To REST
 
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
 
File Upload with RESP API
File Upload with RESP APIFile Upload with RESP API
File Upload with RESP API
 
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
 
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptxTransform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx
 
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).ppt
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).pptTransform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).ppt
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).ppt
 
Mule soft meetup_4_mty_online_oct_2020
Mule soft meetup_4_mty_online_oct_2020Mule soft meetup_4_mty_online_oct_2020
Mule soft meetup_4_mty_online_oct_2020
 
Lampstack (1)
Lampstack (1)Lampstack (1)
Lampstack (1)
 
#ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman
#ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman #ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman
#ATAGTR2018 Presentation " Security Testing for RESTful APIs" By Anuradha Raman
 
Rest With Raml
Rest With RamlRest With Raml
Rest With Raml
 
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
 
Api Testing.pdf
Api Testing.pdfApi Testing.pdf
Api Testing.pdf
 
Api design and development
Api design and developmentApi design and development
Api design and development
 
Web Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIWeb Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUI
 
The ultimate api checklist by Blendr.io
The ultimate api checklist by Blendr.ioThe ultimate api checklist by Blendr.io
The ultimate api checklist by Blendr.io
 

Recently uploaded

costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 

Recently uploaded (20)

costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 

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.