[ckan-dev] Spatial search via action api

Fawcett, David (MNIT) David.Fawcett at state.mn.us
Mon Jul 15 16:26:26 UTC 2013


I am attempting to execute a bbox search via the API(v3) on CKAN 2.0.

We have the spatial plugin installed and the map widget on the datasets page successfully limits search results by spatial exent.

When I attempt a search via the API, I get all of the datasets back, even when I use a bbox that does not contain any of the dataset extents.

Here are a few lines of Python code (using the requests module)

payload = {"extras":{"ext_bbox":"-100,49,-99,50"}}
r = requests.get("http://my.uri/api/3/action/package_search", data=payload, headers={'content-type': 'application/json'})

Does this look like a valid request?  If not, can someone please provide a working example.  Maybe hitting the api on data.gov or some other production site.

Thanks,

David.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130715/26dee291/attachment.html>


More information about the ckan-dev mailing list