From 8c05534ff906ed0086a503fb810811559b362884 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Wed, 7 Oct 2020 14:44:39 +0300 Subject: [PATCH] Add notes for 2020-10-07 --- content/posts/2020-10.md | 51 ++++++++++++++++++++ docs/2020-10/index.html | 63 +++++++++++++++++++++++-- docs/categories/index.html | 2 +- docs/categories/notes/index.html | 2 +- docs/categories/notes/page/2/index.html | 2 +- docs/categories/notes/page/3/index.html | 2 +- docs/categories/notes/page/4/index.html | 2 +- docs/index.html | 2 +- docs/page/2/index.html | 2 +- docs/page/3/index.html | 2 +- docs/page/4/index.html | 2 +- docs/page/5/index.html | 2 +- docs/page/6/index.html | 2 +- docs/page/7/index.html | 2 +- docs/posts/index.html | 2 +- docs/posts/page/2/index.html | 2 +- docs/posts/page/3/index.html | 2 +- docs/posts/page/4/index.html | 2 +- docs/posts/page/5/index.html | 2 +- docs/posts/page/6/index.html | 2 +- docs/posts/page/7/index.html | 2 +- docs/sitemap.xml | 10 ++-- 22 files changed, 135 insertions(+), 27 deletions(-) diff --git a/content/posts/2020-10.md b/content/posts/2020-10.md index c584fd91f..52f58ae80 100644 --- a/content/posts/2020-10.md +++ b/content/posts/2020-10.md @@ -132,4 +132,55 @@ org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected m - Solr returns `hits=18` for the L&R query, but there are no result shown in the L&R UI - I sent all this feedback to Atmire... +## 2020-10-07 + +- Udana from IWMI had asked about stats discrepencies from reports they had generated in previous months or years + - I told him that we very often purge bots and the number of stats can change drastically + - Also, I told him that it is not possible to compare stats from previous exports and that the stats should be taking with a grain of salt +- Testing POSTing items to the DSpace 6 REST API + - We need to authenticate to get a JSESSIONID cookie first: + +``` +$ http -f POST https://dspacetest.cgiar.org/rest/login email=aorth@fuuu.com 'password=fuuuu' +$ http https://dspacetest.cgiar.org/rest/status Cookie:JSESSIONID=EABAC9EFF942028AA52DFDA16DBCAFDE +``` + +- Then we post an item in JSON format to `/rest/collections/{uuid}/items`: + +``` +$ http POST https://dspacetest.cgiar.org/rest/collections/f10ad667-2746-4705-8b16-4439abe61d22/items Cookie:JSESSIONID=EABAC9EFF942028AA52DFDA16DBCAFDE < item-object.json +``` + +- Format of JSON is: + +``` +{ "metadata": [ + { + "key": "dc.title", + "value": "Testing REST API post", + "language": "en_US" + }, + { + "key": "dc.contributor.author", + "value": "Orth, Alan", + "language": "en_US" + }, + { + "key": "dc.date.issued", + "value": "2020-09-01", + "language": "en_US" + } + ], + "archived":"false", + "withdrawn":"false" +} +``` + +- What is unclear to me is the `archived` parameter, it seems to do nothing... perhaps it is only used for the `/items` endpoint when printing information about an item + - If I submit to a collection that has a workflow, even as a super admin and with "archived=false" in the JSON, the item enters the workflow ("Awaiting editor's attention") + - If I submit to a new collection without a workflow the item gets archived immediately + - I created [some notes](https://gist.github.com/alanorth/40fc3092aefd78f978cca00e8abeeb7a) to share with Salem and Leroy for future reference when we start discussion POSTing items to the REST API +- I created an account for Salem on DSpace Test and added it to the submitters group of an ICARDA collection with no other workflow steps so we can see what happens + - We are curious to see if he gets a UUID when posting from MEL + diff --git a/docs/2020-10/index.html b/docs/2020-10/index.html index 5e296765e..1b2968204 100644 --- a/docs/2020-10/index.html +++ b/docs/2020-10/index.html @@ -23,7 +23,7 @@ During the FlywayDB migration I got an error: - + @@ -51,9 +51,9 @@ During the FlywayDB migration I got an error: "@type": "BlogPosting", "headline": "October, 2020", "url": "https://alanorth.github.io/cgspace-notes/2020-10/", - "wordCount": "666", + "wordCount": "956", "datePublished": "2020-10-06T16:55:54+03:00", - "dateModified": "2020-10-06T16:59:31+03:00", + "dateModified": "2020-10-06T23:38:45+03:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -261,6 +261,63 @@ org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected m
  • Solr returns hits=18 for the L&R query, but there are no result shown in the L&R UI
  • I sent all this feedback to Atmire…
  • +

    2020-10-07

    + +
    $ http -f POST https://dspacetest.cgiar.org/rest/login email=aorth@fuuu.com 'password=fuuuu'
    +$ http https://dspacetest.cgiar.org/rest/status Cookie:JSESSIONID=EABAC9EFF942028AA52DFDA16DBCAFDE
    +
    +
    $ http POST https://dspacetest.cgiar.org/rest/collections/f10ad667-2746-4705-8b16-4439abe61d22/items Cookie:JSESSIONID=EABAC9EFF942028AA52DFDA16DBCAFDE < item-object.json
    +
    +
    { "metadata": [
    +    {
    +      "key": "dc.title",
    +      "value": "Testing REST API post",
    +      "language": "en_US"
    +    },
    +    {
    +      "key": "dc.contributor.author",
    +      "value": "Orth, Alan",
    +      "language": "en_US"
    +    },
    +    {
    +      "key": "dc.date.issued",
    +      "value": "2020-09-01",
    +      "language": "en_US"
    +    }
    +  ],
    +  "archived":"false",
    +  "withdrawn":"false"
    +}
    +
    diff --git a/docs/categories/index.html b/docs/categories/index.html index 0ac5b625a..bb0d355fc 100644 --- a/docs/categories/index.html +++ b/docs/categories/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/categories/notes/index.html b/docs/categories/notes/index.html index ddf46f989..32de0d068 100644 --- a/docs/categories/notes/index.html +++ b/docs/categories/notes/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/categories/notes/page/2/index.html b/docs/categories/notes/page/2/index.html index 355b57c14..bb779b517 100644 --- a/docs/categories/notes/page/2/index.html +++ b/docs/categories/notes/page/2/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/categories/notes/page/3/index.html b/docs/categories/notes/page/3/index.html index 9dd18d720..ae713add4 100644 --- a/docs/categories/notes/page/3/index.html +++ b/docs/categories/notes/page/3/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/categories/notes/page/4/index.html b/docs/categories/notes/page/4/index.html index ccde426f8..25608b560 100644 --- a/docs/categories/notes/page/4/index.html +++ b/docs/categories/notes/page/4/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/index.html b/docs/index.html index 0b69a6b25..0c9a9fb10 100644 --- a/docs/index.html +++ b/docs/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/page/2/index.html b/docs/page/2/index.html index 448c49cfc..a3c95d046 100644 --- a/docs/page/2/index.html +++ b/docs/page/2/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/page/3/index.html b/docs/page/3/index.html index 269246208..0e946e588 100644 --- a/docs/page/3/index.html +++ b/docs/page/3/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/page/4/index.html b/docs/page/4/index.html index bfa0c91bf..b2f2ad003 100644 --- a/docs/page/4/index.html +++ b/docs/page/4/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/page/5/index.html b/docs/page/5/index.html index 16833aade..b8c3953f4 100644 --- a/docs/page/5/index.html +++ b/docs/page/5/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/page/6/index.html b/docs/page/6/index.html index cad89ea22..5558e1dab 100644 --- a/docs/page/6/index.html +++ b/docs/page/6/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/page/7/index.html b/docs/page/7/index.html index 58e5d1db0..3f101ba2b 100644 --- a/docs/page/7/index.html +++ b/docs/page/7/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/posts/index.html b/docs/posts/index.html index c6211d51d..3c533b87c 100644 --- a/docs/posts/index.html +++ b/docs/posts/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/posts/page/2/index.html b/docs/posts/page/2/index.html index 57c5aac95..ad475d478 100644 --- a/docs/posts/page/2/index.html +++ b/docs/posts/page/2/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/posts/page/3/index.html b/docs/posts/page/3/index.html index 4ecdddd5a..ee862457d 100644 --- a/docs/posts/page/3/index.html +++ b/docs/posts/page/3/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/posts/page/4/index.html b/docs/posts/page/4/index.html index 4f2600339..f9bc7d3af 100644 --- a/docs/posts/page/4/index.html +++ b/docs/posts/page/4/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/posts/page/5/index.html b/docs/posts/page/5/index.html index d05dad009..a3f12d992 100644 --- a/docs/posts/page/5/index.html +++ b/docs/posts/page/5/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/posts/page/6/index.html b/docs/posts/page/6/index.html index 0758834b0..87030d889 100644 --- a/docs/posts/page/6/index.html +++ b/docs/posts/page/6/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/posts/page/7/index.html b/docs/posts/page/7/index.html index cee61d601..60009d3d2 100644 --- a/docs/posts/page/7/index.html +++ b/docs/posts/page/7/index.html @@ -9,7 +9,7 @@ - + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 1722de00b..ffbddf160 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -4,27 +4,27 @@ https://alanorth.github.io/cgspace-notes/categories/ - 2020-10-06T16:59:31+03:00 + 2020-10-06T23:38:45+03:00 https://alanorth.github.io/cgspace-notes/ - 2020-10-06T16:59:31+03:00 + 2020-10-06T23:38:45+03:00 https://alanorth.github.io/cgspace-notes/categories/notes/ - 2020-10-06T16:59:31+03:00 + 2020-10-06T23:38:45+03:00 https://alanorth.github.io/cgspace-notes/2020-10/ - 2020-10-06T16:59:31+03:00 + 2020-10-06T23:38:45+03:00 https://alanorth.github.io/cgspace-notes/posts/ - 2020-10-06T16:59:31+03:00 + 2020-10-06T23:38:45+03:00