{"id":7780,"date":"2013-04-11T11:46:17","date_gmt":"2013-04-11T09:46:17","guid":{"rendered":"https:\/\/blog.trifork.com\/?p=7780"},"modified":"2013-04-11T11:46:17","modified_gmt":"2013-04-11T09:46:17","slug":"fun-combining-java-javascript-and-elastic-js-within-the-elasticshell","status":"publish","type":"post","link":"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/","title":{"rendered":"Fun combining Java, JavaScript and elastic.js within the elasticshell"},"content":{"rendered":"<p><a style=\"float: left\" href=\"http:\/\/github.com\/javanna\/elasticshell\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/03\/logo-elasticshell-150x150.png\" alt=\"elasticshell\" width=\"150\" height=\"150\" class=\"alignright size-full wp-image-7922\" \/><\/a><br \/>\nI recently wrote a <a href=\"https:\/\/blog.trifork.com\/2013\/03\/06\/introducing-the-elasticshell\/\">couple<\/a> of <a href=\"https:\/\/blog.trifork.com\/2013\/03\/07\/searching-with-the-elasticshell\/\">articles<\/a> about the <a href=\"https:\/\/github.com\/javanna\/elasticshell\">elasticshell<\/a>, the command line shell for <a href=\"http:\/\/www.elasticsearch.org\/\">Elasticsearch<\/a> that I created. If you haven&#8217;t heard about it, it&#8217;s a json friendly command line tool that allows to quickly interact with Elasticsearch: you can easily index documents, execute queries and make use of all the API that Elasticsearch provides. It allows for more advanced usecases as well, since it exposes the power and flexibility of both JavaScript and Java. That&#8217;s scary, isn&#8217;t it? Let&#8217;s see what this means&#8230;<br \/>\n<!--more--><\/p>\n<p>If you have a bit of experience with Elasticsearch you know how cool its <a href=\"http:\/\/www.elasticsearch.org\/guide\/reference\/query-dsl\/\">query DSL<\/a> is. You might also have realized that even though you start with simple queries, you most likely end up with big json objects containing different nested queries, filters, facets, highlighting and so on. That&#8217;s why I thought the elasticshell should make it easier to compose queries and execute them. I wasn&#8217;t totally satisfied about how you could do it using the first <a href=\"http:\/\/dl.bintray.com\/content\/javanna\/elasticsearch-tools\/release\/org\/elasticsearch\/elasticshell\/0.20.5-BETA\/elasticshell-0.20.5-BETA.zip?direct\">BETA release<\/a>, since it used to require some knowledge of the <a href=\"http:\/\/www.elasticsearch.org\/guide\/reference\/java-api\/\">Elasticsearch Java API<\/a> in order to build queries without having to manually write plain json objects. That&#8217;s why I worked on a couple of nice new features that are going to help a lot when it comes to querying Elasticsearch.<\/p>\n<p><strong>The <code>toJson<\/code> command<\/strong><br \/>\nA cool addition is the <code>toJson<\/code> command, that allows to create a json object not only from a string, but directly from a <code><a href=\"http:\/\/www.elasticsearch.org\/guide\/reference\/java-api\/query-dsl-queries\/\">QueryBuilder<\/a><\/code> object too (and more). I&#8217;m talking about Java objects here, instances of classes that are part of Elasticsearch itself, which we can convert to native json in a single call. Let&#8217;s see how this feature makes it easier to combine plain json queries with the ones generated through the Java API. Let&#8217;s start copy pasting a multi match query taken from the <a href=\"http:\/\/www.elasticsearch.org\/guide\/reference\/query-dsl\/multi-match-query\/\">Elasticsearch documentation<\/a> and adapting it to our needs obtaining the following result:<\/p>\n<pre class=\"brush: jscript; gutter: false; title: ; notranslate\" title=\"\">\n{\n  &quot;query&quot;: {\n    &quot;multi_match&quot;: {\n      &quot;query&quot;: &quot;elasticshell&quot;,\n        &quot;fields&quot;: &#x5B;\n          &quot;title^2&quot;,\n          &quot;content&quot;\n        ]\n      }\n  }\n}\n<\/pre>\n<p>After that we want to add a facet to the existing query, but we don&#8217;t remember exactly the right json syntax. The <a href=\"http:\/\/www.elasticsearch.org\/guide\/reference\/java-api\/facets\/\">FacetBuilders<\/a> object provided with the Java API comes to the rescue, together with the available auto-suggestions:<\/p>\n<pre class=\"brush: jscript; gutter: false; title: ; notranslate\" title=\"\">\n&gt; var facetBuilder = FacetBuilders.termsFacet('author').field('author');\n<\/pre>\n<p>If we now print the created object we do see some json, but that&#8217;s still a java object and we only see its string representation (literally the output of its <code>toString<\/code> method). We can now parse it as a json like this:<\/p>\n<pre class=\"brush: jscript; gutter: false; title: ; notranslate\" title=\"\">\n&gt; var facet=toJson(facetBuilder);\n<\/pre>\n<p>What we obtained is a json object that we can combine with the existing search request like this:<\/p>\n<pre class=\"brush: jscript; gutter: false; title: ; notranslate\" title=\"\">\n&gt; search.facets=facet\n<\/pre>\n<p>Let&#8217;s check what happened in our search object:<\/p>\n<pre class=\"brush: jscript; gutter: false; title: ; notranslate\" title=\"\">\n&gt; search\n{\n  &quot;query&quot;: {\n    &quot;multi_match&quot;: {\n      &quot;query&quot;: &quot;elasticshell&quot;,\n      &quot;fields&quot;: &#x5B;\n        &quot;title^2&quot;,\n        &quot;content&quot;\n      ]\n    }\n  },\n  &quot;facets&quot;: {\n    &quot;author&quot;: {\n      &quot;terms&quot;: {\n        &quot;field&quot;: &quot;author&quot;,\n        &quot;size&quot;: 10\n      }\n    }\n  }\n}\n<\/pre>\n<p>What&#8217;s the trick? The Elasticsearch classes whose content can be represented as json usually implement the internal <code><a href=\"https:\/\/github.com\/elasticsearch\/elasticsearch\/blob\/master\/src\/main\/java\/org\/elasticsearch\/common\/xcontent\/ToXContent.java\">ToXContent<\/a><\/code> interface. The <code>toJson<\/code> command just accepts <code>ToXContent<\/code> objects as argument and it&#8217;s able to convert them to json objects, native within the shell.<\/p>\n<p><strong>The best is yet to come<\/strong><br \/>\nThe <code>toJson<\/code> command helps but I thought it&#8217;s not enough. Some knowledge about the Java API is still required, and there are other ways to interact with Elasticsearch. What if you don&#8217;t know the Java API? Maybe you know the widely used JavaScript API, also known as <a href=\"http:\/\/www.fullscale.co\/elasticjs\/\">elastic.js<\/a>? You can just download it and load it using the <code>load<\/code> command, providing the location where the library is located on disk:<\/p>\n<pre class=\"brush: jscript; gutter: false; title: ; notranslate\" title=\"\">\n&gt; load('\/home\/luca\/Desktop\/elastic.js');\n<\/pre>\n<p>Here it is, let&#8217;s now type <code>ejs.<\/code>, the namespace that elastic.js uses, followed by the tab key to see what the suggestions look like:<\/p>\n<pre class=\"brush: jscript; gutter: false; title: ; notranslate\" title=\"\">\n&gt; ejs.\nAndFilter()                 BoolFilter()\nBoolQuery()                 BoostingQuery()\nCommonTermsQuery()          ConstantScoreQuery()\nCustomBoostFactorQuery()    CustomFiltersScoreQuery()\nCustomScoreQuery()          DateHistogramFacet()\nDisMaxQuery()               Document()\nExistsFilter()              FieldMaskingSpanQuery()\nFieldQuery()                FilteredQuery()\nFilterFacet()               FuzzyLikeThisFieldQuery()\nFuzzyLikeThisQuery()        FuzzyQuery()\nGeoBboxFilter()             GeoDistanceFacet()\nGeoDistanceFilter()         GeoDistanceRangeFilter()\nGeoPoint()                  GeoPolygonFilter()\nGeoShapeFilter()            GeoShapeQuery()\nHasChildFilter()            HasChildQuery()\nHasParentFilter()           HasParentQuery()\n<\/pre>\n<p>Wow, that means we can start creating queries using <a href=\"http:\/\/docs.fullscale.co\/elasticjs\/\">elastic.js<\/a>. Let&#8217;s initialize a new search request and add a simple <a href=\"http:\/\/www.elasticsearch.org\/guide\/reference\/query-dsl\/term-query\/\">term query<\/a> to it.<\/p>\n<pre class=\"brush: jscript; gutter: false; title: ; notranslate\" title=\"\">\n&gt; var req=ejs.Request();\n&gt; req.query(ejs.TermQuery('title','elasticshell'));\n<\/pre>\n<p>Once our query is ready to go, we only need to send it to Elasticsearch. We can use the internal <code>_self<\/code> function to read the underlying query json object and send it to elasticsearch as we normally do within the elasticshell:<\/p>\n<pre class=\"brush: jscript; gutter: false; title: ; notranslate\" title=\"\">\n&gt; es.search(req._self());\n<\/pre>\n<p><strong>Load anything you need, at startup too<\/strong><br \/>\nWhat&#8217;s really cool about the <code>load<\/code> command is that it allows to load any external javascript code. That means it&#8217;s possible to load custom scripts that contain documents, queries, or even functions that we frequently use within the elasticshell. It&#8217;s also possible to execute arbitrary commands at startup adding the <code>.elasticshellrc.js<\/code> file to the user home directory. Those commands don&#8217;t necessarily need to be javascript, they can be whatever command that&#8217;s valid within the elasticshell, even Java code!<\/p>\n<p><strong>Let&#8217;s wrap it up<\/strong><br \/>\nIn this article I showed you some creative ways to compose and run Elasticsearch queries using the elasticshell. You can either use the <code>toJson<\/code> command to combine the Java API with plain json queries, or the great elastic.js library if you&#8217;re not a Java guy. The described features are available in the <a href=\"http:\/\/dl.bintray.com\/content\/javanna\/elasticsearch-tools\/release\/org\/elasticsearch\/elasticshell\/0.90.0.RC2\/elasticshell-0.90.0.RC2.zip?direct\">latest<\/a> elasticshell release: there are three active development branches at the moment that contain the same features but work with a different version of Elasticsearch: <a href=\"http:\/\/dl.bintray.com\/content\/javanna\/elasticsearch-tools\/release\/org\/elasticsearch\/elasticshell\/0.19.12-RC\/elasticshell-0.19.12-RC.zip?direct\">0.19<\/a>, <a href=\"http:\/\/dl.bintray.com\/content\/javanna\/elasticsearch-tools\/release\/org\/elasticsearch\/elasticshell\/0.20.6-RC\/elasticshell-0.20.6-RC.zip?direct\">0.20<\/a> and the brand new <a href=\"https:\/\/bintray.com\/version\/show\/general\/javanna\/elasticsearch-tools\/elasticshell\/0.90.0.RC2\">0.90<\/a>. If you have any questions feel free to get in touch with me and it would also be great to know how you progress with its use too.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently wrote a couple of articles about the elasticshell, the command line shell for Elasticsearch that I created. If you haven&#8217;t heard about it, it&#8217;s a json friendly command line tool that allows to quickly interact with Elasticsearch: you can easily index documents, execute queries and make use of all the API that Elasticsearch [&hellip;]<\/p>\n","protected":false},"author":71,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[15,65,10],"tags":[335,61,336],"class_list":["post-7780","post","type-post","status-publish","format-standard","hentry","category-enterprise-search","category-big_data_search","category-development","tag-elastic-js","tag-elasticsearch","tag-elasticshell"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Fun combining Java, JavaScript and elastic.js within the elasticshell - Trifork Blog<\/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:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fun combining Java, JavaScript and elastic.js within the elasticshell - Trifork Blog\" \/>\n<meta property=\"og:description\" content=\"I recently wrote a couple of articles about the elasticshell, the command line shell for Elasticsearch that I created. If you haven&#8217;t heard about it, it&#8217;s a json friendly command line tool that allows to quickly interact with Elasticsearch: you can easily index documents, execute queries and make use of all the API that Elasticsearch [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/\" \/>\n<meta property=\"og:site_name\" content=\"Trifork Blog\" \/>\n<meta property=\"article:published_time\" content=\"2013-04-11T09:46:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/03\/logo-elasticshell-150x150.png\" \/>\n<meta name=\"author\" content=\"Luca Cavanna\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Luca Cavanna\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/\",\"url\":\"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/\",\"name\":\"Fun combining Java, JavaScript and elastic.js within the elasticshell - Trifork Blog\",\"isPartOf\":{\"@id\":\"https:\/\/trifork.nl\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/03\/logo-elasticshell-150x150.png\",\"datePublished\":\"2013-04-11T09:46:17+00:00\",\"author\":{\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/d9aa0a29580038af46b7a223de3e4fd8\"},\"breadcrumb\":{\"@id\":\"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/#primaryimage\",\"url\":\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/03\/logo-elasticshell-150x150.png\",\"contentUrl\":\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/03\/logo-elasticshell-150x150.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/trifork.nl\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fun combining Java, JavaScript and elastic.js within the elasticshell\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/trifork.nl\/blog\/#website\",\"url\":\"https:\/\/trifork.nl\/blog\/\",\"name\":\"Trifork Blog\",\"description\":\"Keep updated on the technical solutions Trifork is working on!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/trifork.nl\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/d9aa0a29580038af46b7a223de3e4fd8\",\"name\":\"Luca Cavanna\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/56beb100625f636499231471d8c27425?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/56beb100625f636499231471d8c27425?s=96&d=mm&r=g\",\"caption\":\"Luca Cavanna\"},\"url\":\"https:\/\/trifork.nl\/blog\/author\/luca\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Fun combining Java, JavaScript and elastic.js within the elasticshell - Trifork Blog","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:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/","og_locale":"en_US","og_type":"article","og_title":"Fun combining Java, JavaScript and elastic.js within the elasticshell - Trifork Blog","og_description":"I recently wrote a couple of articles about the elasticshell, the command line shell for Elasticsearch that I created. If you haven&#8217;t heard about it, it&#8217;s a json friendly command line tool that allows to quickly interact with Elasticsearch: you can easily index documents, execute queries and make use of all the API that Elasticsearch [&hellip;]","og_url":"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/","og_site_name":"Trifork Blog","article_published_time":"2013-04-11T09:46:17+00:00","og_image":[{"url":"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/03\/logo-elasticshell-150x150.png","type":"","width":"","height":""}],"author":"Luca Cavanna","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Luca Cavanna","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/","url":"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/","name":"Fun combining Java, JavaScript and elastic.js within the elasticshell - Trifork Blog","isPartOf":{"@id":"https:\/\/trifork.nl\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/#primaryimage"},"image":{"@id":"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/#primaryimage"},"thumbnailUrl":"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/03\/logo-elasticshell-150x150.png","datePublished":"2013-04-11T09:46:17+00:00","author":{"@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/d9aa0a29580038af46b7a223de3e4fd8"},"breadcrumb":{"@id":"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/#primaryimage","url":"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/03\/logo-elasticshell-150x150.png","contentUrl":"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2013\/03\/logo-elasticshell-150x150.png"},{"@type":"BreadcrumbList","@id":"https:\/\/trifork.nl\/blog\/fun-combining-java-javascript-and-elastic-js-within-the-elasticshell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/trifork.nl\/blog\/"},{"@type":"ListItem","position":2,"name":"Fun combining Java, JavaScript and elastic.js within the elasticshell"}]},{"@type":"WebSite","@id":"https:\/\/trifork.nl\/blog\/#website","url":"https:\/\/trifork.nl\/blog\/","name":"Trifork Blog","description":"Keep updated on the technical solutions Trifork is working on!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/trifork.nl\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/d9aa0a29580038af46b7a223de3e4fd8","name":"Luca Cavanna","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/56beb100625f636499231471d8c27425?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/56beb100625f636499231471d8c27425?s=96&d=mm&r=g","caption":"Luca Cavanna"},"url":"https:\/\/trifork.nl\/blog\/author\/luca\/"}]}},"_links":{"self":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts\/7780","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/users\/71"}],"replies":[{"embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/comments?post=7780"}],"version-history":[{"count":0,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts\/7780\/revisions"}],"wp:attachment":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/media?parent=7780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/categories?post=7780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/tags?post=7780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}