Differences between revisions 19 and 20
Revision 19 as of 2015-10-16 08:36:31
Size: 4096
Editor: LauraArjona
Comment: add note about char limit for the made up short URLs
Revision 20 as of 2016-04-02 04:37:25
Size: 4199
Editor: ?Harsh Daftary
Deletions are marked like this. Additions are marked like this.
Line 48: Line 48:
  . Python Library : [[https://github.com/ninjatrench/GoDebian_api/ | sudo pip install GoDebian_api]]

deb.li - the Debian ShortURL service

deb.li is a shortURL service for Debian related usage, hosted and developed by BerndZeimetz. The service is also available under the domain go.debian.net. To ensure that deb.li is not used by random spammers, adding new URLs is limited to a json-rpc web-interface for now, which is only accessible from a limited list of IPs.


  • Which hosts are allowed to access the json-rpc interface

    • (master.debian.org)
    •,, 2001:41B8:202::/48 (Debian networks @ MAN-DA)
    • (merkel.debian.org)
    • (alioth.debian.org)
    • (Debian network @ dg-i)
    • (vasks.debian.org)
    • (wagner.debian.org)
    • (samosa.debian.org)
    • (Debian network @ UBCECE)
    •, 2a02:16a8:dc41:100::/56 (Debian networks @ conova)
    • (Debian network @ GRNET)
    •, 2607:f8f0:610:4000:216:36ff:fe40:3861 (nono.debian.org)
  • I'd like to add new URLs from a different host

  • Is there a character limit for the made-up short URLs?

  • Is it ok to add a huge amount of URLs automatically

    • Basically - yes. But please make sure it doesn't end up in DOSing the service. It is appreciated if you would contact BerndZeimetz (bzed@debian.org) before adding a huge amount of URLs, maybe there is a faster and/or better way than the json-rpc interface.

  • Will there be other ways to add URLs to the service?

    • An email-gateway is planned, but not implemented yet. It will accept gpg-signed control mails, similar to db.debian.org.
  • Is there a bugtracker?

  • Is there a preview page of the short URLs available?

  • Where is the code?

  • Where is the documentation in the code?

    • Not yet written. Patches are welcome!
  • Is there an example JSON-RPC Client?

  • How do I use the example Client?

    • Clone the git repository from ?git://git.recluse.de/debian/godebian-client.git or http://git.recluse.de/repos/debian/godebian-client.git and read the README. Also there is a checked out version on alioth.debian.org - have a look into ~bzed/godebian-client aka /home/users/bzed/godebian-client.

      • here is a few-liner helper script to access bzed's alioth check-out via ssh
        #!/bin/sh -e
        # call me 'deb.li' and use me as 'deb.li http://some/long/url', stdout is a cut-and-paste friendly URL
        hash=$(ssh alioth.debian.org ~bzed/godebian-client/add_url "$@")
        echo "http://deb.li/$hash"
  • I'd like to use deb.li ShortURLs in my CIA bot messages, is this possible?

    • Yes, sure. have a look at deb.li/ciabot - the ciabot.py script in the example client repository. Please note that the script is a bit customized for alioth, so make sure it works properly for you when you use it somewhere else.

JSON-RPC API documentation

The json-rpc URL is http://deb.li/rpc/json. The following functions are provided:

  • add_url(url)

  • add_static_url(url, key)

  • update_static_url(url, key)

  • get_url(key)

url is the URL which should be shortened and key the key part of the short URL. Please note that the API is not declared as stable yet.