API inconsistency (groups versus organizations)

Hi peer-Open Data proponents,

Thanks to all those who make data.gov.uk such a great service!

My question:

When I perform query [1] I receive a list of groups.

When I perform query [2] I receive a message that no group by the name "academics" exists, even tough it does appear in the reply to [1].

I know the group "academics" is actually there, since [3] does return an actual description.

~~~{.rest}

[1]   http://data.gov.uk/api/3/action/group_list

[2]   http://data.gov.uk/api/3/action/group_show?id=academics

[3]   http://data.gov.uk/api/3/action/organization_show?id=academics

~~~

Help on how to overcome this inconsistency would be very much appreciated.

Cheers!,

Wouter Beek.

PhD at VU University Amsterdam

Comments

Publisher_show?

Hi Wouter,

I don't have the answer but here's another query that returns results:

http://data.gov.uk/api/3/action/publisher_show?id=academics

According to the description "publisher_show" is "based on group_show, but has parent group, as well as the child groups".

That sort of suggests you should be able to access a list of the children for the "academics" group (if that's what you're trying to do), but I don't see how.

Unfortunately the CKAN API is only lightly documented and the Data.gov.uk implementation even less so ...

-- Owen Boswarva, 20/02/2014

 Flag as offensive 

CKAN API

The CKAN API itself has quite a lot of documentation at http://docs.ckan.org/en/latest/api/index.html but I'm aware that it doesn't cover minor temporary changes, or DGU only APIs.  These will get documented here.

 Flag as offensive 

Groups/Organizations

Hi,

Although organizations and groups are very similar they do now have different meaning.  Since our upgrade to CKAN 2.x you should use the organization API - organization_list and organization_show. 

Groups are currently unused but group_list will currently show a list of organizations - this isn't standard CKAN behaviour, I changed it to aid in the migration from groups (pre-November 2013) to the organizations model, and we haven't yet had the opportunity to reset it to the default behaviour.

Cheers

Ross.

 Flag as offensive