Add New Data

Add a new data item. You can add a maximum of 10000 files directly through this API. Use `addOrganizationDataFile` to add additional files.

This API requires multipart form data to be posted. This is how you call the API in a variety of languages:

import requests
ORGANIZATION_ID = 1
API_KEY = 'ei_...'
r = requests.post(
    'https://studio.edgeimpulse.com/v1/api/organizations/' + ORGANIZATION_ID + '/data/add',
    headers={
        'x-api-key': API_KEY
    },
    files=(
        ('name', (None, 'data item name')),
        ('dataset', (None, 'dataset')),
        ('metadata', (None, '{\"key\":\"value\"}')),
        ('bucketName', (None, 'Internal datasets')),
        ('files[]', ('hello.txt', open('/Users/janjongboom/Downloads/hello.txt', 'rb'), 'text/plain')),
        ('files[]', ('world.png', open('/Users/janjongboom/Downloads/world.png', 'rb'), 'image/png')),
    )
)
print('request returned', r, r.content)

Last updated

Was this helpful?