-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathswagger.yml
248 lines (243 loc) · 7.28 KB
/
swagger.yml
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
swagger: "2.0"
info:
description: "A service used to download files from private or public s3 buckets."
version: "1.0.0"
title: "Download service"
license:
name: "Open Government Licence v3.0"
url: "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
tags:
- name: "Public"
schemes:
- "http"
host: localhost:23600
parameters:
datasetID:
name: datasetID
description: "The unique identifier for a dataset."
in: path
required: true
type: string
edition:
name: edition
description: "An edition of a dataset"
in: path
required: true
type: string
version:
name: version
description: "A version of a dataset"
in: path
required: true
type: string
filterOutputID:
name: filterOutputID
description: "The unique identifier for a filter output job"
in: path
required: true
type: string
imageID:
name: imageID
description: "The unique identifier for an image."
in: path
required: true
type: string
variant:
name: variant
description: "The variant of an image to download"
in: path
required: true
type: string
filename:
name: filename
description: "The filename of the file to download"
in: path
required: true
type: string
file_path:
name: filepath
in: path
required: true
description: filepath of required file
securityDefinitions:
FlorenceAPIKey:
name: X-Florence-Token
description: "API key used to allow florence users to be able to access a full download for an unpublished version."
in: header
type: apiKey
paths:
/downloads-new/{filepath}:
get:
tags:
- Download file
summary: "Download a file"
description: "Request a download for a file."
parameters:
- $ref: '#/parameters/file_path'
required: true
produces:
- "*/*"
responses:
200:
$ref: '#/responses/StreamedResponse'
301:
$ref: '#/responses/RequestRedirect'
400:
$ref: '#/responses/InvalidRequestError'
404:
$ref: '#/responses/NotFoundError'
500:
$ref: '#/responses/InternalError'
/downloads/datasets/{datasetID}/editions/{edition}/versions/{version}.csv:
get:
deprecated: true
tags:
- "Public"
summary: "Download the full csv for a given datasetID, edition and version"
description: "Request a download for the full CSV for a given datasetID, edition and version."
parameters:
- $ref: '#/parameters/datasetID'
- $ref: '#/parameters/edition'
- $ref: '#/parameters/version'
produces:
- "text/csv"
responses:
200:
$ref: '#/responses/StreamedResponse'
301:
$ref: '#/responses/RequestRedirect'
400:
$ref: '#/responses/InvalidRequestError'
404:
$ref: '#/responses/NotFoundError'
500:
$ref: '#/responses/InternalError'
/downloads/datasets/{datasetID}/editions/{edition}/versions/{version}.csv-metadata.json:
get:
deprecated: true
tags:
- "Public"
summary: "Download the csv metadata for a given datasetID, edition and version"
description: "Request a download for the metadata for the full CSV for a given datasetID, edition and version."
parameters:
- $ref: '#/parameters/datasetID'
- $ref: '#/parameters/edition'
- $ref: '#/parameters/version'
produces:
- "application/csvm+json"
responses:
200:
$ref: '#/responses/StreamedResponse'
301:
$ref: '#/responses/RequestRedirect'
400:
$ref: '#/responses/InvalidRequestError'
404:
$ref: '#/responses/NotFoundError'
500:
$ref: '#/responses/InternalError'
/downloads/datasets/{datasetID}/editions/{edition}/versions/{version}.xlsx:
get:
deprecated: true
tags:
- "Public"
summary: "Download the full excel file for a given datasetID, edition and version"
description: "Request a download for the full Excel file for a given datasetID, edition and version."
parameters:
- $ref: '#/parameters/datasetID'
- $ref: '#/parameters/edition'
- $ref: '#/parameters/version'
produces:
- "application/vnd.ms-excel"
responses:
200:
$ref: '#/responses/StreamedResponse'
301:
$ref: '#/responses/RequestRedirect'
400:
$ref: '#/responses/InvalidRequestError'
404:
$ref: '#/responses/NotFoundError'
500:
$ref: '#/responses/InternalError'
/downloads/filter-outputs/{filterOutputID}.csv:
get:
deprecated: true
tags:
- "Public"
summary: "Download a filtered csv file for a given filter output id"
description: "Request a download for a filtered csv file for a given filter ouput id which has selected dimension values"
parameters:
- $ref: '#/parameters/filterOutputID'
produces:
- "text/csv"
responses:
200:
$ref: '#/responses/StreamedResponse'
301:
$ref: '#/responses/RequestRedirect'
400:
$ref: '#/responses/InvalidRequestError'
404:
$ref: '#/responses/NotFoundError'
500:
$ref: '#/responses/InternalError'
/downloads/filter-outputs/{filterOutputID}.xlsx:
get:
deprecated: true
tags:
- "Public"
summary: "Download a filtered excel file for a given filter output id"
description: "Request a download for a filtered excel file for a given filter ouput id which has selected dimension values"
parameters:
- $ref: '#/parameters/filterOutputID'
produces:
- "text/csv"
responses:
200:
$ref: '#/responses/StreamedResponse'
301:
$ref: '#/responses/RequestRedirect'
400:
$ref: '#/responses/InvalidRequestError'
404:
$ref: '#/responses/NotFoundError'
500:
$ref: '#/responses/InternalError'
/images/{imageID}/{variant}/{filename}:
get:
deprecated: true
tags:
- "Public"
summary: "Download an image variant"
description: "Request a download of a specific variant of an image as created by the image importer"
parameters:
- $ref: '#/parameters/imageID'
- $ref: '#/parameters/variant'
- $ref: '#/parameters/filename'
produces:
- "image/png"
responses:
200:
$ref: '#/responses/StreamedResponse'
301:
$ref: '#/responses/RequestRedirect'
400:
$ref: '#/responses/InvalidRequestError'
404:
$ref: '#/responses/NotFoundError'
500:
$ref: '#/responses/InternalError'
responses:
InvalidRequestError:
description: "Failed to process the request due to invalid request."
InternalError:
description: "Failed to process the request due to an internal error."
NotFoundError:
description: "The download for the requested version was not found."
RequestRedirect:
description: "A permanent redirect to where the file is hosted on S3"
StreamedResponse:
description: "A streamed response containing the requested download file"
schema:
type: file