[ckan-dev] creating a resource via API v3

Jose Miguel Agudo Molina joseam at geoslab.com
Tue Feb 24 15:32:06 UTC 2015


Dear partners,

I am currently getting in touch with CKAN, my very first steps have been:
1.- Install CKAN form source 
(http://docs.ckan.org/en/latest/maintaining/installing/install-from-source.html)
2.- Install datastore extension 
(http://docs.ckan.org/en/latest/maintaining/datastore.html)

In this second step everything has gone ok but when I get to the test 
set-up and try to create a resource (replacing {YOUR-API-KEY} with a 
valid API-KEY and {PACKAGE-ID} with a dataset id):

curl -X POST http://127.0.0.1:5000/api/3/action/datastore_create -H "Authorization: {YOUR-API-KEY}" -d '{"resource": {"package_id": "{PACKAGE-ID}"}, "fields": [ {"id": "a"}, {"id": "b"} ], "records": [ { "a": 1, "b": "xyz"}, {"a": 2, "b": "zzz"} ]}'
curl -X POSThttp://127.0.0.1:5000/api/3/action/datastore_create  -H "Authorization: c041be73-5bc4-49ec-9a76-8e7eb296a0a2" -d '{"resource": {"package_id": "ab8b611a-eeab-41b8-b867-d6b2e34ba3bd"}, "fields": [ {"id": "a"}, {"id": "b"} ], "records": [ { "a": 1, "b": "xyz"}, {"a": 2, "b": "zzz"} ]}'

I get an Internal Server Error (HTTP500), where can I see the error log? Has any one else had to face this problem?

Many thanks in advance,
best regards,


-- 
-----------------------------------------------------------
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/20150224/6780e2e9/attachment-0002.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/20150224/6780e2e9/attachment-0002.jpg>


More information about the ckan-dev mailing list