This morning I've been playing with the API Import plugin, but I think I'm missing a critical step because no items are importing. After clicking submit and the update status link, I receive the "completed" message. But no items import, and I receive no errors in the application/logs/errors.log
What am I missing?
my import settings:
remote api url: http://library.lclark.edu/digcoll_NEW/api/items/9836
api key is not in use
source omeka: v.2.3
source api is enabled
destination omeka: v.2.3.1
Thanks for any pointers!
The URL that you've posted would only import one item, because it has an ID on the end. Try without the ID and see what happens: http://library.lclark.edu/digcoll_NEW/api/items/
Sheepeh beat me to the response!
The plugin should really give more information about unexpected URLs. It's actually designed to work as a wholesale import, starting at the top endpoint at http://library.lclark.edu/digcoll_NEW/api
Anything else looks like it silently stops with no data imported.
Ahhhh! Thanks guys.
So I wouldn't be able to use this plugin to import all of the items from a specific collection with a get like...
_Probably_ not, though _maybe_ with a little hackery on the plugin's code. Odd things could happen, though.
The possible (untested) hack would be to open up
plugins/OmekaApiImport/libraries/ApiImport/ImportJob/Omeka.php, and look for these few lines of code around line 20:
$importableResources = array(
'element_sets' => 'ApiImport_ResponseAdapter_Omeka_ElementSetAdapter',
'elements' => 'ApiImport_ResponseAdapter_Omeka_ElementAdapter',
'item_types' => 'ApiImport_ResponseAdapter_Omeka_ItemTypeAdapter',
'collections' => 'ApiImport_ResponseAdapter_Omeka_CollectionAdapter',
'items' => 'ApiImport_ResponseAdapter_Omeka_ItemAdapter'
The hack would be to replace that
'items' key with
'items?collection=22' That might limit the items import to just that collection. I have a few big doubts, but it is worth a try. If that doesn't work, we can probably dig up a deeper hack that will. Notice that before that it tries to import all the collection data, so that items can be assigned to the correct collections upon import.
Some plugins also allow their data to be imported. If you want to only get the items, and not things like simple pages, exhibits, or other, it's a good idea to deactivate plugins before importing. Of course, if you want that data (since it might be relevant to the items) leave them activated.
Finally, the importer will get very verbose in the error log if you go to
application/config/config.ini and make the logging level DEBUG around line 93
log.priority = Zend_Log::DEBUG
Cool. Thanks for all of this!
I'll look into hacking it, but may *probably* go another route.