[ckan-dev] creating a resource via API v3

Jose Miguel Agudo Molina joseam at geoslab.com
Thu Feb 26 13:13:53 UTC 2015


Many thanks Adrià, finnally I have been able to run the commands, it is 
not still clear what was the cause but my solution was to install 
everything from scratch.

Just in case it is usefull for the rest of members, my first steps have 
been:

STEP-0: authorization key is obtained when you create a new user in your 
installation (http://127.0.0.1:5000), entering in the user profile you 
will find it

STEP-1: Creating a new dataset (as a result we will receive the dataset 
identifier):
curl http://127.0.0.1:5000/api/3/action/package_create --data 
'{"name":"testdataset"}' -H "Authorization: 
8bda15ff-c3e2-4c0a-b25e-a6fadd6049f0"

STEP-2: Creating a new resource (same as in the example):
curl -X http://127.0.0.1:5000/api/3/action/datastore_create -H 
"Authorization: 8bda15ff-c3e2-4c0a-b25e-a6fadd6049f0" -d '{"resource": 
{"package_id": "57855721-501d-4a61-a8b0-30755ec78b61", "name":"nombre 
recurso 2"}, "fields": [ {"id": "a"}, {"id": "b"} ], "records": [ { "a": 
1, "b": "xyz"}, {"a": 2, "b": "zzz"} ]}'

all the best,

El 25/02/2015 a las 11:43, Adrià Mercader escribió:
> Hi José Miguel,
>
>
> On 24 February 2015 at 15:32, Jose Miguel Agudo Molina
> <joseam at geoslab.com> wrote:
>> I get an Internal Server Error (HTTP500), where can I see the error log? Has any one else had to face this problem?
>
> If you are running the local dev paster server
> (http://127.0.0.1:5000), the error stacktrace will be displayed on the
> terminal de server is running on.
>
> On production setups (ie running under Apache), the error logs are
> located in /var/log/apache2/ckan_default.error.log
>
>
> Adrià
> _______________________________________________
> 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


-- 
-----------------------------------------------------------
José Miguel Agudo Molina
Programador Senior
GeoSLab Logo
     C/ Carlos Marx, 6    CP 50015    Zaragoza (Spain)
     Tlf:   +34 976 762666
     Fax: +34 976 106201
joseam at GeoSLab.com <mailto:suzarso at GeoSLab.com>
http://www.GeoSLab.com
Follow us on Twitter <http://twitter.com/GeoSLab>
------------------------------------------------------------------------
/   Antes de imprimir este correo piensa si realmente es necesario 
hacerlo / Before printing this email, assess if it is really needed /
/    ---- ADVERTENCIA ----
La información contenida en este correo electrónico, y en su caso, 
cualquier fichero anexo al mismo, son de carácter privado y confidencial 
siendo para uso exclusivo de su destinatario. Si usted no es el 
destinatario correcto, el empleado o agente responsable de entregar el 
mensaje al destinatario, o ha recibido esta comunicación por error, le 
informamos que está totalmente prohibida cualquier divulgación, 
distribución o reproducción de esta comunicación según la legislación 
vigente y le rogamos que nos lo notifique inmediatamente, procediendo a 
su destrucción sin continuar su lectura./
/    ---- WARNING ----
Information contained in this email, and any attached files, are private 
and confidential for the addressee. If you are not the intended 
recipient, employee or agent responsible for delivering this message to 
the addressee, or have received this communication by mistake, please be 
aware that any dissemination, distribution or duplication under current 
laws is forbidden and we request you to notify us immediately and 
destroy the message without continue reading. /
------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20150226/e6e08777/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GSL_logo.jpg
Type: image/jpeg
Size: 22010 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20150226/e6e08777/attachment-0003.jpg>


More information about the ckan-dev mailing list