We are using the Access module by @Daniel_KM to control access to some high-quality files that come with conditions on re-use. As there are several thousand items with media attached we are using the REST API to create the items and upload the files.
The Access module can either store the information about permissions and embargo dates in standard object properties, in which case they are editable in the main editing form, or it can use some special properties, editable from the Advanced tab when editing the media. We were hoping to use the latter option, which is the default. The media object would then look like this in the API. See the very bottom for the special fields:
{
"@context": "http://omeka.local/api-context",
"@id": "http://omeka.local/api/media/10976",
"@type": "o:Media",
...
[snip]
...
"o:filename": "27/BowmansLodge_1974_7_1_499.wrl",
"o:lang": "",
"o:original_url": "http://omeka.local/files/original/27/BowmansLodge_1974_7_1_499.wrl",
"o:thumbnail_urls": [],
"data": [],
"o-access:status": {
"level": "reserved",
"level_set": "reserved"
}
}
I had hoped we could update these fields when creating the media via POST or updating it via PUT, simply by adding the values to the JSON payload, but it seems to be ignored, and the access status always ends up with the level values set to “free”.
If it’s not possible to set it via the REST API then I suppose we will have to use ordinary properties, but if anyone (@Daniel_KM included) knows the secret of how to set the special values, I’d be interested to know!