[ckan-dev] using a java client to upload files to a dataset created through the datahub.io website

Clement Levallois clementlevallois at gmail.com
Wed Jan 23 22:14:33 UTC 2013


Hi,


I created a dataset on datahub.io and uploaded 2 files in it through the
website, as a test. I see that these files are hosted at:
https://ckannet-storage.commondatastorage.googleapis.com etc...

Now, programmatically, I use the Ckan Java client to modify the metadata of
these 2 files (jpeg files), using the resource_update method described here:
http://docs.ckan.org/en/latest/apiv3.html#action-api

It works well.

The next step is that I would like to upload new resources (and the
corresponding files) to this dataset, also through the API.

I see the "resource_create" method here:
http://docs.ckan.org/en/latest/apiv3.html#action-api

But this does not actually upload the file, it just describes the resource.

I've checked this page about file uploads
http://docs.ckan.org/en/latest/filestore.html#metadata-api

=> but I am stuck, do the instructions on this page apply to what I want to
achieve? how do I implement that in Java (I suppose the Ckan Java client
would already take care of most of the boilerplate?) Any pointer would be
much appreciated!

Best,

Clement



--------------------------------------------
Clement Levallois, PhD
Erasmus University Rotterdam
The Netherlands

pro website<http://www.erim.eur.nl/ERIM/People/Person_Details?p_aff_id=4321>
 / personal website <http://www.clementlevallois.net/>

twitter and skype: @seinecle
Discover the NESSHI project: http://www.nesshi.eu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130123/59298ddd/attachment.html>


More information about the ckan-dev mailing list