Debian Code Search API keys
Why get an API key at all?
The API works without a key, but then you are sharing resource limits with other users on your IP address or even network. Getting a personal API key gives you your own limits.
Our API keys encode an (encrypted) identity, which makes all API requests programmatically identifiable. This makes Debian Code Search more available:
- When the service would otherwise be overwhelmed by requests, instead of turning off the entire API, we can throttle or reject only requests coming in with an individual API key.
- Because the keys are personalized, we can reach out to the right person and resolve any issues as quickly as possible.
Your personal API key
🔑
After you log in via the salsa.debian.org GitLab instance,
you will see a personal API key file for download here.
If you need a non-personal API key for a CLI tool, web service, etc.,
please reach out to stapelberg@debian.org.
OpenAPI Specification, Client Libraries, Docs, Examples
The Debian Code Search API is described in an OpenAPI specification (OAS),
which you can use with various Swagger tools:
- a standalone version of the Swagger UI documentation browser
-
the editor.swagger.io online editor
Allows 1-click code generation for many programming languages! - the ReDoc online documentation browser
- The Restish CLI
- the Swagger Codegen program
- …and many others, as listed at OpenAPI.Tools
Documentation Browser
For your convenience, here is an embedded Swagger UI documentation browser:
OpenAPI spec URLs
This table lists all available Debian Code Search OpenAPI spec URLs:
| Format | OpenAPI version | URL | Note |
|---|---|---|---|
| YAML | OpenAPI 2 | https://codesearch.debian.net/openapi2.yaml |
Canonical |
OpenAPI 2 is our canonical spec because one can derive OpenAPI 3 from it, but the other way around is not possible. As of September 2020, it is worthwhile to keep OpenAPI 2 around because some tools offer broader compatibility with it.