[ckan-dev] Updating group via API clears its packages
Joshua Tauberer
tauberer+consulting at govtrack.us
Tue Sep 18 14:18:24 UTC 2012
On 09/17/2012 01:30 PM, David Read wrote:
> On 17 September 2012 10:48, Sean Hammond <sean.hammond at okfn.org> wrote:
>>> Over at http://hub.healthdata.gov we're populating site data
>>> entirely through the API. I'm now creating groups. I found that when
>>> I update a group, any packages previously contained in the group are
>>> no longer associated with the group.
> I think because this API is RESTful, when you update an object then
> you update everything about it in one go. You can't pick and choose
> bits to update. That is the inflexibility / simplicity of RESTful
> APIs.
Simplicity is nice. That's not how the API works for any other field,
however.
> So this is one of the reasons that the Action API was produced, that
> Sean mentions. It's RPC, and a lot more flexible. I've not checked,
> but if there is not a function to edit just the Group's core
> properties (i.e. not the packages in it or user memberships) then that
> it is sorely lacking.
I haven't looked much at the actions API because it's labeled in the
docs as beta, and I'm averse to using a beta feature on a production
website. Is it production ready?
(In the meanwhile, as I said originally, I'm fine re-sending the package
list on updates if that's how it's supposed to work.)
--
- Joshua Tauberer
- http://razor.occams.info
More information about the ckan-dev
mailing list