[ckan-dev] Filestore API - error

Pedro Ferro pedro.ferro at gmail.com
Fri Jan 13 11:25:07 UTC 2017


Thank you all for the help but still can't understand how to do it. (you
guys have to have patience to put up with a basic non IT guy...)

I'm running CKAN 2.5.3 in a VM.
At the VM, Ckan is running under 127.0.0.1:5000
Outside the VM, CKAN is running 10.0.70.130:5000



two kinds of doubts:

--> what you meen "supply a "url" property" ?
 I did this but didn't work:

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='desemprego' --form url='http://localhost:5000'
>



>

--> supply package_id
thought that the  package_id was the name of the new dataset we are
uploading

but I also tried with the id that appears in the url when edit a existent
dataset and got an error to

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='4c0d8df1-84d6-492d-af81-ba87f1568389'--form  url= '
> http://localhost:5000'
>


{"help": "http://10.0.70.130:5000/api/3/action/help_show?name=
> resource_create", "success": false, "error": {"url": ["Valor em falta"],
> "__type": "Validation Error"}}curl: (6) Could not resolve host: url=
> <!DOCTYPE html>
> ....




thanks
Pedro

2017-01-12 18:41 GMT+00:00  <ckan-dev-request at lists.okfn.org>:


>
> >
> > On Thu, Jan 12, 2017 at 11:15 AM, Matthew Fullerton
> > <matt.fullerton at gmail.com> wrote:
> >> 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
> >>
> >>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20170113/5e7462eb/attachment-0003.html>


More information about the ckan-dev mailing list