{# Copyright (C) 2013 Matthieu Caneill License: GNU Affero General Public License, version 3 or above. #} {% extends "base.html" %} {% block head %} {{ super() }} {% endblock %} {% block title %}API documentation{% endblock %} {% block breadcrumbs %}doc / api{% endblock %} {% block content %} {% set url_prefix = "http://" + config.DOMAIN %}

{{ self.title() }}

You can query anything in the Debian sources, and get a JSON object which allows you to navigate into packages and source files.

The JSON result will be pretty-printed, unless the X-Requested-With header is set to XmlHttpRequest.

Search

Package search

By accessing the following URL: {{ url_prefix }}/api/search/query See example

File search

You can look for duplicate files using their SHA-256 sum: {{ url_prefix }}/api/sha256/?checksum=sha256&package=packagename Specifying a package name is optional.

Code search

You can search within the code through tags. {{ url_prefix }}/api/ctag/?ctag=tag&package=packagename Specifying a package name is optional.

Package list

All packages

{{ url_prefix }}/api/list

By prefix

{{ url_prefix }}/api/prefix/prefix See example

Navigation in source folders and files

List different versions of a package: {{ url_prefix }}/api/src/packagename See example

List folders and files in a folder: {{ url_prefix }}/api/src/packagename/version/path/to/folder See example

You can use {{ url_prefix }}/api/src/packagename/latest to use automatically the latest available version of the package.

Get information about a file (including the raw_url of the file, which allows you to retrieve its content): {{ url_prefix }}/api/src/packagename/version/path/to/file See example

Checksums

Query the list of indexed source files by SHA256 hash: {{ url_prefix }}/api/sha256/sha256. See example

Check the service status

Through the following URL: {{ url_prefix }}/api/ping/.
You can check the "status" variable and/or the HTTP response.

{% endblock %}