{"id":26560,"date":"2016-06-06T21:01:42","date_gmt":"2016-06-06T13:01:42","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=26560"},"modified":"2024-08-19T19:21:16","modified_gmt":"2024-08-19T11:21:16","slug":"rest-restful-api-dev","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/","title":{"rendered":"Understanding REST and How to Develop RESTful APIs"},"content":{"rendered":"<p>Web developers frequently discuss <strong>REST principles and RESTful data architecture<\/strong>, as they are essential components of modern development. However, the concepts can sometimes be confusing. REST is not a technology but rather <strong>a method for creating APIs based on specific organizational principles<\/strong>. These principles guide developers to create a more universal environment for processing API requests.<\/p>\n<p>In this post, I will explain <a href=\"https:\/\/stackoverflow.com\/\/a\/671508\/477958\" rel=\"nofollow noopener\" target=\"_blank\">RESTful development practices<\/a> from a high-level perspective, focusing on <strong>the <em>what<\/em> rather than the <em>how<\/em><\/strong>. While I will touch on both aspects, this post is designed for web developers who are interested in REST APIs but find the concept difficult to grasp.<\/p>\n<h2>REST for Web Developers<\/h2>\n<p>The acronym REST stands for <strong>Representational State Transfer<\/strong>. This term might seem confusing, and the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer\" rel=\"nofollow noopener\" target=\"_blank\">wiki entry<\/a> may add to the confusion. However, the terminology can be simplified.<\/p>\n<p>REST is essentially a set of <strong>guidelines and architectural styles used for data transmission<\/strong>. It is commonly applied to web applications but can also be used to pass data to software systems.<\/p>\n<p>The acronym API stands for Application Programming Interface, which refers to methods of <strong>connecting with other libraries or applications<\/strong>. For instance, Windows has <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ff818516(v=vs.85).as\" rel=\"nofollow noopener\" target=\"_blank\">multiple APIs<\/a>, and Twitter provides a <a href=\"https:\/\/dev.twitter.com\/rest\/public\" rel=\"nofollow noopener\" target=\"_blank\">web API<\/a>. Although these APIs serve different purposes, they all follow the same underlying principles.<\/p>\n<p>In summary, RESTful APIs are APIs that adhere to the REST architecture.<\/p>\n<h2>What Exactly is the REST Architecture?<\/h2>\n<p>While it can be challenging to define REST architecture precisely, some <a href=\"https:\/\/www.techtarget.com\/searchapparchitecture\/definition\/REST-REpresentational-State-Transfer\" rel=\"nofollow noopener\" target=\"_blank\">architectural constants<\/a> include:<\/p>\n<ul>\n<li><strong>Consistency<\/strong> across the entire API<\/li>\n<li><strong><a href=\"https:\/\/stackoverflow.com\/\/a\/3105337\/477958\" rel=\"nofollow noopener\" target=\"_blank\">Stateless existence<\/a><\/strong> (i.e., no server-side sessions)<\/li>\n<li>Use of <strong>HTTP status codes<\/strong> where appropriate<\/li>\n<li>Use of <strong>URL endpoints<\/strong> with a logical hierarchy<\/li>\n<li><strong>Versioning in the URL<\/strong> rather than in HTTP headers<\/li>\n<\/ul>\n<p>There are no overly specific guidelines like the W3C\u2019s <a href=\"https:\/\/www.w3.org\/TR\/html5\/\" rel=\"nofollow noopener\" target=\"_blank\">HTML5 spec<\/a>, which can sometimes <a href=\"https:\/\/www.reddit.com\/r\/webdev\/comments\/46e4cr\/i_am_going_to_start_building_restful_apis_how\/\" rel=\"nofollow noopener\" target=\"_blank\">lead to confusion<\/a> and uncertainty around REST terminology.<\/p>\n<p>The above list <strong>shouldn\u2019t be considered hard-and-fast rules<\/strong>, although they are true for most modern RESTful APIs.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/rest-restful-api-dev\/01-restful-rest-diagram-api.jpg\" alt=\"Diagram illustrating RESTful API architecture\" width=\"700\" height=\"290\"><figcaption class=\"entry-image-caption\"><a href=\"https:\/\/restful-api-design.readthedocs.io\/en\/latest\/scope.html\" rel=\"nofollow noopener\" target=\"_blank\">IMAGE: restful-api-design.readthedocs.io<\/a><\/figcaption><\/figure>\n<p>REST is a <strong>lightweight methodology<\/strong>, making it ideal for HTTP data transmission. This is why REST became so popular on the web and why it is widely regarded as the best choice for API development.<\/p>\n<p>As <a href=\"https:\/\/www.vinaysahni.com\/best-practices-for-a-pragmatic-restful-api\" rel=\"nofollow noopener\" target=\"_blank\">Vinay Sahni<\/a> aptly puts it, \u201can API is a developer\u2019s UI.\u201d Everything should be easy to use and provide an excellent user experience. RESTful APIs aim to achieve just that.<\/p>\n<h2>Key Takeaways for RESTful APIs<\/h2>\n<p>These tips are specific to APIs <strong>designed for web applications<\/strong>, meaning that <strong>HTTP is a requirement<\/strong>. Often, this also means that <strong>the API data is hosted on an external server<\/strong>. Let\u2019s examine how RESTful APIs work from the perspective of the API user.<\/p>\n<p>The API user, typically a web developer, can build a script that connects to an external API server. The necessary data is then transmitted over HTTP, allowing the developer to display data on their website <strong>without direct access to the external server<\/strong> (e.g., pulling Twitter data).<\/p>\n<p>Generally, there are <strong>four main commands<\/strong> used to <strong>interact with RESTful APIs<\/strong>:<\/p>\n<ol>\n<li><code>GET<\/code> for retrieving an object<\/li>\n<li><code>POST<\/code> for creating a new object<\/li>\n<li><code>PUT<\/code> for modifying or replacing an object<\/li>\n<li><code>DELETE<\/code> for removing an object<\/li>\n<\/ol>\n<p>Each of these methods should be <strong>included with the API call<\/strong> to instruct the server on what action to take.<\/p>\n<p>Most web APIs <strong>only allow <code>GET<\/code> requests<\/strong> to retrieve data from an external server. While authentication is optional, it is highly recommended when allowing potentially destructive commands like <code>PUT<\/code> or <code>DELETE<\/code>.<\/p>\n<p>However, not all RESTful APIs provide such extensive functionality. Consider <a href=\"https:\/\/pokeapi.co\/\" rel=\"nofollow noopener\" target=\"_blank\">Pok\u00e9api<\/a>, a free Pok\u00e9mon API database. It is publicly accessible with decent rate limiting (limiting the number of API requests a user can make over time) but only allows the <code>GET<\/code> method for accessing resources. This type of API may be referred to as a <strong>consumption-only API<\/strong>.<\/p>\n<figure><a href=\"https:\/\/pokeapi.co\/\" rel=\"nofollow noopener\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/rest-restful-api-dev\/02-pokemon-api-webapp-service.jpg\" alt=\"Screenshot of Pok\u00e9mon API website\" width=\"700\" height=\"394\"><\/a><\/figure>\n<p>Maintaining <strong>consistency in return types<\/strong> is also important. JSON is a popular return type, and its <a href=\"https:\/\/jsonapi.org\/\" rel=\"nofollow noopener\" target=\"_blank\">specifications<\/a> provide guidance on proper data structures.<\/p>\n<p>RESTful APIs typically use <strong>nouns for API objects<\/strong> and <strong>verbs for actions performed on those objects<\/strong>. Authentication, rate limiting, and other security measures can be part of the API\u2019s architecture, but a simple API can function without these additional complexities.<\/p>\n<h2>Accessing API Resources<\/h2>\n<p>Public APIs are typically <strong>accessible via direct website URLs<\/strong>. This makes <strong>URL structure critical<\/strong> and should be reserved exclusively for API requests.<\/p>\n<p>Some URLs may include a prefix directory like <code>\/v2\/<\/code> for an updated version 2 of a previous API. This approach is common among developers who want to offer a new API structure without deprecating their existing 1.x API.<\/p>\n<p>I found <a href=\"https:\/\/www.vinaysahni.com\/best-practices-for-a-pragmatic-restful-api#restful\" rel=\"nofollow noopener\" target=\"_blank\">this post<\/a> particularly insightful regarding <strong>basic URL structures<\/strong> and examples from other services.<\/p>\n<p>It\u2019s important to note that the endpoint\u2019s <strong>return data will vary significantly<\/strong> depending on the <strong>HTTP method<\/strong>. For example, <code>GET<\/code> retrieves content, while <code>POST<\/code> creates new content. The request might point to the same endpoint, but the result could be very different.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/rest-restful-api-dev\/03-reddit-api-documentation.jpg\" alt=\"Reddit API documentation website screenshot\" width=\"700\" height=\"555\"><figcaption class=\"entry-image-caption\"><a href=\"https:\/\/www.reddit.com\/dev\/api\" rel=\"nofollow noopener\" target=\"_blank\">IMAGE: Reddit API Documentation<\/a><\/figcaption><\/figure>\n<p>Reviewing examples online can help clarify concepts. We\u2019ve already looked at the <a href=\"https:\/\/pokeapi.co\/docsv2\/#berries-section\" rel=\"nofollow noopener\" target=\"_blank\">Pok\u00e9api<\/a>, but here are some other <strong>real-world API examples<\/strong> to explore:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.reddit.com\/dev\/api\" rel=\"nofollow noopener\" target=\"_blank\">Reddit API<\/a><\/li>\n<li><a href=\"https:\/\/developer.github.com\/v3\/\" rel=\"nofollow noopener\" target=\"_blank\">GitHub API<\/a><\/li>\n<li><a href=\"https:\/\/www.flickr.com\/services\/api\/\" rel=\"nofollow noopener\" target=\"_blank\">Flickr API<\/a><\/li>\n<li><a href=\"https:\/\/developers.pinterest.com\/docs\/getting-started\/introduction\/\" rel=\"nofollow noopener\" target=\"_blank\">Pinterest API<\/a><\/li>\n<\/ul>\n<h2>Building Your Own API<\/h2>\n<p>Developing your own API is a significant undertaking, but it\u2019s not as complicated as it might seem. It requires an <strong>understanding of API design patterns and best practices<\/strong> to create something of real value.<\/p>\n<p>Each API must <strong>connect to your server<\/strong> to return data. In addition to writing code to achieve this, you also need to format the return data appropriately. Other potential requirements include <strong>authentication<\/strong> and <strong>rate limiting<\/strong>, so building an API is not a task to be taken lightly.<\/p>\n<p>Let\u2019s examine <strong>some fundamental principles<\/strong> of API architecture.<\/p>\n<h3>Build Endpoints<\/h3>\n<p>One of the essential aspects of API development is <strong>building endpoints<\/strong>. When <strong>creating resources<\/strong>, it\u2019s important to use <a href=\"https:\/\/cloud.google.com\/apigee\" rel=\"nofollow noopener\" target=\"_blank\">nouns, not verbs<\/a>. This means API data should represent a person, place, or thing-most often <strong>a thing with specific attributes<\/strong> (e.g., a tweet and all its metadata).<\/p>\n<p>Learning to <a href=\"https:\/\/cloud.google.com\/apigee\" rel=\"nofollow noopener\" target=\"_blank\">name nouns<\/a> can be challenging, but it\u2019s a crucial aspect of API development. Simplification is key whenever possible.<\/p>\n<p>There\u2019s an ongoing debate over <strong>singular vs. plural<\/strong> nouns. If you were creating a Twitter API, you might organize the object group first (e.g., tweet) and the object item second (e.g., tweet ID).<\/p>\n<pre>\r\n$ \/tweet\/15032934882934\r\n$ \/tweets\/15032934882934\r\n<\/pre>\n<p>In this case, the singular form often looks better, especially when returning only one resource. However, there is no universally correct answer, so choose what works best for your project.<\/p>\n<h3>Set Return Type<\/h3>\n<p>Another important consideration is the <strong>return type data<\/strong>. Most web users expect JSON content, making it the best option. XML is another choice if you want to offer both. However, JSON is the preferred API return type among web developers.<\/p>\n<p>There\u2019s much more to API development, so I recommend <a href=\"https:\/\/www.hongkiat.com\/blog\/instagram-photo-search\/\">exploring APIs<\/a> to see how other developers build them. This experience will help you become familiar with typical requirements and best practices.<\/p>\n<p>If you\u2019re just starting out, consider these development tutorials:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.restapitutorial.com\/\" rel=\"nofollow noopener\" target=\"_blank\">REST API Tutorial Site<\/a><\/li>\n<li><a href=\"https:\/\/silkapp.github.io\/rest\/tutorial.html\" rel=\"nofollow noopener\" target=\"_blank\">Writing a Simple REST API<\/a><\/li>\n<li><a href=\"https:\/\/spring.io\/guides\/gs\/rest-service\/\" rel=\"nofollow noopener\" target=\"_blank\">Building a RESTful Web Service<\/a><\/li>\n<\/ul>\n<h2>Further Resources<\/h2>\n<p>The best way to learn web app development is through practice. While theory is valuable for understanding the underlying concepts, hands-on experience is essential for practical knowledge.<\/p>\n<p>A good starting point for API development is <strong>connecting to existing APIs<\/strong>. Once you\u2019ve mastered the basics of client-side connections, you can move on to server-side API development by building your own API from scratch.<\/p>\n<p>If you\u2019re ready to dive in, consider the following resources to guide you on your journey.<\/p>\n<h3>Books<\/h3>\n<ul>\n<li><a href=\"https:\/\/www.amazon.com\/\/REST-Design-Rulebook-Mark-Masse\/dp\/1449310508\" rel=\"nofollow noopener\" target=\"_blank\">REST API Design Rulebook<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.com\/\/RESTful-Web-APIs-Leonard-Richardson\/dp\/1449358063\" rel=\"nofollow noopener\" target=\"_blank\">RESTful Web APIs<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.com\/\/RESTful-Web-Services-Cookbook-Scalability\/dp\/0596801688\" rel=\"nofollow noopener\" target=\"_blank\">RESTful Web Services Cookbook<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.com\/\/Undisturbed-REST-Guide-Designing-Perfect\/dp\/1329115945\" rel=\"nofollow noopener\" target=\"_blank\">Undisturbed REST: A Guide to Designing the Perfect API<\/a><\/li>\n<\/ul>\n<h3>Articles<\/h3>\n<ul>\n<li><a href=\"https:\/\/code.tutsplus.com\/tutorials\/a-beginners-guide-to-http-and-rest--net-16340\" rel=\"nofollow noopener\" target=\"_blank\">A Beginner\u2019s Guide to HTTP and REST<\/a><\/li>\n<li><a href=\"https:\/\/matthewross.me\/blog\/posts\/creating-a-restful-api\" rel=\"nofollow noopener\" target=\"_blank\">Creating a RESTful API<\/a><\/li>\n<li><a href=\"https:\/\/www.restapitutorial.com\/lessons\/restfulresourcenaming.html\" rel=\"nofollow noopener\" target=\"_blank\">RESTful Resource Naming Guide<\/a><\/li>\n<li><a href=\"https:\/\/www.mongodb.com\/blog\/post\/building-your-first-application-mongodb-creating-rest-api-using-mean-stack-part-1\" rel=\"nofollow noopener\" target=\"_blank\">Creating A REST API using the MEAN Stack<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Web developers frequently discuss REST principles and RESTful data architecture, as they are essential components of modern development. However, the concepts can sometimes be confusing. REST is not a technology but rather a method for creating APIs based on specific organizational principles. These principles guide developers to create a more universal environment for processing API&hellip;<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3392],"tags":[511],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Understanding REST and How to Develop RESTful APIs - Hongkiat<\/title>\n<meta name=\"description\" content=\"Web developers frequently discuss REST principles and RESTful data architecture, as they are essential components of modern development. However, the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Understanding REST and How to Develop RESTful APIs\" \/>\n<meta property=\"og:description\" content=\"Web developers frequently discuss REST principles and RESTful data architecture, as they are essential components of modern development. However, the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-06T13:01:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-19T11:21:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/rest-restful-api-dev\/01-restful-rest-diagram-api.jpg\" \/>\n<meta name=\"author\" content=\"Jake Rocheleau\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jake Rocheleau\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/rest-restful-api-dev\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/rest-restful-api-dev\\\/\"},\"author\":{\"name\":\"Jake Rocheleau\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/966b2daea15283b4145e71aa98a82c2a\"},\"headline\":\"Understanding REST and How to Develop RESTful APIs\",\"datePublished\":\"2016-06-06T13:01:42+00:00\",\"dateModified\":\"2024-08-19T11:21:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/rest-restful-api-dev\\\/\"},\"wordCount\":1296,\"commentCount\":7,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/rest-restful-api-dev\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/rest-restful-api-dev\\\/01-restful-rest-diagram-api.jpg\",\"keywords\":[\"Web Developers\"],\"articleSection\":[\"Coding\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/rest-restful-api-dev\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/rest-restful-api-dev\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/rest-restful-api-dev\\\/\",\"name\":\"Understanding REST and How to Develop RESTful APIs - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/rest-restful-api-dev\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/rest-restful-api-dev\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/rest-restful-api-dev\\\/01-restful-rest-diagram-api.jpg\",\"datePublished\":\"2016-06-06T13:01:42+00:00\",\"dateModified\":\"2024-08-19T11:21:16+00:00\",\"description\":\"Web developers frequently discuss REST principles and RESTful data architecture, as they are essential components of modern development. However, the\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/rest-restful-api-dev\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/rest-restful-api-dev\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/rest-restful-api-dev\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/rest-restful-api-dev\\\/01-restful-rest-diagram-api.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/rest-restful-api-dev\\\/01-restful-rest-diagram-api.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/rest-restful-api-dev\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Understanding REST and How to Develop RESTful APIs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/966b2daea15283b4145e71aa98a82c2a\",\"name\":\"Jake Rocheleau\",\"description\":\"Jake is a writer and designer with over 10 years experience working on the web. He writes about user experience design and cool resources for designers\",\"sameAs\":[\"https:\\\/\\\/www.hongkiat.com\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/jake\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Understanding REST and How to Develop RESTful APIs - Hongkiat","description":"Web developers frequently discuss REST principles and RESTful data architecture, as they are essential components of modern development. However, the","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/","og_locale":"en_US","og_type":"article","og_title":"Understanding REST and How to Develop RESTful APIs","og_description":"Web developers frequently discuss REST principles and RESTful data architecture, as they are essential components of modern development. However, the","og_url":"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2016-06-06T13:01:42+00:00","article_modified_time":"2024-08-19T11:21:16+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/rest-restful-api-dev\/01-restful-rest-diagram-api.jpg","type":"","width":"","height":""}],"author":"Jake Rocheleau","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Jake Rocheleau","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/"},"author":{"name":"Jake Rocheleau","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/966b2daea15283b4145e71aa98a82c2a"},"headline":"Understanding REST and How to Develop RESTful APIs","datePublished":"2016-06-06T13:01:42+00:00","dateModified":"2024-08-19T11:21:16+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/"},"wordCount":1296,"commentCount":7,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/rest-restful-api-dev\/01-restful-rest-diagram-api.jpg","keywords":["Web Developers"],"articleSection":["Coding"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/","url":"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/","name":"Understanding REST and How to Develop RESTful APIs - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/rest-restful-api-dev\/01-restful-rest-diagram-api.jpg","datePublished":"2016-06-06T13:01:42+00:00","dateModified":"2024-08-19T11:21:16+00:00","description":"Web developers frequently discuss REST principles and RESTful data architecture, as they are essential components of modern development. However, the","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/rest-restful-api-dev\/01-restful-rest-diagram-api.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/rest-restful-api-dev\/01-restful-rest-diagram-api.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/rest-restful-api-dev\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Understanding REST and How to Develop RESTful APIs"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/966b2daea15283b4145e71aa98a82c2a","name":"Jake Rocheleau","description":"Jake is a writer and designer with over 10 years experience working on the web. He writes about user experience design and cool resources for designers","sameAs":["https:\/\/www.hongkiat.com"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/jake\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-6Uo","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/26560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=26560"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/26560\/revisions"}],"predecessor-version":[{"id":72668,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/26560\/revisions\/72668"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=26560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=26560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=26560"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=26560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}