-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAPI
213 lines (188 loc) · 7.17 KB
/
API
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
machine readable output API
stuff is available at http://$host/<path>
output is json
URL: /mr/package/
summary: list source package names
http status codes: 200 500 304
output: a list of hashes. each hash has at least a 'package' key with one source package name
{ '_comment': "yadayadayda",
'result':
[ { 'package': "eglibc" },
{ 'package': "tor" }
...
]
}
URL: /mr/package/<package>/
http status codes: 200 500 404 304
summary: list all available source versions for this package
{ '_comment': "yadayadayda",
'package': "tor",
'result':
[ { 'version': "0.1.2.20-1" },
{ 'version': "0.1.2.20-2" },
{ 'version': "0.1.2.21-1" },
...
]
}
URL: /mr/package/<package>/<version>/srcfiles
Options: fileinfo=1 includes fileinfo section
http status codes: 200 500 404 304
summary: list all source files associated with this package at that version
{ '_comment': "yadayadayda",
'package': "tor",
'version': "0.1.2.20-1",
'result':
[ { 'hash': "4955b5f663b9dccc84d7c264da9c483330ed3fdf" },
{ 'hash': "b4e15cbc18155955311207a3b5db0aeb6680ecaf" },
{ 'hash': "3beaecd47f4c0d3d5d182ef8d47166a81f9f62eb" },
...
]
}
URL: /mr/package/<package>/<version>/binpackages
http status codes: 200 500 404 304
summary: list all binary packages associated with this source package at that version
{ '_comment': "yadayadayda",
'package': "tor",
'version': "0.2.1.22-1",
'result':
[ { 'name': 'tor' , 'version': '0.2.1.22-1' },
{ 'name': 'tor-dbg' , 'version': '0.2.1.22-1' },
{ 'name': 'tor-geoip', 'version': '0.2.1.22-1' },
...
]
}
URL: /mr/package/<package>/<version>/binfiles/<binpkg>/<binversion>
Options: fileinfo=1 includes fileinfo section
http status codes: 200 500 404 304
summary: list all files associated with a binary package
{ '_comment': "yadayadayda",
'package': "tor",
'version': "0.2.1.22-1",
'binary': "tor",
'binary-version': '0.2.1.22-1',
'result':
[ { 'architecture': 'mipsel', hash: '2a3f98cce2f8054621e53d91c7c02d7125ea9c82' },
{ 'architecture': 'hurd-i386', hash: 'a4e9f6abf9664a44f7c94208a236464a59a68103' },
{ 'architecture': 'mips', hash: 'a2bfcdb202331e52b0a50cbce02623083328237e' },
...
]
}
URL: /mr/package/<package>/<version>/allfiles
Options: fileinfo=1 includes fileinfo section
http status codes: 200 500 404 304
summary: list all files associated with this source package at that version
{ '_comment': "yadayadayda",
'package': "tor",
'version': "0.2.1.22-1",
'result': {
'source':
[ { 'hash': "4955b5f663b9dccc84d7c264da9c483330ed3fdf" },
{ 'hash': "b4e15cbc18155955311207a3b5db0aeb6680ecaf" },
{ 'hash': "3beaecd47f4c0d3d5d182ef8d47166a81f9f62eb" },
..
]
'binaries':
[ { 'name': 'tor',
'version': '0.2.1.22-1',
'files':
[ { 'architecture': 'mipsel', hash: '2a3f98cce2f8054621e53d91c7c02d7125ea9c82' },
{ 'architecture': 'hurd-i386', hash: 'a4e9f6abf9664a44f7c94208a236464a59a68103' },
..
]
},
{ 'name": 'tor-geoipdb',
'version': '0.2.1.22-1',
'files':
[ { 'architecture': 'all', hash: '1d8b7383b100f00a1b99664dd38914081e929aaf' },
..
]
},
...
]
}
}
URL: /mr/binary/<binary>/
http status codes: 200 500 404 304
summary: find binary package versions and corresponding source names and versions
{ '_comment': "foo",
'binary': "keylookup",
'result': [ {
'name': "keylookup",
'binary_version': "2.0-2",
'source': "keylookup",
'version': "2.0-2"},
{
'name': "keylookup",
'binary_version': "2.2-2",
'source': "keylookup",
'version': "2.2-2"},
{
'name': "keylookup",
'binary_version': "3.0-1",
'source': "signing-party",
'version': "0.4.2-1"},
...
]
}
URL: /mr/binary/<binpkg>/<binversion>/binfiles
Options: fileinfo=1 includes fileinfo section
http status codes: 200 500 404 304
summary: list all files associated with a binary package
note: different source packages can build binaries with the same binary package name/version tuple.
{ '_comment': "yadayadayda",
'binary': "tor",
'binary-version': '0.2.1.22-1',
'result':
[ { 'architecture': 'mipsel', hash: '2a3f98cce2f8054621e53d91c7c02d7125ea9c82' },
{ 'architecture': 'hurd-i386', hash: 'a4e9f6abf9664a44f7c94208a236464a59a68103' },
{ 'architecture': 'mips', hash: 'a2bfcdb202331e52b0a50cbce02623083328237e' },
...
]
}
URL: /file/<hash>
http status codes: 200 500 404 403 304
[return the file]
URL: /mr/file/<hash>/info
http status codes: 200 500 404 304
{ '_comment': "yadayadayda",
'hash': "bae0f2e5bbedf1fcbdc88061f3f5b1f916824522",
'result':
[ { 'archive_name': 'debian-security',
'name': 'xulrunner_1.9.0.12.orig.tar.gz',
'path': '/pool/updates/main/x/xulrunner',
'size': 43962222,
'first_seen': '20090723T101051Z'},
{ 'archive_name': 'debian',
'name': 'iceweasel_3.0.12.orig.tar.gz',
'path': '/pool/main/i/iceweasel',
'size': 43962222,
'first_seen': '20090801T192339Z'},
{ 'archive_name': 'debian',
'name': 'xulrunner_1.9.0.12.orig.tar.gz',
'path': '/pool/main/x/xulrunner',
'size': 43962222,
'first_seen': '20090801T192339Z'}
]
}
Fileinfo section:
An additional block in the result hash, listing for each hash when it was seen
similar to the result attribute in /file/<hash>/info's result:
{ '_comment': 'foo',
'fileinfo':
{ '03bac2ae872d47ebaba2a7d90e242e89e420d33a': [{'archive_name': 'debian',
'name': 'tor_0.2.1.23.orig.tar.gz',
'path': '/pool/main/t/tor',
'run': '20100215T155930Z',
'size': 2396565}],
'0588383298e7fe2bfd62fd2838057489bfd3d2ac': [{'archive_name': 'debian',
'name': 'tor_0.2.1.23-2_sparc.deb',
'path': '/pool/main/t/tor',
'run': '20100218T221946Z',
'size': 1502742}],
...
}
'result': ...
}
# vim:set et:
# vim:set ts=4:
# vim:set shiftwidth=4: