SlideShare une entreprise Scribd logo
1  sur  31
REST-API’s and
the enterprise
Introduction for architects and project-managers
By Patrick Savalle, innovation architect NN.
CONTENTS
1. API
2. ENTERPRISE
3. REST
PART 1
API-BASICS (GENERAL PRINCIPLES)
Application Programmers Interface
Settling an insurance claim
Part1:~ Api$ Evolution_
• Compile time libraries for a specific language
• Language independent, platform specific, run-time local libraries (e.g. DLL’s
on Win)
• Platform independent, language independent, run-time, non-local libraries
• HTTP-REST, everything on the internet can connect, language independent,
run-time, internet libraries
Same name for many things.
From now on: only REST-API!!!
Part1:~ Api$ What are REST-API’s?_
• Strictly spoken a REST-API is just an interface, a specification: it hides ‘an
implementation’ and standardizes its usage and connectivity
• Pragmatically spoken a REST-API is a library (of functionality) connected
over HTTP(S)
• They are the servers in a client-server model
• These libraries can be built in every programming language
• These libraries can contain any type of functionality: financial services, mail-
service, math, AI, sensor/attenuator, etc.
REST-API’s are the building blocks of the IoT.
REST-API’s can contain (encapsulate) any type of technology.
• Software programs
• Mechanics
• Biologics
• Mechatronics
• Human operators etc.
• Connections to other API’s or systems
Part1:~ Api$ Implementation_
What is inside? How are they implemented?
Everything on the internet can connect to a REST-API:
• Other API’s
• Server applications
• Web applications and web front ends (built with frameworks like AngularJS,
ReactJS, JQuery)
• Terminals
• Mobile app’s, applications etc.
• Machines
Part1:~ Api$ Users_
What is connected? Who are the run-time users?
Part1:~ Api$ API catalogs_
There is an API for everything.
PART 2
ENTERPRISE APPLICATION
Part2:~ Enterprise$ Business perspective_
• The REST-API unlocks new markets and types of customers (machines)
• The REST-API enables new business models
• The right REST-API can transform the enterprise into a IoT platform, the
realm of exponential growth
• It is the universal channel upon which all other channels can be built
What use is a REST-API to the business? It is Product!
Part2:~ Enterprise$ Architects perspective_
• Primary enabler of the digital enterprise
• The REST-API is (should be) the primary unit of modularity of the
enterprise, internally as well as to external clients
• REST-API’s are building blocks that are integrated/combined into business
processes with tools like BPM and apps
• REST-API’s promote autonomy of underlying systems. They also separates
UI/process from basic data manipulation
What is a REST-API to the architect? Modularity!
Part2:~ Enterprise$ Programmers perspective_
• For the programmer that uses an REST-API, it’s just another code-library.
Most API’s come with a language specific ‘wrapper’ that hides the API itself.
To this programmer it no longer makes a difference whether it is REST or
SOAP, or JSON or XML etc.
• Convenience!
What is an API to the consuming programmer?
Part2:~ Enterprise$ Programmers perspective_
• The programmer that creates an API needs a suitable framework. Typically
NOT the same frameworks that are used for traditional web-design.
• API-design is NOT web-design, it’s ‘traditional’ application-design.
• The API-developer does not need visual design or visual UI skills.
• He does need good ‘interface designer’ skills, which means he needs to be
able to switch from his role as an API-creator into that of an API-user.
What is an API to the producing programmer? Deliverable!
Part2:~ Enterprise$ Team perspective_
• Ideally teams are formed around API’s, the operation of the API is their
‘deliverable’, not the API itself.
• Ideally (agile) teams are multidisciplinary: BizDevOps  they not only
develop but also run and support the API
• Ideally all teams have an API / interface designer role
• Teams MUST have autonomy in managing their API’s
What is a REST-API’s to the team? Tool!
Part2:~ Enterprise$ Technology landscape_
• HTTP. The basic communication protocol of the web and thus the
Enterprise
• CORBA. Distributed objects, synchronous inter-process communication
(legacy, deprecated). ‘The enterprise as one big application’
• MQ. Message Queue. Asynchronous, loosely coupled, event-driven inter-
process communication based on message-broadcasts and message-loops
• ESB. Enterprise Service Bus, client-server model, SOA-architecture,
facilitates REST, SOAP -> ‘the enterprise as one big collection of services’
• BPM and MDM. Bussiness process and master data management. Tools
that integrate services into processes
• Streaming data. Simple queueing service, ‘fast data’, real-time, scalable.
• Gateway. ‘The switch board’. Does filtering, authentication, integration,
scaling etc. mostly used in combination / integrated with an ESB
• Web API. An HTTP library, RPC-like, point-to-point. The server in a client-
server combination
Gluing an enterprise together.
v
Part2:~ Enterprise$ REST-API’s and functions_
REST-API’s generally map/represent functions, as in a functional decomposition.
• REST-API’s are designed outside-in, based on client perspective (clients
can be internal)
• Ideally REST-API’s are designed before they are implemented and endpoint
tests should be coded before the REST-API is implemented (test-driven
development)
• REST-API implementations are not based on extensive architectures,
patterns or layering, as integration is typically done in clients (BPM tools,
apps, etc.)  REST-API’s are typically very simple internally
• Consider implementing a REST-API as a (set of) microservices
• The goal should be to have only open REST-API’s / every REST-API should
be open
Part2:~ Enterprise$ Implementation_
Some design and implementation guidelines
Part2:~ Enterprise$ Connecting_
API-connection guidelines
• API gateway is the central hub (routing, authentication, translation, etc.)
• Ideally all internal clients consume API’s (also the external API’s)
through the API gateway
• Customer API’s are exposed only through the API-gateway
• API management is the publication and administration tool for teams
• Internal vs. external / customer facing
• Lifecycle management
• Versioning
• Integration and remixing of API’s
• Access management
• Throttling
• API keys / customer tracking
• Documentation
• Discovery
• Communities
Part2:~ Enterprise$ Api management_
REST-API’s are more than just deliverable
PART 3
REST-BASICS
REST is HTTP/1.1. It is the native protocol of the web. Advantages are:
• Every tool that can handle HTTP, can handle REST as native ‘content’. For
instance gateways, web-servers and browsers can effectively cache, route,
verify, manipulate REST requests or responses.
• In short the whole web supports REST by nature
• It is simple and elegant
• Less diversity in technology, you already use HTTP
See also the dissertation of Roy Fielding:
• https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf
• http://www.cs.colorado.edu/~kena/classes/7818/f08/lectures/lecture_9_fieldi
ng_disserta.pdf
Part3:~ Rest$ WHY REST?_
REST ís HTTP. It is the same protocol. Created by the same designer: Roy Fielding.
Part3:~ Rest$ SOAP vs REST_
• REST is URL-based, SOAP is procedure-based
• REST is not only a protocol, it is also an architectural style (HTTP is the
protocol)
• REST is much simpler, less strict, can use any data format, any
authentication method
• REST is transport-bound (HTTP), SOAP can be used with any transport
protocol (even SMTP for instance, or REST)
• REST is more scalable, more efficient, client-side cacheable, etc.
See also: https://www.quora.com/What-is-the-difference-between-a-SOAP-
API-and-a-REST-API/answers/19883425
Part3:~ Rest$ PROTOCOL_
HTTP is a plain text conversation between
a client and a server. The conversation is
based on actions performed on resources
which are addressed by URL’s.
Part3:~ Rest$ ENDPOINTS_
The REST protocol is based on ‘endpoints’, which are
operations on resources addressed by URL’s.
Endpoints can be bundled to form an API.
ACTION RESOURCE
<verb> https://<host>/<api_version>[/<resource_type>/<instance_id>]
GET https://animal.api/1/lions (returns collection)
GET https://animal.api/1/lions/harry@lion.com (returns single lion)
POST https://animal.api/1/lions (create new element)
PUT https://animal.api/1/lions/harry@lion.com (updates element)
PATCH https://animal.api/1/lions/harry@lion.com (partial update)
DELETE https://animal.api/1/lions (deletes collection)
DELETE https://animal.api/1/lions/harry@lion.com (deletes single element)
GET http://www.example.com/1/customers/33245/orders/8769/lineitems/1
GET https://animal.api/1/lions?start=100&count=50
GET https://animal.api/1/lions?id=100&id=103&id=107 (array)
Part3:~ Rest$ ACTION + RESOURCE_
An endpoint has a very strict URL structure. This is key to
‘REST’. Map your functional application resources onto the WWW
and allow them to be manipulated.
Part1:~ Api$ Maslov’s API_
Good API, bad API, first things first!

Contenu connexe

Tendances

Creating Web Services with Zend Framework - Matthew Turland
Creating Web Services with Zend Framework - Matthew TurlandCreating Web Services with Zend Framework - Matthew Turland
Creating Web Services with Zend Framework - Matthew Turland
Matthew Turland
 

Tendances (20)

What is an API?
What is an API?What is an API?
What is an API?
 
REST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterREST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in Codeigniter
 
Introduction to the Web API
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web API
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & Development
 
Creating Web Services with Zend Framework - Matthew Turland
Creating Web Services with Zend Framework - Matthew TurlandCreating Web Services with Zend Framework - Matthew Turland
Creating Web Services with Zend Framework - Matthew Turland
 
Basic auth implementation using raml in mule
Basic auth implementation using raml in muleBasic auth implementation using raml in mule
Basic auth implementation using raml in mule
 
Api Testing
Api TestingApi Testing
Api Testing
 
API design principles for accelerated development
API design principles for accelerated developmentAPI design principles for accelerated development
API design principles for accelerated development
 
Restful api design
Restful api designRestful api design
Restful api design
 
Postman. From simple API test to end to end scenario
Postman. From simple API test to end to end scenarioPostman. From simple API test to end to end scenario
Postman. From simple API test to end to end scenario
 
Web API testing : A quick glance
Web API testing : A quick glanceWeb API testing : A quick glance
Web API testing : A quick glance
 
Raml part 1
Raml part 1Raml part 1
Raml part 1
 
REST API Doc Best Practices
REST API Doc Best PracticesREST API Doc Best Practices
REST API Doc Best Practices
 
Mocking APIs Collaboratively with Postman
Mocking APIs Collaboratively with PostmanMocking APIs Collaboratively with Postman
Mocking APIs Collaboratively with Postman
 
API Design- Best Practices
API Design-   Best PracticesAPI Design-   Best Practices
API Design- Best Practices
 
API Testing. Streamline your testing process.
API Testing. Streamline your testing process.API Testing. Streamline your testing process.
API Testing. Streamline your testing process.
 
Rest api and-crud-api
Rest api and-crud-apiRest api and-crud-api
Rest api and-crud-api
 
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
 
Test in Rest. API testing with the help of Rest Assured.
Test in Rest. API testing with the help of  Rest Assured.Test in Rest. API testing with the help of  Rest Assured.
Test in Rest. API testing with the help of Rest Assured.
 
API Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNGAPI Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNG
 

Similaire à REST-API's for architects and managers

WSO2 ESB Integration with REST
WSO2 ESB Integration with RESTWSO2 ESB Integration with REST
WSO2 ESB Integration with REST
WSO2
 
Role of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EIRole of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EI
WSO2
 
APIs : Mapping the way
APIs : Mapping the wayAPIs : Mapping the way
APIs : Mapping the way
WSO2
 

Similaire à REST-API's for architects and managers (20)

Api design part 1
Api design part 1Api design part 1
Api design part 1
 
WSO2 ESB Integration with REST
WSO2 ESB Integration with RESTWSO2 ESB Integration with REST
WSO2 ESB Integration with REST
 
Role of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EIRole of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EI
 
Microservices&amp;ap imanagement
Microservices&amp;ap imanagementMicroservices&amp;ap imanagement
Microservices&amp;ap imanagement
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
 
RefCard API Architecture Strategy
RefCard API Architecture StrategyRefCard API Architecture Strategy
RefCard API Architecture Strategy
 
Top 7 wrong common beliefs about Enterprise API implementation
Top 7 wrong common beliefs about Enterprise API implementationTop 7 wrong common beliefs about Enterprise API implementation
Top 7 wrong common beliefs about Enterprise API implementation
 
Octo API-days 2015
Octo API-days 2015Octo API-days 2015
Octo API-days 2015
 
APIs : Mapping the way
APIs : Mapping the wayAPIs : Mapping the way
APIs : Mapping the way
 
Best practices and advantages of REST APIs
Best practices and advantages of REST APIsBest practices and advantages of REST APIs
Best practices and advantages of REST APIs
 
APIdays 2016 - The State of Web API Languages
APIdays 2016  - The State of Web API LanguagesAPIdays 2016  - The State of Web API Languages
APIdays 2016 - The State of Web API Languages
 
Extend soa with api management Sangam18
Extend soa with api management Sangam18Extend soa with api management Sangam18
Extend soa with api management Sangam18
 
How to design effective APIs
How to design effective APIsHow to design effective APIs
How to design effective APIs
 
Effective API Design
Effective API DesignEffective API Design
Effective API Design
 
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...
 
Hia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economyHia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economy
 
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
 
Getting to Grips with RESTful APIs
Getting to Grips with RESTful APIsGetting to Grips with RESTful APIs
Getting to Grips with RESTful APIs
 
APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013
 
From Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesFrom Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web Sites
 

Plus de Patrick Savalle

The future of work, a whitepaper
The future of work, a whitepaperThe future of work, a whitepaper
The future of work, a whitepaper
Patrick Savalle
 

Plus de Patrick Savalle (14)

REST-API design patterns
REST-API design patternsREST-API design patterns
REST-API design patterns
 
State of technology and innovation (2017 edition)
State of technology and innovation  (2017 edition)State of technology and innovation  (2017 edition)
State of technology and innovation (2017 edition)
 
A bitcoin and blockchain primer
A bitcoin and blockchain primerA bitcoin and blockchain primer
A bitcoin and blockchain primer
 
A quick review of (near future) disruptions and innovations.
A quick review of (near future) disruptions and innovations.A quick review of (near future) disruptions and innovations.
A quick review of (near future) disruptions and innovations.
 
Bitcoin presentation deltalloyd
Bitcoin presentation deltalloydBitcoin presentation deltalloyd
Bitcoin presentation deltalloyd
 
The future of work, a whitepaper
The future of work, a whitepaperThe future of work, a whitepaper
The future of work, a whitepaper
 
TeamPark book (english) part 1, vision and inspiration
TeamPark book (english)  part 1, vision and inspirationTeamPark book (english)  part 1, vision and inspiration
TeamPark book (english) part 1, vision and inspiration
 
TeamPark book (english) part 2, platform and method
TeamPark book (english)   part 2, platform and methodTeamPark book (english)   part 2, platform and method
TeamPark book (english) part 2, platform and method
 
TeamPark: platform en methode
TeamPark: platform en methodeTeamPark: platform en methode
TeamPark: platform en methode
 
TeamPark: inspiratie en visie
TeamPark: inspiratie en visieTeamPark: inspiratie en visie
TeamPark: inspiratie en visie
 
Social Platform Design
Social Platform DesignSocial Platform Design
Social Platform Design
 
Build the socially integrated organization with the TeamPark-method
Build the socially integrated organization with the TeamPark-methodBuild the socially integrated organization with the TeamPark-method
Build the socially integrated organization with the TeamPark-method
 
TeamPark: Alternatieve presentatie (NL)
TeamPark: Alternatieve presentatie (NL)TeamPark: Alternatieve presentatie (NL)
TeamPark: Alternatieve presentatie (NL)
 
Building Intelligent Organizations with Sogeti TeamPark
Building Intelligent Organizations with Sogeti TeamParkBuilding Intelligent Organizations with Sogeti TeamPark
Building Intelligent Organizations with Sogeti TeamPark
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

REST-API's for architects and managers

  • 1. REST-API’s and the enterprise Introduction for architects and project-managers By Patrick Savalle, innovation architect NN.
  • 5.
  • 7. Part1:~ Api$ Evolution_ • Compile time libraries for a specific language • Language independent, platform specific, run-time local libraries (e.g. DLL’s on Win) • Platform independent, language independent, run-time, non-local libraries • HTTP-REST, everything on the internet can connect, language independent, run-time, internet libraries Same name for many things.
  • 8. From now on: only REST-API!!!
  • 9. Part1:~ Api$ What are REST-API’s?_ • Strictly spoken a REST-API is just an interface, a specification: it hides ‘an implementation’ and standardizes its usage and connectivity • Pragmatically spoken a REST-API is a library (of functionality) connected over HTTP(S) • They are the servers in a client-server model • These libraries can be built in every programming language • These libraries can contain any type of functionality: financial services, mail- service, math, AI, sensor/attenuator, etc. REST-API’s are the building blocks of the IoT.
  • 10. REST-API’s can contain (encapsulate) any type of technology. • Software programs • Mechanics • Biologics • Mechatronics • Human operators etc. • Connections to other API’s or systems Part1:~ Api$ Implementation_ What is inside? How are they implemented?
  • 11. Everything on the internet can connect to a REST-API: • Other API’s • Server applications • Web applications and web front ends (built with frameworks like AngularJS, ReactJS, JQuery) • Terminals • Mobile app’s, applications etc. • Machines Part1:~ Api$ Users_ What is connected? Who are the run-time users?
  • 12. Part1:~ Api$ API catalogs_ There is an API for everything.
  • 14. Part2:~ Enterprise$ Business perspective_ • The REST-API unlocks new markets and types of customers (machines) • The REST-API enables new business models • The right REST-API can transform the enterprise into a IoT platform, the realm of exponential growth • It is the universal channel upon which all other channels can be built What use is a REST-API to the business? It is Product!
  • 15. Part2:~ Enterprise$ Architects perspective_ • Primary enabler of the digital enterprise • The REST-API is (should be) the primary unit of modularity of the enterprise, internally as well as to external clients • REST-API’s are building blocks that are integrated/combined into business processes with tools like BPM and apps • REST-API’s promote autonomy of underlying systems. They also separates UI/process from basic data manipulation What is a REST-API to the architect? Modularity!
  • 16. Part2:~ Enterprise$ Programmers perspective_ • For the programmer that uses an REST-API, it’s just another code-library. Most API’s come with a language specific ‘wrapper’ that hides the API itself. To this programmer it no longer makes a difference whether it is REST or SOAP, or JSON or XML etc. • Convenience! What is an API to the consuming programmer?
  • 17. Part2:~ Enterprise$ Programmers perspective_ • The programmer that creates an API needs a suitable framework. Typically NOT the same frameworks that are used for traditional web-design. • API-design is NOT web-design, it’s ‘traditional’ application-design. • The API-developer does not need visual design or visual UI skills. • He does need good ‘interface designer’ skills, which means he needs to be able to switch from his role as an API-creator into that of an API-user. What is an API to the producing programmer? Deliverable!
  • 18. Part2:~ Enterprise$ Team perspective_ • Ideally teams are formed around API’s, the operation of the API is their ‘deliverable’, not the API itself. • Ideally (agile) teams are multidisciplinary: BizDevOps  they not only develop but also run and support the API • Ideally all teams have an API / interface designer role • Teams MUST have autonomy in managing their API’s What is a REST-API’s to the team? Tool!
  • 19. Part2:~ Enterprise$ Technology landscape_ • HTTP. The basic communication protocol of the web and thus the Enterprise • CORBA. Distributed objects, synchronous inter-process communication (legacy, deprecated). ‘The enterprise as one big application’ • MQ. Message Queue. Asynchronous, loosely coupled, event-driven inter- process communication based on message-broadcasts and message-loops • ESB. Enterprise Service Bus, client-server model, SOA-architecture, facilitates REST, SOAP -> ‘the enterprise as one big collection of services’ • BPM and MDM. Bussiness process and master data management. Tools that integrate services into processes • Streaming data. Simple queueing service, ‘fast data’, real-time, scalable. • Gateway. ‘The switch board’. Does filtering, authentication, integration, scaling etc. mostly used in combination / integrated with an ESB • Web API. An HTTP library, RPC-like, point-to-point. The server in a client- server combination Gluing an enterprise together.
  • 20. v Part2:~ Enterprise$ REST-API’s and functions_ REST-API’s generally map/represent functions, as in a functional decomposition.
  • 21. • REST-API’s are designed outside-in, based on client perspective (clients can be internal) • Ideally REST-API’s are designed before they are implemented and endpoint tests should be coded before the REST-API is implemented (test-driven development) • REST-API implementations are not based on extensive architectures, patterns or layering, as integration is typically done in clients (BPM tools, apps, etc.)  REST-API’s are typically very simple internally • Consider implementing a REST-API as a (set of) microservices • The goal should be to have only open REST-API’s / every REST-API should be open Part2:~ Enterprise$ Implementation_ Some design and implementation guidelines
  • 22. Part2:~ Enterprise$ Connecting_ API-connection guidelines • API gateway is the central hub (routing, authentication, translation, etc.) • Ideally all internal clients consume API’s (also the external API’s) through the API gateway • Customer API’s are exposed only through the API-gateway • API management is the publication and administration tool for teams
  • 23. • Internal vs. external / customer facing • Lifecycle management • Versioning • Integration and remixing of API’s • Access management • Throttling • API keys / customer tracking • Documentation • Discovery • Communities Part2:~ Enterprise$ Api management_ REST-API’s are more than just deliverable
  • 25.
  • 26. REST is HTTP/1.1. It is the native protocol of the web. Advantages are: • Every tool that can handle HTTP, can handle REST as native ‘content’. For instance gateways, web-servers and browsers can effectively cache, route, verify, manipulate REST requests or responses. • In short the whole web supports REST by nature • It is simple and elegant • Less diversity in technology, you already use HTTP See also the dissertation of Roy Fielding: • https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf • http://www.cs.colorado.edu/~kena/classes/7818/f08/lectures/lecture_9_fieldi ng_disserta.pdf Part3:~ Rest$ WHY REST?_ REST ís HTTP. It is the same protocol. Created by the same designer: Roy Fielding.
  • 27. Part3:~ Rest$ SOAP vs REST_ • REST is URL-based, SOAP is procedure-based • REST is not only a protocol, it is also an architectural style (HTTP is the protocol) • REST is much simpler, less strict, can use any data format, any authentication method • REST is transport-bound (HTTP), SOAP can be used with any transport protocol (even SMTP for instance, or REST) • REST is more scalable, more efficient, client-side cacheable, etc. See also: https://www.quora.com/What-is-the-difference-between-a-SOAP- API-and-a-REST-API/answers/19883425
  • 28. Part3:~ Rest$ PROTOCOL_ HTTP is a plain text conversation between a client and a server. The conversation is based on actions performed on resources which are addressed by URL’s.
  • 29. Part3:~ Rest$ ENDPOINTS_ The REST protocol is based on ‘endpoints’, which are operations on resources addressed by URL’s. Endpoints can be bundled to form an API.
  • 30. ACTION RESOURCE <verb> https://<host>/<api_version>[/<resource_type>/<instance_id>] GET https://animal.api/1/lions (returns collection) GET https://animal.api/1/lions/harry@lion.com (returns single lion) POST https://animal.api/1/lions (create new element) PUT https://animal.api/1/lions/harry@lion.com (updates element) PATCH https://animal.api/1/lions/harry@lion.com (partial update) DELETE https://animal.api/1/lions (deletes collection) DELETE https://animal.api/1/lions/harry@lion.com (deletes single element) GET http://www.example.com/1/customers/33245/orders/8769/lineitems/1 GET https://animal.api/1/lions?start=100&count=50 GET https://animal.api/1/lions?id=100&id=103&id=107 (array) Part3:~ Rest$ ACTION + RESOURCE_ An endpoint has a very strict URL structure. This is key to ‘REST’. Map your functional application resources onto the WWW and allow them to be manipulated.
  • 31. Part1:~ Api$ Maslov’s API_ Good API, bad API, first things first!

Notes de l'éditeur

  1. Voorbeeld van een set REST-API methode. Deze is geprogrammeerd in PHP 7.1 en je ziet de automatisch gegenereerde quick reference op de root van het API-domein.
  2. In the basis HTTP is a text oriented protocol. You can use TELNET to construct and send requests.