SlideShare una empresa de Scribd logo
1 de 35
Designing modern APIs
using MuleSoft Anypoint
Platform : Almost Instantly!!
Birmingham MuleSoft Meetup Group
09/17/21
Organizer
2
About Organizer:
• 15+ years of Technical Experience.
• 4+ years of Experience in MuleSoft Architecture.
• Certified MuleSoft API Designer.
• MuleSoft Meetup Speaker.
• Birmingham Mule Meetup Leader.
Mohammad Sakif
Integration Architect
Speaker
3
Sonali Mehta
Senior MuleSoft Architect
About Speaker:
• 15+ years of Technical Experience.
• 4+ years of Experience in MuleSoft Architecture.
• Certified MuleSoft API Designer.
• MuleSoft Mentor
• MuleSoft Meetup Speaker.
• Both the speaker and host are organizing this meet up in individual capacity, only.
We are not representing our companies here.
• This presentation is strictly for learning purpose only. Organizer/Presenter do not hold any responsibility
that same solution will work for your business requirements also.
• This presentation is not meant for any promotional activities.
Safe Harbor Statement
4
CHEERS..!!
We have prizes to give away!
3 Winners a special prize is ready
5
A SHOW OF HANDS:
New Members With Us.!!
6
● Introducing MuleSoft AnyPoint Platform and API LifeCycle
● How to use API Designer to create API Specifications?
● Introducing RAML
● Defining resources , methods , parameters and responses using RAML
● Modularizing an API
● Simulating an API
Agenda
7
● Engaging users in design phase
● Sharing an API
● Publishing an API in Anypoint Exchange
● Example APIs
● Further Reading
Agenda
Introduction to MuleSoft Anypoint
Platform and API LifeCycle
9
MuleSoft Anypoint Platform
10
Design Once, Deploy Anywhere
API-First Design Approach
12
API Lifecycle Management
13
Anypoint Design Center
14
Steps for designing API using RAML
Introduction to RAML
(RESTful API Modelling Language)
16
RAML : RESTful API Modeling Language
• RAML is a human- and machine-readable language for the definition
of a RESTful application programming interface (API).
• RAML is designed to improve the specification of the API by
providing a format that the API provider and API consumers can use
as a mutual contract.
• RAML is based on broadly used standards such as YAML and JSON.
• RAML files can be used to auto generate documentations, mocked
endpoints , interfaces for API implementations etc.
• RAML uses a human readable data serialization format where data
structure hierarchy is specified by indentation.
17
RAML : Resources, Methods and Parameters
• A resource is a conceptual mapping of an entity or set of entities.
• Resources are the objects identified by web service url that you want
to act upon using HTTP method used for the request
• All resources begin with a slash
• Any methods and parameters nested under a resource belong to
and act upon that resource
• Nested resources are used for a subset of a resource to narrow it
• URI parameter which is a variable element, enclosed in curly
brackets ({}) inside a relative URI of a resource.
18
RAML : Defining Response And Request
Details
• Responses must be a map of one or more HTTP status codes
• For each response , specify a possible return datatypes along with
description and examples
• Same as response details, for a request specify each request data
type along with description and example
19
RAML : Examples
1. HelloWorld API
#%RAML 1.0
title: Hello world # required title
/helloworld: # optional resource
get: # HTTP method declaration
responses: # declare a response
200: # HTTP status code
body: # declare content of response
application/json: # media type
type: | # structural definition of a response (schema or type)
{
"title": "Hello world Response",
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
}
example: | # example of how a response looks
{
"message": "Hello world"
}
20
Example - American Flights API
21
RAML : Simulating an API
• You can mock an API to test it before it is implemented. It is useful to
get early feedback from stackholders
• Use the API console and mocking service to run a live simulation in
API designer
• While performing mocking service it returns sample API responses
written in API definition
• Mocking service is available for outside stockholders through
shareable links
• API console is available in API Designer and API Portal in Anypoint
Exchange so users and designers can test it
22
RAML : Modularizing an API
• RAML introduces the innovative concept of resource types and traits
for characterizing and reusing patterns of resources and associated
methods. Using resource types and traits minimizes the
repetition in a RESTful API design and promotes consistency
within and across APIs.
• Instead of putting all the code in one RAML file, you can modularize
it and compose it in reusable fragments
Datatypes Traits
Examples Documentation
Resource Types Annotation
Security Schemes Libraries
23
RAML : Modularizing an API
• API fragments can be stored in different files and folders within a
project
• Fragments can be stored as a separate project in API design center
• Fragments can be stored in a separate RAML fragment in Anypoint
Exchange
24
#%RAML 1.0
title: Example API
version: v1
mediaType: application/json
types:
Users: !include types/users.raml
User: !include types/user.raml
resourceTypes:
collection:
get:
responses:
200:
body:
traits:
secured:
description: Some requests require authentication
queryParameters:
<<methodName>>: # e.g. get:
description: A <<methodName>>-token pair is required # e.g. A get-token pair...
example: <<methodName>>=h8duh3uhhu38 # e.g. get=h8duh3uhhu38
#%RAML 1.0
title: Dropbox API
version: 1
baseUri: https://api.dropbox.com/{version}
securitySchemes:
oauth_2_0:
description: |
Dropbox supports OAuth 2.0 for authenticating all API requests.
type: OAuth 2.0
describedBy:
headers:
Authorization:
description: |
Used to send a valid OAuth 2 access token. Do not use
with the "access_token" query string parameter.
type: string
queryParameters:
access_token:
description: |
Used to send a valid OAuth 2 access token. Do not use with
27
RAML : Engaging users in design phase
• To build a successful API, you should design it iteratively , getting
feedback from developers on usability and functionality along the
way
• To make API accessible, you need to provide ways to developers to
discover the API and play with it
• You can share an API with developers and make it discoverable
using Anypoint Exchange
28
RAML : Publishing an API in Anypoint Exchange
• You can publish RAML API specification and API fragments to the
Anypoint Exchange from API designer
• API portals are automatically created for REST APIs added to
exchange
• An API console for consuming and testing APIs
• An automatically generated API endpoint that uses a mocking
service to allow the API to be tested without having to implement
it
29
● HelloWorld API
● T-Shirt Ordering Service API
● American Flights API
● Banking Payment Process API
● RAML-Examples
Sample APIs : Demo
30
● raml.org : https://raml.org/developers/raml-100-tutorial
● raml.org : https://raml.org/developers/raml-200-tutorial
● https://github.com/raml-org/raml-spec/blob/master/versions/raml-
10/raml-10.md
● RAML-Examples : https://github.com/raml-org/raml-examples
RAML : Further Reading
Get ready to WIN a Special Gift from MuleSoft Community
Quiz Time
You should not be a meetup leader.
In last 30 days you shouldn’t own any trivia quiz in any
meetup.
Important Instructions for the
attendees to play Trivia quiz
1. Log in to www.kahoot.it via your mobile
phone
Click on “Play” on top right hand side of
the web page
Enter the game pin that is displayed on the
quiz master’s screen
Give your complete name as the nickname
You will be getting your questions on your
laptop screen with option.
For every questions you will get 20 sec to
answer.
34
Share:
○ Tweet your pictures using the hashtag #BirminghamMuleSoftMeetup
○ Invite your network to join: https://meetups.mulesoft.com/birmingham/
Feedback:
○ Fill out the survey feedback and suggest topics for upcoming events
○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the
program
What’s next?
Thank You

Más contenido relacionado

La actualidad más candente

Deploying mule applications
Deploying mule applicationsDeploying mule applications
Deploying mule applicationsBhargav Ranjit
 
Mule soft meetup_virtual_ charlotte_2020_final1
Mule soft meetup_virtual_ charlotte_2020_final1Mule soft meetup_virtual_ charlotte_2020_final1
Mule soft meetup_virtual_ charlotte_2020_final1Subhash Patel
 
apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...
apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...
apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...apidays
 
Mule -solutions for data integration
Mule -solutions for data integrationMule -solutions for data integration
Mule -solutions for data integrationD.Rajesh Kumar
 
Magento Developer Talk. Microservice Architecture and Actor Model
Magento Developer Talk. Microservice Architecture and Actor ModelMagento Developer Talk. Microservice Architecture and Actor Model
Magento Developer Talk. Microservice Architecture and Actor ModelIgor Miniailo
 
Mule Concur Connector
Mule Concur ConnectorMule Concur Connector
Mule Concur ConnectorAnkush Sharma
 
Mule esb–api layer
Mule esb–api layerMule esb–api layer
Mule esb–api layerhimajareddys
 
NServiceBus Mule ESB Comparison
NServiceBus Mule ESB ComparisonNServiceBus Mule ESB Comparison
NServiceBus Mule ESB ComparisonMike Byrne
 
Mule sap connector
Mule sap connectorMule sap connector
Mule sap connectorSon Nguyen
 
MuleSoft Meetup Mumbai Mule 4 Presentation Slide
MuleSoft Meetup Mumbai Mule 4 Presentation SlideMuleSoft Meetup Mumbai Mule 4 Presentation Slide
MuleSoft Meetup Mumbai Mule 4 Presentation SlideManish Kumar Yadav
 
MuleSoft CloudHub FAQ
MuleSoft CloudHub FAQMuleSoft CloudHub FAQ
MuleSoft CloudHub FAQShanky Gupta
 
Mule soft cloudhub deployment basics
Mule soft cloudhub deployment basicsMule soft cloudhub deployment basics
Mule soft cloudhub deployment basicsArun Yaligar
 
Mule esb beginner’s guide
Mule esb beginner’s guideMule esb beginner’s guide
Mule esb beginner’s guideD.Rajesh Kumar
 
Java Basics
Java BasicsJava Basics
Java BasicsKhan625
 
Meet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalMeet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalAkshata Sawant
 
Biz talk vs mulesoft
Biz talk vs mulesoftBiz talk vs mulesoft
Biz talk vs mulesoftkeshav Naidu
 

La actualidad más candente (20)

Deploying mule applications
Deploying mule applicationsDeploying mule applications
Deploying mule applications
 
Mule soft meetup_virtual_ charlotte_2020_final1
Mule soft meetup_virtual_ charlotte_2020_final1Mule soft meetup_virtual_ charlotte_2020_final1
Mule soft meetup_virtual_ charlotte_2020_final1
 
Mule oracle connectors
Mule oracle connectorsMule oracle connectors
Mule oracle connectors
 
apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...
apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...
apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...
 
Mule -solutions for data integration
Mule -solutions for data integrationMule -solutions for data integration
Mule -solutions for data integration
 
Magento Developer Talk. Microservice Architecture and Actor Model
Magento Developer Talk. Microservice Architecture and Actor ModelMagento Developer Talk. Microservice Architecture and Actor Model
Magento Developer Talk. Microservice Architecture and Actor Model
 
Mule Concur Connector
Mule Concur ConnectorMule Concur Connector
Mule Concur Connector
 
Mule esb–api layer
Mule esb–api layerMule esb–api layer
Mule esb–api layer
 
NServiceBus Mule ESB Comparison
NServiceBus Mule ESB ComparisonNServiceBus Mule ESB Comparison
NServiceBus Mule ESB Comparison
 
Mule sap connector
Mule sap connectorMule sap connector
Mule sap connector
 
The DNA of a great API
The DNA of a great APIThe DNA of a great API
The DNA of a great API
 
Managing api development
Managing api developmentManaging api development
Managing api development
 
MuleSoft Meetup Mumbai Mule 4 Presentation Slide
MuleSoft Meetup Mumbai Mule 4 Presentation SlideMuleSoft Meetup Mumbai Mule 4 Presentation Slide
MuleSoft Meetup Mumbai Mule 4 Presentation Slide
 
MuleSoft CloudHub FAQ
MuleSoft CloudHub FAQMuleSoft CloudHub FAQ
MuleSoft CloudHub FAQ
 
Mule soft cloudhub deployment basics
Mule soft cloudhub deployment basicsMule soft cloudhub deployment basics
Mule soft cloudhub deployment basics
 
Mule esb beginner’s guide
Mule esb beginner’s guideMule esb beginner’s guide
Mule esb beginner’s guide
 
Java Basics
Java BasicsJava Basics
Java Basics
 
Meet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalMeet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_final
 
Biz talk vs mulesoft
Biz talk vs mulesoftBiz talk vs mulesoft
Biz talk vs mulesoft
 
Mule ESB Intro
Mule ESB IntroMule ESB Intro
Mule ESB Intro
 

Similar a mulesoft birmingham meetup_api_designing_with_raml

A Journey from API Versioning to Canary Release | APIDays Zurich 2017
A Journey from API Versioning to Canary Release | APIDays Zurich 2017A Journey from API Versioning to Canary Release | APIDays Zurich 2017
A Journey from API Versioning to Canary Release | APIDays Zurich 2017Patrice Krakow
 
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
 
Practices and tools for building better APIs
Practices and tools for building better APIsPractices and tools for building better APIs
Practices and tools for building better APIsNLJUG
 
Practices and tools for building better API (JFall 2013)
Practices and tools for building better API (JFall 2013)Practices and tools for building better API (JFall 2013)
Practices and tools for building better API (JFall 2013)Peter Hendriks
 
API Versioning for Zero Downtime | Devoxx Belgium 2017
API Versioning for Zero Downtime | Devoxx Belgium 2017API Versioning for Zero Downtime | Devoxx Belgium 2017
API Versioning for Zero Downtime | Devoxx Belgium 2017Patrice Krakow
 
A Journey from API Versioning to Canary Release | Nordic APIs Platform Summit...
A Journey from API Versioning to Canary Release | Nordic APIs Platform Summit...A Journey from API Versioning to Canary Release | Nordic APIs Platform Summit...
A Journey from API Versioning to Canary Release | Nordic APIs Platform Summit...Patrice Krakow
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)Tom Johnson
 
Faridabad MuleSoft Meetup Group (1).pdf
Faridabad MuleSoft Meetup Group (1).pdfFaridabad MuleSoft Meetup Group (1).pdf
Faridabad MuleSoft Meetup Group (1).pdfRohitSingh585124
 
API Specifications and Best Practices | MuleSoft Mysore Meetup #4
API Specifications and Best Practices | MuleSoft Mysore Meetup #4API Specifications and Best Practices | MuleSoft Mysore Meetup #4
API Specifications and Best Practices | MuleSoft Mysore Meetup #4MysoreMuleSoftMeetup
 
Mule soft meetup__official__feb-27_2021
Mule soft meetup__official__feb-27_2021Mule soft meetup__official__feb-27_2021
Mule soft meetup__official__feb-27_2021sumitahuja94
 
Write Generic Code with the Tooling API
Write Generic Code with the Tooling APIWrite Generic Code with the Tooling API
Write Generic Code with the Tooling APIAdam Olshansky
 
MuleSoft Surat Virtual Meetup#9 - RAML Reusability and Simplified
MuleSoft Surat Virtual Meetup#9 - RAML Reusability and SimplifiedMuleSoft Surat Virtual Meetup#9 - RAML Reusability and Simplified
MuleSoft Surat Virtual Meetup#9 - RAML Reusability and SimplifiedJitendra Bafna
 
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
 
Austin API Summit 2018: Are REST APIs Still Relevant Today?
Austin API Summit 2018: Are REST APIs Still Relevant Today?Austin API Summit 2018: Are REST APIs Still Relevant Today?
Austin API Summit 2018: Are REST APIs Still Relevant Today?LaunchAny
 
Are REST APIs Still Relevant Today?
Are REST APIs Still Relevant Today?Are REST APIs Still Relevant Today?
Are REST APIs Still Relevant Today?Nordic APIs
 

Similar a mulesoft birmingham meetup_api_designing_with_raml (20)

The ins and outs of RAML
The ins and outs of RAMLThe ins and outs of RAML
The ins and outs of RAML
 
Mule raml
Mule ramlMule raml
Mule raml
 
A Journey from API Versioning to Canary Release | APIDays Zurich 2017
A Journey from API Versioning to Canary Release | APIDays Zurich 2017A Journey from API Versioning to Canary Release | APIDays Zurich 2017
A Journey from API Versioning to Canary Release | APIDays Zurich 2017
 
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
 
2.3.anypoint exchange
2.3.anypoint exchange2.3.anypoint exchange
2.3.anypoint exchange
 
Practices and tools for building better APIs
Practices and tools for building better APIsPractices and tools for building better APIs
Practices and tools for building better APIs
 
Practices and tools for building better API (JFall 2013)
Practices and tools for building better API (JFall 2013)Practices and tools for building better API (JFall 2013)
Practices and tools for building better API (JFall 2013)
 
API Versioning for Zero Downtime | Devoxx Belgium 2017
API Versioning for Zero Downtime | Devoxx Belgium 2017API Versioning for Zero Downtime | Devoxx Belgium 2017
API Versioning for Zero Downtime | Devoxx Belgium 2017
 
A Journey from API Versioning to Canary Release | Nordic APIs Platform Summit...
A Journey from API Versioning to Canary Release | Nordic APIs Platform Summit...A Journey from API Versioning to Canary Release | Nordic APIs Platform Summit...
A Journey from API Versioning to Canary Release | Nordic APIs Platform Summit...
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)
 
Api design part 1
Api design part 1Api design part 1
Api design part 1
 
Faridabad MuleSoft Meetup Group (1).pdf
Faridabad MuleSoft Meetup Group (1).pdfFaridabad MuleSoft Meetup Group (1).pdf
Faridabad MuleSoft Meetup Group (1).pdf
 
API Specifications and Best Practices | MuleSoft Mysore Meetup #4
API Specifications and Best Practices | MuleSoft Mysore Meetup #4API Specifications and Best Practices | MuleSoft Mysore Meetup #4
API Specifications and Best Practices | MuleSoft Mysore Meetup #4
 
Mule soft meetup__official__feb-27_2021
Mule soft meetup__official__feb-27_2021Mule soft meetup__official__feb-27_2021
Mule soft meetup__official__feb-27_2021
 
Write Generic Code with the Tooling API
Write Generic Code with the Tooling APIWrite Generic Code with the Tooling API
Write Generic Code with the Tooling API
 
MuleSoft Surat Virtual Meetup#9 - RAML Reusability and Simplified
MuleSoft Surat Virtual Meetup#9 - RAML Reusability and SimplifiedMuleSoft Surat Virtual Meetup#9 - RAML Reusability and Simplified
MuleSoft Surat Virtual Meetup#9 - RAML Reusability and Simplified
 
Empathic API-Design
Empathic API-DesignEmpathic API-Design
Empathic API-Design
 
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
 
Austin API Summit 2018: Are REST APIs Still Relevant Today?
Austin API Summit 2018: Are REST APIs Still Relevant Today?Austin API Summit 2018: Are REST APIs Still Relevant Today?
Austin API Summit 2018: Are REST APIs Still Relevant Today?
 
Are REST APIs Still Relevant Today?
Are REST APIs Still Relevant Today?Are REST APIs Still Relevant Today?
Are REST APIs Still Relevant Today?
 

Último

RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5T.D. Shashikala
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.pdfKamal Acharya
 
Natalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in KrakówNatalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in Krakówbim.edu.pl
 
School management system project report.pdf
School management system project report.pdfSchool management system project report.pdf
School management system project report.pdfKamal Acharya
 
NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...
NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...
NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...Amil baba
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.PrashantGoswami42
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfKamal Acharya
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单
一比一原版(UofT毕业证)多伦多大学毕业证成绩单一比一原版(UofT毕业证)多伦多大学毕业证成绩单
一比一原版(UofT毕业证)多伦多大学毕业证成绩单tuuww
 
1. Henrich Triangle Safety and Fire Presentation
1. Henrich Triangle Safety and Fire Presentation1. Henrich Triangle Safety and Fire Presentation
1. Henrich Triangle Safety and Fire PresentationBhuwanAgrawal8
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdfKamal Acharya
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.MdManikurRahman
 
Supermarket billing system project report..pdf
Supermarket billing system project report..pdfSupermarket billing system project report..pdf
Supermarket billing system project report..pdfKamal Acharya
 
Construction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptxConstruction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptxwendy cai
 
2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edgePaco Orozco
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdfKamal Acharya
 
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdfRESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdfKamal Acharya
 
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdfDR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdfDrGurudutt
 
Dairy management system project report..pdf
Dairy management system project report..pdfDairy management system project report..pdf
Dairy management system project report..pdfKamal Acharya
 
Arduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectArduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectRased Khan
 
RM&IPR M4.pdfResearch Methodolgy & Intellectual Property Rights Series 4
RM&IPR M4.pdfResearch Methodolgy & Intellectual Property Rights Series 4RM&IPR M4.pdfResearch Methodolgy & Intellectual Property Rights Series 4
RM&IPR M4.pdfResearch Methodolgy & Intellectual Property Rights Series 4T.D. Shashikala
 

Último (20)

RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
RM&IPR M5 notes.pdfResearch Methodolgy & Intellectual Property Rights Series 5
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.pdf
 
Natalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in KrakówNatalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in Kraków
 
School management system project report.pdf
School management system project report.pdfSchool management system project report.pdf
School management system project report.pdf
 
NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...
NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...
NO1 Pandit Black Magic Removal in Uk kala jadu Specialist kala jadu for Love ...
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单
一比一原版(UofT毕业证)多伦多大学毕业证成绩单一比一原版(UofT毕业证)多伦多大学毕业证成绩单
一比一原版(UofT毕业证)多伦多大学毕业证成绩单
 
1. Henrich Triangle Safety and Fire Presentation
1. Henrich Triangle Safety and Fire Presentation1. Henrich Triangle Safety and Fire Presentation
1. Henrich Triangle Safety and Fire Presentation
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.
 
Supermarket billing system project report..pdf
Supermarket billing system project report..pdfSupermarket billing system project report..pdf
Supermarket billing system project report..pdf
 
Construction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptxConstruction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptx
 
2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
 
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdfRESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
 
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdfDR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
 
Dairy management system project report..pdf
Dairy management system project report..pdfDairy management system project report..pdf
Dairy management system project report..pdf
 
Arduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectArduino based vehicle speed tracker project
Arduino based vehicle speed tracker project
 
RM&IPR M4.pdfResearch Methodolgy & Intellectual Property Rights Series 4
RM&IPR M4.pdfResearch Methodolgy & Intellectual Property Rights Series 4RM&IPR M4.pdfResearch Methodolgy & Intellectual Property Rights Series 4
RM&IPR M4.pdfResearch Methodolgy & Intellectual Property Rights Series 4
 

mulesoft birmingham meetup_api_designing_with_raml

  • 1. Designing modern APIs using MuleSoft Anypoint Platform : Almost Instantly!! Birmingham MuleSoft Meetup Group 09/17/21
  • 2. Organizer 2 About Organizer: • 15+ years of Technical Experience. • 4+ years of Experience in MuleSoft Architecture. • Certified MuleSoft API Designer. • MuleSoft Meetup Speaker. • Birmingham Mule Meetup Leader. Mohammad Sakif Integration Architect
  • 3. Speaker 3 Sonali Mehta Senior MuleSoft Architect About Speaker: • 15+ years of Technical Experience. • 4+ years of Experience in MuleSoft Architecture. • Certified MuleSoft API Designer. • MuleSoft Mentor • MuleSoft Meetup Speaker.
  • 4. • Both the speaker and host are organizing this meet up in individual capacity, only. We are not representing our companies here. • This presentation is strictly for learning purpose only. Organizer/Presenter do not hold any responsibility that same solution will work for your business requirements also. • This presentation is not meant for any promotional activities. Safe Harbor Statement 4
  • 5. CHEERS..!! We have prizes to give away! 3 Winners a special prize is ready 5 A SHOW OF HANDS: New Members With Us.!!
  • 6. 6 ● Introducing MuleSoft AnyPoint Platform and API LifeCycle ● How to use API Designer to create API Specifications? ● Introducing RAML ● Defining resources , methods , parameters and responses using RAML ● Modularizing an API ● Simulating an API Agenda
  • 7. 7 ● Engaging users in design phase ● Sharing an API ● Publishing an API in Anypoint Exchange ● Example APIs ● Further Reading Agenda
  • 8. Introduction to MuleSoft Anypoint Platform and API LifeCycle
  • 14. 14 Steps for designing API using RAML
  • 15. Introduction to RAML (RESTful API Modelling Language)
  • 16. 16 RAML : RESTful API Modeling Language • RAML is a human- and machine-readable language for the definition of a RESTful application programming interface (API). • RAML is designed to improve the specification of the API by providing a format that the API provider and API consumers can use as a mutual contract. • RAML is based on broadly used standards such as YAML and JSON. • RAML files can be used to auto generate documentations, mocked endpoints , interfaces for API implementations etc. • RAML uses a human readable data serialization format where data structure hierarchy is specified by indentation.
  • 17. 17 RAML : Resources, Methods and Parameters • A resource is a conceptual mapping of an entity or set of entities. • Resources are the objects identified by web service url that you want to act upon using HTTP method used for the request • All resources begin with a slash • Any methods and parameters nested under a resource belong to and act upon that resource • Nested resources are used for a subset of a resource to narrow it • URI parameter which is a variable element, enclosed in curly brackets ({}) inside a relative URI of a resource.
  • 18. 18 RAML : Defining Response And Request Details • Responses must be a map of one or more HTTP status codes • For each response , specify a possible return datatypes along with description and examples • Same as response details, for a request specify each request data type along with description and example
  • 19. 19 RAML : Examples 1. HelloWorld API #%RAML 1.0 title: Hello world # required title /helloworld: # optional resource get: # HTTP method declaration responses: # declare a response 200: # HTTP status code body: # declare content of response application/json: # media type type: | # structural definition of a response (schema or type) { "title": "Hello world Response", "type": "object", "properties": { "message": { "type": "string" } } } example: | # example of how a response looks { "message": "Hello world" }
  • 20. 20 Example - American Flights API
  • 21. 21 RAML : Simulating an API • You can mock an API to test it before it is implemented. It is useful to get early feedback from stackholders • Use the API console and mocking service to run a live simulation in API designer • While performing mocking service it returns sample API responses written in API definition • Mocking service is available for outside stockholders through shareable links • API console is available in API Designer and API Portal in Anypoint Exchange so users and designers can test it
  • 22. 22 RAML : Modularizing an API • RAML introduces the innovative concept of resource types and traits for characterizing and reusing patterns of resources and associated methods. Using resource types and traits minimizes the repetition in a RESTful API design and promotes consistency within and across APIs. • Instead of putting all the code in one RAML file, you can modularize it and compose it in reusable fragments Datatypes Traits Examples Documentation Resource Types Annotation Security Schemes Libraries
  • 23. 23 RAML : Modularizing an API • API fragments can be stored in different files and folders within a project • Fragments can be stored as a separate project in API design center • Fragments can be stored in a separate RAML fragment in Anypoint Exchange
  • 24. 24 #%RAML 1.0 title: Example API version: v1 mediaType: application/json types: Users: !include types/users.raml User: !include types/user.raml resourceTypes: collection: get: responses: 200: body:
  • 25. traits: secured: description: Some requests require authentication queryParameters: <<methodName>>: # e.g. get: description: A <<methodName>>-token pair is required # e.g. A get-token pair... example: <<methodName>>=h8duh3uhhu38 # e.g. get=h8duh3uhhu38
  • 26. #%RAML 1.0 title: Dropbox API version: 1 baseUri: https://api.dropbox.com/{version} securitySchemes: oauth_2_0: description: | Dropbox supports OAuth 2.0 for authenticating all API requests. type: OAuth 2.0 describedBy: headers: Authorization: description: | Used to send a valid OAuth 2 access token. Do not use with the "access_token" query string parameter. type: string queryParameters: access_token: description: | Used to send a valid OAuth 2 access token. Do not use with
  • 27. 27 RAML : Engaging users in design phase • To build a successful API, you should design it iteratively , getting feedback from developers on usability and functionality along the way • To make API accessible, you need to provide ways to developers to discover the API and play with it • You can share an API with developers and make it discoverable using Anypoint Exchange
  • 28. 28 RAML : Publishing an API in Anypoint Exchange • You can publish RAML API specification and API fragments to the Anypoint Exchange from API designer • API portals are automatically created for REST APIs added to exchange • An API console for consuming and testing APIs • An automatically generated API endpoint that uses a mocking service to allow the API to be tested without having to implement it
  • 29. 29 ● HelloWorld API ● T-Shirt Ordering Service API ● American Flights API ● Banking Payment Process API ● RAML-Examples Sample APIs : Demo
  • 30. 30 ● raml.org : https://raml.org/developers/raml-100-tutorial ● raml.org : https://raml.org/developers/raml-200-tutorial ● https://github.com/raml-org/raml-spec/blob/master/versions/raml- 10/raml-10.md ● RAML-Examples : https://github.com/raml-org/raml-examples RAML : Further Reading
  • 31. Get ready to WIN a Special Gift from MuleSoft Community Quiz Time
  • 32. You should not be a meetup leader. In last 30 days you shouldn’t own any trivia quiz in any meetup. Important Instructions for the attendees to play Trivia quiz
  • 33. 1. Log in to www.kahoot.it via your mobile phone Click on “Play” on top right hand side of the web page Enter the game pin that is displayed on the quiz master’s screen Give your complete name as the nickname You will be getting your questions on your laptop screen with option. For every questions you will get 20 sec to answer.
  • 34. 34 Share: ○ Tweet your pictures using the hashtag #BirminghamMuleSoftMeetup ○ Invite your network to join: https://meetups.mulesoft.com/birmingham/ Feedback: ○ Fill out the survey feedback and suggest topics for upcoming events ○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program What’s next?