[ckan-dev] datastore set up error

Hayden Waring hayden at opengovgear.com
Fri Jun 13 01:19:53 UTC 2014


Hi Roger,


You need to add {"force" : true} to your dictionary.

Try


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"} ], "force" : true }'


OpenGovGear
www.opengovgear.com


On Thu, Jun 12, 2014 at 5:57 PM, roger <roger_ke at 163.com> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140612/4cdcde76/attachment-0003.html>


More information about the ckan-dev mailing list