[ckan-discuss] HTTP 500 error when adding a new package using the API
Maali, Fadi
fadi.maali at deri.org
Sun May 22 21:02:57 BST 2011
Thanks a lot David.
It looks that the problem was somehow from the combination of (curl,
Windows and the single quote ')
Rewriting the command to use only double quotes solved the problem:
curl http://test.ckan.net/api/rest/package -d "{\"name\":\"test\",\
"title\":\"Test package\"}" -H "Authorization:MY-API-KEY"
Thanks,
Fadi
From: David Raznick [mailto:kindly at gmail.com]
Sent: 22 May 2011 19:50
To: Maali, Fadi
Cc: CKAN discuss
Subject: Re: [ckan-discuss] HTTP 500 error when adding a new package
using the API
Hello
I do not seem to get a 500 for that request with my api key.
The only issue is that there is already a package named "test" in the
database. The reply to the request gives me.
{"name": ["Package name already exists in database"]}
So it may be something odd with the api key.
David
On Sun, May 22, 2011 at 12:29 AM, Maali, Fadi <fadi.maali at deri.org>
wrote:
Hello,
I am getting a 500 Internal server error when trying to add a new
package to http://test.ckan.net
I followed the instructions described in the API documentation
http://packages.python.org/ckan/api.html#example-of-usage
the command I am using is:
curl http://test.ckan.net/api/rest/package -d '{"name":"test",
"title":"Test package"}' -H "Authorization:MY-API-KEY"
Is something wrong in the request?
Thanks,
Fadi
_______________________________________________
ckan-discuss mailing list
ckan-discuss at lists.okfn.org
http://lists.okfn.org/mailman/listinfo/ckan-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-discuss/attachments/20110522/1eaf3df2/attachment-0001.htm>
More information about the ckan-discuss
mailing list