From 22f2d07eca84b184eeca5ce4fa4ecc79e8705b65 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sun, 5 Mar 2017 12:39:09 +0200 Subject: [PATCH] Add notes for 2017-03-05 --- content/post/2017-03.md | 12 ++++++++++++ public/2017-03/index.html | 21 ++++++++++++++++++--- public/index.xml | 17 ++++++++++++++++- public/post/index.xml | 17 ++++++++++++++++- public/sitemap.xml | 8 ++++---- public/tags/notes/index.xml | 17 ++++++++++++++++- 6 files changed, 82 insertions(+), 10 deletions(-) diff --git a/content/post/2017-03.md b/content/post/2017-03.md index 1158b3ba9..1c9c512ee 100644 --- a/content/post/2017-03.md +++ b/content/post/2017-03.md @@ -58,3 +58,15 @@ DirectClass CMYK $ identify -format '%r\n' Africa\ group\ of\ negotiators.pdf\[0\] DirectClass sRGB Alpha ``` + +## 2017-03-05 + +- Look into helping developers from landportal.info with a query for items related to LAND on the REST API +- They want something like the items that are returned by the general "LAND" query in the search interface, but we cannot do that +- We can only return specific results for metadata fields, like: + +``` +$ curl -s -H "accept: application/json" -H "Content-Type: application/json" -X POST "https://dspacetest.cgiar.org/rest/items/find-by-metadata-field" -d '{"key": "cg.subject.ilri","value": "LAND REFORM", "language": null}' | json_pp +``` + +- But there are hundreds of combinations of fields and values (like `dc.subject` and all the center subjects), and we can't use wildcards in REST! diff --git a/public/2017-03/index.html b/public/2017-03/index.html index a1e30c710..00a6c2ab9 100644 --- a/public/2017-03/index.html +++ b/public/2017-03/index.html @@ -37,7 +37,7 @@ $ identify ~/Desktop/alc_contrastes_desafios.jpg - + @@ -94,13 +94,13 @@ $ identify ~/Desktop/alc_contrastes_desafios.jpg "headline": "March, 2017", "url": "https://alanorth.github.io/cgspace-notes/2017-03/", - "wordCount": "368", + "wordCount": "465", "datePublished": "2017-03-01T17:08:52+02:00", - "dateModified": "2017-03-03T18:40:38+02:00", + "dateModified": "2017-03-04T01:15:47+02:00", "author": { @@ -232,6 +232,21 @@ $ identify -format '%r\n' Africa\ group\ of\ negotiators.pdf\[0\] DirectClass sRGB Alpha +

2017-03-05

+ + + +
$ curl -s -H "accept: application/json" -H "Content-Type: application/json" -X POST "https://dspacetest.cgiar.org/rest/items/find-by-metadata-field" -d '{"key": "cg.subject.ilri","value": "LAND REFORM", "language": null}' | json_pp
+
+ + + diff --git a/public/index.xml b/public/index.xml index f091e9228..71ca3638c 100644 --- a/public/index.xml +++ b/public/index.xml @@ -76,7 +76,22 @@ DirectClass CMYK $ identify -format '%r\n' Africa\ group\ of\ negotiators.pdf\[0\] DirectClass sRGB Alpha -</code></pre> +</code></pre> + +<h2 id="2017-03-05">2017-03-05</h2> + +<ul> +<li>Look into helping developers from landportal.info with a query for items related to LAND on the REST API</li> +<li>They want something like the items that are returned by the general &ldquo;LAND&rdquo; query in the search interface, but we cannot do that</li> +<li>We can only return specific results for metadata fields, like:</li> +</ul> + +<pre><code>$ curl -s -H &quot;accept: application/json&quot; -H &quot;Content-Type: application/json&quot; -X POST &quot;https://dspacetest.cgiar.org/rest/items/find-by-metadata-field&quot; -d '{&quot;key&quot;: &quot;cg.subject.ilri&quot;,&quot;value&quot;: &quot;LAND REFORM&quot;, &quot;language&quot;: null}' | json_pp +</code></pre> + +<ul> +<li>But there are hundreds of combinations of fields and values (like <code>dc.subject</code> and all the center subjects), and we can&rsquo;t use wildcards in REST!</li> +</ul> diff --git a/public/post/index.xml b/public/post/index.xml index 1342969c2..db21e7349 100644 --- a/public/post/index.xml +++ b/public/post/index.xml @@ -76,7 +76,22 @@ DirectClass CMYK $ identify -format '%r\n' Africa\ group\ of\ negotiators.pdf\[0\] DirectClass sRGB Alpha -</code></pre> +</code></pre> + +<h2 id="2017-03-05">2017-03-05</h2> + +<ul> +<li>Look into helping developers from landportal.info with a query for items related to LAND on the REST API</li> +<li>They want something like the items that are returned by the general &ldquo;LAND&rdquo; query in the search interface, but we cannot do that</li> +<li>We can only return specific results for metadata fields, like:</li> +</ul> + +<pre><code>$ curl -s -H &quot;accept: application/json&quot; -H &quot;Content-Type: application/json&quot; -X POST &quot;https://dspacetest.cgiar.org/rest/items/find-by-metadata-field&quot; -d '{&quot;key&quot;: &quot;cg.subject.ilri&quot;,&quot;value&quot;: &quot;LAND REFORM&quot;, &quot;language&quot;: null}' | json_pp +</code></pre> + +<ul> +<li>But there are hundreds of combinations of fields and values (like <code>dc.subject</code> and all the center subjects), and we can&rsquo;t use wildcards in REST!</li> +</ul> diff --git a/public/sitemap.xml b/public/sitemap.xml index 6a5267245..5ebb0cbe1 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -3,7 +3,7 @@ https://alanorth.github.io/cgspace-notes/2017-03/ - 2017-03-03T18:40:38+02:00 + 2017-03-04T01:15:47+02:00 @@ -88,19 +88,19 @@ https://alanorth.github.io/cgspace-notes/ - 2017-03-03T18:40:38+02:00 + 2017-03-04T01:15:47+02:00 0 https://alanorth.github.io/cgspace-notes/tags/notes/ - 2017-03-03T18:40:38+02:00 + 2017-03-04T01:15:47+02:00 0 https://alanorth.github.io/cgspace-notes/post/ - 2017-03-03T18:40:38+02:00 + 2017-03-04T01:15:47+02:00 0 diff --git a/public/tags/notes/index.xml b/public/tags/notes/index.xml index fb5d13359..13f6c8229 100644 --- a/public/tags/notes/index.xml +++ b/public/tags/notes/index.xml @@ -75,7 +75,22 @@ DirectClass CMYK $ identify -format '%r\n' Africa\ group\ of\ negotiators.pdf\[0\] DirectClass sRGB Alpha -</code></pre> +</code></pre> + +<h2 id="2017-03-05">2017-03-05</h2> + +<ul> +<li>Look into helping developers from landportal.info with a query for items related to LAND on the REST API</li> +<li>They want something like the items that are returned by the general &ldquo;LAND&rdquo; query in the search interface, but we cannot do that</li> +<li>We can only return specific results for metadata fields, like:</li> +</ul> + +<pre><code>$ curl -s -H &quot;accept: application/json&quot; -H &quot;Content-Type: application/json&quot; -X POST &quot;https://dspacetest.cgiar.org/rest/items/find-by-metadata-field&quot; -d '{&quot;key&quot;: &quot;cg.subject.ilri&quot;,&quot;value&quot;: &quot;LAND REFORM&quot;, &quot;language&quot;: null}' | json_pp +</code></pre> + +<ul> +<li>But there are hundreds of combinations of fields and values (like <code>dc.subject</code> and all the center subjects), and we can&rsquo;t use wildcards in REST!</li> +</ul>