SlideShare a Scribd company logo
1 of 20
April 04, 2024
Dublin MuleSoft Meetup Group
API Design using Anypoint Studio
#MuleSoftMeetups
Organizers
Kunal Gupta has over 9 years of dedicated work experience in Integration Development, Execution, and
Delivery.
Extensive involvement in diverse project implementations, placing a strong emphasis on API Management,
including Analysis, Design, Development, and Implementation.
Linkedin - Kunal Gupta | LinkedIn
Speaker
3
Afreen is a MuleSoft mentor and working as a Mulesoft Developer at Zurich Insurance.
She has great experience in Integration, development, execution and delivery using the
MuleSoft products and offerings. Afreen has completed the following certifications -
1. MCD Level 1
2. MCPA and MCIA
Linkedin - Afreen Fatma | LinkedIn
4
AGENDA
• Introduction: Fundamentals of RAML
• API Specification vs API Fragment
• Different fragment types and their usage
1. Traits
2. Library
3. Data Type
4. Examples
5. Resource Type
6. Security Scheme
• Best Practices
• Demo
Fundamentals of RAML
5
Fundamentals of RAML
6
What is RAML ?
1. RAML stands for RESTful API Modeling Language.
2. It is a YAML based Language for describing RESTful APIs.
3. It provides a structured, clear format for describing an API.
4. It is designed to promote reuse, readability, and shared understanding among users.
Fundamentals of RAML
7
Why do we need RAML?
1. Clear documentation
2. Code Reusability
3. Collaboration
4. API Mocking
API Specification vs API Fragment
8
• An API fragment is a portion of an API specification, which is
why understanding it starts at the API specification level.
• An API specification consists of a plan of how your API should
look structurally.
API Fragment
9
API fragments are reusable component of RAML to make the
design and build of a reusable API even quicker and easier.
Another advantage of building an API spec out of reusable API
fragments is that consistency of definitions reduces the effort of
implementing APIs.
10
Different types of API Fragment
11
Traits
• Mulesoft traits, serves as a powerful tool for enhancing integration
projects.
• A “trait” typically refers to a reusable configuration or behaviour that
you can apply to one or more elements within your mulesoft project.
• Traits are a way to define a set of common properties,
configurations, or behaviours that can be shared among different
components, such as connectors, flows, and error handlers.
• They enhance the reusability and maintainability of your integration
projects by allowing you to define common settings in a central
location and apply them consistently.
Different types of API Fragment
12
Library
• A library is a RAML fragment that contains reusable definitions and
can be included in other API specifications as well.
• Example: A library could contain dataTypes, traits, and
resourceTypes that are common across multiple APIs.
• Benefits: Libraries help in organizing and maintaining common
definitions in a central place.
Different types of API Fragment
13
DataTypes
• DataTypes in RAML fragment are way to define the structure of
data that is sent or received.
• Example: A datatype could define a ‘User’ object with properties
such as ‘name’, ‘email’ and ‘age’.
• Benefits: DataTypes ensure the consistency of data structure
across the API and can be reused across multiple APIs.
Different types of API Fragment
14
Examples
• Examples are a way to shoe a sample payload for a method in your
API.
• Example: An example of a ‘User’ datatype could show a sample
JSON object with ‘name’, ‘email’ and ‘age’.
• Benefits: Examples provide a way for developers to understand the
expected request or response structure.
Different types of API Fragment
15
Resource Type
• Resource types are reusable components that can be applied to
multiple resources.
• Example: A resource type could define a ‘collection’ of items with
‘get’, ‘post’, ‘put’, and ‘delete’ methods.
• Benefits: Resource Types allow for the reuse of common resource
behaviours and reduce the need for repeated specification.
Different types of API Fragment
16
Security Scheme
• Security schemes are defined ways to secure an API and can be
applied to multiple methods or resources.
• Example: A security scheme could define an OAuth 2.0 security
flow.
• Benefits: Security schemes ensure the consistency of API security
and can be reused across multiple APIs.
Best Practices
● Start with the API Consumer in mind
● Use Restful principles
● Utilize API Fragments
● Follow consistent naming conventions
● Use HTTP status codes appropriately
● Leverage API-led connectivity
● Version your APIs
● Secure your APIs
● Documentation
17
Reference
18
 Overview of API Fragments Design Strategies | MuleSoft Blog
 RAML 101: Libraries and DataTypes Fragments | by Jonathan
Stoikovitch | RAML by Example | Medium
 API Best Practices: How to Design and Manage APIs | MuleSoft
 API Fragments and Why They Matter – PlektonLabs
 Why API Specs Are the Backbone of Successful Development |
Ready, Set, Cloud! (readysetcloud.io)
Q & A Session
Thank you

More Related Content

Similar to Dublin_mulesoft_meetup_API_specifications.pptx

Project_Goibibo information technology automation testing.pptx
Project_Goibibo information technology automation testing.pptxProject_Goibibo information technology automation testing.pptx
Project_Goibibo information technology automation testing.pptx
skhushi9980
 

Similar to Dublin_mulesoft_meetup_API_specifications.pptx (20)

Api design part 1
Api design part 1Api design part 1
Api design part 1
 
Prominent Back-end frameworks to consider in 2022!
Prominent Back-end frameworks to consider in 2022!Prominent Back-end frameworks to consider in 2022!
Prominent Back-end frameworks to consider in 2022!
 
08 hopex v next service fabric
08 hopex v next   service fabric08 hopex v next   service fabric
08 hopex v next service fabric
 
12 factor app - Core Guidelines To Cloud Ready Solutions
12 factor app - Core Guidelines To Cloud Ready Solutions12 factor app - Core Guidelines To Cloud Ready Solutions
12 factor app - Core Guidelines To Cloud Ready Solutions
 
SLASH IMAGINE: The #1 Midjourney API.pdf
SLASH IMAGINE: The #1 Midjourney API.pdfSLASH IMAGINE: The #1 Midjourney API.pdf
SLASH IMAGINE: The #1 Midjourney API.pdf
 
Rails interview questions
Rails interview questionsRails interview questions
Rails interview questions
 
REST != WebAPI
REST != WebAPIREST != WebAPI
REST != WebAPI
 
Microservice Pattern Launguage
Microservice Pattern LaunguageMicroservice Pattern Launguage
Microservice Pattern Launguage
 
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
Global Azure 2022 - Architecting Modern Serverless APIs with Azure Functions ...
 
Who Should Consider Using Laravel for Web Development?
Who Should Consider Using Laravel for Web Development?Who Should Consider Using Laravel for Web Development?
Who Should Consider Using Laravel for Web Development?
 
SpringCloudConfig.pptx.pdf
SpringCloudConfig.pptx.pdfSpringCloudConfig.pptx.pdf
SpringCloudConfig.pptx.pdf
 
Django Rest Framework - Building a Web API
Django Rest Framework - Building a Web APIDjango Rest Framework - Building a Web API
Django Rest Framework - Building a Web API
 
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
APIs from the Edge to the Mesh
APIs from the Edge to the MeshAPIs from the Edge to the Mesh
APIs from the Edge to the Mesh
 
Unit 5- Cloud Applications.pdf
Unit 5- Cloud Applications.pdfUnit 5- Cloud Applications.pdf
Unit 5- Cloud Applications.pdf
 
Exploiting the value of Dublin Core through pragmatic development
Exploiting the value of Dublin Core through pragmatic developmentExploiting the value of Dublin Core through pragmatic development
Exploiting the value of Dublin Core through pragmatic development
 
Project_Goibibo information technology automation testing.pptx
Project_Goibibo information technology automation testing.pptxProject_Goibibo information technology automation testing.pptx
Project_Goibibo information technology automation testing.pptx
 
Creating a RESTful api without losing too much sleep
Creating a RESTful api without losing too much sleepCreating a RESTful api without losing too much sleep
Creating a RESTful api without losing too much sleep
 
Laravel Web Development: A Comprehensive Guide
Laravel Web Development: A Comprehensive GuideLaravel Web Development: A Comprehensive Guide
Laravel Web Development: A Comprehensive Guide
 

Recently uploaded

Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 

Recently uploaded (20)

الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 

Dublin_mulesoft_meetup_API_specifications.pptx

  • 1. April 04, 2024 Dublin MuleSoft Meetup Group API Design using Anypoint Studio
  • 2. #MuleSoftMeetups Organizers Kunal Gupta has over 9 years of dedicated work experience in Integration Development, Execution, and Delivery. Extensive involvement in diverse project implementations, placing a strong emphasis on API Management, including Analysis, Design, Development, and Implementation. Linkedin - Kunal Gupta | LinkedIn
  • 3. Speaker 3 Afreen is a MuleSoft mentor and working as a Mulesoft Developer at Zurich Insurance. She has great experience in Integration, development, execution and delivery using the MuleSoft products and offerings. Afreen has completed the following certifications - 1. MCD Level 1 2. MCPA and MCIA Linkedin - Afreen Fatma | LinkedIn
  • 4. 4 AGENDA • Introduction: Fundamentals of RAML • API Specification vs API Fragment • Different fragment types and their usage 1. Traits 2. Library 3. Data Type 4. Examples 5. Resource Type 6. Security Scheme • Best Practices • Demo
  • 6. Fundamentals of RAML 6 What is RAML ? 1. RAML stands for RESTful API Modeling Language. 2. It is a YAML based Language for describing RESTful APIs. 3. It provides a structured, clear format for describing an API. 4. It is designed to promote reuse, readability, and shared understanding among users.
  • 7. Fundamentals of RAML 7 Why do we need RAML? 1. Clear documentation 2. Code Reusability 3. Collaboration 4. API Mocking
  • 8. API Specification vs API Fragment 8 • An API fragment is a portion of an API specification, which is why understanding it starts at the API specification level. • An API specification consists of a plan of how your API should look structurally.
  • 9. API Fragment 9 API fragments are reusable component of RAML to make the design and build of a reusable API even quicker and easier. Another advantage of building an API spec out of reusable API fragments is that consistency of definitions reduces the effort of implementing APIs.
  • 10. 10
  • 11. Different types of API Fragment 11 Traits • Mulesoft traits, serves as a powerful tool for enhancing integration projects. • A “trait” typically refers to a reusable configuration or behaviour that you can apply to one or more elements within your mulesoft project. • Traits are a way to define a set of common properties, configurations, or behaviours that can be shared among different components, such as connectors, flows, and error handlers. • They enhance the reusability and maintainability of your integration projects by allowing you to define common settings in a central location and apply them consistently.
  • 12. Different types of API Fragment 12 Library • A library is a RAML fragment that contains reusable definitions and can be included in other API specifications as well. • Example: A library could contain dataTypes, traits, and resourceTypes that are common across multiple APIs. • Benefits: Libraries help in organizing and maintaining common definitions in a central place.
  • 13. Different types of API Fragment 13 DataTypes • DataTypes in RAML fragment are way to define the structure of data that is sent or received. • Example: A datatype could define a ‘User’ object with properties such as ‘name’, ‘email’ and ‘age’. • Benefits: DataTypes ensure the consistency of data structure across the API and can be reused across multiple APIs.
  • 14. Different types of API Fragment 14 Examples • Examples are a way to shoe a sample payload for a method in your API. • Example: An example of a ‘User’ datatype could show a sample JSON object with ‘name’, ‘email’ and ‘age’. • Benefits: Examples provide a way for developers to understand the expected request or response structure.
  • 15. Different types of API Fragment 15 Resource Type • Resource types are reusable components that can be applied to multiple resources. • Example: A resource type could define a ‘collection’ of items with ‘get’, ‘post’, ‘put’, and ‘delete’ methods. • Benefits: Resource Types allow for the reuse of common resource behaviours and reduce the need for repeated specification.
  • 16. Different types of API Fragment 16 Security Scheme • Security schemes are defined ways to secure an API and can be applied to multiple methods or resources. • Example: A security scheme could define an OAuth 2.0 security flow. • Benefits: Security schemes ensure the consistency of API security and can be reused across multiple APIs.
  • 17. Best Practices ● Start with the API Consumer in mind ● Use Restful principles ● Utilize API Fragments ● Follow consistent naming conventions ● Use HTTP status codes appropriately ● Leverage API-led connectivity ● Version your APIs ● Secure your APIs ● Documentation 17
  • 18. Reference 18  Overview of API Fragments Design Strategies | MuleSoft Blog  RAML 101: Libraries and DataTypes Fragments | by Jonathan Stoikovitch | RAML by Example | Medium  API Best Practices: How to Design and Manage APIs | MuleSoft  API Fragments and Why They Matter – PlektonLabs  Why API Specs Are the Backbone of Successful Development | Ready, Set, Cloud! (readysetcloud.io)
  • 19. Q & A Session