diff --git a/content/posts/2018-09.md b/content/posts/2018-09.md index 6622fd3af..95aece8dd 100644 --- a/content/posts/2018-09.md +++ b/content/posts/2018-09.md @@ -66,4 +66,51 @@ Caused by: java.lang.RuntimeException: Failed to startup the DSpace Service Mana - One invalid value for `dc.type` - Abenet says she hasn't received any more subscription emails from the CUA module since she unsubscribed yesterday, so I think we don't need create an issue on Atmire's bug tracker anymore +## 2018-09-10 + +- Playing with [strest](https://github.com/eykhagen/strest) to test the DSpace REST API programatically +- For example, given this `test.yaml`: + +``` +version: 1 + +requests: + test: + method: GET + url: https://dspacetest.cgiar.org/rest/test + validate: + raw: "REST api is running." + + login: + url: https://dspacetest.cgiar.org/rest/login + method: POST + data: + json: {"email":"test@dspace","password":"thepass"} + + status: + url: https://dspacetest.cgiar.org/rest/status + method: GET + headers: + rest-dspace-token: Value(login) + + logout: + url: https://dspacetest.cgiar.org/rest/logout + method: POST + headers: + rest-dspace-token: Value(login) + +# vim: set sw=2 ts=2: +``` + +- Works pretty well, though the DSpace `logout` always returns an HTTP 415 error for some reason +- We could eventually use this to test sanity of the API for creating collections etc +- A user is getting an error in her workflow: + +``` +2018-09-10 07:26:35,551 ERROR org.dspace.submit.step.CompleteStep @ Caught exception in submission step: +org.dspace.authorize.AuthorizeException: Authorization denied for action WORKFLOW_STEP_1 on COLLECTION:2 by user 3819 +``` + +- Seems to be during submit step, because it's workflow step 1...? + diff --git a/docs/2018-09/index.html b/docs/2018-09/index.html index 42fb79c29..e590d7cbd 100644 --- a/docs/2018-09/index.html +++ b/docs/2018-09/index.html @@ -18,7 +18,7 @@ I’m testing the new DSpace 5.8 branch in my Ubuntu 18.04 environment and I " /> - + Abenet says she hasn’t received any more subscription emails from the CUA module since she unsubscribed yesterday, so I think we don’t need create an issue on Atmire’s bug tracker anymore +

2018-09-10

+ + + +
version: 1
+
+requests:
+  test:
+    method: GET
+    url: https://dspacetest.cgiar.org/rest/test
+    validate:
+      raw: "REST api is running."
+
+  login:
+    url: https://dspacetest.cgiar.org/rest/login
+    method: POST
+    data:
+      json: {"email":"test@dspace","password":"thepass"}
+
+  status:
+    url: https://dspacetest.cgiar.org/rest/status
+    method: GET
+    headers:
+      rest-dspace-token: Value(login)
+
+  logout:
+    url: https://dspacetest.cgiar.org/rest/logout
+    method: POST
+    headers:
+      rest-dspace-token: Value(login)
+
+# vim: set sw=2 ts=2:
+
+ + + +
2018-09-10 07:26:35,551 ERROR org.dspace.submit.step.CompleteStep @ Caught exception in submission step: 
+org.dspace.authorize.AuthorizeException: Authorization denied for action WORKFLOW_STEP_1 on COLLECTION:2 by user 3819
+
+ + + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 63239bde2..ebdaeb8ee 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -4,7 +4,7 @@ https://alanorth.github.io/cgspace-notes/2018-09/ - 2018-09-04T17:31:20+03:00 + 2018-09-04T17:33:30+03:00 @@ -184,7 +184,7 @@ https://alanorth.github.io/cgspace-notes/ - 2018-09-04T17:31:20+03:00 + 2018-09-04T17:33:30+03:00 0 @@ -195,7 +195,7 @@ https://alanorth.github.io/cgspace-notes/tags/notes/ - 2018-09-04T17:31:20+03:00 + 2018-09-04T17:33:30+03:00 0 @@ -207,13 +207,13 @@ https://alanorth.github.io/cgspace-notes/posts/ - 2018-09-04T17:31:20+03:00 + 2018-09-04T17:33:30+03:00 0 https://alanorth.github.io/cgspace-notes/tags/ - 2018-09-04T17:31:20+03:00 + 2018-09-04T17:33:30+03:00 0