[ckan-dev] datastore set up error

Nigel Babu nigel.babu at okfn.org
Fri Jun 13 03:45:28 UTC 2014


Hi Rogers,

To pass force=True, edit your curl command to be like this:
curl -X POST http://127.0.0.1:5000/api/3/action/datastore_create -H "Authorization: {YOUR-API-KEY}" -d '{"resource_id": "{RESOURCE-ID}", "force": "true", "fields": [ {"id": "a"}, {"id": "b"} ], "records": [ { "a": 1, "b": "xyz"}, {"a": 2, "b": "zzz"} ]}'


On Fri, Jun 13, 2014 at 08:57:35AM +0800, roger wrote:
> Hi,
> i installed ckan2.2 from package on ubuntu 12.04 and tried to set up the datastore,
> when i run test the set up of datastore with command
>
> curl -X POST http://127.0.0.1:5000/api/3/action/datastore_create -H "Authorization: {YOUR-API-KEY}" -d '{"resource_id": "{RESOURCE-ID}", "fields": [ {"id": "a"}, {"id": "b"} ], "records": [ { "a": 1, "b": "xyz"}, {"a": 2, "b": "zzz"} ]}'
>
> i replaced my api key and the resource id,
> and i received the error that can not edit read-only resources, either pass force = true or change url type to datastore.
> Then how to pass force = true ?
> Thanks,
> Roger

> _______________________________________________
> 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


--
Nigel Babu
Developer, Open Knowledge



More information about the ckan-dev mailing list