This document provides an introduction and overview of web services and RESTful APIs. It discusses the benefits of separating an application into logical layers and exposing business logic through services. It defines web services, microservices, and REST principles. It explains how RESTful resources are addressed with URIs and represented with formats like JSON. It outlines the HTTP methods GET, POST, PUT, PATCH, and DELETE and how they map to create, retrieve, update, and delete operations. It also covers SOAP and challenges it addresses compared to REST. Finally, it discusses HTTP status codes for indicating success and error responses.
Overview of REST web service concepts (Representational State Transfer).
REST is a radically different approach for web services compared to the combo SOAP/WSDL.
REST defines an architectural style for web applications and web services.
REST makes heavy use of the underlying HTTP protocol.
REST itself is not a protocol but defines architectural principles based on the concept of addressable resources and a uniform access to these resources based on the well-known HTTP-methods GET, POST, PUT and DELETE.
The state of a client (web service consumer) is controlled by the REST web service through connected links between resources (resource oriented architecture). The client state however is stored on the client itself thus greatly increasing scalability of REST-based architectures.
The REST paradigm has mostly superseded SOAP / WSDL type web services in many enterprise applications. This is largely owed to the fact that the underlying HTTP protocol is well understood and proved its scalability in the WWW.
Overview of REST web service concepts (Representational State Transfer).
REST is a radically different approach for web services compared to the combo SOAP/WSDL.
REST defines an architectural style for web applications and web services.
REST makes heavy use of the underlying HTTP protocol.
REST itself is not a protocol but defines architectural principles based on the concept of addressable resources and a uniform access to these resources based on the well-known HTTP-methods GET, POST, PUT and DELETE.
The state of a client (web service consumer) is controlled by the REST web service through connected links between resources (resource oriented architecture). The client state however is stored on the client itself thus greatly increasing scalability of REST-based architectures.
The REST paradigm has mostly superseded SOAP / WSDL type web services in many enterprise applications. This is largely owed to the fact that the underlying HTTP protocol is well understood and proved its scalability in the WWW.
Introduces "Slug" a web crawler (or "Scutter") designed for harvesting semantic web content. Implemented in Java using the Jena API, Slug provides a configurable, modular framework that allows a great degree of flexibility in configuring the retrieval, processing and storage of harvested content. The framework provides an RDF vocabulary for describing crawler configurations and collects metadata concerning crawling activity. Crawler metadata allows for reporting and analysis of crawling progress, as well as more efficient retrieval through the storage of HTTP caching data.
A set of slides that provides a high-level overview of the W3C Linked Data Platform specification presented at the 4th Linked Data in Architecture and Construction Workshop.
For more detailed and technical version of the presentation, please refer to
http://www.slideshare.net/nandana/learning-w3c-linked-data-platform-with-examples
LDAC 2016 programme
http://smartcity.linkeddata.es/LDAC2016/#programme
The W3C Linked Data Platform (LDP) specification describes a set of best practices and simple approach for a read-write Linked Data architecture, based on HTTP access to web resources that describe their state using the RDF data model. This presentation provides a set of simple examples that illustrates how an LDP client can interact with an LDP server in the context of a read-write Linked Data application i.e. how to use the LDP protocol for retrieving, updating, creating and deleting Linked Data resources.
This presentation covers basics of RESTful webservices. I have prepared it by reading different online tutorials. One of them is java brains video tutorial. Hope this helps some one.
If any one needs examples mentioned in the slides, please contact me.
Representational State Transfer (REST) and HATEOASGuy K. Kloss
Lecture from Auckland University of Technology in the Service-Oriented Architecture for the Master's course in Service-Oriented Computing (semester 2, 2013)
An introduction to REST and RESTful web services.
You can take the course below to learn about REST & RESTful web services.
https://www.udemy.com/building-php-restful-web-services/
This paper proposes a mapping of the Linked Data Platform (LDP) specification for Constrained Application Protocol (CoAP). Main motivation stems from the fact that LDP W3C Recommendation presents resource management primitives for HTTP only. A general translation of LDP-HTTP requests and responses is provided, as well as a framework for HTTP-to-CoAP proxying. Experiments have been carried out using the LDP W3C Test Suite.
When we discuss APIs, most people immediately think of OAuth, GET and POST, and JSON. Few people think of the underlying concepts of nouns and verbs, idempotence, and uniform interfaces. Even less consider how we can combine these concepts into hypermedia to build APIs that are useful, logical, and future-friendly. Join us as we combine the basics, explore the larger concepts, and look at the standards that are leading the way.
This slide show is from my presentation on what JSON and REST are. It aims to provide a number of talking points by comparing apples and oranges (JSON vs. XML and REST vs. web services).
The glory of REST in Java: Spring HATEOAS, RAML, Temenos IRISGeert Pante
-Introduction to REST and REST Maturity
-Spring HATEOAS
-RAML: RESTful API Modeling Language
-IRIS: Temenos Interaction, Reporting & Information Services
A quick overview on REST : what it is and what it is not. REST has strict contraints and many internet Apis are not so REST. It’s also very popular today because RESTfull services can be consumed easily by any client or device. Soap is also still valid in a few circomstaces. It has never been so easy to create Rest-like services in .net since asp.net Web Api.
Introduces "Slug" a web crawler (or "Scutter") designed for harvesting semantic web content. Implemented in Java using the Jena API, Slug provides a configurable, modular framework that allows a great degree of flexibility in configuring the retrieval, processing and storage of harvested content. The framework provides an RDF vocabulary for describing crawler configurations and collects metadata concerning crawling activity. Crawler metadata allows for reporting and analysis of crawling progress, as well as more efficient retrieval through the storage of HTTP caching data.
A set of slides that provides a high-level overview of the W3C Linked Data Platform specification presented at the 4th Linked Data in Architecture and Construction Workshop.
For more detailed and technical version of the presentation, please refer to
http://www.slideshare.net/nandana/learning-w3c-linked-data-platform-with-examples
LDAC 2016 programme
http://smartcity.linkeddata.es/LDAC2016/#programme
The W3C Linked Data Platform (LDP) specification describes a set of best practices and simple approach for a read-write Linked Data architecture, based on HTTP access to web resources that describe their state using the RDF data model. This presentation provides a set of simple examples that illustrates how an LDP client can interact with an LDP server in the context of a read-write Linked Data application i.e. how to use the LDP protocol for retrieving, updating, creating and deleting Linked Data resources.
This presentation covers basics of RESTful webservices. I have prepared it by reading different online tutorials. One of them is java brains video tutorial. Hope this helps some one.
If any one needs examples mentioned in the slides, please contact me.
Representational State Transfer (REST) and HATEOASGuy K. Kloss
Lecture from Auckland University of Technology in the Service-Oriented Architecture for the Master's course in Service-Oriented Computing (semester 2, 2013)
An introduction to REST and RESTful web services.
You can take the course below to learn about REST & RESTful web services.
https://www.udemy.com/building-php-restful-web-services/
This paper proposes a mapping of the Linked Data Platform (LDP) specification for Constrained Application Protocol (CoAP). Main motivation stems from the fact that LDP W3C Recommendation presents resource management primitives for HTTP only. A general translation of LDP-HTTP requests and responses is provided, as well as a framework for HTTP-to-CoAP proxying. Experiments have been carried out using the LDP W3C Test Suite.
When we discuss APIs, most people immediately think of OAuth, GET and POST, and JSON. Few people think of the underlying concepts of nouns and verbs, idempotence, and uniform interfaces. Even less consider how we can combine these concepts into hypermedia to build APIs that are useful, logical, and future-friendly. Join us as we combine the basics, explore the larger concepts, and look at the standards that are leading the way.
This slide show is from my presentation on what JSON and REST are. It aims to provide a number of talking points by comparing apples and oranges (JSON vs. XML and REST vs. web services).
The glory of REST in Java: Spring HATEOAS, RAML, Temenos IRISGeert Pante
-Introduction to REST and REST Maturity
-Spring HATEOAS
-RAML: RESTful API Modeling Language
-IRIS: Temenos Interaction, Reporting & Information Services
A quick overview on REST : what it is and what it is not. REST has strict contraints and many internet Apis are not so REST. It’s also very popular today because RESTfull services can be consumed easily by any client or device. Soap is also still valid in a few circomstaces. It has never been so easy to create Rest-like services in .net since asp.net Web Api.
Modern REST API design principles and rules.pdfAparna Sharma
Typically, when updating or developing an API like Newsdata.io which is a news API for a service to provide news data with quick response time, there are lengthy discussions about the API’s structure, naming, and functions. Although, over time, certain rules have emerged that can be applied to the process and aid in reaching a common ground while developing.
История появления REST
Описание и период популяризации технологии
Виды запросов и коды ответов
Элементы транзакции
Проблематика использования
Отсутствие общего согласования и стандартизации
Частичная поддержка заголовков запросов
Различное поведение клиентов при одинаковом коде ответа
Сложный процесс поиска ошибок во время разработки
Альтернативы
Использование SOAP, XML-RPC и websocket, особенности мониторинга и тестирования REST-сервисов.
Пути реализации в Symfony2-проектах
Voryx REST Generator bundle
FOSRestBundle
NelmioApiDocBundle
Modern REST API design principles and rules.pdfAparna Sharma
Typically, when updating or developing an API like Newsdata.io which is a news API for a service to provide news data with quick response time, there are lengthy discussions about the API’s structure, naming, and functions. Although, over time, certain rules have emerged that can be applied to the process and aid in reaching a common ground while developing.
Many enterprise IT folk seem to believe that REST is only suitable for lightweight integration or for relatively simple data manipulation (CRUD). On the contrary, by applying well-understood design patterns, REST can provide capabilities that only traditional enterprise integration tools have been able to provide - high performance, asynchronous messaging, reliability, etc.
This presentation was provided by Ralph LeVan of OCLC, during the NISO event "Next Generation Discovery Tools: New Tools, Aging Standards," held March 27 - March 28, 2008.
top nidhi software solution freedownloadvrstrong314
This presentation emphasizes the importance of data security and legal compliance for Nidhi companies in India. It highlights how online Nidhi software solutions, like Vector Nidhi Software, offer advanced features tailored to these needs. Key aspects include encryption, access controls, and audit trails to ensure data security. The software complies with regulatory guidelines from the MCA and RBI and adheres to Nidhi Rules, 2014. With customizable, user-friendly interfaces and real-time features, these Nidhi software solutions enhance efficiency, support growth, and provide exceptional member services. The presentation concludes with contact information for further inquiries.
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
Les Buildpacks existent depuis plus de 10 ans ! D’abord, ils étaient utilisés pour détecter et construire une application avant de la déployer sur certains PaaS. Ensuite, nous avons pu créer des images Docker (OCI) avec leur dernière génération, les Cloud Native Buildpacks (CNCF en incubation). Sont-ils une bonne alternative au Dockerfile ? Que sont les buildpacks Paketo ? Quelles communautés les soutiennent et comment ?
Venez le découvrir lors de cette session ignite
Unleash Unlimited Potential with One-Time Purchase
BoxLang is more than just a language; it's a community. By choosing a Visionary License, you're not just investing in your success, you're actively contributing to the ongoing development and support of BoxLang.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfJay Das
With the advent of artificial intelligence or AI tools, project management processes are undergoing a transformative shift. By using tools like ChatGPT, and Bard organizations can empower their leaders and managers to plan, execute, and monitor projects more effectively.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
Enhancing Research Orchestration Capabilities at ORNL.pdf
Introduction to Web Services
1. Introduction to Web Services
Jeff Anderson
janderson141@cscc.edu
Center for Workforce Development
2. Why Services?
• Promotes separation of duties between the
each layer in the architecture
• Allows the presentation layer to focus on
user interaction
• Centralizes business rules and business logic
in the application service layer
• Delegates data persistence to the data
access layer
3. Web Services
• Extend the service layer onto the network so it can
be used by any number of clients all around the
world
• Client applications become much lighter weight and
focus on user interactions, not business logic and
persistence
• Multiple versions of an application, such as web,
iOS, Android, Alexa, ”Hey Google”, etc. share
business rules making them faster and less
expensive to develop
• Allows other applications to collaborate with ours
• Promotes loose coupling and use of domain specific
languages in each layer by exchanging data in a text
format such as JavaScript Object Notation (JSON)
4. Microservices
“In short, the microservice architectural style is an approach to
developing a single application as a suite of small services, each
running in its own process and communicating with lightweight
mechanisms, often an HTTP resource API. These services are built
around business capabilities and independently deployable by fully
automated deployment machinery. There is a bare minimum of
centralized management of these services, which may be written in
different programming languages and use different data storage
technologies.”
-- James Lewis and Martin Fowler
https://martinfowler.com/microservices/
6. Simple Object Access Protocol (SOAP)
• A W3C recommendation for exchanging structured information in a
decentralized, distributed environment
• Uses eXtensible Markup Language (XML) to exchange data in ways
documented using Web Services Description Language (WSDL)
• Defines an extensible framework providing a message construct that
can be exchanged over a variety of underlying protocols
• Designed to be independent of any particular programming model or
language
https://www.w3.org/TR/soap12-part1/#intro
9. Challenges With SOAP Services
• XML parsing is complex and can be slow to process
• The Extensible Stylesheet Language (XSL) and XML Path Language
(XPath) assist with transforming XML but add another level of
complexity
• The WSDL can be used to generate code for working with SOAP web
services but versioning becomes a problem when the WSDL needs to
change
• While SOAP may be simpler than it’s predecessors, it is way more
complex than it’s name would imply
• In most organizations, SOAP web services are consider ”legacy” code
11. Representational State Transfer (REST)
• A network based architectural style for proposed by Roy Thomas
Fielding in his PhD Dissertation at the University of California in 2000
• A stateless, cacheable, client-server based architectural style for
building distributed applications at internet scale
• Uses HTTP as the application-level protocol for communication and
transfer of resource representations
• Resources can be represented any number of ways, such as XML or
JSON, and are negotiated via “accept” and “content-type” headers
• Actions to be performed are articulated through HTTP methods with
success or failure denoted by HTTP status codes
https://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
12. Principles of REST
• Resources expose easily understood directory structure URIs.
• Representations transfer JSON or XML to represent data objects and
attributes.
• Messages use HTTP methods explicitly (for example, GET, POST, PUT,
and DELETE).
• Stateless interactions store no client context on the server between
requests. State dependencies limit and restrict scalability. The client
holds session state.
https://spring.io/understanding/rest#principles-of-rest
14. REST Resources
“The key abstraction of information in REST is a resource. Any
information that can be named can be a resource: a document or
image, a temporal service (e.g. "today's weather in Los Angeles"), a
collection of other resources, a non-virtual object (e.g. a person), and so
on. In other words, any concept that might be the target of an
author's hypertext reference must fit within the definition of a
resource. A resource is a conceptual mapping to a set of entities, not
the entity that corresponds to the mapping at any particular point in
time.”
– Roy Fielding
https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm#sec_5_2_1_1
16. REST Resource Representations
Use nouns to describe entity sets:
• The collection of customers:
/customers
• A single customer:
/customers/{customerId}
• Accounts of a particular customer:
/customers/{customerId}/accounts
https://www.thoughtworks.com/insights/blog/rest-api-design-resource-modeling
17. Challenges / Guidance
• Balance the grain so applications are not too chatty
• Resource naming should not depend on the API consumer knowing
control flow of business processes
• Clients should not be able to leave the system in an inconsistent state
• Consider naming resources after business processes that encapsulate
intent and operate in a consistent way on dependent collections
such as /accounts/{accountId}/transactions or
/customers/{customerId}/changeOfAddress
• Business process resource names should still be nouns to the extent
possible
https://www.thoughtworks.com/insights/blog/rest-api-design-resource-modeling
19. Safe Methods
• Safe means GET and HEAD methods should only retrieve data with no
significant side effects
• This enables other methods, such as POST, PUT and DELETE to be
special in a way the user would expect that a possibly unsafe action is
being requested
https://tools.ietf.org/html/rfc2616#section-9.1.1
20. Idempotent Methods
• Idempotent means, aside from error or expiration issues, the side-
effects of N > 0 (multiple) identical requests is the same as for N = 1 (a
single) request
• GET, HEAD, PUT and DELETE are idempotent
• OPTIONS and TRACE SHOULD NOT have side effects, and so are
inherently idempotent
https://tools.ietf.org/html/rfc2616#section-9.1.2
21. GET
Retrieve whatever information (in the form of an entity) identified by
the Request-URI. Example: Retrieve an address with an ID of 1:
GET /addresses/1
• GET can be conditional if the request includes an If-Modified-Since,
If-Unmodified-Since, If-Match, If-None-Match, or If-Range header
field
• GET can be partial if the request includes a Range header field or
request parameters for limiting results
• Responses are cacheable to reduce latency and network traffic
• Using request headers, the client can request uncached data
https://tools.ietf.org/html/rfc7231#section-4.3.1
22. POST
Requests the origin server accept the entity enclosed in the request as
a new subordinate of the resource identified by the Request-URI in the
Request-Line. Example: Create a new address:
POST /addresses
• The posted entity is subordinate to that URI in the same way that a
file is subordinate to a directory containing it or a record is
subordinate to a database
• Often POST is used to create a new entity, but it can also be used to
update an entity
https://tools.ietf.org/html/rfc7231#section-4.3.3
23. PUT
Requests the enclosed entity be stored under the supplied Request-URI. Example:
create or modify the address with an ID of 1:
PUT /addresses/1
• If the Request-URI refers to an already existing resource, the enclosed entity
SHOULD be considered as a modified version of the one residing on the origin
server
• If the Request-URI does not point to an existing resource, and that URI is capable
of being defined as a new resource by the requesting user agent, the origin server
can create the resource with that URI
• A PUT request is idempotent which is the main difference between the
expectations of PUT versus a POST request
• PUT replaces an existing entity. If only a subset of data elements are provided,
the rest will be replaced with empty or null
https://tools.ietf.org/html/rfc7231#section-4.3.4
24. PATCH
Requests that a set of changes described in the request entity be
applied to the resource identified by the Request-URI
• The set of changes is represented in a format called a "patch
document" identified by a media type
• If the Request-URI does not point to an existing resource, the server
MAY create a new resource
• Collisions from multiple PATCH requests may be more dangerous than
PUT collisions because some patch formats need to operate from a
known base-point or else they will corrupt the resource
• The PATCH method affects the resource identified by the Request-URI,
and it also MAY have side effects on other resources
• PATCH is neither safe nor idempotent
https://tools.ietf.org/html/rfc5789
25. DELETE
Remove an entity at a URI.
Example: remove the address with an ID of 1:
DELETE /addresses/1
• The delete may be logical in that previous versions continue to exist
https://tools.ietf.org/html/rfc7231#section-4.3.5
27. 2xx – Success
• 200 OK – the request succeeded (GET, PUT, PATCH)
• 201 Created – a new resource has been created (PUT, POST)
• 202 Accepted – the request has been accepted for processing which
has not yet completed
• 204 No Content – the request was successful and there is no content
to be returned (DELETE)
https://tools.ietf.org/html/rfc7231#section-6.3
28. 4xx – Client Error
• 400 Bad Request – the request had malformed syntax and was not
understood
• 401 Unauthorized – the request requires valid client authentication
and authorization
• 403 Forbidden – the request is understood but is being rejected for
any of a variety of reasons
• 404 Not Found – the URI references a non existent resource
• 405 Method Not Allowed – the client made a request using an HTTP
Method that is not supported by the server
• 415 Unsupported Media Type – the request is not in a supported
format
https://tools.ietf.org/html/rfc7231#section-6.5
29. 500 – Server Error
• 500 Internal Server Error – an unexpected error prevented the
request from being fulfilled
• 503 Service Unavailable – The server is down or overloaded and
unable to handle the request
https://tools.ietf.org/html/rfc7231#section-6.6
33. Hypermedia As The Engine Of
Application State (HATEOAS)
Designing REST Services
34. Hypermedia as the Engine of Application State
• Is a constraint applied to the REST application architecture
• The goal of HATEOAS is to isolate application state in the server rather
than the client
• A hypermedia-driven site provides information to navigate the site's
REST interfaces dynamically by including hypermedia links with the
responses
• These hypermedia links represent valid state transitions, any of which
the client can choose next
• Whereas SOAP uses tightly coupled WSDL-driven interfaces which are
defined at compile time, HATEOAS uses loosely coupled dynamically
generated interfaces defined at run time
https://spring.io/understanding/HATEOAS
37. Further Reading
• Understanding REST from the Spring website
• REST API Design – Resource Modeling by Prakash Subramaniam
• Understanding HATEOAS from the Spring website
• Richardson Maturity Model by Martin Fowler
• GitHub API Documentation
• Architectural Styles and the Design of Network-based Software
Architectures by Roy Fielding
• RFC 7231, Hypertext Transfer Protocol
• Cross-Origin Resource Sharing by W3C
Editor's Notes
A Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical resource
It allows different types of resource identifiers to be used in the same context, even when the mechanisms used to access those resources may differ
The term "resource" is used in a general sense for whatever might be identified by a URI such as an electronic document, an image, a web page
Each URI begins with a scheme name that refers to a specification for assigning identifiers within that scheme
A conditional GET method requests that the entity be transferred only under the circumstances described by the conditional header field(s). The conditional GET method is intended to reduce unnecessary network usage by allowing cached entities to be refreshed without requiring multiple requests or transferring data already held by the client.
A partial GET requests that only part of the entity be transferred, as described in section 14.35. The partial GET method is intended to reduce unnecessary network usage by allowing partially-retrieved entities to be completed without transferring data already held by the client.
The response to a GET request is cacheable if and only if it meets the requirements for HTTP caching described in section 13 of the HTTP specification
In a PUT request, the enclosed entity is considered to be a modified version of the resource stored on the origin server, and the client is requesting that the stored version be replaced. With PATCH, however, the enclosed entity contains a set of instructions describing how a resource currently residing on the origin server should be modified to produce a new version
Delete is also expected to be idempotent in that subsequent delete requests for a given resource are ignored.
Index.html served from S3 includes Javascript from Cloudfront (different domain) that wants to pull content from API gateway on a 3rd domain. CORS would block access to the API gateway content from the Javascript