3 title: Debian Code Search
4 description: OpenAPI for https://codesearch.debian.net/
6 email: stapelberg@debian.org
9 url: http://www.apache.org/licenses/LICENSE-2.0.html
12 description: Get a Debian Code Search API key
13 url: https://codesearch.debian.net/apikeys/
15 - url: https://codesearch.debian.net/api/v1
18 description: Code Search
24 summary: Searches through source code
26 Performs a search through the full Debian Code Search corpus, blocking until all results are available (might take a few seconds depending on the search query).
28 Search results are ordered by their ranking (best results come first).
33 description: The search query, for example `who knows...` (literal) or `who
34 knows\.\.\.` (regular expression). See https://codesearch.debian.net/faq
35 for more details about which keywords are supported. The regular expression
36 flavor is RE2, see https://github.com/google/re2/blob/master/doc/syntax.txt
42 description: Whether the query is to be interpreted as a literal (`literal`)
43 instead of as an RE2 regular expression (`regexp`). Literal searches are
44 faster and do not require escaping special characters, regular expression
45 searches are more powerful.
54 description: All search results
60 $ref: '#/components/schemas/SearchResult'
62 description: The x-dcs-apikey header was either not set at all, or contained
63 an invalid (no longer valid?) API key. Please see https://codesearch.debian.net/apikeys/
72 summary: Like /search, but aggregates per package
73 description: 'The search results are currently sorted arbitrarily, but we intend
74 to sort them by ranking eventually: https://github.com/Debian/dcs/blob/51338e934eb7ee18d00c5c18531c0790a83cb698/cmd/dcs-web/querymanager.go#L719'
75 operationId: searchperpackage
79 description: The search query, for example `who knows...` (literal) or `who
80 knows\.\.\.` (regular expression). See https://codesearch.debian.net/faq
81 for more details about which keywords are supported. The regular expression
82 flavor is RE2, see https://github.com/google/re2/blob/master/doc/syntax.txt
88 description: Whether the query is to be interpreted as a literal (`literal`)
89 instead of as an RE2 regular expression (`regexp`). Literal searches are
90 faster and do not require escaping special characters, regular expression
91 searches are more powerful.
100 description: All search results
106 $ref: '#/components/schemas/PackageSearchResult'
108 description: The x-dcs-apikey header was either not set at all, or contained
109 an invalid (no longer valid?) API key. Please see https://codesearch.debian.net/apikeys/
126 description: The Debian source package containing this search result, including
127 the full Debian version number.
128 example: i3-wm_4.18-1
131 description: Path to the file containing the this search result, starting
133 example: i3bar/src/xcb.c
136 description: Line number containing the search result.
141 description: Up to 2 full lines before the search result (see `context`).
144 - ' cursor = xcb_generate_id(xcb_connection);'
149 description: The full line containing the search result.
150 example: ' i3Font cursor_font = load_font("cursor", false);'
153 description: Up to 2 full lines after the search result (see `context`).
155 - ' xcb_create_glyph_cursor('
159 description: A search result matching the specified query. You can use sources.debian.org
160 to view the file contents. See https://github.com/Debian/dcs/blob/master/cmd/dcs-web/show/show.go
161 for how to construct a sources.debian.org URL from a search result.
170 description: The Debian source package for which up to 2 search results
171 have been aggregated in `results`.
172 example: i3-wm_4.18-1
176 $ref: '#/components/schemas/SearchResult'
181 description: The search query, for example `who knows...` (literal) or `who
182 knows\.\.\.` (regular expression). See https://codesearch.debian.net/faq for
183 more details about which keywords are supported. The regular expression flavor
184 is RE2, see https://github.com/google/re2/blob/master/doc/syntax.txt
191 description: Whether the query is to be interpreted as a literal (`literal`)
192 instead of as an RE2 regular expression (`regexp`). Literal searches are faster
193 and do not require escaping special characters, regular expression searches