Hi all,
I am trying to automate things with Omeka S installations and am attempting to create or import a vocabulary with the REST API, but for some reason that only partly works: which means: a new vocabulary record get’s created, but the imported classes and properties are zero (0).
Is it not possible to import a vocabulary this way? Or could someone maybe explain how to do this?
BTW: I think I also noticed that when using the UI to import a vocabulary with a remote_url it almost always fails when attempting to autodetect the format. Does anyone else have the same experience?
I have no experience with this particular REST method. But maybe the following might be usefull: the Omeka-CLI by GhentCDH has the vocabulary:create-import-config option which make a data file which looks like:
Thanks for that suggestion I did not yet know about that tool. Unfortunately it seems to only work on a local installation of Omeka S using the PHP interface and not via the REST API, which is what I was aiming for.
Seems like a useful tool for other things though
looking at the Omeka S code, the REST API does not use the RdfImporter when creating a vocabulary, it just creates an new vocabulary entry with empty classes and properties.
Yeah, I meant to reply to this at some point to this effect:
The RDF importer isn’t hooked up to the REST API. You can create a vocabulary and its classes and properties by POSTing to the vocabularies endpoint, but it’s expecting a structure like
There isn’t something you can pass to the vocabulary endpoint to make it read from a vocab file the way the import option in the interface does. It’s something we could provide without too much trouble though if there’s interest… probably with a different endpoint, I’d imagine.