-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmod-linked-data-import.yaml
More file actions
165 lines (159 loc) · 4.58 KB
/
Copy pathmod-linked-data-import.yaml
File metadata and controls
165 lines (159 loc) · 4.58 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
openapi: 3.0.0
info:
title: Linked Data Import API
version: v1
description: Linked Data Import API
paths:
/linked-data-import/files:
post:
operationId: uploadFile
tags:
- upload
description: Uploads a local file into tenant-specific folder in configured S3 bucket
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required:
- file
properties:
file:
type: string
format: binary
responses:
'200':
description: Uploaded file name in S3
content:
text/plain:
schema:
type: string
'400':
description: Invalid upload request
'500':
description: Internal Server Error
/linked-data-import/start:
post:
operationId: startImport
tags:
- import, start
description: Starts the process of Linked Data Import and returns ID of Import Job Instance
parameters:
- name: fileName
in: query
required: true
description: The name of a file to be imported from S3. Should be located in Tenant's folder
schema:
type: string
- name: contentType
in: query
required: false
description: Content type of the file to be imported (e.g., application/ld+json, text/turtle). JSON by default.
schema:
type: string
- name: defaultWorkType
in: query
required: false
description: Default Work extra type - MONOGRAPH or SERIAL
schema:
$ref: defaultWorkType.json
responses:
'200':
description: ID of Linked Data Import job instance started
content:
text/plain:
schema:
type: string
'404':
description: No file is found in S3
'500':
description: Internal Server Error
/linked-data-import/jobs/{jobExecutionId}:
get:
operationId: getJobInfo
tags:
- import, job
description: Returns information about Import Job by ID
parameters:
- name: jobExecutionId
in: path
required: true
description: The ID of the Import Job Execution
schema:
type: integer
format: int64
responses:
'200':
description: Import Job information
content:
application/json:
schema:
$ref: '#/components/schemas/jobInfo'
'404':
description: Job not found
'500':
description: Internal Server Error
/linked-data-import/jobs/{jobExecutionId}/failed-lines:
get:
operationId: getFailedLines
tags:
- import, job
description: Downloads CSV file with failed RDF lines for the specified job
parameters:
- name: jobExecutionId
in: path
required: true
description: The ID of the Import Job Execution
schema:
type: integer
format: int64
responses:
'200':
description: CSV file with failed RDF lines
headers:
Content-Disposition:
description: Attachment header for file download
schema:
type: string
example: 'attachment; filename="failed-lines.csv"'
content:
text/csv:
schema:
type: string
format: binary
'404':
description: Job not found
'500':
description: Internal Server Error
/linked-data-import/jobs/{jobExecutionId}/stop:
put:
operationId: stopJob
tags:
- import, job
description: Stops running Import Job by execution ID
parameters:
- name: jobExecutionId
in: path
required: true
description: The ID of the Import Job Execution
schema:
type: integer
format: int64
responses:
'200':
description: Job has been stopped successfully
'404':
description: Job is not found
'409':
description: Job cannot be stopped because it's not running
'500':
description: Internal Server Error
components:
schemas:
importOutputEventDto:
$ref: kafka/importOutputEvent.json
importResultEventDto:
$ref: kafka/result/importResultEvent.json
jobInfo:
$ref: jobInfo.json