[ckan-dev] CkanClient file upload & CKAN 2.2
Nigel Babu
nigel.babu at okfn.org
Mon Jan 27 03:22:42 UTC 2014
Hi Stephane,
We're actually going to deprecate ckanclient as the official client in the
near future and start recommending
ckanapi<https://github.com/open-data/ckanapi>instead. ckanapi doesn't
yet support resource uploads as far as I know
though.
- I don't know of there being a resource_upload endpoint in the current
API. See the documentation<http://docs.ckan.org/en/latest/filestore.html#filestore-api>for
how it works.
- Yes, you can get the CKAN version from the `/api/action/status_show`
endpoint.
Nigel Babu
Developer | @nigelbabu <https://twitter.com/nigelbabu>
The Open Knowledge Foundation <http://okfn.org/>
Empowering through Open Knowledge
http://okfn.org/ | @okfn <http://twitter.com/OKFN> | OKF on
Facebook<https://www.facebook.com/OKFNetwork> |
Blog <http://blog.okfn.org/> | Newsletter<http://okfn.org/about/newsletter>
CKAN | http://ckan.org/ | @CKANproject
<http://twitter.com/CKANproject> |the world’s leading open-source data
portal platform
On 23 January 2014 00:44, Stéphane Guidoin <stephane at opennorth.ca> wrote:
> Hello,
>
> I have a script based on CkanClient that I use to upload files.
>
> I've upgraded from CKAN 2.0.x to 2.2 and the file upload seem to be
> broken. Based on the online documentation, it seems that the filestore API
> has changed over v2.2 (http://docs.ckan.org/en/latest/filestore.html):
> now we directly have to send the metadata (including the package to assign
> it) with the file as a multipart while previously it had to be uploaded and
> then assign it.
>
> I could change the CkanClient in order to support that BUT:
> - Does the new file upload (resource_create and resource_upload) exposes a
> REST interface following the same schema as the one currently used by
> CkanClient
> - Is there a way to know about the CKAN version from the API? Ideally, the
> Ckanclient should be able to support both behaviours based on CKAN.
>
> (That being said, it's a pity that the behaviour of the API was changed
> and the API version remained the same.)
>
> Stéphane
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140127/c1da553a/attachment-0003.html>
More information about the ckan-dev
mailing list