[ckan-dev] Filestore API - error
Matthew Fullerton
matt.fullerton at gmail.com
Thu Jan 12 16:15:00 UTC 2017
Hi Pedro,
you need to supply a "url" property as well as package_id. The API
reference for resource_create also states this, although I'm very curious
to see what happens to the URL you provide, assuming the file upload works.
-Matt
On 12 Jan 2017 5:06 p.m., "Pedro Ferro" <pedro.ferro at gmail.com> wrote:
Hi,
I must be doing something wrong, when I try to upload a file to CKAN trough
Filestore API
The goal is to upload a file in CKAN and create the corresponding new
Dataset, trough Filestore API.
File: /tmp/distrito_conc_escolaridade.geojson
Ckan: 127.0.0.1:5000
Following the documentation http://docs.ckan.org/en/
latest/maintaining/filestore.html
I make:
curl -H'Authorization: c72f0189-dae9-4606-9e3d-debf5b560268' '
http://localhost:5000/api/action/resource_create' --form
upload=/tmp/distrito_conc_escolaridade.geojson --form package_id="teste"
The reponse:
{"help": "http://10.0.70.130:5000/api/3/action/help_show?name=resourc
e_create", "success": false, "error": {"url": ["Valor em falta"], "__type":
"Validation Error"}}
At CKAN nothing is uploaded.
Anyone know what could be wrong?
Thanks,
Pedro
_______________________________________________
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/20170112/4deeeb6e/attachment-0003.html>
More information about the ckan-dev
mailing list