I am looking to use the Ingestion Service data
endpoint (not the files
endpoint) with the Python requests.post()
.
Is there example code in Python using the api/training/data
endpoint?
How would one modify the following to use attachments[]?
res = requests.post(url='https://ingestion.edgeimpulse.com/api/training/data',
data='mark.jpg',
headers={
'x-api-key': 'ei_...',
'x-file-name': 'mark.jpg',
'x-label': 'mark', })
An alternate solution might be if someone could help convert the cURL syntax:
-F attachments[]="@metadata.json;type=application/json" \
-F attachments[]="@mark.jpg;type=image/jpeg"
into an argument compatible with the Python requests.post()
?