[ckan-dev] ckanapi bulk_update_* does not behave as expected

Wiebke Toussaint wiebke.toussaint at uct.ac.za
Mon Aug 22 15:55:34 UTC 2016


Hey


I've installed ckan 2.5.2 via package install (live here http://energydata.uct.ac.za<http://energydata.uct.ac.za/>) and have successfully used API commands to get and post datasets. However, I have not been able to create a private dataset (could not find the parameter relating to 'visibility'). I'm thus trying to do a bulk update from public to private (and vice versa) with the following CLI command:


ckanapi action bulk_update_private datasets=my_dataset org_id=my_org_id -r http://energydata.uct.ac.za -a myapikey


I keep receiving a 'null' response, instead of the anticipated 'success'. A similar issue seems to be recorded here: https://github.com/ckan/ckan/issues/2662

[https://avatars3.githubusercontent.com/u/3489241?v=3&s=400]<https://github.com/ckan/ckan/issues/2662>

bulk_update_* doesn't do anything · Issue #2662 · ckan/ckan<https://github.com/ckan/ckan/issues/2662>
github.com
Running: >>> r = requests.post('http://localhost:5000/api/3/action/bulk_update_private', json={'datasets':['a-dataset'], 'org_id': 'another-organization'}, headers={'Authorization':apikey}) >>> r...

Can anybody point me in the right direction of where I'm going wrong? Does the problem lie with the API or with me using it incorrectly? Is there a parameter I'm missing?


Kind regards,

Wiebke


Disclaimer - University of Cape Town This e-mail is subject to UCT policies and e-mail disclaimer published on our website at http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from +27 21 650 9111. If this e-mail is not related to the business of UCT, it is sent by the sender in an individual capacity. Please report security incidents or abuse via csirt at uct.ac.za
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160822/b37ff212/attachment-0002.html>


More information about the ckan-dev mailing list