{"id":5511,"date":"2023-09-22T06:27:40","date_gmt":"2023-09-22T13:27:40","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/odata\/?p=5511"},"modified":"2023-09-24T22:00:55","modified_gmt":"2023-09-25T05:00:55","slug":"deep-insert-support-in-odata-client","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/odata\/deep-insert-support-in-odata-client\/","title":{"rendered":"Deep insert support in OData client"},"content":{"rendered":"<p>In the <a href=\"https:\/\/devblogs.microsoft.com\/odata\/deep-insert-support-in-odata-web-api\/\">Deep insert support in OData webapi<\/a> blog post, we demonstrated how to add deep insert capabilities to an OData service. In this blog post, we demonstrate how to add deep insert capabilities in OData client.<\/p>\n<p>In the following sections, we implement a client app.<\/p>\n<h2>Create a Console application<\/h2>\n<ul>\n<li>Start Visual Studio 2022 and select <strong>Create a new project<\/strong>.<\/li>\n<li>In the <strong>Create a new project<\/strong> dialog:\n<ul>\n<li>Enter <code>Console<\/code> in the <strong>Search for templates<\/strong> search box.<\/li>\n<li>Select <strong>Console App<\/strong> project template and select <strong>Next<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<li>Name the project <em>ODataClientDeepInsert<\/em> and select <strong>Next<\/strong>.<\/li>\n<li>In the <strong>Additional information<\/strong> dialog:\n<ul>\n<li>Select <strong>.NET 6.0 (Long Term Support)<\/strong>.<\/li>\n<li>Check <strong>Do not use top-level statements<\/strong> &#8211; not necessary if you&#8217;re comfortable with using top-level statements that limits you to using local variables and local functions.<\/li>\n<li>Select <strong>Create<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Install required packages<\/h2>\n<p>In our client application, we are going to use the <code>Microsoft.OData.Client<\/code> library that offers APIs for building deep insert requests and consuming deep insert responses.<\/p>\n<p>Run the following command on the Visual Studio <strong>Package Manager Console<\/strong> to install the <code><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.OData.Client\">Microsoft.OData.Client<\/a><\/code>\u00a0nuget package:<\/p>\n<p><code><span style=\"font-size: 1rem; text-align: var(--bs-body-text-align);\">Install-Package Microsoft.OData.Client<\/span><\/code><\/p>\n<h2>Generate proxy class<\/h2>\n<p>We generate a strongly-typed OData client proxy using the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=marketplace.ODataConnectedService2022\">OData Connected Service<\/a> extension.<\/p>\n<p>If <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=marketplace.ODataConnectedService2022\">OData Connected Service<\/a> extension is not installed, follow the steps below to install from the <a href=\"https:\/\/marketplace.visualstudio.com\/\">Visual Studio marketplace<\/a>:<\/p>\n<ul>\n<li>From the Visual Studio <strong>Extensions<\/strong> menu, select <strong>Manage Extensions<\/strong>.<\/li>\n<li>From the <strong>Manage Extensions<\/strong> window, type &#8220;OData Connected Service&#8221; on the <strong>Search<\/strong> box.<\/li>\n<li>The <strong>OData Connected Service 2022+<\/strong> extension should appear on the list if you&#8217;re using Visual Studio 2022.<\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><a href=\"https:\/\/devblogs.microsoft.com\/odata\/wp-content\/uploads\/sites\/23\/2023\/06\/media-resource-odata-client-install-ocs-extension.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-5436\" src=\"https:\/\/devblogs.microsoft.com\/odata\/wp-content\/uploads\/sites\/23\/2023\/06\/media-resource-odata-client-install-ocs-extension.png\" alt=\"Image media resource odata client install ocs extension\" width=\"941\" height=\"653\" srcset=\"https:\/\/devblogs.microsoft.com\/odata\/wp-content\/uploads\/sites\/23\/2023\/06\/media-resource-odata-client-install-ocs-extension.png 941w, https:\/\/devblogs.microsoft.com\/odata\/wp-content\/uploads\/sites\/23\/2023\/06\/media-resource-odata-client-install-ocs-extension-300x208.png 300w, https:\/\/devblogs.microsoft.com\/odata\/wp-content\/uploads\/sites\/23\/2023\/06\/media-resource-odata-client-install-ocs-extension-768x533.png 768w\" sizes=\"(max-width: 941px) 100vw, 941px\" \/><\/a><\/p>\n<ul>\n<li>A button labelled <strong>Download<\/strong>\u00a0should appear on the list item if the extension is not installed. Click the button to install the extension.<\/li>\n<\/ul>\n<p>Ensure that the ASP.NET Core application created in <a href=\"https:\/\/devblogs.microsoft.com\/odata\/deep-insert-support-in-odata-web-api\/\">Deep insert support in OData webapi<\/a> is running before proceeding with the following steps to generate the OData client proxy:<\/p>\n<ul>\n<li>In <strong>Solution Explorer<\/strong>, right-click <strong>ODataClientDeepInsert<\/strong> project. Click <strong>Add<\/strong> &gt; <strong>Connected Service<\/strong> to open the <strong>Connected Services<\/strong> view.<\/li>\n<li>Click <strong>OData Connected Service<\/strong> (under <strong>Other Services<\/strong>) to launch the OData Connected Service wizard.<\/li>\n<li>On the <strong>Endpoint<\/strong> wizard page, provide a suitable service name (e.g., <em>DeepInsertService<\/em>) and enter the endpoint which the OData service from \u00a0<a href=\"https:\/\/devblogs.microsoft.com\/odata\/deep-insert-support-in-odata-web-api\/\">Deep insert support in OData webapi<\/a> is listening on, e.g., <a href=\"http:\/\/localhost:5000\">http:\/\/localhost:5000<\/a>. If you specified a route prefix for the OData service, make sure to append it to the endpoint, e.g., <a href=\"http:\/\/localhost:5000\/ROUTE_PREFIX\">http:\/\/localhost:5000\/ROUTE_PREFIX<\/a>.<\/li>\n<li>Click <strong>Next<\/strong> to move to the <strong>Schema Types Selection<\/strong> wizard page. Leave everything unchanged.<\/li>\n<li>Click <strong>Next<\/strong> again to move to the <strong>Function\/Action Imports Selection<\/strong> wizard page. Leave everything unchanged.<\/li>\n<li>Click <strong>Next<\/strong> again to move to the <strong>Settings<\/strong> wizard page. If you wish, you can provide your own name for the client proxy, e.g. <em>ODataClientDeepInsertProxy<\/em>. Leave the other settings unchanged.<\/li>\n<li>Click <strong>Finish<\/strong> to trigger the generation of the client proxy.<\/li>\n<\/ul>\n<h2>Create a deep insert request<\/h2>\n<p>We will explore various methods that we use to create deep insert requests.<\/p>\n<h3>AddRelatedObject method<\/h3>\n<p>In the <strong>Program.cs<\/strong> file&#8217;s Main method, add the code below:<\/p>\n<p><code>Example 1<\/code><\/p>\n<pre class=\"prettyprint language-cs language-csharp\"><code class=\"language-cs language-csharp\">DataServiceContext context = new Container(new Uri(\"http:\/\/localhost:5000\"));\r\n\r\nPerson person = new Person\r\n{\r\n    ID = 100,\r\n    Name = \"Person 100\"\r\n};\r\n\r\nCar car = new Car\r\n{\r\n    ID = 1001,\r\n    Name = \"Car 1001\"\r\n};\r\n\r\ncontext.AddObject(\"Persons\", person);\r\ncontext.AddRelatedObject(this.person, \"Cars\", car);\r\n\r\nDataServiceResponse response = this.context.DeepInsert&lt;Person&gt;(this.person);<\/code><\/pre>\n<p><span class=\"TextRun SCXW76846850 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><strong><span class=\"NormalTextRun SpellingErrorV2Themed SpellingErrorHighlight SCXW76846850 BCX8\">AddRelatedObject <\/span><\/strong><span class=\"NormalTextRun SpellingErrorV2Themed SpellingErrorHighlight SCXW76846850 BCX8\">method a<\/span><\/span><span class=\"TextRun SCXW76846850 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW76846850 BCX8\">dds a related object to the context and creates the link that defines the relationship between the two objects (<strong>Person<\/strong> and <strong>Car<\/strong>) in a single request. The nested property MUST be a collection-valued navigation property.<\/span><\/span><\/p>\n<p>Below is the request payload created:<\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">{\r\n  \"ID\": 100,\r\n  \"Name\": \"Person 100\",\r\n  \"Cars\": [\r\n    {\r\n      \"ID\": 1001,\r\n      \"Name\": \"Car 1001\"\r\n    }\r\n  ]\r\n}<\/code><\/pre>\n<p>We could call <strong>AddRelatedObject<\/strong> to support multiple nestings of related objects: Let&#8217;s update the code in <strong>Program.cs<\/strong> to look like below:<\/p>\n<p><code>Example 2<\/code><\/p>\n<pre class=\"prettyprint language-cs language-csharp\"><code class=\"language-cs language-csharp\">DataServiceContext context = new Container(new Uri(\"http:\/\/localhost:5000\"));\r\n\r\nPerson person = new Person\r\n{\r\n    ID = 100,\r\n    Name = \"Person 100\"\r\n};\r\n\r\nCar car = new Car\r\n{\r\n    ID = 1001,\r\n    Name = \"Car 1001\"\r\n};\r\n\r\nManufacturer manufacturer = new Manufacturer\r\n{\r\n    ID = 11,\r\n    Name = \"Manu-A\"\r\n};\r\n\r\nCountry country = new Country\r\n{\r\n    ID = 101,\r\n    Name = \"CountryA\"\r\n};\r\n\r\ncontext.AddObject(\"Persons\", person);\r\ncontext.AddRelatedObject(person, \"Cars\", car);\r\ncontext.AddRelatedObject(car, \"Manufacturers\", manufacturer);\r\ncontext.AddRelatedObject(manufacturer, \"Countries\", country);\r\n\r\nDataServiceResponse response = this.context.DeepInsert&lt;Person&gt;(person);<\/code><\/pre>\n<p>Below is the request payload created:<\/p>\n<pre class=\"prettyprint language-json\"><code class=\"language-json\">{\r\n  \"ID\": 100,\r\n  \"Name\": \"Person 100\",\r\n  \"Cars\": [\r\n    {\r\n      \"ID\": 1001,\r\n      \"Name\": null,\r\n      \"Manufacturers\": [\r\n        {\r\n          \"ID\": 11,\r\n          \"Name\": \"Manu-A\",\r\n          \"Countries\": [\r\n            {\r\n              \"ID\": 101,\r\n              \"Name\": \"CountryA\"\r\n            }\r\n          ]\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n}<\/code><\/pre>\n<h2>AddLink method<\/h2>\n<p>In the <strong>Program.cs<\/strong> file&#8217;s <strong>Main<\/strong> method, add the code below:<\/p>\n<p><code>Example 3<\/code><\/p>\n<pre class=\"prettyprint language-cs language-csharp\"><code class=\"language-cs language-csharp\">DataServiceContext context = new Container(new Uri(\"http:\/\/localhost:5000\"));\r\n\r\nPerson person = new Person\r\n{\r\n    ID = 100,\r\n    Name = \"Person 100\"\r\n};\r\n\r\nCar car1 = new Car\r\n{\r\n    ID = 1001,\r\n    Name = \"Car 1001\"\r\n};\r\n\r\nCar car2 = new Car\r\n{\r\n    ID = 1002,\r\n    Name = \"Car 1002\"\r\n};\r\n\r\ncontext.AddObject(\"Persons\", person);\r\ncontext.AttachTo(\"Cars\", car1);\r\ncontext.AttachTo(\"Cars\", car2);\r\ncontext.AddLink(person, \"Cars\", car1);\r\ncontext.AddLink(person, \"Cars\", car2);\r\n\r\nDataServiceResponse response = this.context.DeepInsert&lt;Person&gt;(person);<\/code><\/pre>\n<p><strong>AddLink<\/strong> method a<span class=\"TextRun SCXW233270149 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW233270149 BCX8\">dds the specified link to the set of objects the <\/span><span class=\"NormalTextRun SCXW233270149 BCX8\">DataServiceContext<\/span><span class=\"NormalTextRun SCXW233270149 BCX8\"> is tracking. <span class=\"TextRun SCXW76846850 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW76846850 BCX8\">The nested property MUST be a collection-valued navigation property.<\/span><\/span><\/span><\/span><\/p>\n<p><span class=\"TextRun SCXW233270149 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW233270149 BCX8\">In the code above, we called <strong>AttachTo<\/strong> so that the <strong>dataservicecontext<\/strong> can track <strong>car1<\/strong> and <strong>car2. <\/strong><\/span><\/span>Then we call <strong>AddLink<\/strong> method to create a link between <strong>person<\/strong> and <strong>car1<\/strong> and another link between <strong>person<\/strong> and <strong>car2<\/strong>.<\/p>\n<p>Below is the request payload created:<\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">{\r\n  \"ID\": 100,\r\n  \"Name\": \"Bing\",\r\n  \"Cars\": [\r\n    {\r\n      \"@id\": \"http:\/\/localhost:5000\/Cars(1001)\"\r\n    },\r\n    {\r\n      \"@id\": \"http:\/\/localhost:5000\/Cars(1002)\"\r\n    }\r\n  ]\r\n}<\/code><\/pre>\n<p><code>@id<\/code> can be used interchangeably with <code>@odata.id<\/code>.<\/p>\n<p>If we looked keenly, <code>AddLink<\/code> and <code>AddRelatedObject<\/code> methods above are used to link or add objects to <strong>collection-valued navigation properties<\/strong>. We will now discuss methods that are used to link or add objects to <strong>single-valued navigation properties<\/strong>.<\/p>\n<h3>SetRelatedObject method<\/h3>\n<p>In the <strong>Program.cs<\/strong> file&#8217;s Main method, add the code below:<\/p>\n<p><code>Example 4<\/code><\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">DataServiceContext context = new Container(new Uri(\"http:\/\/localhost:5000\"));\r\n\r\nVipPerson vipPerson = new VipPerson\r\n{\r\n    ID = 100,\r\n    Name = \"Person 100\"\r\n};\r\n\r\nCar car = new Car\r\n{\r\n    ID = 1001,\r\n    Name = \"Car 1001\"\r\n};\r\n\r\ncontext.AddObject(\"VipPersons\", vipPerson);\r\ncontext.SetRelatedObject(vipPerson, \"Car\", car);\r\n\r\nDataServiceResponse response = this.context.DeepInsert&lt;VipPerson&gt;(vipPerson);<\/code><\/pre>\n<p><span class=\"TextRun SCXW76846850 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><strong><span class=\"NormalTextRun SpellingErrorV2Themed SpellingErrorHighlight SCXW76846850 BCX8\">SetRelatedObject <\/span><\/strong><span class=\"NormalTextRun SpellingErrorV2Themed SpellingErrorHighlight SCXW76846850 BCX8\">method Adds a related object to the context and creates the link that defines the relationship between the two objects <\/span><\/span><span class=\"TextRun SCXW76846850 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW76846850 BCX8\">(<strong>VipPerson <\/strong>and <strong>Car<\/strong>) in a single request. The nested property MUST be a single-valued navigation property.<\/span><\/span><\/p>\n<p>Below is the created payload:<\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">{\r\n  \"ID\": 100,\r\n  \"Name\": \"Person 100\",\r\n  \"Car\": {\r\n    \"ID\": 1001,\r\n    \"Name\": \"Car 1001\"\r\n  }\r\n}<\/code><\/pre>\n<h3>SetRelatedObjectLink<\/h3>\n<p>In the <strong>Program.cs<\/strong> file&#8217;s <strong>Main<\/strong> method, add the code below:<\/p>\n<p><code>Example 5<\/code><\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">DataServiceContext context = new Container(new Uri(\"http:\/\/localhost:5000\"));\r\n\r\nVipPerson vipPerson = new VipPerson\r\n{\r\n    ID = 100,\r\n    Name = \"Person 100\"\r\n};\r\n\r\nCar car = new Car\r\n{\r\n    ID = 1001,\r\n    Name = \"Car 1001\"\r\n};\r\n\r\ncontext.AddObject(\"VipPersons\", vipPerson);\r\ncontext.AttachTo(\"Cars\", car);\r\ncontext.SetRelatedObjectLink(vipPerson, \"Car\", car);\r\n\r\nDataServiceResponse response = this.context.DeepInsert&lt;VipPerson&gt;(vipPerson);<\/code><\/pre>\n<p><strong>SetRelatedObjectLink<\/strong> method adds the specified link to the set of objects the DataServiceContext is tracking. The nested property MUST be a single-valued navigation property.<\/p>\n<p><span class=\"TextRun SCXW233270149 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW233270149 BCX8\">In the code above, we called <strong>AttachTo<\/strong> so that the <strong>DataServiceContext<\/strong> can track the <strong>car <\/strong>object.<strong>\u00a0<\/strong><\/span><\/span>Then we call <strong>SetRelatedObjectLink <\/strong>method to create a link between <strong>person<\/strong> and <strong>car<\/strong>.<\/p>\n<p>Below is the created payload:<\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">{\r\n  \"ID\": 100,\r\n  \"Name\": \"Bing\",\r\n  \"Car\": {\r\n    \"@id\": \"http:\/\/localhost:5000\/Cars(1001)\"\r\n  }\r\n}<\/code><\/pre>\n<h2>Handle a deep insert response<\/h2>\n<p>Responses from <code>deep insert<\/code>requests are stored in a <code>DataServiceResponse<\/code>.<\/p>\n<p>The\u00a0<code>DataServiceResponse<\/code> object includes a sequence of <code>OperationResponse<\/code> objects that, in turn, contain a sequence of <code>EntityDescriptor<\/code>\u00a0or\u00a0<code>LinkDescriptor<\/code> instances that represent the changes persisted or attempted. When an entity is created or modified in the data service, the <code>EntityDescriptor<\/code> includes a reference to the updated entity, including any server-generated property values, such as the generated ID value.<\/p>\n<p>Each <code>OperationResponse<\/code> can contain a nested sequence of <code>OperationResponse<\/code> objects.<\/p>\n<p>Below will be the json response from the deep insert request in <code>example 2<\/code><\/p>\n<pre class=\"prettyprint language-json\"><code class=\"language-json\">{\r\n  \"@context\": \"http:\/\/localhost:5000\/$metadata#Persons(Cars())\/$entity\",\r\n  \"ID\": 100,\r\n  \"Name\": \"Person 100\",\r\n  \"Cars\": [\r\n    {\r\n      \"ID\": 1001,\r\n      \"Name\": null,\r\n      \"Manufacturers\": [\r\n        {\r\n          \"ID\": 11,\r\n          \"Name\": \"Manu-A\",\r\n          \"Countries\": [\r\n            {\r\n              \"ID\": 101,\r\n              \"Name\": \"CountryA\"\r\n            }\r\n          ]\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n}<\/code><\/pre>\n<p>Let&#8217;s look at how we can extract values from a deep insert response in <code>example 2<\/code><\/p>\n<pre class=\"prettyprint language-cs language-csharp\"><code class=\"language-cs language-csharp\">DataServiceResponse response = this.context.DeepInsert&lt;Person&gt;(this.person);\r\n\r\nChangeOperationResponse changeOperationResponse = response.First() as ChangeOperationResponse;\r\nEntityDescriptor entityDescriptor = changeOperationResponse.Descriptor as EntityDescriptor;\r\nPerson returnedPerson = entityDescriptor.Entity as Person;\r\n\r\nChangeOperationResponse nestedResponseCars = changeOperationResponse.NestedResponses[0] as ChangeOperationResponse;\r\nEntityDescriptor carDescriptor = nestedResponseCars.Descriptor as EntityDescriptor;\r\nCar returnedCar = carDescriptor.Entity as Car;\r\n\r\nChangeOperationResponse nestedResponseManufacturers = nestedResponseCars.NestedResponses[0] as ChangeOperationResponse;\r\nEntityDescriptor manuDescriptor = nestedResponseManufacturers.Descriptor as EntityDescriptor;\r\nManufacturer returnedManufacturer = manuDescriptor.Entity as Manufacturer;\r\n\r\nChangeOperationResponse nestedResponseCountries= nestedResponseManufacturers.NestedResponses[0] as ChangeOperationResponse;\r\nEntityDescriptor countryDescriptor = nestedResponseCountries.Descriptor as EntityDescriptor;\r\nCountry returnedCountry = countryDescriptor.Entity as Country;<\/code><\/pre>\n<h2>Handling failed responses<\/h2>\n<p>When the have failed responses, the <code>DataServiceResponse<\/code> will still be created with the sequence of <code>OperationResponse<\/code> objects.<\/p>\n<p><code>OperationResponse<\/code> objects for failed responses will contain the <code>Error<\/code> property which is an\u00a0<a class=\"no-loc\" href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/api\/system.exception\" data-linktype=\"absolute-path\">Exception<\/a> object that contains the error.<\/p>\n<h2>Conclusion<\/h2>\n<p>This blog post provides an overview of the various methods we use to create deep insert requests and handle responses. We hope this is the starting point for you to add more capabilities to your OData client projects.<\/p>\n<p><code class=\"language-cs language-csharp\"><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Deep insert support in OData webapi blog post, we demonstrated how to add deep insert capabilities to an OData service. In this blog post, we demonstrate how to add deep insert capabilities in OData client. In the following sections, we implement a client app. Create a Console application Start Visual Studio 2022 and [&hellip;]<\/p>\n","protected":false},"author":20598,"featured_media":3253,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5511","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-odata"],"acf":[],"blog_post_summary":"<p>In the Deep insert support in OData webapi blog post, we demonstrated how to add deep insert capabilities to an OData service. In this blog post, we demonstrate how to add deep insert capabilities in OData client. In the following sections, we implement a client app. Create a Console application Start Visual Studio 2022 and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/posts\/5511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/users\/20598"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/comments?post=5511"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/posts\/5511\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/media\/3253"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/media?parent=5511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/categories?post=5511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/tags?post=5511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}