{"id":59786,"date":"2020-08-17T14:00:47","date_gmt":"2020-08-17T14:00:47","guid":{"rendered":"https:\/\/www.baeldung.com\/?p=85811"},"modified":"2020-08-17T14:00:47","modified_gmt":"2020-08-17T14:00:47","slug":"introduction-to-spring-data-azure-cosmos-db","status":"publish","type":"post","link":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/2020\/08\/17\/introduction-to-spring-data-azure-cosmos-db\/","title":{"rendered":"Introduction to Spring Data Azure Cosmos DB"},"content":{"rendered":"<p class=\"syndicated-attribution\"><meta name= \\\"keywords \\\" content= \\\"\u96fb\u5b50\u8a08\u7b97\u6a5f, \u6559\u80b2, IT \u96fb\u8166\u73ed,\u96fb\u8166\u88dc\u7fd2\uff0c \u96fb\u8166\u73ed\uff0c \u5bb6\u6559\uff0c \u79c1\u4eba\u8001\u5e2b\uff0c \u8cc7\u8a0a\u6280\u8853\uff0c \u7a0b\u5e8f\u8a2d\u8a08\uff0c \u96fb\u5b50\u8a08\u7b97\u6a5f\uff0c \u904a\u6232\uff0c \u860b\u679c\uff0c \u96fb\u5f71\uff0c \u8a08\u7b97\u6a5f\uff0c\u7de8\u78bc\uff0c Java\uff0c C\/C++\uff0c JavaScript\uff0c PHP\uff0c HTML\uff0c CSS\uff0c MySQL\uff0c mobile\uff0c Android\uff0c \u52d5\u6f2b\uff0c Python\uff0c teacher\uff0c \u88dc\u7fd2\uff0c \u96fb\u8166\u88dc\u7fd2 \u8cc7\u8a0a, \u7535\u5b50\u8ba1\u7b97\u673a, IT ,Game, apple, movie, Computer,student,Java,\u6559\u80b2, ,\u5b66\u751f, \u5b66\u4e60, learn, \u6559\u5b66,  Android, apple,anime, animation, \u4fe1\u606f\u6280\u672f, \u7a0b\u5e8f\u8bbe\u8ba1, \u79fb\u52a8\u7535\u8bdd, \u8cc7\u8a0a\u79d1\u6280,Game, Jeu, Juego,Call Of Duty ,\u4f7f\u547d\u53ec\u559a , \u6e38\u620f, \u7535\u5b50\u6e38\u620f,, \u591a\u4eba\u7535\u5b50\u6e38\u620f, \u7f51\u7edc\u6e38\u620f\uff0conline\uff0conline game, \u624b\u673a\u6e38\u620f, mobile \\\"><\/p>\n<h2 data-id=\"overview-8\">1. Overview<\/h2>\n<div class=\"bd-anchor\" id=\"overview-8\"><\/div>\n<p>In this tutorial, we&#8217;ll learn about Azure Cosmos DB and how we can interact with it using Spring Data.<\/p>\n<h2 data-id=\"azure-cosmos-db\">2. Azure Cosmos DB<\/h2>\n<div class=\"bd-anchor\" id=\"azure-cosmos-db\"><\/div>\n<p><strong><a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/github.com\/Azure\/azure-sdk-for-java\/tree\/master\/sdk\/cosmos\/azure-cosmos\"  rel=\"noopener noreferrer\">Azure Cosmos DB<\/a> is Microsoft&#8217;s globally distributed database service.<\/strong><\/p>\n<p><strong>It&#8217;s a NoSQL database<\/strong>, which\u00a0provides comprehensive service level agreements for throughput, latency, availability, and consistency guarantees. Also, it assures <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/introduction#guaranteed-low-latency-at-99th-percentile-worldwide\"  rel=\"noopener noreferrer\">99.999% availability<\/a> for both reads and writes.<\/p>\n<p>Azure Cosmos DB does not give only two consistency choices i.e. either consistent or not consistent. Instead, <strong>we get five consistency choices: <em>strong<\/em>, <em>bounded staleness<\/em>, <em>session<\/em>, <em>consistent prefix<\/em>, and <em>eventual<\/em>.<\/strong><\/p>\n<p>We can elastically scale both the throughput and storage of Azure Cosmos DB.<\/p>\n<p>Additionally, it&#8217;s available in all Azure regions and offers turnkey global distribution\u00a0as we can replicate our data in any Azure regions just by clicking a button. This helps us in having our data closer to our users so that we can serve their requests faster.<\/p>\n<p><strong>It&#8217;s schema-agnostic<\/strong> <strong>as it has no schema<\/strong>. Furthermore, we don&#8217;t need to do any index management for Azure Cosmos Db. It automatically does indexing of data for us.<\/p>\n<p>We can work with Azure CosmosDb using different standard APIs such as SQL, MongoDB, Cassandra, etc.<\/p>\n<h2 data-id=\"spring-data-azure-cosmos-db\">3. Spring Data Azure Cosmos DB<\/h2>\n<div class=\"bd-anchor\" id=\"spring-data-azure-cosmos-db\"><\/div>\n<p><strong>Microsoft also provides a module that allows us to work with Cosmos DB using Spring Data<\/strong>. In the next section, we&#8217;ll see how we can use Azure Cosmos DB in a Spring Boot application.<\/p>\n<p>In our example, we&#8217;ll create a Spring web application that stores a product entity in an Azure Cosmos database and performs basic CRUD operations on it. First, we need to configure an account and database in the Azure portal, following the instructions in the <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/create-cosmosdb-resources-portal\"  rel=\"noopener noreferrer\">documentation<\/a>.<\/p>\n<p><strong>If we don&#8217;t want to create an account on the Azure portal, Azure also provides the Azure Cosmos Emulator.<\/strong> Even though this doesn&#8217;t contain all the functionalities of Azure Cosmos Service and there are some differences, we can use it for local development and testing.<\/p>\n<p>We can use the Emulator in our local environment in two ways: either by downloading the Azure Cosmos Emulator on our machine or <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/local-emulator#running-on-docker\"  rel=\"noopener noreferrer\">running the Emulator<\/a> on Docker for Windows.<\/p>\n<p><strong>We&#8217;ll choose the option to run it on Docker<\/strong> for Windows. Let&#8217;s pull the Docker image by running the following command:<\/p>\n<pre><code class=\"language-bash\">docker pull microsoft\/azure-cosmosdb-emulator<\/code><\/pre>\n<p>Then we can run the Docker image and start the container by running the following commands:<\/p>\n<pre><code class=\"language-bash\">set containerName=azure-cosmosdb-emulator\r\nset hostDirectory=%LOCALAPPDATA%\\azure-cosmosdb-emulator.hostd\r\nmd %hostDirectory% 2&gt;nul\r\ndocker run --name %containerName% --memory 2GB --mount \"type=bind,source=%hostDirectory%,destination=C:\\CosmosDB.Emulator\\bind-mount\" -P --interactive --tty microsoft\/azure-cosmosdb-emulator<\/code><\/pre>\n<p>Once we&#8217;ve configured the Azure Cosmos DB account and database in the Azure portal or in Docker, we can continue to configure it in our Spring Boot application.<\/p>\n<h2 data-id=\"using-azure-cosmos-db-in-spring\">4. Using Azure Cosmos DB in Spring<\/h2>\n<div class=\"bd-anchor\" id=\"using-azure-cosmos-db-in-spring\"><\/div>\n<h3 data-id=\"1-configuring-spring-data-azure-cosmos-db-with-spring\">4.1. Configuring Spring Data Azure Cosmos DB with Spring<\/h3>\n<div class=\"bd-anchor\" id=\"1-configuring-spring-data-azure-cosmos-db-with-spring\"><\/div>\n<p>We start by adding the <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/mvnrepository.com\/artifact\/com.microsoft.azure\/spring-data-cosmosdb\/2.3.0\">spring-data-cosmosdb<\/a> dependency in our<em> pom.xml<\/em>:<\/p>\n<pre><code class=\"language-xml\">&lt;dependency&gt; \r\n    &lt;groupId&gt;com.microsoft.azure&lt;\/groupId&gt; \r\n    &lt;artifactId&gt;spring-data-cosmosdb&lt;\/artifactId&gt; \r\n    &lt;version&gt;2.3.0&lt;\/version&gt; \r\n&lt;\/dependency&gt;\r\n<\/code><\/pre>\n<p><strong>To access Azure Cosmos DB from our Spring application we&#8217;ll need the URI of our database, it&#8217;s <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/docs.microsoft.com\/en-us\/azure\/cosmos-db\/secure-access-to-data\"  rel=\"noopener noreferrer\">access keys<\/a> and database name.<\/strong> \u00a0Then we&#8217;all add the connection properties in our <em>application.properties<\/em>:<\/p>\n<pre><code class=\"language-xml\">azure.cosmosdb.uri=cosmodb-uri\r\nazure.cosmosdb.key=cosmodb-primary-key\r\nazure.cosmosdb.secondaryKey=cosmodb-secondary-key\r\nazure.cosmosdb.database=cosmodb-name\r\n<\/code><\/pre>\n<p>We can find the values of the above properties from the Azure portal. The URI, primary key, and the secondary key will be available in the keys section of our Azure Cosmos DB in the Azure portal.<\/p>\n<p>To connect to Azure Cosmos DB from our application we need to create a client. For that, <strong>we need to extend <em>AbstractCosmosConfiguration<\/em> class in our configuration class and add the <em>@EnableCosmosRepositories\u00a0<\/em>annotation.<\/strong><\/p>\n<p>This annotation will scan for interfaces that extend Spring Data&#8217;s repository interfaces in the specified package.<\/p>\n<p>We also need to <strong>configure a bean of type <em>CosmosDBConfig<\/em><\/strong>:<\/p>\n<pre><code class=\"language-java\">@Configuration\r\n@EnableCosmosRepositories(basePackages = \"com.baeldung.spring.data.cosmosdb.repository\")\r\npublic class AzureCosmosDbConfiguration extends AbstractCosmosConfiguration {\r\n    @Value(\"${azure.cosmosdb.uri}\")\r\n    private String uri;\r\n    @Value(\"${azure.cosmosdb.key}\")\r\n    private String key;\r\n    @Value(\"${azure.cosmosdb.database}\")\r\n    private String dbName;\r\n    private CosmosKeyCredential cosmosKeyCredential;\r\n    @Bean\r\n    public CosmosDBConfig getConfig() {\r\n        this.cosmosKeyCredential = new CosmosKeyCredential(key);\r\n        CosmosDBConfig cosmosdbConfig = CosmosDBConfig.builder(uri, this.cosmosKeyCredential, dbName)\r\n            .build();\r\n        return cosmosdbConfig;\r\n    }\r\n}<\/code><\/pre>\n<h3 data-id=\"2-creating-an-entity-for-azure-cosmos-db\">4.2. Creating an Entity for Azure Cosmos DB<\/h3>\n<div class=\"bd-anchor\" id=\"2-creating-an-entity-for-azure-cosmos-db\"><\/div>\n<p>In order to interact with Azure Cosmos DB, we make use of entities. So, let&#8217;s create an entity that we will store in Azure Cosmos DB. To make our <em>Product<\/em> class an entity, <strong>we&#8217;ll use the <em>@Document<\/em> annotation:<\/strong><\/p>\n<pre><code class=\"language-java\">@Document(collection = \"products\")\r\npublic class Product {\r\n    @Id\r\n    private String productid;\r\n    private String productName;\r\n    private double price;\r\n    @PartitionKey\r\n    private String productCategory;\r\n}<\/code><\/pre>\n<p>In this example, <strong>we&#8217;ve used the <em>collection<\/em> attribute with the value <em>products<\/em>, to indicate this will be the name of our container in the database<\/strong>. If we don&#8217;t provide any value for the <em>collection<\/em> parameter, then the class name will be used as the container name in the database.<\/p>\n<p>We&#8217;ve also defined an id for our document. We can either create a field with the name <em>id<\/em> in our class or we can annotate a field with the <em>@Id <\/em>annotation.\u00a0Here we have used the <em>productid<\/em> field as the document id.<\/p>\n<p><strong>We can logically partition our data in our container by using a partition key by annotating a field with <em>@PartitionKey. <\/em><\/strong>In our class, we&#8217;ve used the <em>productCategory<\/em> field as the partition key.<\/p>\n<p>By default, the indexing policy is defined by Azure, but we can also customize it by using <em>@DocumentIndexingPolicy\u00a0<\/em>annotation on our entity Class.<\/p>\n<p>We can also enable Optimistic locking for our entity container by creating a field named <em>_etag<\/em> and annotating it with <em>@Version.<\/em><\/p>\n<h3 data-id=\"3-defining-the-repository\">4.3. Defining the Repository<\/h3>\n<div class=\"bd-anchor\" id=\"3-defining-the-repository\"><\/div>\n<p>Now <strong>let&#8217;s create a <em>ProductRepository<\/em> interface that extends <em>CosmosRepository<\/em><\/strong>. Using this interface, we can perform CRUD operations on our Azure Cosmos DB:<\/p>\n<pre><code class=\"language-java\">@Repository\r\npublic interface ProductRepository extends CosmosRepository&lt;Product, String&gt; {\r\n    List findByProductName(String productName);\r\n}<\/code><\/pre>\n<p>As we can see, this is defined in a similar way to other Spring Data modules.<\/p>\n<h3 data-id=\"4-testing-the-connection\">4.4. Testing the Connection<\/h3>\n<div class=\"bd-anchor\" id=\"4-testing-the-connection\"><\/div>\n<p>Now we can create a Junit Test to save a <em>Product<\/em> entity in Azure Cosmos DB using our <em>ProductRepository<\/em>:<\/p>\n<pre><code class=\"language-java\">@SpringBootTest\r\npublic class AzureCosmosDbApplicationManualTest {\r\n    @Autowired\r\n    ProductRepository productRepository;\r\n    @Test\r\n    public void givenProductIsCreated_whenCallFindById_thenProductIsFound() {\r\n        Product product = new Product();\r\n        product.setProductid(\"1001\");\r\n        product.setProductCategory(\"Shirt\");\r\n        product.setPrice(110.0);\r\n        product.setProductName(\"Blue Shirt\");\r\n        productRepository.save(product);\r\n        Product retrievedProduct = productRepository.findById(\"1001\", new PartitionKey(\"Shirt\"))\r\n            .orElse(null);\r\n        Assert.notNull(retrievedProduct, \"Retrieved Product is Null\");\r\n    }\r\n}<\/code><\/pre>\n<p>By running this Junit test we can test our connection with Azure Cosmos DB from our Spring application.<\/p>\n<h2 data-id=\"conclusion-10\">5. Conclusion<\/h2>\n<div class=\"bd-anchor\" id=\"conclusion-10\"><\/div>\n<p>In this tutorial, we learned about Azure Cosmos DB. Further, we learned how to access Azure Cosmos DB from a Spring Boot application, how to create entities and configure a Repository by extending <em>CosmosRepository<\/em> to interact with it.<\/p>\n<p>The code for the above example is available <a href=\"https:\/\/feeds.feedblitz.com\/~\/t\/0\/0\/baeldung\/~https:\/\/github.com\/eugenp\/tutorials\/tree\/master\/persistence-modules\/spring-data-cosmosdb\">over on GitHub<\/a>.<\/p>\n<p><Img align=\"left\" border=\"0\" height=\"1\" width=\"1\" alt=\"\" style=\"border:0;float:left;margin:0;padding:0;width:1px!important;height:1px!important;\" hspace=\"0\" src=\"https:\/\/feeds.feedblitz.com\/~\/i\/633754430\/0\/baeldung\"><\/p>\n<div style=\"clear:both;padding-top:0.2em;\"><a title=\"Like on Facebook\" href=\"https:\/\/feeds.feedblitz.com\/_\/28\/633754430\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/fblike20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a title=\"Share on Google+\" href=\"https:\/\/feeds.feedblitz.com\/_\/30\/633754430\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/googleplus20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a title=\"Pin it!\" href=\"https:\/\/feeds.feedblitz.com\/_\/29\/633754430\/baeldung,\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/pinterest20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a title=\"Tweet This\" href=\"https:\/\/feeds.feedblitz.com\/_\/24\/633754430\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/twitter20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a title=\"Subscribe by email\" href=\"https:\/\/feeds.feedblitz.com\/_\/19\/633754430\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/email20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a title=\"Subscribe by RSS\" href=\"https:\/\/feeds.feedblitz.com\/_\/20\/633754430\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/rss20.png\" style=\"border:0;margin:0;padding:0;\"><\/a>&#160;<a rel=\"NOFOLLOW\" title=\"View Comments\" href=\"https:\/\/www.baeldung.com\/spring-data-cosmos-db#respond\"><img decoding=\"async\" height=\"20\" style=\"border:0;margin:0;padding:0;\" src=\"https:\/\/assets.feedblitz.com\/i\/comments20.png\"><\/a>&#160;<a title=\"Follow Comments via RSS\" href=\"https:\/\/www.baeldung.com\/spring-data-cosmos-db\/feed\/\"><img decoding=\"async\" height=\"20\" style=\"border:0;margin:0;padding:0;\" src=\"https:\/\/assets.feedblitz.com\/i\/commentsrss20.png\"><\/a>&#160;<\/div>\n\n<p class=\"syndicated-attribution\"><figure class= \\\"wp-block-image alignnone \\\"><img src= \\\"http:\/\/itteacheritfreelance.hk\/test\/wordpress\/wp-content\/uploads\/2016\/05\/logo2-2.png\\\" alt=\\\"IT\u96fb\u8166\u88dc\u7fd2 java\u88dc\u7fd2 \u70ba\u5927\u5bb6\u914d\u5c0d\u96fb\u8166\u88dc\u7fd2,IT freelance, \u79c1\u4eba\u8001\u5e2b, PHP\u88dc\u7fd2,CSS\u88dc\u7fd2,XML,Java\u88dc\u7fd2,MySQL\u88dc\u7fd2,graphic design\u88dc\u7fd2,\u4e2d\u5c0f\u5b78ICT\u88dc\u7fd2,\u4e00\u5c0d\u4e00\u79c1\u4eba\u88dc\u7fd2\u548cFreelance\u81ea\u7531\u5de5\u4f5c\u914d\u5c0d\u3002\\\"\/><figcaption>\u7acb\u523b\u8a3b\u518a\u53ca\u5831\u540d\u96fb\u8166\u88dc\u7fd2\u8ab2\u7a0b\u5427!<\/figcaption><\/figure>\r\n<\/br>Find A Teacher Form:\r\n<\/br>https:\/\/docs.google.com\/forms\/d\/1vREBnX5n262umf4wU5U2pyTwvk9O-JrAgblA-wH9GFQ\/viewform?edit_requested=true#responses\r\n<\/br><\/br>Email:\r\n<\/br>public1989two@gmail.com<br><br><br><br><br><br><br>\r\n<a href=www.itsec.hk style=color:#FFFFFF;>www.itsec.hk<\/a><br>\r\n<a href=\\\"www.itsec.vip\\\" style=color:#FFFFFF;>www.itsec.vip<\/a><br>\r\n<a href=\\\"www.itseceu.uk\\\" style=color:#FFFFFF;>www.itseceu.uk<\/a><br><\/p>","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Learn how to interact with Azure Cosmos DB using Spring Data.<\/p>\n<div><a title=\"Like on Facebook\" href=\"https:\/\/feeds.feedblitz.com\/_\/28\/633754430\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/fblike20.png\"><\/a>&nbsp;<a title=\"Share on Google+\" href=\"https:\/\/feeds.feedblitz.com\/_\/30\/633754430\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/googleplus20.png\"><\/a>&nbsp;<a title=\"Pin it!\" href=\"https:\/\/feeds.feedblitz.com\/_\/29\/633754430\/baeldung,\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/pinterest20.png\"><\/a>&nbsp;<a title=\"Tweet This\" href=\"https:\/\/feeds.feedblitz.com\/_\/24\/633754430\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/twitter20.png\"><\/a>&nbsp;<a title=\"Subscribe by email\" href=\"https:\/\/feeds.feedblitz.com\/_\/19\/633754430\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/email20.png\"><\/a>&nbsp;<a title=\"Subscribe by RSS\" href=\"https:\/\/feeds.feedblitz.com\/_\/20\/633754430\/baeldung\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/rss20.png\"><\/a>&nbsp;<a rel=\"NOFOLLOW\" title=\"View Comments\" href=\"https:\/\/www.baeldung.com\/spring-data-cosmos-db#respond\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/comments20.png\"><\/a>&nbsp;<a title=\"Follow Comments via RSS\" href=\"https:\/\/www.baeldung.com\/spring-data-cosmos-db\/feed\/\"><img decoding=\"async\" height=\"20\" src=\"https:\/\/assets.feedblitz.com\/i\/commentsrss20.png\"><\/a>&nbsp;<\/div>\n<\/div>","protected":false},"author":214,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Introduction to Spring Data Azure Cosmos DB - ITTeacherITFreelance.hk","description":"Learn how to interact with Azure Cosmos DB using Spring Data. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"},"footnotes":""},"categories":[6],"tags":[4793],"_links":{"self":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/59786"}],"collection":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/214"}],"replies":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=59786"}],"version-history":[{"count":1,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/59786\/revisions"}],"predecessor-version":[{"id":59787,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/59786\/revisions\/59787"}],"wp:attachment":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=59786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=59786"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=59786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}