mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2025-01-27 05:49:12 +01:00
Add notes for 2020-10-08
This commit is contained in:
@ -198,4 +198,21 @@ $ http POST https://dspacetest.cgiar.org/rest/collections/f10ad667-2746-4705-8b1
|
||||
- Does *not* post straight to archive, goes to workflow
|
||||
- Note that community administrators have no role in item submission other than being able to create/manage collection groups
|
||||
|
||||
## 2020-10-08
|
||||
|
||||
- I did some testing of the DSpace 5 REST API because Salem and I were curious
|
||||
- The authentication is a little different (uses a serialized JSON object instead of a form and the token is an HTTP header instead of a cookie):
|
||||
|
||||
```
|
||||
$ http POST http://localhost:8080/rest/login email=aorth@fuuu.com 'password=ddddd'
|
||||
$ http http://localhost:8080/rest/status rest-dspace-token:d846f138-75d3-47ba-9180-b88789a28099
|
||||
$ http POST http://localhost:8080/rest/collections/1549/items rest-dspace-token:d846f138-75d3-47ba-9180-b88789a28099 < item-object.json
|
||||
```
|
||||
|
||||
- The item submission works exactly the same as in DSpace 6:
|
||||
|
||||
1. The submitting user must be a collection admin
|
||||
2. If the collection has a workflow the item will enter it and the API returns an item ID
|
||||
3. If the collection does not have a workflow then the item is committed to the archive and you get a Handle
|
||||
|
||||
<!-- vim: set sw=2 ts=2: -->
|
||||
|
Reference in New Issue
Block a user