[ckan-dev] Filestore API - error

Ian Ward ian at excess.org
Thu Jan 12 16:17:14 UTC 2017


CKAN 2.5 and later shouldn't require the url parameter.

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



More information about the ckan-dev mailing list