Just to answer my own question.

Just adding groupId, year, month, day query parameters at the bitstream 
creation step should work, but didn't. Problem is, it actually doesn't 
remove the default policy, so I added 
policy.delete();
to here 
<https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-rest/src/main/java/org/dspace/rest/ItemsResource.java#L518>
 (the 
second for-loop could be refactored out, and do the deletion in the first), 
now it works!

- Anis

On Wednesday, October 18, 2017 at 4:00:36 PM UTC+3, Anis wrote:
>
> Hi! I'm considering doing ingestion through dspace rest api, but I've a 
> question regarding embargo. I got a working idea in my head (which I 
> tested, and it works) and the flow would go something like this: 
> 1. Create item
> 2. Create Bitstream for item
> 3. Fetch policies for the bitstream
> 4. Delete TYPE_INHERITED policy
> 5. Create my own policy with the embargo date.
> This is quite cumbersome and not failsafe (connection failure after step 2 
> leaves the bitstream open), is it possible to somehow pass a policy with 
> creating a bitstream, or is there some special command to add embargoed 
> items? I've tried to read through the documentation, but to no avail. Help 
> would be greatly appreciated, thank you!
>
>
> - Anis
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to