[csw-maintainers] Full package statistics via REST

Sebastian Kayser skayser at opencsw.org
Sat Oct 29 20:53:08 CEST 2011


* Maciej (Matchek) Blizi??ski <maciej at opencsw.org> wrote:
> 2011/10/28 Sebastian Kayser <skayser at opencsw.org>:
> > If there's just a single package that I am interested in (I am after the
> > catalogname to md5 mapping), is there a more specific URL to grab? The
> > page above takes really long to load.
> 
> Look at the URL scheme in the source code (pkgdb_web.py), it should be
> easy to find out what URLs to call.

Thanks, found the list of URLs and also the kind of URL that I was
looking for. Retrieve information for a single package:

    http://buildfarm.opencsw.org/pkgdb/rest/catalogs/unstable/i386/SunOS5.9/catalognames/mbuffer/

Next up, teach this to ceeswi.

> > Btw., can you navigate the REST tree to see which URLs are available?
> > Like an entry page that people can easily remember (or which is added to
> > buildfarm.opencsw.org) and from where one can explore features at will?
> 
> Overall, there's more md5 sums that you can reasonably fetch.  So the
> idea is that you can find packages by:
> 
> - knowing the md5 sum in advance, because you have the file itself
> - knowing the catalog (release name, architecture, os release version)
> and the catalogname or pkgname
> - knowing the catalog, and enumerating all packages belonging to it
> 
> I could also add something to enumerate the catalogs.

That's fully sufficient. Maybe add a link to pkgdb_web.py [1] on the
pkgdb/ index page so that people who want to script stuff get a pointer
to what's available.

Sebastian

[1] http://sourceforge.net/apps/trac/gar/browser/csw/mgar/gar/v2/lib/web/pkgdb_web.py#L16


More information about the maintainers mailing list