[ckan-dev] Package Create API

Matthew Fullerton matt.fullerton at gmail.com
Wed Feb 3 07:57:19 UTC 2016


Hi Mike,
I think it goes like this:
{
  "packagekey": "packagekeyvalue",
  "etc": "etcvalue",
  "groups":
    [
      {"id": "id_of_group_1"},
      {"name": "name_of_group_2"}
    ]
}

But don't hold your breath that identifying groups by name will work, I
would say its safer to use id.

Best,
Matt

On 3 February 2016 at 08:40, Mike Sinclair <mm.sinclair08 at gmail.com> wrote:

> Hi guys,
>
> I'm a bit confused. One of the parameters for package_create is:
>
> groups (list of dictionaries) – the groups to which the dataset belongs
> (optional), each group dictionary should have one or more of the following
> keys which identify an existing group: 'id' (the id of the group, string),
> or 'name' (the name of the group, string), to see which groups exist call
> group_list()
>
> If I do the a package_create, I am dumping this json into a python dict.
> Are the groups supposed to be in a nested dictionary? Is so, is the dict
> called "group"? What are the name, value pairs?
>
> Thanks,
>
> Mike
>>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160203/441b2087/attachment-0003.html>


More information about the ckan-dev mailing list