opendata - cannot delete resource from CKAN data store -


i testing datastore functionality on ckan 2.3. running basic tests on ckan datastore page:

http://docs.ckan.org/en/ckan-2.3/maintaining/datastore.html#the-datastore-api

i able create, view , delete dataset using these commands:

curl -x post http://127.0.0.1:5000/api/3/action/datastore_create -h "authorization: {your-api-key}" -d '{"resource": {"package_id": "{package-id}"}, "fields": [ {"id": "a"}, {"id": "b"} ], "records": [ { "a": 1, "b": "xyz"}, {"a": 2, "b": "zzz"} ]}'

curl http://127.0.0.1:5000/api/3/action/datastore_search?resource_id={resource_id}

curl -x post http://127.0.0.1:5000/api/3/action/datastore_delete -h "authorization: {your-api-key}" -d '{"resource_id": "{resource-id}"}'

however, if after creating datastore resource after first step, delete using ui, can still view datastore resource using step 2 , cannot delete step 3.

how clean up?

i able delete this. had use "force:true" option in command.

curl -x post http://127.0.0.1/api/3/action/datastore_delete -h "authorization: mykey" -d '{"resource_id": "c1d0c269-f44b-4c78-a7a8-8c8fc1d18b27", "force":"true"}'

strange since if try delete without option before deleting via ui, works if delete ui, makes remaining datastore resource read-only , need use force. unable find anywhere in documentation makes resource read-only.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -