[ckan-dev] package_update action API doubt

Sean Hammond sean.hammond at okfn.org
Mon Aug 26 10:05:42 UTC 2013


> Im trying to update the information of a field ("Author") using
> package_update API action call.
> 
> My call is: *(Demo content)
> 
> http http://my.ckan.instance/api/3/action/package_update id=dummyDataset
> author=dummyAuthor Authorization:my_API_KEY
> 
> My problem is when I change the author field, all the others fields (and
> resources also) are deleted and put in blank.
> 
> There is a way to maintain the information of all package schema and only
> change the information of a field?.

You need to pass the (unchanged) value of the author field (and all
other package fields) to package_update. As far as I know there's no way
around this when using the API.

I don't think this is a very nice feature of the API (and I don't think
it's consistent with all other *_update API actions in CKAN either), I'd
like it to get cleaned up but for now I think we're stuck with it.




More information about the ckan-dev mailing list