-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapshot__snapshot_tests____api__v1.snap
261 lines (208 loc) · 9.43 KB
/
snapshot__snapshot_tests____api__v1.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
---
source: repology-webapp/tests/snapshot_tests/mod.rs
expression: snapshot
snapshot_kind: text
---
Status: 200
Header: content-type: text/html
Header: content-length: 9482
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Multiple package repositories analyzer">
<meta name="keywords" content="repository, package, packages, version">
<meta name="author" content="Dmitry Marakasov">
<title>API - Repology</title>
<link rel="stylesheet" href="/static/bootstrap.min.v3.3.7.8dc6d358477be27a.css">
<link rel="stylesheet" href="/static/repology.v21.bb7b05a7b3bfbdb9.css">
<link rel="icon" href="/static/repology.v1.6108dff405ea1a42.ico" sizes="16x16 32x32 64x64" type="image/x-icon">
<link rel="search" type="application/opensearchdescription+xml" title="Repology packages" href="/opensearch/project.xml">
<link rel="search" type="application/opensearchdescription+xml" title="Repology maintainers" href="/opensearch/maintainer.xml">
</head>
<body>
<nav class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#repology-navbar-collapse" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">
<img alt="Repology" src="/static/repology40x40.v1.0ea026630d9180a2.png" width="40" height="40">
</a>
</div>
<div class="collapse navbar-collapse" id="repology-navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="/projects/">Projects</a></li>
<li><a href="/maintainers/">Maintainers</a></li>
<li><a href="/repositories/statistics">Repositories</a></li>
<li><a href="/tools">Tools</a></li>
<li><a href="/security/recent-cves">Security</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="/news">News</a></li>
<li class="active"><a href="/docs">Docs</a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<h1 class="page-header">API</h1>
</div>
<div class="container">
<article>
<h3>Terms of use</h3>
<p>Bulk requests to this API are discouraged, consider using a <a href="https://dumps.repology.org/README.txt">database dump</a>. Bulk clients must identify themselves with a custom <code>user-agent</code>, referring to a description of the client and a way to report misbehavior (such as GitHub repository with an issue tracker). Bulk clients must not do more than one request per second. Miscomplying clients will be blocked.</p>
<h3>Introduction</h3>
<div class="alert alert-warning" role="alert">Note that API stability is currently not guaranteed - it may change at any moment.</div>
<p>API always returns a list of <em>packages</em>. <em>Package</em> is a dictionary of the following format:</p>
<pre>
{
"repo": "freebsd",
"srcname": "www/firefox",
"binname": "firefox",
"visiblename": "www/firefox",
"version": "50.1.0",
"origversion": "50.1.0_4,1",
"status": "newest",
"summary": "Widely used web browser",
"categories": ["www"],
"licenses": ["GPLv2+"],
"maintainers": ["gecko@FreeBSD.org"]
}
</pre>
<p>Fields are:</p>
<dl class="dl-horizontal">
<dt>repo</dt><dd>name of repository for this package</dd>
<dt>subrepo</dt><dd>name of subrepository (if applicable; for example, <em>main</em> or <em>contrib</em> or <em>non-free</em> for Debian)</dd>
<dt>srcname, binname</dt><dd>package name(s) as used in repository - source package name and/or binary package name, whichever is applicable (all fields are optional)</dd>
<dt>visiblename</dt><dd>package name as shown to the user by Repology</dd>
<dt>version</dt><dd>package version (sanitized, as shown by Repology) </dd>
<dt>origversion</dt><dd>package version as in repository</dd>
<dt>status</dt><dd>package status, one of <em>newest</em>, <em>devel</em>, <em>unique</em>, <em>outdated</em>, <em>legacy</em>, <em>rolling</em>, <em>noscheme</em>, <em>incorrect</em>, <em>untrusted</em>, <em>ignored</em></dd>
<dt>summary</dt><dd>one-line description of the package</dd>
<dt>categories</dt><dd>list of package categories</dd>
<dt>licenses</dt><dd>list of package licenses</dd>
<dt>maintainers</dt><dd>list of package maintainers</dd>
</dl>
<p>
Mandatory fields are <b>repo</b> and <b>version</b>, all other fields are optional.
</p>
<p><em>Project</em> is a group of related <em>packages</em> from different repositories (though it may contain multiple <em>packages</em> from the same repository). <em>Project</em> has its own name which is derived from <em>package</em> names. In most cases it's the same, but sometimes different <em>package</em> names are transformed into a single <em>project</em> name to coalesce differently named <em>packages</em> from different repositories.</p>
<p>API allows to request <em>packages</em> for a single <em>project</em> or for a range of <em>projects</em>.</p>
<h3>Single project</h3>
<p>Get list of <em>packages</em> for specific <em>project</em> (here, firefox):</p>
<pre>
/api/v1/project/firefox
</pre>
<h3>Multiple projects</h3>
<p>The following requests return data for multiple <em>projects</em>
in form of <em>project</em> name → list of <em>packages</em>
dictionary. API returns no more than 200 <em>projects</em>
per request. You may specify a start or an end of <em>project</em> names
range to request.</p>
<p>Get first 200 projects:</p>
<pre>
/api/v1/projects/
</pre>
<p>Get first 200 projects starting with <b>firefox</b> (inclusive):</p>
<pre>
/api/v1/projects/firefox/
</pre>
<p>Get last 200 projects up to <b>firefox</b> (inclusive):</p>
<pre>
/api/v1/projects/..firefox/
</pre>
<p>You may iterate through all projects by using the last project name in the next
request</p>
<pre>
/api/v1/projects/ # returns '010editor' ... 'aaut'
/api/v1/projects/aaut/ # returns 'aaut' ... 'acf-snort'
/api/v1/projects/acf-snort/ # returns 'acf-snort' ... 'adinatha-fonts'
# ...
</pre>
<h3>Filtered projects</h3>
<p>API supports all the filters available on the website, so you can just
play with filters in the <a href="/projects/">website</a>
and then replace <code>/projects/</code> URL prefix with
<code>/api/v1/projects/</code> to get API output.</p>
<p>Supported filters are:</p>
<dl class="dl-horizontal">
<dt>search</dt><dd>project name substring to look for</dd>
<dt>maintainer</dt><dd>return projects maintainer by specified person</dd>
<dt>category</dt><dd>return projects with specified category</dd>
<dt>inrepo</dt><dd>return projects present in specified repository</dd>
<dt>notinrepo</dt><dd>return projects absent in specified repository</dd>
<dt>repos</dt><dd>return projects present in specified number of repositories (exact values and open/closed ranges are allowed, e.g. <code>1</code>, <code>5-</code>, <code>-5</code>, <code>2-7</code></dd>
<dt>families</dt><dd>return projects present in specified number of repository families (for instance, use <code>1</code> to get unique projects)</dd>
<dt>repos_newest</dt><dd>return projects which are up to date in specified number of repositories</dd>
<dt>families_newest</dt><dd>return projects which are up to date in specified number of repository families</dd>
<dt>newest</dt><dd>return newest projects only</dd>
<dt>outdated</dt><dd>return outdated projects only</dd>
<dt>problematic</dt><dd>return problematic projects only</dd>
</dl>
<p>Example: get unique outdated projects not present in FreeBSD maintainer by foo@bar.com</p>
<pre>
/api/v1/projects/?notinrepo=freebsd&maintainer=foo%40bar.com&families=1&outdated=1
</pre>
<h3>Problems</h3>
<p>Get problems for specific repository or maintainer:</p>
<pre>
/api/v1/repository/freebsd/problems
/api/v1/maintainer/ports%40freebsd.org/problems-for-repo/freebsd
</pre>
Output is an array of entries of the following format:
<pre>
{
"type": "homepage_dead",
"data": {
"url": "http://artax.karlin.mff.cuni.cz/~brain/0verkill/",
"code": 500
},
...
"repo": "freebsd",
"srcname": "games/0verkill",
"binname": "0verkill",
"rawversion": "0.16_2",
"maintainers": [
"mich@freebsd.org"
],
"effname": "0verkill",
"version": "0.16",
...
}
</pre>
<p>Fields are:</p>
<dl class="dl-horizontal">
<dt>type</dt><dd>problem type string constant</dd>
<dt>data</dt><dd>additional details on the problem in the form of JSON dictionary</dd>
<dt>*</dt><dd>unspecified set of internal fields for package which generated this problem. You may use some of them to identify the package, but they may change in the future</dd>
</dl>
</article>
</div>
<footer class="footer">
<div class="container">
<p class="pull-right footer-links">
GitHub repositories:
<a href="https://github.com/repology/repology-rs/tree/master/repology-webapp">webapp</a>,
<a href="https://github.com/repology/repology-updater">updater</a>,
<a href="https://github.com/repology/repology-rules">ruleset</a>
</p>
<p>
Copyright (C) 2016-2024 Dmitry Marakasov<br>
Code licensed under GPLv3+.<br>
Powered by Rust.
</p>
</div>
</footer>
<script src="/static/jquery-3.7.1.min.cc6904672d4db9a3.js"></script>
<script src="/static/bootstrap.min.v3.3.7.66502a3c5769c640.js"></script>
<script src="/static/moment.min.v2.29.2.b7efa16ed0d164d6.js"></script>
<script src="/static/repology.v2.ee0228ab3d88406f.js"></script>
</body>
</html>