Supported file types
With the Ingestion API, you can upload the following types of files:| Data type | Extension | Acquisition format | Annotation formats |
|---|---|---|---|
| Sensor | .json, .cbor | JSON CBOR | labels, structured labels |
| Sensor | .csv | CSV | labels, structured labels |
| Sensor | .parquet | Parquet | labels, structured labels |
| Audio | .wav | - | labels, structured labels |
| Image | .jpg, .png | - | labels, object detection |
| Video* | .mp4, .avi | - | labels |
| Labels | .labels | - | labels, structured labels, object detection |
Endpoints
Files endpoint
These are the endpoints available for the Ingestion API:POST /api/training/files- for adding data samples to the training setPOST /api/validation/files- for adding data samples to the validation setPOST /api/testing/files- for adding data samples to the test setPOST /api/post-processing/files- for adding data samples to the post-processing setPOST /api/split/files- for adding samples automatically split across the training, validation, and test sets
- The maximum number of files you can upload in a single request is 1000
- The maximum size of a single file is 100 MB
- The validation endpoint is only available if the explicit validation set advanced setting is enabled in your project
- The split endpoint splits the files into training, validation, and test sets based on the split percentages defined in your project
- If you have the ‘Live classification’ page open in your browser while uploading to the testing endpoint, the file will automatically be classified against the current impulse.
api/training/files endpoint is the following:
Data endpoint (legacy)
Because thefiles endpoints expect Content-Type to be multipart/form-data, there are also available legacy endpoints that require simpler requests:
POST /api/training/dataPOST /api/testing/dataPOST /api/anomaly/data
api/training/data endpoint is the following:
Header Parameters
x-api-key- API Key (required).x-label- Label (optional). If this header is not provided a label is automatically inferred from the filename through the following regex:^[a-zA-Z0-9\s-_]+- For example: idle.01 will yield the label idle. If you don’t want to assign the label nor derive it from the file name, provide anx-no-labelheader with the value1.x-disallow-duplicates- When set, the server checks the hash of the message against your current dataset (optional). We’d recommend setting this header but haven’t enabled it by default for backward compatibility.x-add-date-id: 1 - to add a date ID to the filename. For example: if you upload with filename test.wav the file name will be test - set this option and we’ll add a unique ID to the end (this is what we use on the daemon to create unique names).x-metadata- JSON-encoded string of key/value pairs to attach as metadata to the uploaded sample(s) (optional). For example:{"site":"Paris","source":"field-trial-2"}. Metadata can be used to control train/validation splits, drive data pipeline synchronisation, and slice model performance by attribute.Content-type- format of data used. Can beapplication/cbor,application/json, ormultipart/form-data.
Responses
All responses are sent with content typetext/plain. The following response codes may be returned:
200- Stored the file, file name is in the body.400- Invalid message, e.g. fields are missing, or are invalid. See body for more information.401- Missingx-api-keyheader, or invalid API key.421- Missing header, see body for more information.500- Internal server error, see body for more information.