[ckan-dev] [ckan-use] API Question

Adrià Mercader amercadero at gmail.com
Thu Nov 10 11:44:04 UTC 2011


On 10 November 2011 11:24, David Read <david.read at okfn.org> wrote:
> On 10 November 2011 11:12, DA ROS Jonathan <jdaros at sii.fr> wrote:
>> I'm trying to use API to delete my packages that i download with harvest
>> plugin.
> Perhaps @James can chime in here about deleting harvested datasets, as
> I think it is different to normal packages/datasets?
Harvested datasets are no different from normal datasets, and if there
is an API call to delete a dataset, then it should work with them. The
only issue to note is that it will need to be done by the user that
created (harvested) them in the first place, or a sysadmin.

This API call should work:
curl http://<ckan_instance>/api/3/action/package_delete -d
"{\"id\":\"<package_id>\"}" -H "Authorization: <your_api_key>"

Adrià




More information about the ckan-dev mailing list