[ckan-dev] Create a dataset with a group

Sean Hammond sean.hammond at okfn.org
Mon Sep 17 09:10:39 UTC 2012


> I have developed clients for java and php versions. I would like to upload
> all datasets with assigning a certain group.
> 
> Based on http://docs.ckan.org/en/ckan-1.7.1/api-v2.html#status-codes , (not
> sure) it is not possible to assign a group for new resources.
> 
> Dataset{ id: Uuid, name: Name-String, title: String, version: String, url:
> String, resources: [ Resource, Resource, ...], author: String,
> author_email: String, maintainer: String, maintainer_email: String,
> license_id: String, tags: Tag-List, notes: String, extras: { Name-String:
> String, ... } } See note below on additional fields upon GET of a dataset.
> Is there any other method for doing it?

Hi Kim, I think you mean to assign a group to new datasets not
resources?

Try using the CKAN API v3, it is generally better than the v2 API, and
since CKAN 1.8 it has much better documentation:

http://docs.ckan.org/en/ckan-1.8/apiv3.html

For example, you can see that the package_create action has a parameter
'groups' that lets you specify what groups the new package should belong
to.




More information about the ckan-dev mailing list