Data Operation

UploadData

Upload data to a dataset
Users upload data to a dataset
    1.
    Acquire data upload credentials
    2.
    Transfer data directly to S3
    3.
    Put callback

GetPolicy

Acquire upload credentials
Request path
GET /v1/datasets/{id}/policies
Request parameter
Path
Name
Descriptions
Value
id
Yes
Dataset ID
Query
Name
Type
Descriptions
Value
draftNumber
int
Yes
Draft number
segmentName
string
No
Dataset segmentation
expired
int
No
The token expiration time measured in seconds cannot be negative. The default is 60 seconds and any time greater than 300 seconds will be treated as 300
Request instance
1
curl --location --request GET '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/policies?expired=60&draftNumber=1' \
2
--header 'x-token: {your_accesskey}'\
3
--header 'Content-Type: application/json'
Copied!
Output
1
# Response status
2
HttpStatus 200
3
# Response result
4
{
5
"result": {
6
"policy": "eyJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJmYXQtZGF0YXBsYXRmb3JtLXZlcnNpb24ifSxbInN0YXJ0cy13aXRoIiwiJGtleSIsIjNhZTBiYzI5M2Q3N2FiYjQwODZhMzc5ZjAyNjkwNmNlL2YwODk3NDUwLWNlZjEtNGQ3Zi05NDI3LWNiZGRhZjcxYzc1YS8iXSxbInN0YXJ0cy13aXRoIiwiJHN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyIsIiJdLFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiIl0seyJ4LWFtei1jcmVkZW50aWFsIjoiQUtJQVFIVFdDQTNKTTZESTdVQ0YvMjAyMTAzMjQvdXMtd2VzdC0xL3MzL2F3czRfcmVxdWVzdCJ9LHsieC1hbXotYWxnb3JpdGhtIjoiQVdTNC1ITUFDLVNIQTI1NiJ9LHsieC1hbXotZGF0ZSI6IjIwMjEwMzI0VDA1NDIwMFoifV0sImV4cGlyYXRpb24iOiIyMDIxLTAzLTI0VDA1OjQ0OjAwWiJ9",
7
"success_action_status": "200",
8
"x-amz-algorithm": "AWS4-HMAC-SHA256",
9
"x-amz-credential": "AKIAQHTWCA3JM6DI7UCF/20210324/us-west-1/s3/aws4_request",
10
"x-amz-date": "20210324T054200Z",
11
"x-amz-signature": "8dbc309fa36caad5791907c385632e74a47362ca6f1517b748e150f1306851a0"
12
},
13
"extra": {
14
"backendType": "s3",
15
"host": "https://dataplatform-version.s3.us-west-1.amazonaws.com",
16
},
17
"expireAt": 1616564580
18
}
Copied!

Front-end direct transmission based on the acquired credentials

The obtained result can be deserialized directly and transferred directly to S3. extra host is the access address
Request path
POST The value of "host" within the "extra" array from the output above
Request parameter
body
Name
Type
Required
Descriptions
x-amz-credential
string
Yes
Consistent with the returned x-amz-credential of the previously obtained credentials
success_action_status
string
Yes
Consistent with the return value success_action_status of the previously obtained credentials
x-amz-algorithm
string
Yes
Consistent with the returned x-amz-algorithm of the previously obtained credentials
x-amz-signature
string
Yes
Consistent with the return value x-amz-signature of the previously obtained credentials
policy
string
Yes
Consistent with the returned policy of the previously obtained credentials
x-amz-date
string
Yes
Consistent with the return value x-amz-date of the previously obtained credentials
key
string
Yes
Calculate the checksum of a file with SHA-1 cryptographic hash
file
file
Yes
File
Request instance
1
curl --location --request POST 'https://dataplatform-version.s3.us-west-1.amazonaws.com/' \
2
--form 'x-amz-credential=AKIAQHTWCA3JM6DI7UCF/20210323/us-west-1/s3/aws4_request' \
3
--form 'x-amz-algorithm=AWS4-HMAC-SHA256' \
4
--form 'x-amz-date=20210323T120601Z' \
5
--form 'x-amz-signature=42d7455003455a76796d67087b6a314b6c28445a14b80c9145029aeaa0091ec4' \
6
--form 'policy=eyJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJmYXQtZGF0YXBsYXRmb3JtLXZlcnNpb24ifSxbInN0YXJ0cy13aXRoIiwiJGtleSIsIjNhZTBiYzI5M2Q3N2FiYjQwODZhMzc5ZjAyNjkwNmNlL2YwODk3NDUwLWNlZjEtNGQ3Zi05NDI3LWNiZGRhZjcxYzc1YS8iXSxbInN0YXJ0cy13aXRoIiwiJHN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyIsIiJdLFsic3RhcnRzLXdpdGgiLCIkQ29udGVudC1UeXBlIiwiIl0seyJ4LWFtei1jcmVkZW50aWFsIjoiQUtJQVFIVFdDQTNKTTZESTdVQ0YvMjAyMTAzMjMvdXMtd2VzdC0xL3MzL2F3czRfcmVxdWVzdCJ9LHsieC1hbXotYWxnb3JpdGhtIjoiQVdTNC1ITUFDLVNIQTI1NiJ9LHsieC1hbXotZGF0ZSI6IjIwMjEwMzIzVDEyMDYwMVoifV0sImV4cGlyYXRpb24iOiIyMDIxLTAzLTIzVDEyOjA4OjAxWiJ9' \
7
--form 'success_action_status=200' \
8
--form 'key=b9676b075dff6d3333bbebb7cdd154f3631bb926' \
9
--form '[email protected]/{localFile}'
Copied!
Output
1
# Response status
2
HttpStatus 204
3
# Response result
4
{}
Copied!

PutCallback

Upload complete callback
Request path
PUT /v1/datasets/{id}/callback
Request parameter
Path
Name
Descriptions
Value
id
Yes
Dataset ID
body
Name
Type
Required
Descriptions
draftNumber
int
Yes
Draft number
checksum
string
Yes
The checksum of an uploaded file. Calculate the checksum of a file with SHA-1 cryptographic hash
remotePath
string
Yes
The remote file path, such as a.jpg
segmentName
string
Yes
Segment name
sensorName
string
No
Must be passed for the upload of fusion data; sensor name
frameId
string
No
Must be provided for the upload of fusion data. The frameID should be in the format of ulid. Please refer to https://github.com/oklog/ulid
timestamp
float
No
Not required to be provided for Fusion data upload
label
map
No
For the annotation labels of the file, please refer to uploadLabel
Request instance
1
curl --location --request PUT '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/callback' \
2
--header 'x-token: {your_accesskey}'\
3
--header 'Content-Type: application/json'\
4
--data-raw '{
5
"draftNumber": "1",
6
"checksum": "b9676b075dff6d3333bbebb7cdd154f3631bb926",
7
"remotePath": "car1.jpg",
8
"frameId": "01D78XYFJ1PRM1WPBCBT3VHMNV",
9
"segmentName": "car",
10
"sensorName": "camera_car",
11
"timestamp": 1532402934
12
}'
Copied!
Output
1
# Response status
2
HttpStatus 200
3
# Response result
4
{}
Copied!

MultiPutCallback

Batch callback
Request path
PUT /v1/datasets/{id}/multi/callback
Request parameter
Path
Name
Descriptions
Value
id
Yes
Dataset ID
body
Name
Type
Required
Descriptions
draftNumber
int
Yes
Draft number
segmentName
string
Yes
Segment name
objects
[]object
Yes
The batch callback objects
├─checksum
string
Yes
The checksum of an uploaded file. Calculate the checksum of a file with SHA-1 cryptographic hash
├─remotePath
string
Yes
The remote file path, such as a.jpg
├─sensorName
string
No
Must be passed for the upload of fusion data; sensor name
├─frameId
string
No
Must be provided for the upload of fusion data. The frameID should be in the format of ulid. Please refer to https://github.com/oklog/ulid
├─timestamp
float
No
Not required to be provided for Fusion data upload
├─label
map
No
For the annotation labels of the file, please refer to uploadLabel
Request instance
1
curl --location --request PUT '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/callback' \
2
--header 'x-token: {your_accesskey}'\
3
--header 'Content-Type: application/json'\
4
--data-raw '{
5
"draftNumber": "1",
6
"segmentName": "car",
7
"objects": [
8
{
9
"remotePath": "car1.jpg",
10
"checksum": "b9676b075dff6d3333bbebb7cdd154f3631bb926",
11
"frameId": "01D78XYFJ1PRM1WPBCBT3VHMNV",
12
"sensorName": "camera_car",
13
"timestamp": 1532402934,
14
"label":{}
15
}
16
]
17
}'
Copied!
Output
1
# Response status
2
HttpStatus 200
3
# Response result
4
{}
Copied!

createSegment

Create a segment
POST /v1/datasets/{id}/segments
Request parameter
Path
Name
Descriptions
Value
id
Yes
Dataset ID
Body
Name
Type
Required
Descriptions
draftNumber
int
Yes
Draft number
name
string
Yes
Segment name. This cannot be null and should not include ".",""
description
string
No
Segment description
Request instance
1
curl --location --request POST '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/segments'\
2
--header 'x-token: {your_accesskey}'\
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"draftNumber":1,
6
"name": "graviti",
7
"description": "this is a segment"
8
}'
Copied!
Output
1
# Response status
2
HttpStatus 201
3
# Response result
4
{}
Copied!

DeleteSegment

Delete segment
DELETE /v1/datasets/{id}/segments
Path
Name
Descriptions
Value
id
Yes
Dataset ID
Body
Name
Type
Required
Descriptions
draftNumber
int
Yes
Draft number
segmentName
string
Yes
segmentName
Request instance
1
curl --location --request DELETE '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/segments' \
2
--header 'x-token: {your_accesskey}'\
3
--data-raw '{
4
"draftNumber":1,
5
"segmentName": "car",
6
}'
Copied!
Output
1
# Response status
2
HttpStatus 200
3
# Response result
4
{}
Copied!

ListSegment

Acquire dataset segment
GET /v1/datasets/{id}/segments
Request parameter
Path
Name
Descriptions
Value
id
Yes
Dataset ID
Query
Name
Type
Required
Descriptions
draftNumber
int
No
Draft number. Only one of draft and commit should exist, but they should not exist at the same time
commit
string
No
Commit ID, commit tag, or branch name
limit
int
No
The default is set to 128. The maximum value for a single time is 128
offset
int
No
The default is 0
sortBy
string
No
Currently sorting is based or created_at and updated_at while entering other content will return InvalidParamsValue.
orderBy
string
No
The default is desc (descending order). The valid content is asc (ascending order) and desc
Request instance
1
curl --location --request GET '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/segments?commit=v1.0&offset=0&limit=2'\
2
--header 'x-token: {your_accesskey}'\
3
--header 'Content-Type: application/json'
Copied!
Output
Normal dataset
1
# Response status
2
HttpStatus 200
3
{
4
"segments": [
5
{
6
"name": "car",
7
"description": "this is car"
8
},
9
{
10
"name": "graviti",
11
"description": "this is a segment"
12
}
13
],
14
"offset": 0,
15
"recordSize": 2,
16
"totalCount": 10
17
}
Copied!

UploadLabelCatalog

Upload the labelCatalog
PUT /v1/datasets/{id}/labels/catalogs
Request parameter
Path
Name
Descriptions
Value
id
Yes
Dataset ID
Body
Name
Type
Required
Descriptions
draftNumber
int
Yes
Draft number
catalog
map
yes
Annotation Type. key: CLASSIFICATION: annotation classification BOX2D: 2D box annotation BOX3D: 3D box annotation POLYGON2D: 2D polygon annotation POLYLINE2D: 2D polyline annotation KEYPOINTS2D: 2D keypoints annotation CUBOID2D: 2D cuboid annotation SENTENCE: audio transcription annotation For the annotation type above, each one of them has its own structure. You can refer to the request instances for detailed information. Please follow the format of the input value for each annotation type
├─description
string
false
Descriptions
├─categoryDelimiter
string
false
The delimiter used to separate the parent-child relationship of category. The default is not to support the parent-child relationship. The recommended delimiter is "."
├─categories
object[]
false
Item type: object and category list, which includes all category information
├─isTracking
bool
No
Tracking or not
├─name
string
yes
Category name
├─description
string
No
Category description
├─attributes
object[]
No
Item type. It includes attribute-related information
├─name
string
Yes
Attribute name
├─type
string/string[]
false
attribute type:string, boolean, integer, number, array, null,such as"interger", ["integer", "null"]
├─minimum
float
No
The minimum value of the attribute. When the attribute is numerical, this field defines the minimum value (closed interval)
├─maximum
float
No
The maximum value of the attribute. When the attribute is numerical, this field defines the maximum value (closed interval)
├─description
string
No
Attribute description
├─enum
string[]
No
The options of the value of an attribute. This represents all the possible options this attribute may have.
├─parentCategories
string[]
No
Relational categories represent the categories to which the attribute belongs to. If it is empty, then this is a global attribute
├─items
object[]
No
Item type that defines multiple attributes. (When the "type" field is "array", it indicates multiple attributes)
├─type
string/string[]
No
type of an attribute value with multiple options:string, boolean, integer, number, array, null,such as "interger", ["integer", "null"]
├─minimum
float
No
The minimum value (closed interval) of the attribute value with multiple options
├─maximum
float
No
The maximum value (closed interval) of the multiple attribute
├─enum
string[]
No
The enumeration of the value of an attribute with multiple options. This represents all the possible options this attribute may have.
Request instance
1
curl --location --request PUT '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/labels/catalogs'\
2
--header 'x-token: {your_accesskey}'\
3
--header 'Content-Type: application/json'\
4
--data-raw '{
5
"draftNumber": 1,
6
"BOX2D": {
7
"attributes": [
8
{
9
"description": "attribute 'traffic_light_color' is a multiple choice attribute",
10
"items": {
11
"enum": [
12
"unknown",
13
"red",
14
"yellow",
15
"green"
16
]
17
},
18
"name": "traffic_light_color",
19
"parentCategories": [
20
"traffic_light"
21
],
22
"type": "array"
23
},
24
{
25
"description": "attribute 'visibility' is a float value between 0 to 1",
26
"maximum": 1,
27
"minimum": 0,
28
"name": "visibility",
29
"type": "number"
30
},
31
{
32
"description": "this is color",
33
"enum": [
34
"red",
35
"blue",
36
"green"
37
],
38
"name": "color",
39
"parentCategories": [
40
"car"
41
],
42
"type": "string"
43
}
44
],
45
"categories": [
46
{
47
"description": "this is a car",
48
"name": "car"
49
}
50
],
51
"categoryDelimiter": ".",
52
"description": "this is a description of label catalog",
53
"isTracking": false
54
},
55
"BOX3D": {
56
"attributes": [
57
{
58
"description": "attribute 'traffic_light_color' is a multiple choice attribute",
59
"items": {
60
"enum": [
61
"unknown",
62
"red",
63
"yellow",
64
"green"
65
]
66
},
67
"name": "traffic_light_color",
68
"parentCategories": [
69
"traffic_light"
70
],
71
"type": "array"
72
},
73
{
74
"description": "attribute 'visibility' is a float value between 0 to 1",
75
"maximum": 1,
76
"minimum": 0,
77
"name": "visibility",
78
"type": "number"
79
},
80
{
81
"description": "this is color",
82
"enum": [
83
"red",
84
"blue",
85
"green"
86
],
87
"name": "color",
88
"parentCategories": [
89
"car"
90
],
91
"type": "string"
92
}
93
],
94
"categories": [
95
{
96
"description": "this is a car",
97
"name": "car"
98
}
99
],
100
"categoryDelimiter": ".",
101
"description": "this is a description of label catalog",
102
"isTracking": false
103
},
104
"CLASSIFICATION": {
105
"attributes": [
106
{
107
"description": "attribute 'traffic_light_color' is a multiple choice attribute",
108
"items": {
109
"enum": [
110
"unknown",
111
"red",
112
"yellow",
113
"green"
114
]
115
},
116
"name": "traffic_light_color",
117
"parentCategories": [
118
"traffic_light"
119
],
120
"type": "array"
121
},
122
{
123
"description": "attribute 'visibility' is a float value between 0 to 1",
124
"maximum": 1,
125
"minimum": 0,
126
"name": "visibility",
127
"type": "number"
128
},
129
{
130
"description": "this is color",
131
"enum": [
132
"red",
133
"blue",
134
"green"
135
],
136
"name": "color",
137
"parentCategories": [
138
"car"
139
],
140
"type": "string"
141
}
142
],
143
"categories": [
144
{
145
"description": "this is a car",
146
"name": "car"
147
}
148
],
149
"categoryDelimiter": ".",
150
"description": "this is a description of label catalog"
151
},
152
"CUBOID2D": {
153
"attributes": [
154
{
155
"description": "attribute 'traffic_light_color' is a multiple choice attribute",
156
"items": {
157
"enum": [
158
"unknown",
159
"red",
160
"yellow",
161
"green"
162
]
163
},
164
"name": "traffic_light_color",
165
"parentCategories": [
166
"traffic_light"
167
],
168
"type": "array"
169
},
170
{
171
"description": "attribute 'visibility' is a float value between 0 to 1",
172
"maximum": 1,
173
"minimum": 0,
174
"name": "visibility",
175
"type": "number"
176
},
177
{
178
"description": "this is color",
179
"enum": [
180
"red",
181
"blue",
182
"green"
183
],
184
"name": "color",
185
"parentCategories": [
186
"car"
187
],
188
"type": "string"
189
}
190
],
191
"categories": [
192
{
193
"description": "this is a car",
194
"name": "car"
195
}
196
],
197
"categoryDelimiter": ".",
198
"description": "this is a description of label catalog",
199
"isTracking": false
200
},
201
"KEYPOINTS2D": {
202
"attributes": [
203
{
204
"description": "attribute 'traffic_light_color' is a multiple choice attribute",
205
"items": {
206
"enum": [
207
"unknown",
208
"red",
209
"yellow",
210
"green"
211
]
212
},
213
"name": "traffic_light_color",
214
"parentCategories": [
215
"traffic_light"
216
],
217
"type": "array"
218
},
219
{
220
"description": "attribute 'visibility' is a float value between 0 to 1",
221
"maximum": 1,
222
"minimum": 0,
223
"name": "visibility",
224
"type": "number"
225
},
226
{
227
"description": "this is color",
228
"enum": [
229
"red",
230
"blue",
231
"green"
232
],
233
"name": "color",
234
"parentCategories": [
235
"car"
236
],
237
"type": "string"
238
}
239
],
240
"categories": [
241
{
242
"description": "this is a car",
243
"name": "car"
244
}
245
],
246
"categoryDelimiter": ".",
247
"description": "this is a description of label catalog",
248
"isTracking": false,
249
"keypoints": [
250
{
251
"description": "this is key point",
252
"names": [
253
"ear",
254
"leg",
255
"mouse"
256
],
257
"number": 3,
258
"parentCategories": [],
259
"skeleton": [
260
[
261
0,
262
1
263
],
264
[
265
1,
266
2
267
]
268
],
269
"visible": "1"
270
}
271
]
272
},
273
"POLYGON2D": {
274
"attributes": [
275
{
276
"description": "attribute 'traffic_light_color' is a multiple choice attribute",
277
"items": {
278
"enum": [
279
"unknown",
280
"red",
281
"yellow",
282
"green"
283
]
284
},
285
"name": "traffic_light_color",
286
"parentCategories": [
287
"traffic_light"
288
],
289
"type": "array"
290
},
291
{
292
"description": "attribute 'visibility' is a float value between 0 to 1",
293
"maximum": 1,
294
"minimum": 0,
295
"name": "visibility",
296
"type": "number"
297
},
298
{
299
"description": "this is color",
300
"enum": [
301
"red",
302
"blue",
303
"green"
304
],
305
"name": "color",
306
"parentCategories": [
307
"car"
308
],
309
"type": "string"
310
}
311
],
312
"categories": [
313
{
314
"description": "this is a car",
315
"name": "car"
316
}
317
],
318
"categoryDelimiter": ".",
319
"description": "this is a description of label catalog",
320
"isTracking": false
321
},
322
"POLYLINE2D": {
323
"attributes": [
324
{
325
"description": "attribute 'traffic_light_color' is a multiple choice attribute",
326
"items": {
327
"enum": [
328
"unknown",
329
"red",
330
"yellow",
331
"green"
332
]
333
},
334
"name": "traffic_light_color",
335
"parentCategories": [
336
"traffic_light"
337
],
338
"type": "array"
339
},
340
{
341
"description": "attribute 'visibility' is a float value between 0 to 1",
342
"maximum": 1,
343
"minimum": 0,
344
"name": "visibility",
345
"type": "number"
346
},
347
{
348
"description": "this is color",
349
"enum": [
350
"red",
351
"blue",
352
"green"
353
],
354
"name": "color",
355
"parentCategories": [
356
"car"
357
],
358
"type": "string"
359
}
360
],
361
"categories": [
362
{
363
"description": "this is a car",
364
"name": "car"
365
}
366
],
367
"categoryDelimiter": ".",
368
"description": "this is a description of label catalog",
369
"isTracking": false
370
},
371
"SENTENCE": {
372
"attributes": [
373
{
374
"description": "this is a description of attribute",
375
"enum": [
376
"red",
377
"blue",
378
"green"
379
],
380
"items": {
381
"enum": [
382
"red",
383
"blue",
384
"green"
385
],
386
"maximum": 10,
387
"minimum": 0,
388
"type": {}
389
},
390
"maximum": 10,
391
"minimum": 0,
392
"name": "color",
393
"parentCategories": [],
394
"type": {}
395
}
396
],
397
"description": "this is a description of label catalog",
398
"isSample": false,
399
"lexicon": "[[\"啊\", \"aa\", \"a1\"], [\"阿婆\": \"aa\", \"a1\", \"p\", \"o2\"], [\"爱\", \"aa\", \"ai4\"], [\"爱祖国\",\"aa\", \"ai4\", \"z\", \"u3\", \"g\", \"uo2\"]]",
400
"sampleRate": 32
401
}
402
}'
Copied!
Output
1
HttpStatus 200
2
{}
Copied!

GetLabelCatalog

Acquire dataset label
GET /v1/datasets/{id}/labels/catalogs
Request parameter
Path
Name
Descriptions
Value
id
Yes
Dataset ID
Query
Name
Type
Required
Descriptions
draftNumber
int
No
Draft number. Only one of draft and commit should exist, but they should not exist at the same time
commit
string
false
Commit ID, commit tag, or branch name
Request instance
1
curl --location --request GET '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/labels/catalogs?commit=v1.0'\
2
--header 'x-token: {your_accesskey}'\
3
--header 'Content-Type: application/json'
Copied!
Output
1
# Response status
2
HttpStatus 200
3
# Response result
4
{
5
"catalog": {
6
"BOX2D": {
7
"attributes": [
8
{
9
"name": "color"
10
}
11
],
12
"categories": [
13
{
14
"description": "hello",
15
"name": "car"
16
}
17
]
18
}
19
}
20
}
Copied!

UploadSensor

Upload sensor
POST /v1/datasets/{id}/sensors
Path
Name
Descriptions
Value
id
Yes
Dataset ID
Body
Name
Type
Required
Descriptions
draftNumber
int
Draft number
segmentName
string
Yes
Segment Name
name
string
Yes
Sensor name
type
string
Yes
Sensor type
description
string
No
Descriptions
extrinsics
object
No
The extrinsics of sensor
├─rotation
object
No
Rotation matrix
├─w
float
Yes
w
├─x
float
Yes
x
├─y
float
Yes
y
├─z
float
Yes
z
├─translation
object
No
Translation matrix
├─x
float
Yes
x
├─y
float
Yes
y
├─z
float
Yes
z
intrinsics
object
No
The intrinsics of sensor (required only for camera-like devices)
├─cameraMatrix
object
No
├─cx
float
Yes
├─cy
float
Yes
cy
├─fx
float
Yes
fx
├─fy
float
Yes
fy
├─skew
float
No
skew
├─distortionCoefficients
object
No
Distortion coefficients (p1, p2, k1, k2, k3, k4, k5, k6 and so on. The more coefficients are provided, the more accurate the calculation) ├─p1|float|No|p1 ├─p2|float|No|p2 ├─k1|float|No|k1 ├─k2|float|No|k2 ├─k3|float|No|k3
Request instance
1
curl --location --request POST '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/sensors' \
2
--header 'x-token: {your_accesskey}'\
3
--data-raw '{
4
"description": "This is a example camera sensor",
5
"extrinsics": {
6
"rotation": {
7
"w": 0.6924185592174665,
8
"x": -0.7031619420114925,
9
"y": -0.11648342771943819,
10
"z": 0.11203317912370753
11
},
12
"translation": {
13
"x": 1.03569100218,
14
"y": 0.484795032713,
15
"z": 1.59097014818
16
}
17
},
18
"intrinsics": {
19
"cameraMatrix": {
20
"cx": 1256.7414812095406,
21
"cy": 492.7757465151356,
22
"fx": 1256.7414812095406,
23
"fy": 792.1125740759628,
24
"skew": 122.7757465151356
25
},
26
"distortionCoefficients": {
27
"k1": 0.12,
28
"k2": 0.33,
29
"k3": 0.13,
30
"k4": 0.93,
31
"k5": 0.23,
32
"p1": 1,
33
"p2": 0.3
34
}
35
},
36
"name": "camera_01",
37
"segmentName": "car",
38
"type": "CAMERA"
39
}'
Copied!

DeleteSensor

Delete sensor
DELETE /v1/datasets/{id}/sensors
Path
Name
Descriptions
Value
id
Yes
Dataset ID
Body
Name
Type
Required
Descriptions
draftNumber
int
Yes
Draft number
segmentName
string
Yes
Segment name
sensorName
string
Yes
Sensor name
Request instance
1
curl --location --request DELETE '{service}/v1/datasets/154e35bae8954f09969ef8c9445efd2c/sensors' \
2
--header 'x-token: {your_accesskey}'\
3
--data-raw '{
4
"draftNumber": 1,
5
"segmentName": "car",
6
"name": "sensor1",
7
}'
Copied!
Output
1
# Response status
2
HttpStatus 200
3
# Response result
4
{}
Copied!

ListSensor

Acquire the sensor
GET /v1/datasets/{id}/sensors