HTTP JSON api for the Ultimate Debian Database.
Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README
index.py
test_uddlib.py
uddlib.py

README

Introduction
===========

A web API for the Ultimate Debian Database.

This API is read-only.

Installation
============

Copy the file, create a file config.py with the following constants, and start
the web server:
* HOST
* PORT
* USER
* PASSWORD
* DATABASE

URL schema
==========

The root gives the list of available subdirectories. For example :
http://udd.progval.net/bugs/

You can provide filters (by appending ?filter1=value1&filter2=value2) to the
URL. filter1 and filter2 are names of fields of the resources.
Giving the same filter twice will be ignored.

Self-documentation
==================

As content are generated dynamically, it is possible for the API to display doc
about itself. You just have to append /doc/ to a resource path to get a
description of its fields.

For example : http://udd.progval.net/bugs/doc/

Format
======

All errors are plain text (text/plain). All data are json (application/json).

Sample Apache configuration
===========================

    <VirtualHost 0.0.0.0:80>
        ServerName udd.progval.net

        DocumentRoot /home/udd/udd-http-api
        <Directory "/home/udd/udd-http-api">
            Options Indexes MultiViews FollowSymLinks +ExecCGI
            Order allow,deny
            Allow from all
        </Directory>
        <Location />
            Options Indexes MultiViews FollowSymLinks +ExecCGI
            SetHandler wsgi-script
            Order allow,deny
            Allow from all
        </Location>
        ErrorLog /home/udd/apache/error.log
        WSGIScriptAlias / /home/udd/udd-http-api/index.py
        AssignUserId udd udd
    </VirtualHost>