-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.sdk.json
254 lines (254 loc) · 7.13 KB
/
swagger.sdk.json
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
{
"basePath": "/",
"paths": {
"/integration/0.1/ingestion/": {"post": {
"summary": "Upload a file",
"produces": ["application/json;charset=UTF-8"],
"description": "Upload an input image. Classification will not be started yet.",
"operationId": "uploadInputFile",
"responses": {
"200": {
"schema": {"$ref": "#/definitions/DocumentPayload"},
"description": "file uploaded. A document payload response will be returned in the body."
},
"400": {
"schema": {"$ref": "#/definitions/ErrorResponse"},
"description": "The document could not be stored/processed"
}
},
"parameters": [{
"in": "formData",
"name": "stream",
"description": "The document data to be ingested",
"type": "file",
"required": true
}],
"tags": [
"All",
"Ingestion"
],
"consumes": ["multipart/form-data"]
}},
"/integration/0.1/ingestion/{documentId}": {"get": {
"summary": "Get the status of the given document id",
"produces": ["application/json;charset=UTF-8"],
"operationId": "getDocumentStatus",
"responses": {"200": {
"schema": {"$ref": "#/definitions/IngestionResponse"},
"description": "OK"
}},
"parameters": [{
"in": "path",
"name": "documentId",
"description": "documentId",
"type": "string",
"required": true
}],
"tags": [
"All",
"Ingestion"
],
"consumes": ["application/json"]
}},
"/integration/0.1/ingestion/{channelName}": {"put": {
"summary": "Push document to the ingestion queue",
"produces": ["application/json;charset=UTF-8"],
"operationId": "receiveDocument",
"responses": {"200": {
"schema": {"$ref": "#/definitions/IngestionResponse"},
"description": "Document ingested"
}},
"parameters": [
{
"in": "path",
"name": "channelName",
"description": "channelName",
"type": "string",
"required": true
},
{
"in": "query",
"name": "documentType",
"description": "documentType",
"type": "string",
"required": false
},
{
"schema": {"$ref": "#/definitions/DocumentPayload"},
"in": "body",
"name": "documentPayload",
"description": "documentPayload",
"required": true
}
],
"tags": [
"All",
"Ingestion"
],
"consumes": ["application/json;charset=UTF-8"]
}}
},
"host": "gw.api.cloud.sphereon.com",
"schemes": ["https"],
"securityDefinitions": {"oauth2schema": {
"tokenUrl": "https://gw.api.cloud.sphereon.com/token",
"scopes": {"global": "accessEverything"},
"type": "oauth2",
"flow": "application"
}},
"definitions": {
"Error": {
"description": "An error",
"type": "object",
"required": [
"code",
"level",
"message"
],
"properties": {
"code": {"type": "string"},
"level": {
"type": "string",
"enum": [
"INFO",
"WARNING",
"FATAL"
]
},
"cause": {"$ref": "#/definitions/Error"},
"message": {"type": "string"}
}
},
"IngestionResponse": {
"description": "The response from the ingestion controller.",
"type": "object",
"required": ["deliveryStatus"],
"properties": {
"requestTime": {
"format": "date-time",
"description": "The request date/time for this document in ISO 8601 format",
"readOnly": true,
"type": "string"
},
"deliveryTime": {
"format": "date-time",
"description": "The delivery date/time of this job in ISO 8601 format",
"readOnly": true,
"type": "string"
},
"documentId": {"type": "string"},
"deliveryStatus": {
"description": "The deliveryStatus of the document",
"readOnly": true,
"type": "string",
"enum": [
"CREATED",
"QUEUED",
"ON_HOLD",
"PROCESSING",
"DELIVERED",
"ERROR"
]
},
"statusMessage": {
"description": "A delivery status message, which can be informational, warning or error. A message here does not indicate an error per se",
"readOnly": true,
"type": "string"
}
}
},
"StreamLocation": {
"description": "Location record of data stream",
"type": "object",
"properties": {
"folderPath": {"type": "string"},
"originalFileName": {"type": "string"},
"fileName": {"type": "string"},
"id": {
"readOnly": true,
"type": "string"
},
"containerId": {"type": "string"}
}
},
"DocumentDetails": {
"description": "A structure containing details about the document name, size, data or data location etc.",
"type": "object",
"required": ["streamLocation"],
"properties": {
"fileName": {
"description": "The original file name",
"type": "string"
},
"streamLocation": {
"description": "The storage location of the binary stream",
"$ref": "#/definitions/StreamLocation"
},
"fileSize": {
"format": "int64",
"description": "The file size / stream length",
"type": "integer"
},
"contentType": {
"description": "The content type of the document",
"type": "string"
}
}
},
"DocumentPayload": {
"description": "A document payload containing file info and meta data.",
"type": "object",
"properties": {
"documentDetails": {
"description": "A structure containing details about the document name, size, data or data location etc.",
"$ref": "#/definitions/DocumentDetails"
},
"metaDataPayloadType": {
"description": "The markup type of the meta data payload",
"type": "string",
"enum": [
"JSON",
"XML"
]
},
"metaDataPayload": {
"description": "The meta data payload",
"type": "string"
}
}
},
"ErrorResponse": {
"description": "The error response",
"type": "object",
"properties": {"errors": {
"type": "array",
"items": {"$ref": "#/definitions/Error"}
}}
}
},
"swagger": "2.0",
"info": {
"license": {
"name": "Apache License Version 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0"
},
"contact": {
"name": "Sphereon DevOps Team",
"url": "https://sphereon.com",
"email": "[email protected]"
},
"termsOfService": "https://sphereon.com",
"title": "Enterprise Integration API",
"version": "0.1"
},
"tags": [
{
"name": "All",
"description": "All API's"
},
{
"name": "Ingestion",
"description": "Ingestion API"
}
]
}