Debian Codegraph @

docs/swagger.json

raw
1 {
2 "swagger": "2.0",
3 "info": {
4 "description": "Archivista API",
5 "title": "Archivista API",
6 "contact": {
7 "name": "Archivista Contributors",
8 "url": "https://github.com/in-toto/archivista/issues/new"
9 },
10 "license": {
11 "url": "https://opensource.org/licenses/Apache-2"
12 },
13 "version": "v1"
14 },
15 "paths": {
16 "/download/{gitoid}": {
17 "get": {
18 "description": "download an attestation",
19 "produces": [
20 "application/json"
21 ],
22 "summary": "Download",
23 "deprecated": true,
24 "parameters": [
25 {
26 "type": "string",
27 "description": "gitoid",
28 "name": "gitoid",
29 "in": "path",
30 "required": true
31 }
32 ],
33 "responses": {
34 "200": {
35 "description": "OK",
36 "schema": {
37 "$ref": "#/definitions/dsse.Envelope"
38 }
39 },
40 "400": {
41 "description": "Bad Request",
42 "schema": {
43 "type": "string"
44 }
45 },
46 "404": {
47 "description": "Not Found"
48 },
49 "500": {
50 "description": "Internal Server Error",
51 "schema": {
52 "type": "string"
53 }
54 }
55 }
56 }
57 },
58 "/upload": {
59 "post": {
60 "description": "stores an attestation",
61 "produces": [
62 "application/json"
63 ],
64 "summary": "Upload",
65 "deprecated": true,
66 "responses": {
67 "200": {
68 "description": "OK",
69 "schema": {
70 "$ref": "#/definitions/api.StoreResponse"
71 }
72 }
73 }
74 }
75 },
76 "/v1/artifacts": {
77 "get": {
78 "description": "retrieves details about all available Artifacts",
79 "produces": [
80 "application/json"
81 ],
82 "tags": [
83 "Artifacts"
84 ],
85 "summary": "List all Artifacts",
86 "responses": {
87 "200": {
88 "description": "OK",
89 "schema": {
90 "type": "object",
91 "additionalProperties": {
92 "$ref": "#/definitions/artifactstore.Artifact"
93 }
94 }
95 },
96 "400": {
97 "description": "Bad Request",
98 "schema": {
99 "type": "string"
100 }
101 },
102 "500": {
103 "description": "Internal Server Error",
104 "schema": {
105 "type": "string"
106 }
107 }
108 }
109 }
110 },
111 "/v1/artifacts/{name}": {
112 "get": {
113 "description": "retrieves details about all available versions of a specified artifact",
114 "produces": [
115 "application/json"
116 ],
117 "tags": [
118 "Artifacts"
119 ],
120 "summary": "List Artifact Versions",
121 "parameters": [
122 {
123 "type": "string",
124 "description": "artifact name",
125 "name": "name",
126 "in": "path",
127 "required": true
128 }
129 ],
130 "responses": {
131 "200": {
132 "description": "OK",
133 "schema": {
134 "type": "object",
135 "additionalProperties": {
136 "$ref": "#/definitions/artifactstore.Version"
137 }
138 }
139 },
140 "400": {
141 "description": "Bad Request",
142 "schema": {
143 "type": "string"
144 }
145 },
146 "500": {
147 "description": "Internal Server Error",
148 "schema": {
149 "type": "string"
150 }
151 }
152 }
153 }
154 },
155 "/v1/artifacts/{name}/{version}": {
156 "get": {
157 "description": "retrieves details about a specified version of an artifact",
158 "produces": [
159 "application/json"
160 ],
161 "tags": [
162 "Artifacts"
163 ],
164 "summary": "Artifact Version Details",
165 "parameters": [
166 {
167 "type": "string",
168 "description": "artifact name",
169 "name": "name",
170 "in": "path",
171 "required": true
172 },
173 {
174 "type": "string",
175 "description": "version of artifact",
176 "name": "version",
177 "in": "path",
178 "required": true
179 }
180 ],
181 "responses": {
182 "200": {
183 "description": "OK",
184 "schema": {
185 "$ref": "#/definitions/artifactstore.Version"
186 }
187 },
188 "400": {
189 "description": "Bad Request",
190 "schema": {
191 "type": "string"
192 }
193 },
194 "404": {
195 "description": "Not Found"
196 },
197 "500": {
198 "description": "Internal Server Error",
199 "schema": {
200 "type": "objecpec"
201 }
202 }
203 }
204 }
205 },
206 "/v1/download/artifact/{name}/{version}/{distribution}": {
207 "get": {
208 "description": "downloads a specified distribution of an artifact",
209 "produces": [
210 "application/octet-stream"
211 ],
212 "tags": [
213 "Artifacts"
214 ],
215 "summary": "Download Artifact",
216 "parameters": [
217 {
218 "type": "string",
219 "description": "name of artifact",
220 "name": "name",
221 "in": "path",
222 "required": true
223 },
224 {
225 "type": "string",
226 "description": "version of artifact to download",
227 "name": "version",
228 "in": "path",
229 "required": true
230 },
231 {
232 "type": "string",
233 "description": "distribution of artifact to download",
234 "name": "distribution",
235 "in": "path",
236 "required": true
237 }
238 ],
239 "responses": {
240 "200": {
241 "description": "OK",
242 "schema": {
243 "type": "file"
244 }
245 },
246 "400": {
247 "description": "Bad Request",
248 "schema": {
249 "type": "string"
250 }
251 },
252 "404": {
253 "description": "Not Found"
254 },
255 "500": {
256 "description": "Internal Server Error",
257 "schema": {
258 "type": "string"
259 }
260 }
261 }
262 }
263 },
264 "/v1/download/{gitoid}": {
265 "get": {
266 "description": "download an attestation",
267 "produces": [
268 "application/json"
269 ],
270 "tags": [
271 "attestation"
272 ],
273 "summary": "Download",
274 "parameters": [
275 {
276 "type": "string",
277 "description": "gitoid",
278 "name": "gitoid",
279 "in": "path",
280 "required": true
281 }
282 ],
283 "responses": {
284 "200": {
285 "description": "OK",
286 "schema": {
287 "$ref": "#/definitions/dsse.Envelope"
288 }
289 },
290 "400": {
291 "description": "Bad Request",
292 "schema": {
293 "type": "string"
294 }
295 },
296 "404": {
297 "description": "Not Found"
298 },
299 "500": {
300 "description": "Internal Server Error",
301 "schema": {
302 "type": "string"
303 }
304 }
305 }
306 }
307 },
308 "/v1/query": {
309 "post": {
310 "description": "GraphQL query",
311 "produces": [
312 "application/json"
313 ],
314 "tags": [
315 "graphql"
316 ],
317 "summary": "Query GraphQL",
318 "responses": {
319 "200": {
320 "description": "OK",
321 "schema": {
322 "$ref": "#/definitions/archivista.Resolver"
323 }
324 }
325 }
326 }
327 },
328 "/v1/upload": {
329 "post": {
330 "description": "stores an attestation",
331 "produces": [
332 "application/json"
333 ],
334 "tags": [
335 "attestation"
336 ],
337 "summary": "Upload",
338 "responses": {
339 "200": {
340 "description": "OK",
341 "schema": {
342 "$ref": "#/definitions/api.StoreResponse"
343 }
344 }
345 }
346 }
347 }
348 },
349 "definitions": {
350 "api.StoreResponse": {
351 "type": "object",
352 "properties": {
353 "gitoid": {
354 "type": "string"
355 }
356 }
357 },
358 "archivista.Resolver": {
359 "type": "object"
360 },
361 "artifactstore.Artifact": {
362 "type": "object",
363 "properties": {
364 "versions": {
365 "type": "object",
366 "additionalProperties": {
367 "$ref": "#/definitions/artifactstore.Version"
368 }
369 }
370 }
371 },
372 "artifactstore.Distribution": {
373 "type": "object",
374 "properties": {
375 "sha256digest": {
376 "type": "string"
377 }
378 }
379 },
380 "artifactstore.Version": {
381 "type": "object",
382 "properties": {
383 "description": {
384 "type": "string"
385 },
386 "distributions": {
387 "type": "object",
388 "additionalProperties": {
389 "$ref": "#/definitions/artifactstore.Distribution"
390 }
391 }
392 }
393 },
394 "dsse.Envelope": {
395 "type": "object",
396 "properties": {
397 "payload": {
398 "type": "array",
399 "items": {
400 "type": "integer"
401 }
402 },
403 "payloadType": {
404 "type": "string"
405 },
406 "signatures": {
407 "type": "array",
408 "items": {
409 "$ref": "#/definitions/dsse.Signature"
410 }
411 }
412 }
413 },
414 "dsse.Signature": {
415 "type": "object",
416 "properties": {
417 "certificate": {
418 "type": "array",
419 "items": {
420 "type": "integer"
421 }
422 },
423 "intermediates": {
424 "type": "array",
425 "items": {
426 "type": "array",
427 "items": {
428 "type": "integer"
429 }
430 }
431 },
432 "keyid": {
433 "type": "string"
434 },
435 "sig": {
436 "type": "array",
437 "items": {
438 "type": "integer"
439 }
440 },
441 "timestamps": {
442 "type": "array",
443 "items": {
444 "$ref": "#/definitions/dsse.SignatureTimestamp"
445 }
446 }
447 }
448 },
449 "dsse.SignatureTimestamp": {
450 "type": "object",
451 "properties": {
452 "data": {
453 "type": "array",
454 "items": {
455 "type": "integer"
456 }
457 },
458 "type": {
459 "$ref": "#/definitions/dsse.SignatureTimestampType"
460 }
461 }
462 },
463 "dsse.SignatureTimestampType": {
464 "type": "string",
465 "enum": [
466 "tsp"
467 ],
468 "x-enum-varnames": [
469 "TimestampRFC3161"
470 ]
471 }
472 }
473 }