Add Files
Add a new file to an existing data item.
import requests, io
ORGANIZATION_ID = 1
DATA_ITEM_ID = 1000
API_KEY = 'ei_...'
r = requests.post(
'https://studio.edgeimpulse.com/v1/api/organizations/' + ORGANIZATION_ID + '/data/' + DATA_ITEM_ID + '/add',
headers={
'x-api-key': API_KEY
},
files=(
('files[]', ('hello.txt', open('/Users/janjongboom/Downloads/hello.txt', 'rb'), 'text/plain')),
)
)
print('returned', r, r.content)
Last updated
Was this helpful?