[ckan-dev] Package modification date

David Raznick kindly at gmail.com
Tue May 17 10:08:36 UTC 2011


2011/5/17 Adrià Mercader <amercadero at gmail.com>

> Hi all,
>
> I'm working on the CKAN harvester, and I need to check when a package
> was last modified. I'm using the json API to get the remote packages.
> Two different questions here:
>
> * For an individual package, "metadata_modified" looks like the one to look
> at:
> http://it.ckan.net/api/2/rest/package/2eb938e1-0aa0-4a33-8e2b-d7d8f6b41101
>

> The thing is that it is not always present, like in this case:
> http://hu.ckan.net/api/2/rest/package/5f343aba-bef5-4f3f-abfd-672f2de1dbe0
>

This must be an old/buggy version.   It would be sorted if we upgraded it,
as the data is still there.

>
> Should I fall back to the revision
> (
> http://hu.ckan.net/api/2/rest/revision/6fe1c323-2094-4955-887b-abee19ab4f28
> )
> to look at the last modified date in that case?
> For the packages that have "metadata_modified", is this equivalent to
> the revision timestamp?


> * If I wanted to query only the packages modified from a certain date,
> I guess I should use the revision search api:
> http://it.ckan.net/api/search/revision?since_time=2011-04-17
>
> My question is, are the revisions returned only referring to changes
> in packages, or there could be also changes in groups, users, etc on
> this list?
>

Changes in metadata_modified include changes to extras, resources and tags
as well.

The revision_id against the package (above) only shows changes to the
package object itself *not* the extras, resources and tags.

No method shows changes to users and groups.

Sadly the easiest way is to get changes since a certain date from the atom
feed.  However that needs to be parsed.  This feed gives changes to extras,
resources and tags.


>
> Thanks!
>
> Adrià
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20110517/7ea094ba/attachment-0001.html>


More information about the ckan-dev mailing list