RESTful API Design, RESTful URI Design, Design Steps, Example Application, What are resources in REST? Various HTTP Status codes used in REST, POST, GET, PUT, PATCH, DELETE methods and what are they used for?
Arcadian Learning a Team of 50 Year industrial Expertise provide professional Training in Java Development. Spring Framework provides a comprehensive programming and configuration model for modern Java-based enterprise level Web Applications and Web Services - on any kind of deployment platform.
The talk at TYPO3 DevDays 2015 in Nuremberg which explains the deep insights of how search works. TF-IDF algorithm, vector space model and how that is used in Lucene and therefore Solr and Elasticsearch.
Munching & crunching - Lucene index post-processingabial
Lucene EuroCon 10 presentation on index post-processing (splitting, merging, sorting, pruning), tiered search, bitwise search, and a few slides on MapReduce indexing models (I ran out of time to show them, but they are there...)
Arcadian Learning a Team of 50 Year industrial Expertise provide professional Training in Java Development. Spring Framework provides a comprehensive programming and configuration model for modern Java-based enterprise level Web Applications and Web Services - on any kind of deployment platform.
The talk at TYPO3 DevDays 2015 in Nuremberg which explains the deep insights of how search works. TF-IDF algorithm, vector space model and how that is used in Lucene and therefore Solr and Elasticsearch.
Munching & crunching - Lucene index post-processingabial
Lucene EuroCon 10 presentation on index post-processing (splitting, merging, sorting, pruning), tiered search, bitwise search, and a few slides on MapReduce indexing models (I ran out of time to show them, but they are there...)
Presented by Adrien Grand, Software Engineer, Elasticsearch
Although people usually come to Lucene and related solutions in order to make data searchable, they often realize that it can do much more for them. Indeed, its ability to handle high loads of complex queries make Lucene a perfect fit for analytics applications and, for some use-cases, even a credible replacement for a primary data-store. It is important to understand the design decisions behind Lucene in order to better understand the problems it can solve and the problems it cannot solve. This talk will explain the design decisions behind Lucene, give insights into how Lucene stores data on disk and how it differs from traditional databases. Finally, there will be highlights of recent and future changes in Lucene index file formats.
Zoe Slattery's slides from PHPNW08:
The ability to store large quantities of local data means that many applications require some form of text search and retrieval facility. From the point of view of the application developer there are a number of choices to make, the first is whether to use a complete packaged solution or whether to use one of the available information libraries to build a custom information retrieval (IR) solution. In this talk I’ll look at the options for PHP programmers who choose to embed IR facilities within their applications.
For Java programmers there is clearly a good range of options for text retrieval libraries, but options for PHP programmers are more limited. At first sight for a PHP programmer wishing to embed indexing and search facilities in their application, the choice seems obvious - the PHP implementation of Lucene (Zend Search Lucene). There is no requirement to support another language, the code is PHP therefore easy for PHP programmers to work with and the license is commercially friendly. However, whilst ease of integration and support are key factors in choice of technology, performance can also be important; the performance of the PHP implementation of Lucene is poor compared to the Java implementation.
In this talk I’ll explain the differences in performance between PHP implementation of Lucene and the Java implementation and examine the other options available to PHP programmers for whom performance is a critical factor.
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).
REST & RESTful Web Service
REST stands for Representational State Transfer
REST web services communicate over the HTTP specification, using HTTP vocabulary
If a service does not include all constraints it is not a RESTful web service.
Presented by Adrien Grand, Software Engineer, Elasticsearch
Although people usually come to Lucene and related solutions in order to make data searchable, they often realize that it can do much more for them. Indeed, its ability to handle high loads of complex queries make Lucene a perfect fit for analytics applications and, for some use-cases, even a credible replacement for a primary data-store. It is important to understand the design decisions behind Lucene in order to better understand the problems it can solve and the problems it cannot solve. This talk will explain the design decisions behind Lucene, give insights into how Lucene stores data on disk and how it differs from traditional databases. Finally, there will be highlights of recent and future changes in Lucene index file formats.
Zoe Slattery's slides from PHPNW08:
The ability to store large quantities of local data means that many applications require some form of text search and retrieval facility. From the point of view of the application developer there are a number of choices to make, the first is whether to use a complete packaged solution or whether to use one of the available information libraries to build a custom information retrieval (IR) solution. In this talk I’ll look at the options for PHP programmers who choose to embed IR facilities within their applications.
For Java programmers there is clearly a good range of options for text retrieval libraries, but options for PHP programmers are more limited. At first sight for a PHP programmer wishing to embed indexing and search facilities in their application, the choice seems obvious - the PHP implementation of Lucene (Zend Search Lucene). There is no requirement to support another language, the code is PHP therefore easy for PHP programmers to work with and the license is commercially friendly. However, whilst ease of integration and support are key factors in choice of technology, performance can also be important; the performance of the PHP implementation of Lucene is poor compared to the Java implementation.
In this talk I’ll explain the differences in performance between PHP implementation of Lucene and the Java implementation and examine the other options available to PHP programmers for whom performance is a critical factor.
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).
REST & RESTful Web Service
REST stands for Representational State Transfer
REST web services communicate over the HTTP specification, using HTTP vocabulary
If a service does not include all constraints it is not a RESTful web service.
A Deep Dive into RESTful API Design Part 1VivekKrishna34
REST Architectural Constrains. What are Client Server, Statelessness, Uniform Interface and other REST architectural design constraints?
Designing RESTful Endpoints, REST Best Practices, RESTful URI Design & HATEOAS principles
CRUD APIs can be a very powerful tool. However, simply PUTing and POSTing entities can lead to anemic endpoints that lack business value. Go beyond the traditional CRUD API and provide more expressive and meaningful REST endpoints with an API crafted with a commanding paradigm.
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.
Http Service will help us fetch external data, post to it, etc. We need to import the http module to make use of the http service. Let us consider an example to understand how to make use of the http service.
Similar to A Deep Dive into RESTful API Design Part 2 (20)
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
2. Part I - Recap
1. Architectural Constraints of REST
a. Client-Server
b. Statelessness
c. Cacheability
d. Layered System
e. Code-on-Demand
f. Uniform Interface
2. All about Resources
a. What is a resource?
b. Types of resources
3. All about Representations
4. URI Naming Conventions
3. RESTful API design steps
1. Identify the resource(s).
○ What are resources?
2. Create model URIs.
○ versioning, namespace, resources naming conventions and resource identifiers.
3. Determine resource structure and request/response format.
4. Assign HTTP methods
○ HTTP methods and status codes.
○ Idempotency, Safety and caching responses.
4. Example Application
● We are going to build a simple user service, where we store, retrieve and
modify user information.
● User information includes - name, DOB, list of their addresses, password,
phone#, email, type and status of their account.
5. Resources
● What are resources?
○ General Definition - A resource is anything that’s important enough to be referenced as a
thing. You should make something into a resource, if you want to
■ include all or part of it by reference into another representation,
■ retrieve or cache a representation of it,
■ create a hypertext link to it,
■ or perform CRUD operations on it.
○ Definition of a resource was designed to be intentionally vague. So, if you don’t understand it,
get in line.
○ In RESTful APIs resources can be collections or singletons, they can also contain other
resources.
8. URIs
● URIs are used to uniquely identify and address a resource in RESTful APIs.
● URIs are made up of 3 parts.
○ Version,
○ Namespace (optional),
○ Resource name.
● We’ll look into what each of the above concepts are, in detail in the following
slides.
9. More About URIs - Versioning
● APIs are a contract between the client and the server (uniform interface constraint).
● Breaking changes break the contract between the client and the server. In our case, between our
frontend react application and our backend java services.
● Breaking changes include -
○ a change in the format of the request/response data for one or more calls
○ a change in the request/response type (i.e. changing an integer to a float) etc.
● Non-breaking changes tend to be additive. E.g. adding new fields or nested resources to your
resource representations, adding new endpoints such as a PUT or PATCH that was previously
unavailable. API consumers should build client code that is resilient to these kinds of non-breaking
changes.
10. Versioning continued...
● Version changes should happen according to the following rules, when your
APIs are being consumed by clients.
○ Breaking changes result in a major version change.
○ Non-breaking changes result in a minor version change (optional).
● Version changes should not happen during the development phase of your
APIs. I.e. before exposing them to the client.
● Since we are in the process of developing our example application, we will
use v1 as our API version.
11. More About URIs - Namespaces
● Namespaces are optional and add a bit of organisation to your APIs mainly
from a documentation point of view.
● Namespaces allow you to group related resources under a common root.
● It can be used for url based routing when there are multiple components (E.g.
microservices).
● Also allows you to define a scope for a particular resource.
○ E.g. In our inhouse IoT application, In case you want to differentiate between motor
configuration and sump configuration, you can use the same resource name under 2
namespaces -
■ /v1/motor/configurations
■ /v1/sump/configurations
● Namespaces should be singular nouns.
12. Resource naming and URI formatting best practices
● Use nouns for collections and document names, and verbs for controllers
names
○ E.g. collection - /v1/motor/configurations, controller - /v1/motor/change-configuration
● Forward slash (/) to indicate hierarchical relationships.
● Avoid trailing slashes
● Use hyphens to improve readability
● Do not use underscores in URIs
● Use lower case in URIs
● Do not use file extensions
● Never use camel case CRUD function names in URIs
○ E.g. Correct - POST /v1/motor/configurations, Wrong - /v1/motor/createConfigurations,
● Use query params to filter collection type resources.
13. Resource naming recap
● Plural lowercase nouns.
● DO NOT use verbs in resource names. E.g. /v1/device/getDeviceInfo
● DO NOT use camel case.
● Use hyphens in between words, in case there more than 2 words in your
resource name.
● Use resource ids to identify particular resources in a collection. E.g.
/v1/device/{id}.
● Subresources are identified like this /v1/device/{id}/configurations
14. URIs for our example application
● Recap - Resources that we identified were user and address (sub-resource).
● URIs are made up of 3 parts,
○ Version,
○ Namespace (optional in general, but mandatory for our example app),
○ Resource name.
● Can you name the URIs that we will use in our application?
● Remember URIs are used to address a particular resource uniquely.
15. URIs for our example application
● /v1/account/users and /v1/account/users/{id}/addresses
● /v1/account/addresses
16. Request/Response Format
● Now we need to take a decision on how we are going to represent our
resources.
● REST accepts multiple request and response body types, like form-url-
encoded, form data, plain text, json, binaries etc.
● Most RESTful APIs use either XML or JSON.
● We are going to be using JSONs in our example application.
17. Idempotence, Safety and Caching
● In computing, an idempotent operation is one that has no additional effect if it is called more than
once with the same input parameters. f(f(f(x))) = f(x).
● E.g. the abs function is idempotent because abs(abs(x)) = abs(x).
● In RESTful APIs a request method is considered "idempotent" if the intended effect on the server of
multiple identical requests with that method is the same as the effect for a single such request.
● Is the DELETE method idempotent?
● A Safe method does not modify the given resource in any way. It retrieves a representation of a
given resource without modifying it.
● “Cacheability” is one of REST’s architectural constraints.
● In RESTful APIs, when a consumer requests a resource’s representation, the request goes through
a cache or a series of caches before hitting the database hosting the resource.
18. HTTP methods and response codes
● HTTP methods represent the ways in which resources can be accessed or
modified.
● There are 5 major HTTP methods
a. POST
b. GET
c. PUT
d. PATCH
e. DELETE
● In addition to response messages, server responses also contain http
headers, a status message and a status code.
● Status codes range from 1xx - 5xx
19. HTTP Status Codes
HTTP Status Codes Description
1xx (Informational) An informational response, indicates that the request was received and
understood.
2xx (Successful) The request was successfully received, understood and accepted.
3xx (Redirection) Further action needs to be taken in order to complete the request.
4xx (Client Error) The request contains bad syntax or cannot be fulfilled.
5xx (Server Error) The server failed to fulfill an apparently valid request.
20. Status Codes continued...
● 1xx - Informational
○ 101 Switching Protocols
● 2xx - Successful,
○ 200 OK
○ 202 Accepted
○ 201 Created
○ 204 No Content
● 3xx - Redirection,
○ 301 Moved Permanently
○ 302 Found
○ 304 Not Modified
● 4xx - Client Errors,
○ 400 Bad Request
○ 401 Unauthorized
○ 403 Forbidden
○ 404 Not Found
● 5xx - Server Errors.
○ 500 Internal Server Error
○ 502 Bad Gateway
○ 504 Gateway Timeout
For More Info visit -
https://tools.ietf.org/html/rfc2616#section-10
21. POST
● POST method is used to create new resources.
● If the resource is created, the server responds with a 201 Created.
● Sometimes when a POST request performs an action on a resource without a
resource identifier (controller pattern methods) the server can return a 200
(OK) or a 204 (No Content).
● POST responses are not cacheable.
● POST request are neither safe nor idempotent and invoking two identical
POSTs will result in two different resources containing the same information
and different resource ids.
● POSTs cannot return 404.
22. GET
● GET Request are used to retrieve resource representations (current state of the
resource).
● There are 2 types of GET requests.
a. GET with resource identifier,
b. GET for a collection of resources with or without query params.
● GETs usually return a 200 OK with the response body containing the resource(s) that
were requested.
● Type 1 GET (get with id) should return a 404 Not Found, if the requested resource is
not present in the server.
● Type 2 GET (get collection) should return a 200 with an empty response body, if the
requests resources are not found.
● GET is idempotent, safe and the responses are cacheable.
23. ● PUT request are used to update existing resources.
● If the resource does not exist, the server may choose to create it or it may not.
● If a resource was created, the server must return a 201 Created to inform the client,
that the update resulted in a new resource being created.
● If an existing resource was updated, the server can return either a 200 OK or a 204 No
Content.
● PUT should only be used if you are replacing an entire resource, for partial updates
please use the PATCH method.
● PUT
○ requests are idempotent but are not safe
○ response is not cacheable.
PUT
24. PATCH
● It is used to partially update a resource.
● It cannot create a resource as it sends partial information only.
● PATCH applies a delta rather than updating the given resource entirely.
● A typical PATCH request is an array of partial modifications to the given resource.
● The array contains a request to update a particular portion of a given resource in the
following format.
[{ “op”: “replace”, “path”: “/email”, “value”: “new.email@example.org” }]
● op is operation, it can be remove, add, replace, move and copy.
● It includes the path to the field that you are changing and the value that needs to be
changed.
● Similar to PUT, PATCH requests are also idempotent, not safe and not cacheable.
JSON Patch standard -
https://tools.ietf.org/html/rfc6902
25. DELETE
● As the name applies, DELETE method is used to delete resources.
● A successful delete operation should return a 200 OK with a response or if
you don’t wish to return any response from the server, a 204 No Content is
sent back.
● DELETE operations are idempotent (ideally).
● If the item is not present in the server, it may return a 404 Not Found to the
client.
● It is also not cacheable and not safe.
26. Recap
HTTP Method Request Has Body Response Has Body Safe Idempotent Cacheable
POST Yes Yes No No No
GET No Yes Yes Yes Yes
PUT Yes Optional No Yes No
PATCH Yes Optional No Yes No
DELETE No Optional No Yes No
27. Back to our example application
● Recap - resource names - users and addresses which was a sub-resource.
● Endpoints - /v1/account/users and /v1/account/users/{id}/addresses.
● Can you make CRUD endpoints for the users and address resources?
● I need to get all addresses that have the pincode as 600014, how do i do
that?
● Also needed is an endpoint to modify the user’s mobile number. The request
should contain the user’s current mobile number, an otp and their updated
mobile number.
● Update a user’s DOB with a resource id and the updated DOB value alone.