Hi all,
I’m new to omeka s and I’m struggling to understand how to create/update relations between items via REST API. Unfortunately, the few examples available in the forum are not complete. In particular I have the following cases:
(1) an item with data properties
e.g. the name of a person. My JSON payload looks like this:
"wdp:P2561":[{ "property_id":1,
"property_label":"person name",
"@value": "Last name, First name",
"type":"literal",
"lang":"en"
}]
(2) an item with object properties
Here comes the problem, objects can be one of the following three options:
(2.1) the object is a resource already created
e.g. a book of my author.
"wdp:P50":[ {"property_id":1,
"property_label":"authorOf",
"@id": "http://xxx/items/item-id",
"type":"resource:item" ,
"value_resource_id": item-id,
}]
(2.2) the object is an external URI
e.g. a VIAF ID. In these cases I don’t need to know what it redirects to.
"wdp:P214":[{ "property_id":1,
"property_label":"VIAF ID",
"@id": "http://viaf.org/xxx",
"type":"uri" }]
(2.3) the object is a term from a controlled vocabulary (built-in OmekaS value suggest)
e.g. a geonames. In this case, when users type via Omeka interface the placename, they can select the desired place from the dropdown. However, it’s not clear how these entities are treated in Omeka.
So my questions are:
- Are controlled vocabulary terms just URIs (and the valuesuggest plugin does the magic) or are these items?
- I’m not sure what to do in this case when uploading new data via API, should I treat it as a URI, like I did for the VIAF, or should I look for Omeka IDs? an example would be of help!
Moreover:
- Are the examples correct and complete (for what concerns the property at hand)? I couldn’t find any example of object properties, so I’m not even sure whether keys and values are correct (!)
- Do I need to specify
property_label
all the times?
Thank you!