[ckan-dev] Delete datastore via api

Dominik Moritz dominik.moritz at okfn.org
Mon Feb 18 23:41:47 UTC 2013


Hi Lasse,

The datstore API, which is part of the action  API, is not a REST API. There is no need to send an HTTP DELETE. The documentation for the action API at [1] might help you here.

Also, make sure that the resource exists in your datastore. There is a list of all resources at `[...]/api/action/datastore_search?resource_id=_table_metadata`.

Cheers,
Dominik

[1] http://docs.ckan.org/en/latest/apiv3.html 


On 18 Feb 2013, at 16:57, Lasse Vestergaard <ibbernik at gmail.com> wrote:

> Hi all.
> 
> Do you know of any good way to search all content of the mailing list? I'm
> facing a problem with deleting a datastore, and I'm sure that someone else
> has tried this, but I can't seem to find any effective way to traverse the
> mailing list (except sitting for hours and reading through it all).
> 
> Aynways, my problem is that I try to do this:
> 
> curl -i -X DELETE http://myckan.com/api/3/action/datastore_delete -H
> "Authorization: <my_key>" -d '{"resource_id": "<resource_id>"}'
> 
> and the rsponse is:
> 
> <html>
> <head>
>  <title>404 Not Found</title>
> </head>
> <body>
>  <h1>404 Not Found</h1>
>  The resource could not be found.<br /><br />
> 
> </body>
> </html>
> 
> I have tried to find an example of deleting through the datastore api, but
> I haven't found any.
> 
> 
> Any help would be apreciated.
> 
> Regards
> 
> Lasse Vestergaard
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev





More information about the ckan-dev mailing list