[ckan-dev] data api question

Rufus Pollock rufus.pollock at okfn.org
Fri Mar 30 15:13:52 UTC 2012


BTW: I'm on #ckan on freenode if you want to caht.

On 30 March 2012 15:58, James Casbon <casbon at gmail.com> wrote:
> Hi CKAN,
>
> Go to gold prices:
> http://thedatahub.org/dataset/gold-prices/resource/b9aae52b-b082-4159-b46f-7bb9c158d013
>
> Click 'data api button', tells me to use
> "http://thedatahub.org/api/data/b9aae52b-b082-4159-b46f-7bb9c158d013"

Add _search on the end of it plus some kind of query.

That link is described as "base". Perhaps we should move it down the
list. 2nd and 3rd examples are of actual queries.

> $ curl -g "http://thedatahub.org/api/data/b9aae52b-b082-4159-b46f-7bb9c158d013/"
> No handler found for uri
> [/ckan-www.ckan.net/b9aae52b-b082-4159-b46f-7bb9c158d013/] and method
> [GET]
>
> $ curl -g "http://thedatahub.org/api/data/b9aae52b-b082-4159-b46f-7bb9c158d013/_search"
> {"error":"ActionRequestValidationException[Validation Failed: 1:
> search source is missing;]","status":500}

3rd example on list ;-) (this is correct for search url but you need
to actually search for something or add a size parameter):

http://thedatahub.org/api/data/b9aae52b-b082-4159-b46f-7bb9c158d013/_search?size=1

I agree this is kind of stupid and will look into fixing it.

Rufus

> Am I missing something?
>
> --
> James
> http://casbon.me/
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev



-- 
Co-Founder, Open Knowledge Foundation
Promoting Open Knowledge in a Digital Age
http://www.okfn.org/ - http://blog.okfn.org/




More information about the ckan-dev mailing list