{"id":310,"date":"2016-05-04T13:55:55","date_gmt":"2016-05-04T13:55:55","guid":{"rendered":"http:\/\/www.appinf.com\/blog\/?p=310"},"modified":"2016-09-02T10:38:19","modified_gmt":"2016-09-02T10:38:19","slug":"implementing-rest-apis-in-c-with-pocopro-remoting","status":"publish","type":"post","link":"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/","title":{"rendered":"Implementing REST APIs in C++ with POCO<sup>PRO<\/sup> Remoting"},"content":{"rendered":"<p>Starting with the 2016.1 release of the POCO<sup>PRO<\/sup> frameworks a new feature has been added to the <a href=\"http:\/\/www.appinf.com\/features.html#remoting\">Remoting NG<\/a> toolkit that makes it easy to implement <a href=\"https:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer\">RESTful web services<\/a> in C++. Remoting NG is a distributed objects and web services framework for C++, based on annotated C++ class definitions and a code generator. Remoting NG enables distributed applications using high-level object-based inter-process communication, remote method invocation or web services based on JSON-RPC or SOAP. For example, a (simplistic) remote service for user account management (using the TCP-based transport protocol, JSON-RPC or SOAP) could be implemented as follows:<\/p>\r\n\r\n<code>\/\/@ serialize\r\nstruct User\r\n{\r\n    std::string name;\r\n    Poco::Optional&lt;std::string&gt; password;\r\n    Poco::Optional&lt;std::set&lt;std::string&gt;&gt; permissions;\r\n    Poco::Optional&lt;std::set&lt;std::string&gt;&gt; roles;\r\n};\r\n\r\n\r\n\/\/@ remote\r\nclass UserManager\r\n{\r\npublic:\r\n    UserManager(\/* ... *\/);\r\n    ~UserManager();\r\n\r\n    void addUser(const User& user);\r\n    void updateUser(const User& user);\r\n    User getUser(const std::string& username);\r\n    void deleteUser(const std::string& username);\r\n\r\nprivate:\r\n    \/\/ ...\r\n};\r\n<\/code>\r\n\r\n<p>Based on the above declarations, the Remoting NG code generator is used to generate generic code for serialization\/deserialization and remote invocation (proxy, skeleton, etc.) that allows the UserManager class to become a remote service (based on the TCP transport) or web service using SOAP or JSON-RPC 2.0. To learn more about how everything works, please see the <a href=\"http:\/\/www.appinf.com\/docs\/poco\/00100-RemotingNGOverview.html\">overview<\/a> and <a href=\"http:\/\/www.appinf.com\/docs\/poco\/00150-RemotingNGTutorialPart1.html\">tutorials<\/a> (<a href=\"http:\/\/www.appinf.com\/docs\/poco\/00151-RemotingNGTutorialPart2.html\">part 2<\/a>, <a href=\"http:\/\/www.appinf.com\/docs\/poco\/00152-RemotingNGTutorialPart3.html\">part 3<\/a>) in the <a href=\"http:\/\/docs.appinf.com\">documentation<\/a>. Starting with the 2016.1 release, Remoting NG can also be used to implement a REST web service. For this to work, the service class must be implemented in a different way. In fact, multiple classes will be used that cover different aspects of the web service according to REST principles. A typical implementation could consist of the following API endpoints:<\/p>\r\n\r\n<h3>Retrieving a list of users<\/h3>\r\n\r\n<p>This is achieved with a GET request to the <i>users<\/i> collection:<\/p>\r\n\r\n<code>GET \/api\/1.0\/users HTTP\/1.1\r\nHost: localhost:80\r\n\r\n<\/code>\r\n\r\n<p>The response looks like:<\/p>\r\n\r\n<code>HTTP\/1.1 200 OK\r\nContent-Type: application\/json\r\nContent-Length: nnn\r\n\r\n[\r\n    {\r\n        \"name\": \"admin\",\r\n        \"permissions: \r\n        [\r\n        ],\r\n        \"roles\":\r\n        [\r\n            \"administrator\"\r\n        ]\r\n    },\r\n    {\r\n        ...\r\n    }\r\n]\r\n<\/code>\r\n\r\n<p>Using query parameters, the result can be filtered or restricted:<\/p>\r\n\r\n<code>GET \/api\/1.0\/users?maxResults=10&start=10 HTTP\/1.1\r\nHost: localhost:80\r\n\r\n<\/code>\r\n\r\n<h3>Creating a user<\/h3>\r\n\r\n<p>This is achieved with a POST request to the <i>users<\/i> collection:<\/p>\r\n\r\n<code>POST \/api\/1.0\/users HTTP\/1.1\r\nHost: localhost:80\r\nContent-Type: application\/json\r\nContent-Length: nnn\r\n\r\n{\r\n    \"name\": \"admin\",\r\n    \"password\": \"s3cr3t\",\r\n    \"permissions\": [\r\n    ],\r\n    \"roles\": [\r\n        \"administrator\"\r\n    ]\r\n}\r\n<\/code>\r\n\r\n<h3>Updating and deleting a user<\/h3>\r\n\r\n<p>We'd also like to be able to update and delete user accounts:<\/p>\r\n\r\n<code>PATCH \/api\/1.0\/users\/admin HTTP\/1.1\r\nHost: localhost:80\r\nContent-Type: application\/json\r\nContent-Length: nnn\r\n\r\n{\r\n    \"permissions\": [\r\n        \"somePermission\"\r\n    ]\r\n}\r\n<\/code>\r\n\r\n<code>DELETE \/api\/1.0\/users\/admin HTTP\/1.1\r\nHost: localhost:80\r\n\r\n<\/code>\r\n\r\n<p>To keep things simple, we'll leave the supported operations at that. A real service could also add endpoints for nested objects such as permissions or roles. Implementing such a web service is straightforward with Remoting. We need to provide two C++ classes, one for handling the user collection, and the other for handling a single user account. The class declarations are shown in the following (we're using the <i>User<\/i> struct from above, but make the <i>name<\/i> field optional):<\/p>\r\n\r\n<code>\r\n\/\/@ serialize\r\nstruct User\r\n{\r\n    Poco::Optional&lt;std::string&gt; name;\r\n    Poco::Optional&lt;std::string&gt; password;\r\n    Poco::Optional&lt;std::set&lt;std::string&gt;&gt; permissions;\r\n    Poco::Optional&lt;std::set&lt;std::string&gt;&gt; roles;\r\n};\r\n\r\n\r\n\/\/@ remote\r\n\/\/@ path=\"\/api\/1.0\/users\"\r\nclass UserCollectionEndpoint\r\n{\r\npublic:\r\n    UserCollectionEndpoint(\/* ... *\/);\r\n    ~UserCollectionEndpoint();\r\n\r\n    User post(const User& user);\r\n        \/\/\/ Create a new user.\r\n\r\n    \/\/@ $maxResults={in=query, mandatory=false}\r\n    \/\/@ $start={in=query, mandatory=false}\r\n    std::vector<User> get(int maxResults = 0, int start = 0);\r\n        \/\/\/ Return a list of user objects, starting with\r\n        \/\/\/ the given start index, and return at most\r\n        \/\/\/ maxResults items.\r\n\r\nprivate:\r\n    \/\/ ...\r\n};\r\n\r\n\r\n\/\/@ remote\r\n\/\/@ path=\"\/api\/1.0\/users\/{name}\"\r\nclass UserEndpoint\r\n{\r\npublic:\r\n    UserEndpoint(\/* ... *\/);\r\n    ~UserEndpoint();\r\n\r\n    \/\/@ $name={in=path}\r\n    User put(const std::string& name, const User& user);\r\n        \/\/\/ Update a user (calls patch()).\r\n\r\n    \/\/@ $name={in=path}\r\n    User patch(const std::string& name, const User& user);\r\n        \/\/\/ Update a user.\r\n\r\n    \/\/@ $name={in=path}\r\n    User get(const std::string& name);\r\n        \/\/\/ Retrieve a user by name.\r\n\r\n    \/\/@ $name={in=path}\r\n    void delete_(const std::string& name);\r\n        \/\/\/ Delete a user.\r\n\r\nprivate:\r\n    \/\/ ...\r\n};\r\n<\/code>\r\n\r\n<p>What can be seen in the above code samples is that we only have to implement member functions for the HTTP methods (GET, POST, PUT, PATCH, DELETE) that out API supports. We don't have to deal with the details of parsing or creating JSON, or handling request URIs and query strings, or the intricacies of HTTP requests. The Remoting REST framework does all these things automatically, using code generated by the Remoting code generator, based on the annotations in the header files. For example, for the <i>UserCollectionEndpoint::post()<\/i> method, the parameter is automatically serialized and deserialized to\/from JSON, whereas for <i>UserEndpoint::put()<\/i>, the name of the user is extracted from the request path (note the placeholder <i>{name}<\/i> in the path annotation). Parameters passed in a query can also be handled, as seen in <i>UserCollectionEndpoint::get()<\/i>. Parameters can also be passed in HTTP request\/response headers or in a form. Furthermore, HTTP authentication (basic, digest) is supported, as well as HTTPS.<\/p>\r\n\r\n<p>As can be seen, implementing REST web service in C++ really becomes easy, given a powerful toolkit like the POCO<sup>PRO<\/sup> Remoting. For more information, please refer to the <a href=\"http:\/\/docs.appinf.com\">documentation<\/a>. To try it out yourself, get a <a href=\"http:\/\/www.appinf.com\/getstarted.hmtl\">free evaluation version<\/a> for Windows, Linux or OS X.<\/p>\r\n\r\n(Post updated 2016-09-02)","protected":false},"excerpt":{"rendered":"<p>Starting with the 2016.1 release of the POCOPRO frameworks a new feature has been added to the Remoting NG toolkit that makes it easy to implement RESTful web services in C++. Remoting NG is a distributed objects and web services framework for C++, based on annotated C++ class definitions and a code generator. Remoting NG [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_eb_attr":"","footnotes":""},"categories":[4,26],"tags":[39],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Implementing REST APIs in C++ with POCOPRO Remoting - macchina.io Blog [STAGING]<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Implementing REST APIs in C++ with POCOPRO Remoting - macchina.io Blog [STAGING]\" \/>\n<meta property=\"og:description\" content=\"Starting with the 2016.1 release of the POCOPRO frameworks a new feature has been added to the Remoting NG toolkit that makes it easy to implement RESTful web services in C++. Remoting NG is a distributed objects and web services framework for C++, based on annotated C++ class definitions and a code generator. Remoting NG [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/\" \/>\n<meta property=\"og:site_name\" content=\"macchina.io Blog [STAGING]\" \/>\n<meta property=\"article:published_time\" content=\"2016-05-04T13:55:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-09-02T10:38:19+00:00\" \/>\n<meta name=\"author\" content=\"G\u00fcnter Obiltschnig\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@macchina_io\" \/>\n<meta name=\"twitter:site\" content=\"@macchina_io\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"G\u00fcnter Obiltschnig\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/\"},\"author\":{\"name\":\"G\u00fcnter Obiltschnig\",\"@id\":\"https:\/\/web-staging.macchina.io\/blog\/#\/schema\/person\/85e732123d4102689b6436b2807a626b\"},\"headline\":\"Implementing REST APIs in C++ with POCOPRO Remoting\",\"datePublished\":\"2016-05-04T13:55:55+00:00\",\"dateModified\":\"2016-09-02T10:38:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/\"},\"wordCount\":581,\"publisher\":{\"@id\":\"https:\/\/web-staging.macchina.io\/blog\/#organization\"},\"keywords\":[\"featured\"],\"articleSection\":[\"C++\",\"Remoting\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/\",\"url\":\"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/\",\"name\":\"Implementing REST APIs in C++ with POCOPRO Remoting - macchina.io Blog [STAGING]\",\"isPartOf\":{\"@id\":\"https:\/\/web-staging.macchina.io\/blog\/#website\"},\"datePublished\":\"2016-05-04T13:55:55+00:00\",\"dateModified\":\"2016-09-02T10:38:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/web-staging.macchina.io\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Implementing REST APIs in C++ with POCOPRO Remoting\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/web-staging.macchina.io\/blog\/#website\",\"url\":\"https:\/\/web-staging.macchina.io\/blog\/\",\"name\":\"macchina.io Blog [STAGING]\",\"description\":\"Internet of Things, edge computing, IoT device software, C++\",\"publisher\":{\"@id\":\"https:\/\/web-staging.macchina.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/web-staging.macchina.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/web-staging.macchina.io\/blog\/#organization\",\"name\":\"macchina.io\",\"url\":\"https:\/\/web-staging.macchina.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/web-staging.macchina.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/macchina.io\/blog\/wp-content\/uploads\/2018\/08\/macchina.io_emp_logo.png\",\"contentUrl\":\"https:\/\/macchina.io\/blog\/wp-content\/uploads\/2018\/08\/macchina.io_emp_logo.png\",\"width\":1537,\"height\":529,\"caption\":\"macchina.io\"},\"image\":{\"@id\":\"https:\/\/web-staging.macchina.io\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/macchina_io\",\"https:\/\/www.linkedin.com\/showcase\/37869369\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/web-staging.macchina.io\/blog\/#\/schema\/person\/85e732123d4102689b6436b2807a626b\",\"name\":\"G\u00fcnter Obiltschnig\",\"sameAs\":[\"http:\/\/www.appinf.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Implementing REST APIs in C++ with POCOPRO Remoting - macchina.io Blog [STAGING]","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:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/","og_locale":"en_US","og_type":"article","og_title":"Implementing REST APIs in C++ with POCOPRO Remoting - macchina.io Blog [STAGING]","og_description":"Starting with the 2016.1 release of the POCOPRO frameworks a new feature has been added to the Remoting NG toolkit that makes it easy to implement RESTful web services in C++. Remoting NG is a distributed objects and web services framework for C++, based on annotated C++ class definitions and a code generator. Remoting NG [&hellip;]","og_url":"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/","og_site_name":"macchina.io Blog [STAGING]","article_published_time":"2016-05-04T13:55:55+00:00","article_modified_time":"2016-09-02T10:38:19+00:00","author":"G\u00fcnter Obiltschnig","twitter_card":"summary_large_image","twitter_creator":"@macchina_io","twitter_site":"@macchina_io","twitter_misc":{"Written by":"G\u00fcnter Obiltschnig","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/#article","isPartOf":{"@id":"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/"},"author":{"name":"G\u00fcnter Obiltschnig","@id":"https:\/\/web-staging.macchina.io\/blog\/#\/schema\/person\/85e732123d4102689b6436b2807a626b"},"headline":"Implementing REST APIs in C++ with POCOPRO Remoting","datePublished":"2016-05-04T13:55:55+00:00","dateModified":"2016-09-02T10:38:19+00:00","mainEntityOfPage":{"@id":"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/"},"wordCount":581,"publisher":{"@id":"https:\/\/web-staging.macchina.io\/blog\/#organization"},"keywords":["featured"],"articleSection":["C++","Remoting"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/","url":"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/","name":"Implementing REST APIs in C++ with POCOPRO Remoting - macchina.io Blog [STAGING]","isPartOf":{"@id":"https:\/\/web-staging.macchina.io\/blog\/#website"},"datePublished":"2016-05-04T13:55:55+00:00","dateModified":"2016-09-02T10:38:19+00:00","breadcrumb":{"@id":"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/web-staging.macchina.io\/blog\/c\/implementing-rest-apis-in-c-with-pocopro-remoting\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/web-staging.macchina.io\/blog\/"},{"@type":"ListItem","position":2,"name":"Implementing REST APIs in C++ with POCOPRO Remoting"}]},{"@type":"WebSite","@id":"https:\/\/web-staging.macchina.io\/blog\/#website","url":"https:\/\/web-staging.macchina.io\/blog\/","name":"macchina.io Blog [STAGING]","description":"Internet of Things, edge computing, IoT device software, C++","publisher":{"@id":"https:\/\/web-staging.macchina.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/web-staging.macchina.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/web-staging.macchina.io\/blog\/#organization","name":"macchina.io","url":"https:\/\/web-staging.macchina.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/web-staging.macchina.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/macchina.io\/blog\/wp-content\/uploads\/2018\/08\/macchina.io_emp_logo.png","contentUrl":"https:\/\/macchina.io\/blog\/wp-content\/uploads\/2018\/08\/macchina.io_emp_logo.png","width":1537,"height":529,"caption":"macchina.io"},"image":{"@id":"https:\/\/web-staging.macchina.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/macchina_io","https:\/\/www.linkedin.com\/showcase\/37869369"]},{"@type":"Person","@id":"https:\/\/web-staging.macchina.io\/blog\/#\/schema\/person\/85e732123d4102689b6436b2807a626b","name":"G\u00fcnter Obiltschnig","sameAs":["http:\/\/www.appinf.com"]}]}},"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/web-staging.macchina.io\/blog\/wp-json\/wp\/v2\/posts\/310"}],"collection":[{"href":"https:\/\/web-staging.macchina.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/web-staging.macchina.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/web-staging.macchina.io\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/web-staging.macchina.io\/blog\/wp-json\/wp\/v2\/comments?post=310"}],"version-history":[{"count":18,"href":"https:\/\/web-staging.macchina.io\/blog\/wp-json\/wp\/v2\/posts\/310\/revisions"}],"predecessor-version":[{"id":339,"href":"https:\/\/web-staging.macchina.io\/blog\/wp-json\/wp\/v2\/posts\/310\/revisions\/339"}],"wp:attachment":[{"href":"https:\/\/web-staging.macchina.io\/blog\/wp-json\/wp\/v2\/media?parent=310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/web-staging.macchina.io\/blog\/wp-json\/wp\/v2\/categories?post=310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/web-staging.macchina.io\/blog\/wp-json\/wp\/v2\/tags?post=310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}