[ckan-dev] CKAN says I am sending __junk
Yu Chen
cheny18 at rpi.edu
Thu Oct 10 19:20:21 UTC 2013
Hi,
I am trying to use the ckan http api to update the resources in a certain dataset. What I do is just to send the post request with the body as a json file like this:
{
"resource": [
{
"resource_group_id": "d1ed31c4-c356-4f9a-aaaf-6b79ba2f4efd",
"hash": "",
"description": "",
"format": "",
"url": "http://udco.tw.rpi.edu/ckan/storage/f/2013-10-09-123102/DataScience_2013_Assignment-2.pdf",
"revision_gtimestamp": "",
"state": "active",
"position": 0,
"revision_id": "",
"id": ""
}
],
"num_resources": 1
}
and ckan says what I send is __junk.
However, if I try to send
{
"resource": [],
"num_resources": 1
}
it works perfectly. I saw some of the previous post on this issue and figure out it might be the problem with the fields. Does anyone know what's the required field that I need to send in the json file? Thanks!
Cheers
Yu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20131010/a37360ff/attachment.html>
More information about the ckan-dev
mailing list