-
Notifications
You must be signed in to change notification settings - Fork 1
/
adt_openapi_v1.json
272 lines (272 loc) · 10.5 KB
/
adt_openapi_v1.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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
{
"openapi": "3.0.0",
"info": {
"version": "1.0",
"title": "Automotive Data Transformer",
"description": "Unlock the potential of your MDF files by processing them with our new cloud-based microservice.",
"termsOfService": "https://www.bosch-engineering.com/de/terms-of-use-1.html",
"contact": {
"name": "Bosch Engineering GmbH",
"url": "https://www.bosch-engineering.com",
"email": "automotive-data-transformer@bosch.com"
}
},
"servers": [
{
"url": "https://api.automotive-data-transformer.com/v1"
}
],
"paths": {
"/": {
"post": {
"tags": [
"mdf"
],
"summary": "Parse MDF File",
"description": "The first and fastest cloud-based MDF converter. Meta data extraction and conversion of all relevant automotive measurement file formats, to enable cloud-based analytics, simulation and ML.",
"operationId": "post-adtv1",
"requestBody": {
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"allOf": [
{
"$ref": "#/components/schemas/ParserOptions"
},
{
"$ref": "#/components/schemas/ParserS3Options"
}
]
}
]
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/LambdaResponseObject"
},
"500": {
"description": "Internal Server Error"
}
},
"security": [
{
"ID Token": []
}
],
"servers": [
{
"url": "https://api.automotive-data-transformer.com/v1"
}
]
}
}
},
"tags": [
{
"name": "mdf"
}
],
"components": {
"securitySchemes": {
"ID Token": {
"type": "apiKey",
"description": "ID Token for using the API",
"name": "Authorization",
"in": "header"
}
},
"responses": {
"ChannelList": {
"description": "The response from the metadata query, which only returns the channel list.",
"content": {
"application/json": {
"schema": {
"type": "array",
"description": "The response from the metadata query, which only returns the channel list.",
"items": {
"type": "string"
},
"x-examples": {
"Example 1": [
"0:1:Signal_ABC",
"0:2:Signal_DEF",
"0:3:Signal_XYZ"
]
}
}
}
}
},
"LambdaResponseObject": {
"description": "Response object from the lambda function. This will be deprecated. The new response format will be implemented.",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
},
"schemas": {
"ParserOptions": {
"type": "object",
"title": "ParserOptions",
"description": "The parser options define how you want to parse your MDF file. ",
"properties": {
"action": {
"enum": [
"channel_list",
"meta",
"meta_all",
"export"
],
"description": "`action` defines the operation mode of the mdf parser. The possible values of the `action` option are: \n* `channel_list`\n* `meta`\n* `meta_all`\n* `export`\n\n## More on the `action`\nThe MDF parser can do two things currently:\n\n1. metadata parsing\n2. signals parsing\n\n### Metadata parsing\n* use `channel_list` to only get the channel names.\n* use `meta` to get the most used metadata, not all the data.\n* use `meta_all` to get all metadata.\n\n### Signal parsing\n* use `export` to parse the signals.",
"default": "meta"
},
"format": {
"enum": [
"csv",
"parquet"
],
"description": "Define the wished output format. Available options are:\n* `csv`, write the extracted signal as CSV format in the target location\n* `parquet`, write the extracted signals as parquet format in the target location\n* `json`, write the extracted signals as JSON format in the target location",
"default": "parquet"
},
"signal": {
"type": "array",
"description": "You can extract one signal, multiple signals or all signals. With the `signal` option, you can define which signals you want to extract. `signal` is an array of the MDF channel names. You can get the channel names by using the `channel_list` action.\n\nIf you want to extract only one signal, just leave one item in the array. If you don't define this option, no signals will be extracted.\n\nMaximal array size of `signal` is 250. ",
"items": {
"type": "string",
"example": "signal1"
}
},
"return_type": {
"enum": [
"filepath",
"json"
],
"description": "This option controls the return type of the metadata parsing response. It has two options:\n\n* `filepath`\n* `json`\n\n `filepath` will return the path of the written output files in the response. \n \n `json` will return the content as JSON response without written to any files. The parameter `format` will be ignored.",
"default": "filepath"
},
"resample": {
"type": "integer",
"description": "With `resample` option, you can resample all the channels to the given sampling time in milliseconds. The handling of the missing values can be configured with `integer_interpolation` and `float_interpolation` options.\n\nIf `resample` option is set, the `signal` option will be ignored, since all the signals will be resampled to the specified sampling time."
},
"integer_interpolation": {
"enum": [
0,
1,
2
],
"description": "Interpolation method for the integer channels.\n\n0: repeat the previous sample.\n1: use the linear interpolation.\n2: hybrid interpolation. ",
"default": 0
},
"float_interpolation": {
"enum": [
0,
1
],
"description": "Interplolation method for the float channels.\n\n0: repeat the previous sample\n1: use the linear interpolation",
"default": 1
},
"cut_start": {
"type": "number",
"description": "Start timestamp to cut the export signal. Start and stop limits are absolute values or values relative to the first timestamp depending on the whence argument.",
"format": "float"
},
"cut_end": {
"type": "number",
"description": "Stop timestamp to cut the export file.",
"format": "float"
},
"cut_whence": {
"enum": [
0,
1
],
"description": "How to search for the start and stop values.\n0: (default) absolute\n1: relative to first timestamp",
"default": 0
},
"compress": {
"type": "boolean",
"description": "Enables Snappy compression if parquet is exported. ",
"default": true
},
"export_all_signals": {
"type": "boolean",
"description": "Flag to export all signals. ",
"default": false
},
"spawn": {
"type": "boolean",
"description": "Default to `true` for using the concurrent parsing mechanism. Only Valid for 'action': 'export'. \n",
"default": true
}
},
"required": [
"action"
]
},
"ParserS3Options": {
"type": "object",
"title": "ParserS3Options",
"description": "Parse the MDF files in your S3 bucket.",
"properties": {
"filename": {
"type": "string",
"description": "The name of the MDF file. You can also include the prefixes."
},
"input_bucket": {
"type": "string",
"description": "The bucket name that contains your MDF file."
},
"output_bucket": {
"type": "string",
"description": "Define the output bucket to write the export. Without this option, the export will be saved into the `input_bucket` too."
},
"assume_role": {
"type": "string",
"description": "The Amazon Resource Name (ARN) of the role to assume."
},
"session_name": {
"type": "string",
"description": "An identifier for the assumed role session.\n\nUse the role session name to uniquely identify a session when the same role is assumed by different principals or for different reasons. In cross-account scenarios, the role session name is visible to, and can be logged by the account that owns the role. The role session name is also used in the ARN of the assumed role principal. This means that subsequent cross-account API requests that use the temporary security credentials will expose the role session name to the external account in their CloudTrail logs."
},
"output_path": {
"type": "string",
"description": "Define an output path for the results. "
},
"output_name_prefix": {
"type": "string",
"description": "Add an additional file prefix to the file_stem of the output file. It's useful if you want to export mulitple MDF files into one `output_path`."
},
"external_id": {
"type": "string",
"description": "An external ID for the cross account role access."
}
},
"required": [
"filename",
"input_bucket",
"assume_role",
"session_name"
],
"x-examples": {
"Use S3 credentials with MDF Parser": {
"filename": "example_project_prefix/offroad.mf4",
"input_bucket": "example-project-bucket",
"output_bucket": "mdf-parser-output-bucket",
"aws_access_key_id": "s3_key_id",
"aws_access_key_secret": "s3_key_secret"
}
}
}
}
},
"x-internal": false
}