[ckan-discuss] Basic CKAN API question

Dominik Moritz dominik.moritz at okfn.org
Tue Apr 23 21:07:58 BST 2013


The shortest hack to get it working even with old CKAN versions is http://datahub.io/api/3/action/group_list?{}.

On 23 Apr 2013, at 21:50, therzog1 at worldbank.org wrote:

> Thanks, Ross, that did the trick.
> <31435267.jpg>	 	Timothy (Tim) Herzog
> Open Data Specialist, Development Data Group
> World Bank, 1818 H St. NW Washington, DC 20433
> Tel: 202-473-1701 | therzog1 at worldbank.org | data.worldbank.org
> Skype: timherzog | Twitter: @tgherzog
> 
> 
> <graycol.gif>Ross Jones ---04/22/2013 06:45:06 PM---Hi Tim, It's expecting a POST with a JSON body, you could probably try the following in a GET reques
> 
> From:	Ross Jones <ross at servercode.co.uk>
> To:	therzog1 at worldbank.org
> Cc:	ckan-discuss at lists.okfn.org
> Date:	04/22/2013 06:45 PM
> Subject:	Re: [ckan-discuss] Basic CKAN API question
>       	
> 
> 
> 
> Hi Tim,
> 
> It's expecting a POST with a JSON body, you could probably try the following in a GET request instead.
> 
> http://datahub.io/api/3/action/group_list?json={}
> 
> The parameters don't seem to matter for this type of call.
> 
> Regards
> 
> Ross
> 
> 
> On 22 Apr 2013, at 23:23, therzog1 at worldbank.org wrote:
> 
> Hi all,
> 
> Quick CKAN API question: how do I get a list of all groups on a CKAN site?  Specifically, I'm trying to fetch the list of groups from datahub.io so I don't have to page through the list manually (it's not in alphabetical order, at least not by group name). But when I follow the docs and go to http://datahub.io/api/3/action/group_list I get the message below.
> 
> "Bad request - JSON Error: No request body data"
> 
> I see something in the API docs about "posting an JSON dictionary in an HTTP POST request to one of CKAN’s API URLs" but I'm not sure what that means in this instance (can't I just send an HTTP GET?) . An example would be helpful.
> 
> Thanks,
> Tim
> 
> 
> <21759961.jpg>	 	Timothy (Tim) Herzog
> Open Data Specialist, Development Data Group
> World Bank, 1818 H St. NW Washington, DC 20433
> Tel: 202-473-1701 | therzog1 at worldbank.org | data.worldbank.org
> Skype: timherzog | Twitter: @tgherzog
> _______________________________________________
> ckan-discuss mailing list
> ckan-discuss at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-discuss
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-discuss
> 
> 
> _______________________________________________
> ckan-discuss mailing list
> ckan-discuss at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-discuss
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-discuss/attachments/20130423/ca789573/attachment.htm>


More information about the ckan-discuss mailing list