[ckan-dev] XML output support and Dataset date search [was Re: IATI]
Adrià Mercader
amercadero at gmail.com
Fri Oct 21 10:09:35 UTC 2011
Hi Chris,
I'm cc'ing the dev list to see if we can gather some support for some
of your proposals :)
2011/10/21 Chris Wallace <kit.wallace at gmail.com>:
> The API returns only JSON but I need to turn this into XML . oF course I'd
> like an XML response- i've queried Rufus and the ckan list and there doesnt
> seem to be a demand for XML but it would be a great addition - (my pasrse of
> JSON to XML is a bit of a hack but its fast enough )
We want CKAN to offer as metadata formats as possible, but it's true
that we haven't yet met with this demand.
I don't think we will be adding this feature in a near future, but a
CKAN extension offering XML representation could be created.
> I'd like to query the packages for those with specific filetype (activity )
> and last modified since a given datetime - filetype now works but last time
> I tried the since parameter to a search didnt work
I agree that the current situation is less than optimal. Right now you
can't search datasets directly by modification date, but rather you
need to query the revision search:
http://iatiregistry.org/api/search/revision?since_time=2011-10-01
That returns you a list of revision ids, and then you need to get the
revision details to see which datasets were actually modified
http://iatiregistry.org/api/rest/revision/159cbe1c-16fa-4fb3-8c3c-55b7616eb2c2
And if, like in your case, you need to filter by an extra property
(filetype=activity), you'll need to intersect the two sets of results
http://iatiregistry.org/api/search/dataset?filetype=activity
There has been a ticket floating around for a long time to implement
dataset-level date search
http://trac.ckan.org/ticket/191
Maybe we can include it in one of the next sprints?
Adrià
More information about the ckan-dev
mailing list