{"id":127,"date":"2018-03-19T23:26:00","date_gmt":"2018-03-19T23:26:00","guid":{"rendered":"https:\/\/kindsonthegenius.com\/blog\/2018\/03\/19\/restful-web-services-tutorial-1-creating-a-rest-api-in-visual-studio-net-c\/"},"modified":"2020-08-19T13:03:26","modified_gmt":"2020-08-19T11:03:26","slug":"restful-web-services-tutorial-1-creating-a-rest-api-in-visual-studio-net-c","status":"publish","type":"post","link":"https:\/\/kindsonthegenius.com\/blog\/restful-web-services-tutorial-1-creating-a-rest-api-in-visual-studio-net-c\/","title":{"rendered":"RESTful Web Services Tutorial 1 &#8211; Creating a REST API in Visual Studio(.Net C#)"},"content":{"rendered":"<p>I must say, I never knew how easy and clear this topic of REST API is untill I did it myself. If you have any issues, mention it in the comment box by the left of this page that says: &#8216;Your Opinion Matters&#8217; and you will recieve needed assistance.<\/p>\n<div style=\"clear: both; text-align: center;\">\u00a0<a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/3.bp.blogspot.com\/-1yFdCNJsR-M\/WrBGyLDSfyI\/AAAAAAAABcs\/wOTxt1jqBo4vDJ8wLwFuQ01NgghpTetZwCLcBGAs\/s1600\/How%2Bto%2BBuild%2BREST%2BAPI%2Bin%2BVisual%2BStudio.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/3.bp.blogspot.com\/-1yFdCNJsR-M\/WrBGyLDSfyI\/AAAAAAAABcs\/wOTxt1jqBo4vDJ8wLwFuQ01NgghpTetZwCLcBGAs\/s320\/How%2Bto%2BBuild%2BREST%2BAPI%2Bin%2BVisual%2BStudio.jpg\" width=\"320\" height=\"246\" border=\"0\" data-original-height=\"789\" data-original-width=\"1025\" \/><\/a><\/div>\n<p>In this lesson we are going to cover the following<\/p>\n<ul>\n<li><a href=\"#whatservice\">What is RESTful Web Services<\/a><\/li>\n<li><a href=\"#whatapi\">What is REST API<\/a><\/li>\n<li><a href=\"#task\">Task<\/a><\/li>\n<li><a href=\"#solution\">Solution: Creating RESTful API in Visual Studio(Step by Step)<\/a>\n<ul>\n<li><a href=\"#step1\">Step 1: Create an Empty Web API project<\/a><\/li>\n<li><a href=\"#step2\">Step 2: Test the Application<\/a><\/li>\n<li><a href=\"#step3\">Step 3: Add a Controller<\/a><\/li>\n<li><a href=\"#step4\">Step 4: Add a Model(Employee class)<\/a><\/li>\n<li><a href=\"#step5\">Step 5: Create a list of Employees<\/a><\/li>\n<li><a href=\"#step6\">Step 6: Write the two Methods<\/a><\/li>\n<li><a href=\"#step7\">Step 7: Modify the WebApiConfig.cs file<\/a><\/li>\n<li><a href=\"#step8\">Step 8: Test the API<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#next\">Next Steps<\/a><\/li>\n<\/ul>\n<p><a href=\"https:\/\/youtu.be\/49c2TOpi4RA\">Watch the Video Lessons Here<\/a><br \/>\n<b><\/b><\/p>\n<h3><b id=\"whatservice\">What is RESTful Web Services?<\/b><\/h3>\n<p>First we anSwer the question, what is a web service? A web service is is a piece of software or service that is accessible over the internet. A web services can also be used by other services or applications. For instance the weather service, or the currency exchange rates. If we go to Google and type &#8216;100USD to EUR&#8217;, a web service is called which executes the function to carry out the conversion. Here, 4 things happen:<\/p>\n<ul>\n<li>accept the input parameters which are (the currency to convert from, the currency to convert to, and the value to convert)<\/li>\n<li>query a database to obtain the exchange rate between the two currencies<\/li>\n<li>do the calculation<\/li>\n<li>return the result(response) to the client<\/li>\n<\/ul>\n<p>All of this is handled by a web service<br \/>\nThese whole process is just the same as what happens during a function call. But in this case we give it a fancy name &#8216;web service&#8217; because it happens seamlessly over the web.<\/p>\n<p>Now there are two types of web services:<br \/>\n<i><span style=\"color: #990000;\">SOAP Web Services:<\/span> <\/i>SOAP stands for Simple Object Access Protocol and this is the traditional web service that have been around for some time. SOAP is based on XML.<a href=\"http:\/\/#\" target=\"_blank\" rel=\"noopener\"> Read more about SOAP here.<\/a><\/p>\n<p><span style=\"color: #cc0000;\"><i>REST Web Services:<\/i><\/span> REST stands for Representational State Transfer and is a newer type of web service. REST said to be (not a protocol or standard) but an architechtural style. It support both XML and JSON. <a href=\"http:\/\/#\" target=\"_blank\" rel=\"noopener\">Read more about REST here.<\/a><\/p>\n<p>&nbsp;<\/p>\n<h3><b>What is REST API?<\/b><\/h3>\n<p>Again we need to answer the question, &#8216;what is an API?&#8217;. API stands for Application Programmer&#8217;s Interface and defined as &#8216;a set of sub-routine definitions, tools and protocols for building a computer software&#8217;. An API is built using normal software development tools. But they are not complete applications. They are tools to be used by other applications or by a programmer in developing an application.<br \/>\nAn API based on REST is called REST API or RESTful API.<\/p>\n<p>Lets not get into the practical aspect as this would help make it clearer for you. We would build a REST API to solve the task below.<\/p>\n<p>&nbsp;<\/p>\n<h3><i><b><span style=\"color: #cc0000;\">Task<\/span><\/b><\/i><\/h3>\n<p><i><span style=\"color: #cc0000;\">Creaate a REST Web Service in .NET that exposes methods to<\/span><\/i><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><i><span style=\"color: #cc0000;\">Return a list of employees<\/span><\/i><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li><i><span style=\"color: #cc0000;\">Return an employee based on employeeID paramenter<\/span><\/i><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><b>Soltion: Creating RESTful API in Visual Studio(Step by Step)<\/b><\/h3>\n<p>We would cover thes seven simple steps and at the end we would have a complete web service in .Net that we can access through a browser or any other REST client.<br \/>\nYou can use Visual Studio 2013, 2015 or 2017.<\/p>\n<p>&nbsp;<\/p>\n<h3><b>Step 1: Create an Empty Web API project<\/b><\/h3>\n<p>When you are creatinga new project, make sure you select Web API project as shown in the Figure 1.<\/p>\n<div style=\"clear: both; text-align: center;\"><\/div>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/3.bp.blogspot.com\/-Rj3kl1PA9fc\/WrA07sou8hI\/AAAAAAAABbc\/70woKRcgEdw9X-nO57rJLX3l91bkU3s8QCLcBGAs\/s1600\/Figure%2B1.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/3.bp.blogspot.com\/-Rj3kl1PA9fc\/WrA07sou8hI\/AAAAAAAABbc\/70woKRcgEdw9X-nO57rJLX3l91bkU3s8QCLcBGAs\/s400\/Figure%2B1.jpg\" width=\"400\" height=\"241\" border=\"0\" data-original-height=\"577\" data-original-width=\"952\" \/>\u00a0<\/a><\/div>\n<div style=\"clear: both; text-align: center;\">Figure 1: Web API Template<\/div>\n<p>Give the applicaiton a name and Click OK<\/p>\n<div style=\"text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/2.bp.blogspot.com\/-eZ9e5lBgik8\/WrA07u-529I\/AAAAAAAABbg\/Cc5WSRKgTo8yabpvJBpg6hhEwJ6ArmGxgCLcBGAs\/s1600\/Figure%2B2.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/2.bp.blogspot.com\/-eZ9e5lBgik8\/WrA07u-529I\/AAAAAAAABbg\/Cc5WSRKgTo8yabpvJBpg6hhEwJ6ArmGxgCLcBGAs\/s400\/Figure%2B2.jpg\" width=\"400\" height=\"297\" border=\"0\" data-original-height=\"575\" data-original-width=\"770\" \/><\/a><\/div>\n<div style=\"text-align: center;\">Figure 2: Choose Empty, Select Web API<\/div>\n<p>Make sure that the Web API checkbox is selected then you can click OK to create the application.<br \/>\nAt this point the folders structure of your application is shown in Figure 3<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/2.bp.blogspot.com\/-rVxYwTSkxpk\/WrA28ieAZ4I\/AAAAAAAABbw\/UIq3URyOcHgp5_UnqayNkUOPpQTW-6YXACLcBGAs\/s1600\/Figure%2B3%2B-%2BFolder%2BStructure.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/2.bp.blogspot.com\/-rVxYwTSkxpk\/WrA28ieAZ4I\/AAAAAAAABbw\/UIq3URyOcHgp5_UnqayNkUOPpQTW-6YXACLcBGAs\/s400\/Figure%2B3%2B-%2BFolder%2BStructure.jpg\" width=\"400\" height=\"367\" border=\"0\" data-original-height=\"729\" data-original-width=\"791\" \/>\u00a0<\/a><\/div>\n<div style=\"clear: both; text-align: center;\">Figure 3: Folder Structure<\/div>\n<p><ins style=\"display: block; text-align: center;\" data-ad-client=\"ca-pub-7041870931346451\" data-ad-format=\"fluid\" data-ad-layout=\"in-article\" data-ad-slot=\"8227894917\"><\/ins><br \/>\n<b><\/b><\/p>\n<h3><b>Step 2: Test the Application<\/b><\/h3>\n<p>Build and run the application in Chrome or Firefox or any other browser and ensure that the the home page is displayed as shown below. (You can press F5 to run the application)<br \/>\nIt opens the browser window and displays the error page shown in Figure 4. This is not a problem.<\/p>\n<p>The error pages is displayed because we have not yet added any model, view or controller to our REST API.<br \/>\nClose the browser window and stop application from running.<\/p>\n<p>&nbsp;<\/p>\n<h3><b>Step 3: Add a Controller<\/b><\/h3>\n<p>Right-click on the Controller folder in the solution explorer and click on Add, an choose Controller<br \/>\nChoose &#8211; Web API 2 Controller &#8211; Empty<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/2.bp.blogspot.com\/-noJe6X7DN1Y\/WrA7dZ6GkUI\/AAAAAAAABb8\/TPe31Ki2hpof3feKEsAcAcMQ2osU2qeagCLcBGAs\/s1600\/Figure%2B4%2B-%2BController.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/2.bp.blogspot.com\/-noJe6X7DN1Y\/WrA7dZ6GkUI\/AAAAAAAABb8\/TPe31Ki2hpof3feKEsAcAcMQ2osU2qeagCLcBGAs\/s320\/Figure%2B4%2B-%2BController.jpg\" width=\"320\" height=\"221\" border=\"0\" data-original-height=\"660\" data-original-width=\"955\" \/>\u00a0<\/a><\/div>\n<div style=\"clear: both; text-align: center;\">Figure 4: Adding Controller<\/div>\n<p>Give it a name\u00a0 <i>EmployeeController<\/i><\/p>\n<p>&nbsp;<\/p>\n<h3><b>Step 4: Add a Model (Employee model)<\/b><\/h3>\n<p>A controller is another class in the Controllers folder of\u00a0 the solution that inherits from ApiController class.<\/p>\n<ul>\n<li>Right-click on the Model folder in the Solution Explorer and choose Add<\/li>\n<li>Click on New and choose Class.<\/li>\n<li>Enter the following code to the class to define our employee model.<\/li>\n<\/ul>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;\">\n<pre style=\"line-height: 125%; margin: 0;\">      <span style=\"color: #008800; font-weight: bold;\">public<\/span> <span style=\"color: #008800; font-weight: bold;\">class<\/span> <span style=\"color: #bb0066; font-weight: bold;\">Employee<\/span>\r\n    {\r\n        <span style=\"color: #008800; font-weight: bold;\">public<\/span> <span style=\"color: #333399; font-weight: bold;\">int<\/span> EmployeeId { <span style=\"color: #008800; font-weight: bold;\">get<\/span>; <span style=\"color: #008800; font-weight: bold;\">set<\/span>; }\r\n        <span style=\"color: #008800; font-weight: bold;\">public<\/span> <span style=\"color: #333399; font-weight: bold;\">string<\/span> Name { <span style=\"color: #008800; font-weight: bold;\">get<\/span>; <span style=\"color: #008800; font-weight: bold;\">set<\/span>; }\r\n        <span style=\"color: #008800; font-weight: bold;\">public<\/span> <span style=\"color: #333399; font-weight: bold;\">string<\/span>  City { <span style=\"color: #008800; font-weight: bold;\">get<\/span>; <span style=\"color: #008800; font-weight: bold;\">set<\/span>; }\r\n    }<\/pre>\n<\/div>\n<div style=\"text-align: center;\">Listing 1: Employee Model Class<\/div>\n<p>&nbsp;<\/p>\n<h3><b>Step 5: Create a List of Employees<\/b><\/h3>\n<p>Create a hard-coded list of employees in the controller class. This is shown in Listing 2.<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;\">\n<pre style=\"line-height: 125%; margin: 0;\">        List&lt;Employee&gt; employees = <span style=\"color: #008800; font-weight: bold;\">new<\/span> List&lt;Employee&gt;()\r\n        {\r\n            <span style=\"color: #008800; font-weight: bold;\">new<\/span> Employee{EmployeeId=<span style=\"color: #6600ee; font-weight: bold;\">1<\/span>, Name=<span style=\"background-color: #fff0f0;\">\"Kindson\"<\/span>, City =<span style=\"background-color: #fff0f0;\">\"Akokwa\"<\/span>},\r\n            <span style=\"color: #008800; font-weight: bold;\">new<\/span> Employee{EmployeeId =<span style=\"color: #6600ee; font-weight: bold;\">2<\/span>, Name=<span style=\"background-color: #fff0f0;\">\"Oleander\"<\/span>, City=<span style=\"background-color: #fff0f0;\">\"Lagos\"<\/span>},\r\n            <span style=\"color: #008800; font-weight: bold;\">new<\/span> Employee{EmployeeId =<span style=\"color: #6600ee; font-weight: bold;\">3<\/span>, Name=<span style=\"background-color: #fff0f0;\">\"Saffron\"<\/span>, City=<span style=\"background-color: #fff0f0;\">\"Gbagada\"<\/span>}\r\n        };<\/pre>\n<\/div>\n<div style=\"text-align: center;\">Listing 2: The Employees List<\/div>\n<p>&nbsp;<\/p>\n<h3><b>Step 6: Write the two Methods<\/b><\/h3>\n<p>The first method would be a method that returns a list of employees.<br \/>\nThe second method would take a parameter of an employeeId and return a particular employee that matches that particular id.<br \/>\nThe two methods is shown in Listing 3<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;\">\n<pre style=\"line-height: 125%; margin: 0;\"><span style=\"color: #0000cc;\">        [HttpGet]<\/span>\r\n        <span style=\"color: #008800; font-weight: bold;\">public<\/span> IEnumerable&lt;Employee&gt; getEmployees()\r\n        {\r\n            <span style=\"color: #008800; font-weight: bold;\">return<\/span> employees;\r\n        }<\/pre>\n<p><span style=\"color: #0000cc;\"> [HttpGet]<\/span><br \/>\n<span style=\"color: #008800; font-weight: bold;\">public<\/span> IEnumerable&lt;Employee&gt; getEmployeeById( <span style=\"color: #333399; font-weight: bold;\">int<\/span> id)<br \/>\n{<br \/>\n<span style=\"color: #333399; font-weight: bold;\">var<\/span> Emp = <span style=\"color: #008800; font-weight: bold;\">from<\/span> emp <span style=\"color: #008800; font-weight: bold;\">in<\/span> getEmployees()<br \/>\n<span style=\"color: #008800; font-weight: bold;\">where<\/span> emp.EmployeeId.Equals(id)<br \/>\n<span style=\"color: #008800; font-weight: bold;\">select<\/span> emp;<\/p>\n<p><span style=\"color: #008800; font-weight: bold;\">return<\/span> Emp.ToList&lt;Employee&gt;();<br \/>\n}<\/p>\n<\/div>\n<div style=\"text-align: center;\">Listing 3: Methods to return list of employee and single employee<\/div>\n<p>At this point the complete controller file would be like shown in Figure 5.<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/1.bp.blogspot.com\/-AumpL0tJ9S8\/WrA_cpWnbJI\/AAAAAAAABcI\/Lsa6gjxI8EcpTY4nXrAbd90j9MeGmAhCwCLcBGAs\/s1600\/Figure%2B5%2B-%2BFinal%2BController%2BFile.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/1.bp.blogspot.com\/-AumpL0tJ9S8\/WrA_cpWnbJI\/AAAAAAAABcI\/Lsa6gjxI8EcpTY4nXrAbd90j9MeGmAhCwCLcBGAs\/s640\/Figure%2B5%2B-%2BFinal%2BController%2BFile.jpg\" width=\"640\" height=\"350\" border=\"0\" data-original-height=\"800\" data-original-width=\"1458\" \/><\/a><\/div>\n<div style=\"clear: both; text-align: center;\">Figure 5: Final Controller File<\/div>\n<p>&nbsp;<\/p>\n<h3><b>Step 7: Modify the WebApiConfig.cs file<\/b><\/h3>\n<p>This file controls what the url that will be typed into the browser to access the data.<br \/>\nReplace routeTemplate code with this one:<\/p>\n<div style=\"text-align: center;\"><span style=\"color: blue;\">api\/{controller}\/{action}\/{id} <\/span><\/div>\n<p><span style=\"color: blue;\">The complete <\/span>WebAPIConfig.cs file\u00a0 will be as shown below.<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/2.bp.blogspot.com\/-yKZtdRwwubA\/WrBBMyfH4-I\/AAAAAAAABcU\/Q2hKaqsIpPM5cC2Qd07GbuqGQCZvZoWQgCLcBGAs\/s1600\/Figure%2B6%2B-%2BWebAPIConfig%2Bfile.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/2.bp.blogspot.com\/-yKZtdRwwubA\/WrBBMyfH4-I\/AAAAAAAABcU\/Q2hKaqsIpPM5cC2Qd07GbuqGQCZvZoWQgCLcBGAs\/s640\/Figure%2B6%2B-%2BWebAPIConfig%2Bfile.jpg\" width=\"640\" height=\"364\" border=\"0\" data-original-height=\"817\" data-original-width=\"1429\" \/><\/a><\/div>\n<div style=\"clear: both; text-align: center;\">Figure 6: WebAPIConfig File<\/div>\n<p>At this point, we are ready to test our API<\/p>\n<p>&nbsp;<\/p>\n<h3><b>Step 8: Test the API\u00a0<\/b><\/h3>\n<p>&nbsp;<\/p>\n<ul>\n<li>Rebuild\u00a0 and run the application.<\/li>\n<li>Run the applicaiton by pressing F5.<\/li>\n<li>The browser opens and displays an error page.<\/li>\n<\/ul>\n<p>Now, in the browser address bar, append the following <span style=\"color: blue;\">\/api\/Employee\/getEmployees\u00a0<\/span><br \/>\nThe output would be as shown in Figure 7.<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/2.bp.blogspot.com\/-MoxGI2ryxB4\/WrBDJ80tiWI\/AAAAAAAABcg\/9-3YRsO2dYEPfTgK9Ia3D91JV19nfXURgCLcBGAs\/s1600\/Figure%2B7%2B-%2BRun%2Bthe%2BApplication.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/2.bp.blogspot.com\/-MoxGI2ryxB4\/WrBDJ80tiWI\/AAAAAAAABcg\/9-3YRsO2dYEPfTgK9Ia3D91JV19nfXURgCLcBGAs\/s640\/Figure%2B7%2B-%2BRun%2Bthe%2BApplication.jpg\" width=\"640\" height=\"347\" border=\"0\" data-original-height=\"795\" data-original-width=\"1458\" \/>\u00a0<\/a><\/div>\n<div style=\"clear: both; text-align: center;\">Figure 7: Final Output<\/div>\n<p><i>Also test for getEmployeeById<\/i><br \/>\nNow replace the url with this one<span style=\"color: blue;\"> \/api\/Employee\/getEmployeeByID\/1<\/span><br \/>\nIf it displays a single record, then you have successfully completed this tutorial<\/p>\n<p>&nbsp;<\/p>\n<h3><b>Next Steps<\/b><\/h3>\n<p>I would like to let you know that working with Web API does not get more difficult than this. The next steps would also be as easy to follow as this one.<br \/>\nWe would now learn about RestClient, which is a tool you use to test web services.<br \/>\nThank you for reading!<\/p>\n<p>For video lessons, subscribe to my YouTube channel on: <a href=\"https:\/\/www.youtube.com\/channel\/UCvHgEAcw6VpcOA3864pSr5A\" target=\"_blank\" rel=\"noopener\">Tech and Programming Lessons on YouTube<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I must say, I never knew how easy and clear this topic of REST API is untill I did it myself. If you have any &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[289],"tags":[],"_links":{"self":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/127"}],"collection":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/comments?post=127"}],"version-history":[{"count":2,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/127\/revisions"}],"predecessor-version":[{"id":1309,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/127\/revisions\/1309"}],"wp:attachment":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/media?parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/categories?post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/tags?post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}