-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdataImport.raml
More file actions
378 lines (372 loc) · 12.3 KB
/
dataImport.raml
File metadata and controls
378 lines (372 loc) · 12.3 KB
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
#%RAML 1.0
title: Data import
version: v3.0
protocols: [ HTTP, HTTPS ]
baseUri: http://localhost
documentation:
- title: Data import API
content: API for uploading source records and processing them
types:
error: !include raml-storage/raml-util/schemas/error.schema
errors: !include raml-storage/raml-util/schemas/errors.schema
fileDefinition: !include raml-storage/schemas/mod-data-import/fileDefinition.json
uploadDefinition: !include raml-storage/schemas/mod-data-import/uploadDefinition.json
definitionCollection: !include raml-storage/schemas/mod-data-import/uploadDefinitionCollection.json
initJobExecutionsRqDto: !include raml-storage/schemas/dto/initJobExecutionsRqDto.json
initJobExecutionsRsDto: !include raml-storage/schemas/dto/initJobExecutionsRsDto.json
jobExecution: !include raml-storage/schemas/mod-source-record-manager/jobExecution.json
jobExecutionDto: !include raml-storage/schemas/dto/jobExecutionDto.json
jobExecutionDtoCollection: !include raml-storage/schemas/dto/jobExecutionDtoCollection.json
statusDto: !include raml-storage/schemas/dto/statusDto.json
processFilesRqDto: !include raml-storage/schemas/dto/processFilesRqDto.json
rawRecordsDto: !include raml-storage/schemas/dto/rawRecordsDto.json
jobProfile: !include raml-storage/schemas/common/profileInfo.json
fileExtension: !include raml-storage/schemas/mod-data-import/fileExtension.json
fileExtensionCollection: !include raml-storage/schemas/mod-data-import/fileExtensionCollection.json
dataTypeCollection: !include raml-storage/schemas/mod-data-import/dataTypeCollection.json
dataImportEventTypes: !include raml-storage/schemas/common/dataImportEventTypes.json
dataImportInitConfig: !include raml-storage/schemas/common/dataImportInitConfig.json
dataImportQueueItem: !include raml-storage/schemas/mod-data-import/dataImportQueueItem.json
dataImportQueueItemCollection: !include raml-storage/schemas/mod-data-import/dataImportQueueItemCollection.json
fileUploadInfo: !include raml-storage/schemas/mod-data-import/fileUploadInfo.json
fileDownloadInfo: !include raml-storage/schemas/mod-data-import/fileDownloadInfo.json
splitStatus: !include raml-storage/schemas/dto/splitStatus.json
assembleFileDto: !include raml-storage/schemas/dto/assembleFileDto.json
cancelResponse: !include raml-storage/schemas/mod-data-import/cancelResponse.json
traits:
validate: !include raml-storage/raml-util/traits/validation.raml
pageable: !include raml-storage/raml-util/traits/pageable.raml
searchable: !include raml-storage/raml-util/traits/searchable.raml
resourceTypes:
collection: !include raml-storage/raml-util/rtypes/collection.raml
collection-item: !include raml-storage/raml-util/rtypes/item-collection.raml
/data-import:
/uploadDefinitions:
displayName: Upload Definition
description: File Upload Definition API
type:
collection:
schemaCollection: definitionCollection
schemaItem: uploadDefinition
exampleCollection: !include raml-storage/examples/mod-data-import/uploadDefinitionCollection.sample
exampleItem: !include raml-storage/examples/mod-data-import/uploadDefinition.sample
post:
is: [validate]
get:
description: Get a list of definitions
is: [
searchable: {
description:
"with valid searchable fields: for example id=67dfac11-1caf-4470-9ad1-d533f6360bdd",
example:
"id=67dfac11-1caf-4470-9ad1-d533f6360bdd"
},
pageable,
validate
]
/{uploadDefinitionId}:
displayName: Upload Definition
description: Get, Delete or Update a specific Upload Definition
type:
collection-item:
schema: uploadDefinition
exampleItem: !include raml-storage/examples/mod-data-import/uploadDefinition.sample
put:
is: [validate]
responses:
200:
body:
application/json:
type: uploadDefinition
delete:
responses:
204:
/files:
post:
is: [validate]
body:
application/json:
type: fileDefinition
responses:
201:
body:
application/json:
type: uploadDefinition
400:
description: "Bad request"
body:
text/plain:
example: "Bad request"
422:
description: "Unprocessable Entity"
body:
application/json:
type: errors
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
/{fileId}:
delete:
description: Delete file by id
responses:
204:
404:
description: "File not found"
body:
text/plain:
example: "File not found"
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
post:
description: Upload file
body:
application/octet-stream:
responses:
200:
body:
application/json:
type: uploadDefinition
400:
description: "Bad request"
body:
text/plain:
example: "Bad request"
404:
description: "Not found"
body:
text/plain:
example: "Not found"
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
/assembleStorageFile:
post:
description: Assemble the large file uploaded to storage by the UI
is: [validate]
body:
application/json:
type: assembleFileDto
responses:
204:
400:
description: "Bad request"
body:
text/plain:
example: "Bad request"
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
/processFiles:
displayName: File processing service
description: File processing API
post:
description: Starts the file processing
is: [validate]
body:
application/json:
type: processFilesRqDto
responses:
204:
400:
description: "Bad request"
body:
text/plain:
example: "Bad request"
422:
description: "Unprocessable Entity"
body:
application/json:
type: errors
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
/jobExecutions/{jobExecutionId}:
/cancel:
displayName: Cancel a split Job
description: removes incomplete files from DI queue and marks the jobs cancelled
delete:
responses:
200:
body:
application/json:
type: cancelResponse
500:
body:
application/json:
type: string
/downloadUrl:
description: Get a presigned S3 download URL
get:
responses:
200:
body:
application/json:
type: fileDownloadInfo
404:
description: "Job execution not found"
body:
text/plain:
example: "Job execution not found"
/fileExtensions:
displayName: File Extension
description: API for managing file extensions
type:
collection:
schemaCollection: fileExtensionCollection
schemaItem: fileExtension
exampleCollection: !include raml-storage/examples/mod-data-import/fileExtensionCollection.sample
exampleItem: !include raml-storage/examples/mod-data-import/fileExtension.sample
get:
is: [
searchable: {
description:
"with valid searchable fields: for example importBlocked=true",
example:
"importBlocked=true"
},
pageable,
validate
]
post:
is: [validate]
/{id}:
displayName: File Extension
description: Get, Delete or Update a specific File Extension
type:
collection-item:
schema: fileExtension
exampleItem: !include raml-storage/examples/mod-data-import/fileExtension.sample
put:
is: [validate]
responses:
200:
body:
application/json:
type: fileExtension
delete:
responses:
204:
/restore:
/default:
post:
description: Restore fileExtension settings to default
responses:
200:
body:
application/json:
type: fileExtensionCollection
400:
description: "Bad request"
body:
text/plain:
example: "Bad request"
422:
description: "Unprocessable Entity"
body:
application/json:
type: errors
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
/dataTypes:
get:
description: Get a list of data types
responses:
200:
body:
application/json:
type: dataTypeCollection
400:
description: "Bad request"
body:
text/plain:
example: "Bad request"
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
/splitStatus:
get:
description: Get the server configuration of file splitting
queryParameters:
responses:
200:
body:
application/json:
type: splitStatus
400:
description: "Bad request"
body:
text/plain:
example: "Bad request"
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
/uploadUrl:
get:
description: Get a presigned upload url for the first part of a file
queryParameters:
fileName:
description: "The name of the file that will be uploaded"
required: true
responses:
200:
body:
application/json:
type: fileUploadInfo
400:
description: "Bad request"
body:
text/plain:
example: "Bad request"
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
/uploadUrl/subsequent:
get:
description: Get a presigned upload url for later parts of a file
queryParameters:
key:
description: "The key that will be uploaded to on S3"
required: true
uploadId:
description: "The upload ID"
required: true
partNumber:
description: "The part number, postitive integers beginning at two (part 1 is uploaded with /uploadUrl)"
required: true
type: integer
minimum: 2
responses:
200:
body:
application/json:
type: fileUploadInfo
400:
description: "Bad request"
body:
text/plain:
example: "Bad request"
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"